News:

Support the VirtueMart project and become a member

Main Menu

Add to cart button in category layout

Started by designthewebs, May 07, 2012, 19:26:35 PM

Previous topic - Next topic

designthewebs

Hello guys, I am new here on the forum and have been using Virtumar 1.x for quite a long while now, as I'm new to 2.x I have a question about this version.
Is there a possibility to put an add to cart button in the category view were al the products in one category are listed, so that de customer doesn't have to go to the product page in order to add this product to the basket?

Thanks in advance.

JtouchMobile.com

Don't know if there already has a solution for this or not, but you can get it by making a template override
(Understanding  about VIEW in VM 2: http://forum.virtuemart.net/index.php?topic=90935.0)

- First, find the code to control "categories" layout here:
/components/com_virtuemart/views/categories/tmpl/default.php

- Then, read code of generate add to cart control, in product details view:
/com_virtuemart/views/productdetails/tmpl/default.php
and
/com_virtuemart/views/productdetails/tmpl/default_addtocart.php

Then you can easy bring the add to cart function to categories view.

I know that this is a hand-by-hand guide, but I hope that it will give you a point to do a research and then apply it for your own purpose

;)
Author of Jtouch - Mobile solution for Joomla & VirtueMart
http://www.jtouchmobile.com