I'm creating my own shopping cart component and I can't choose what way of storing products and categories would be the best. There are the following few options:

1. A fully independent component with its own table for products and separate table for categories (as Virtuemart does)

2. A component with its own table for products but with binding them to Joomla Categories

3. A component using Joomla Categories and Joomla Articles as products (as J2Store does, see the link about benefits)

4. A fully independent component with one common table for products and categories and another table for relations between them (as I described by the link)

Perhaps there is some else way. What way would be the best from the standpoints of simplicity in developing and integrating, speed of working especially if there will be thousands of products etc. Please explain.

Thanks in advance

1 Answer 1


Any of these alternatives is perfectly valid. Thus, the final choice have to be guided by your personal preferences.

Disclaimer: I have been extensively working integrating Joomla extensions for AutoTweet and Joocial (we have recently topped up 60 extensions)

From my experience with AdsManager, DJ-Classifieds, HikaShop, IProperty, JomEstate, JoomShopping, MijoShop, VirtueMart and ZOO Apps:

  1. Most of them implement their own tables for Products and Categories. In this way, there is no restriction to design your own model.
  2. Joomla Categories is a quick way to have a hierarchical structure. If your requirements are simple, it is better to go for this option. (+ multi-language support).
  3. Joomla Articles has many options, but it is not so obvious how to reuse it for a shopping cart. In addition, it is not designed for this task and it can change at any time. Even though, you have an example of shopping cart integration and also FlexiContent is built on top of com_content.
  4. For a first successful experience, I prefer a table for each object. If the object is complex, you can add a params field (json-encoded) or child tables.

At the end, you have to implement the choice nearer to your knowledge. There are advanced options like Doctrine ORM, but they require previous knowledge adding complexitity (besides the changellenge of the shopping cart itself).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.