VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Jason dsg on June 17, 2016, 18:40:53 PM

Title: cart help
Post by: Jason dsg on June 17, 2016, 18:40:53 PM
can someone tell me how to remove the cart form the category page all i want it the pic and be able to click it to go to the product info page. i have tried but have no luck thanks in advance www.dsgcentral.com
Title: Re: cart help
Post by: jenkinhill on June 17, 2016, 20:19:41 PM
Make a copy of components/com_virtuemart/sublayouts/products.php and edit the file to exclude the elements you do not need. Rename this file. eg as catproducts.php and upload it as a sublayouts override file. Then edit components/com_virtuemart/views/category/tmpl/default.php to call that new sublayout intead of the default products.php. Upload that file as a template override.

http://docs.virtuemart.net/tutorials/templating-layouts.html
Title: Re: cart help
Post by: jenkinhill on June 17, 2016, 23:47:05 PM
You need to use the sublayout override only for the category - that's why it is renamed and that renamed file is called from the category defult.php  The productdetails templates and sublayouts should work as normal.
Title: Re: cart help
Post by: jenkinhill on June 18, 2016, 18:46:50 PM
There is a limit to how much free help we can provide here.  If you really need help with this then you should commission a developer.
Title: Re: cart help
Post by: GJC Web Design on June 20, 2016, 01:25:16 AM
just call your renamed products.php (without the add to cart) by

e.g. newproducts.php

echo shopFunctionsF::renderVmSubLayout('newproducts',array('products'=>$products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));