News:

Looking for documentation? Take a look on our wiki

Main Menu

Remove products on subcat view

Started by mrsjprice, June 13, 2014, 01:53:54 AM

Previous topic - Next topic

mrsjprice

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?

jenkinhill

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
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

mrsjprice

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.

mrsjprice

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.

GJC Web Design

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

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

mrsjprice

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?

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation