News:

Looking for documentation? Take a look on our wiki

Main Menu

Disable "add to cart" for specific categories

Started by ILCILA, February 05, 2013, 14:30:53 PM

Previous topic - Next topic

ILCILA

Hello everyone!

I am working on a shop for an electronics company, they have 2 groups who are going to visit the website

- Home owners
-- Category 1
-- Category 2
- Professionals
-- Category 1
-- Category 2
-- Category 3
-- Category 4

the home owners can order their products direct. But the professionals may not order, they online need a catalogue function.

How can I disable the "add-to-cart" function in the product (sub-)catagories for the Professionals?

Great thanks,

Gerben

jenkinhill

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

ILCILA

Quote from: jenkinhill on February 05, 2013, 17:44:35 PM
http://forum.virtuemart.net/index.php?topic=112416.msg378054#msg378054
First of all, thanks!

Now the following step --> I know I can select a template per catagorie, so the simple step is to make a template overide and select this overide...

But how to create this?

ILCILA

Found it!


  • Copy "default.php" in / components/com_virtuemart/views/productdetails/tmpl
  • Rename it to "whateveryouwant.php" and disable the 'add to cart' option on line 204 by adding "//" in front of line
  • In adminpanel, select the override in the productdetails

All the credits go to jenkinhill!