News:

Support the VirtueMart project and become a member

Main Menu

Disable Selected Categories in Front Page View

Started by mcw1225, March 03, 2016, 16:14:24 PM

Previous topic - Next topic

mcw1225

Using: Joomla! 3.4.8 Stable
VirtueMart 3.0.12

Is it possible to disable SELECTED virtuemart categories on the Joomla front page when using the category layout?
However I still need ALL categories to be on display in the virtuemart store view.

Basically I only want my key categories on display on the home/front page.

Many thanks,
Mat

jenkinhill

I did something like that a couple of years ago. The site front page was built as a Joomla article rather than a VM page, with the few required categories coded on the page. The normal VirtueMart homepage was used through a "Store" menu link.
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

GJC Web Design

or over ride components\com_virtuemart\sublayouts\categories.php and drop them out of the loop if they don't match a $allowed_cats array u create

might mess up row counts etc


$allowed_cats = array(1,3,6,7);
foreach ( $categories as $category ) {

    if(!inarray($category->virtuemart_category_id,$allowed_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

jenkinhill

Quote from: GJC Web Design on March 03, 2016, 17:06:58 PM
might mess up row counts etc

It did for me every way I tried, which is why I hand coded the page.
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