I'm building a custom component that I would like to have an e-shop area, with some products. I don't think it's a good idea to create an e-shop mechanic from scratch because I worry about security issues.

I'm thinking of installing Virtuemart or another e-shop and try to insert it inside the component, although I don't know if it is really possible.

Has anyone tried something like that before? And if it is possible, what e-shop do you recommend?

closed as too broad by FFrewin, fruppel, Farahmand, Lodder, TryHarder Nov 13 '15 at 6:20


  • What exactly you have in mind? What your component is going to do at its own and why it needs to have an e-shop area? What elements/parts/features of the other e-shop component you think to use? In the backend, what your component will do in its e-shop area, and how this is going to be different from what Virtuemart is doing? And, If your solution is going to require VirtueMart to be installed, why don't just leave the e-shop part to VirtueMart? – FFrewin Nov 10 '15 at 8:50
  • It gonna be a complex crm for a driving school. The products will be services( buying the driving license) . From VirtueMart i want the buy button, the cart and the payments , excluding completly the shipping form.But all theese things must be inside my component.Virtuemart is executed at com_virtuemart , is there anyway to include a component inside another component? – IseNgaRt Nov 10 '15 at 11:00
  • well, things aren't going to be easy - with this... without wanting to offend you... what you are describing is a bit messy from the idea-ground, or at least not explained well in your question. Of course you can "borrow" code and you can call other classes. But why not integrating your component to virtuemart or other with a plugin? At the other hand, there is not necessary to use shipping when using e-shop extensions. Generally there can be too many things you could do, depending on what you are building, but it's hard to say. Do more research and better planning with your features. – FFrewin Nov 10 '15 at 11:11

Why use a complex component like Virtuemart if you're not actually going to use most of it? Virtuemart (and similar extensions) process the payments through a payment system like PayPal, Stripe, Google Wallet, Amazon etc using an API. Just communicate directly with the API from your component.

Many of these systems includes a shopping cart that can be easily integrated with your website:

PayPal is a popular option, supporting both payments from other PayPal accounts, and direct payments using credit card. A shopping cart can also be set up if you want your customers to be able to add several products and pay everything at once. Security is handled by PayPal.

Another option I suggest you take a look at is SnipCart. It's very easy to use, and all you have to do is include their javascript file, and you can turn any element into a buy button like this:

<button type="button" class="snipcart-add-item"
  Add to cart

There are many other options, but these are the ones I've used myself.

The major advantage of this approach is that you add all the code inside your component, without requiring the user to install (and configure) a third party component for your system to work.

  • 2
    I can help if you have any questions related to Snipcart! I am one of Snipcart's founders. – Charles Ouellet Nov 11 '15 at 14:59
