Quit add to cart button WITHOUT activating catalogue option

  • Posts: 2
  • Thank you received: 0
4 years 9 months ago #309082

-- HikaShop version -- : 4.2

HOW can I quit the add to cart button without activating catalogue option?

The option to disable it is in general options for products, and even in the menu (showing a categorie of products) options... but the button is still there.
I want one menu option WITHOUT add to cart, and one menu option with add to cart button in products.

What I am doing wrong? there is a third place where the button needs to be disabled?

Please Log in or Create an account to join the conversation.

  • Posts: 81566
  • Thank you received: 13075
  • MODERATOR
4 years 9 months ago #309090

Hi,

There is no option to disable the add to cart buttons on the product details page.
There is only an option to disable the add to cart buttons on the listings (in the menu item settings or the module settings ), and the setting in the configuration is just the value for when you select "inherit" in these menu item/module settings.
So I'm afraid that you can do it with just the options available. You'll have to modify a bit the code with a view override.
Since you can already control the add to cart button display for the listing, you just need to edit the view file product / quantity.php via the menu Display>Views to control the display of the add to cart button on the product page.
You'll find there this line:

$catalogue_mode = $this->config->get('catalogue', false) || !$this->params->get('add_to_cart', 1);
You can modify it to change the $catalogue_mode variable based on the current menu item.

The following user(s) said Thank You: smart web

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum