VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: mrsjprice on June 13, 2014, 01:53:54 AM

Title: Remove products on subcat view
Post by: mrsjprice on June 13, 2014, 01:53:54 AM
I have categories and then I have subcategories.

When clicking through the top level category to view the sub categories. Under the sub categories all my products are displayed for those categories.

How can I remove the products from this page, so that you have to click through to the sub category to view any product?
Title: Re: Remove products on subcat view
Post by: jenkinhill on June 13, 2014, 10:42:19 AM
You should do this with template overrides, but without more information I don't know if you already use overrides. Please see http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: Remove products on subcat view
Post by: mrsjprice on June 14, 2014, 12:52:09 PM
Hi I'm using joomla 2.5.18 and VM 2.6.6

PHP Version    5.3.27

I'm not familiar with VM template overrides, I suppose I'll google. I can't provide a live URL as it's currently closed to guests.
Title: Re: Remove products on subcat view
Post by: mrsjprice on June 14, 2014, 12:53:31 PM
Is it just the standard joomla template override system to be used? If so I know how to use that. Do you know which file it is I need to edit to remove products on the sub category view?

Please.
Title: Re: Remove products on subcat view
Post by: GJC Web Design on June 14, 2014, 14:00:01 PM
switch off any SEF and it will be obvious - it is std Joomla template over rides

index.php?option=com_virtuemart&view=category&virtuemart_category_id=1

components/com_virtuemart/views/category/tmpl/default.php

Title: Re: Remove products on subcat view
Post by: mrsjprice on June 15, 2014, 12:08:06 PM
I've had a go at this but I can't figure out how to remove the products only on the page with subcategories.

If I remove the block of code from the file you've mentioned above it removes the products from displaying on the page with the subcategories but it also removes it from within product listing page in the subcategory?
Title: Re: Remove products on subcat view
Post by: GJC Web Design on June 15, 2014, 12:42:00 PM
Yes - you need to know some coding... it is the same template for top cats or sub cats - so either you code up some selective mechanisim to do different things if in a sub cat or not or have different templates for top cats and sub cats.

You can set individual templates for any or all cats