How to change product layout per a single category?

  • Posts: 224
  • Thank you received: 8
5 years 4 months ago #301294

Hello,
I want to eliminate all "add to cart" buttons for the products of a certain category, that should be displaied more like a catalogue, how to do that?.
In the category settings I see that one can choose a "Layout on product page", but the dropdown only shows the cart custom template I already have in place and nothing else (a part from the default layouts available).



So is there another way to do this?
The ideal solution would be to eliminate the add to cart and whishlist buttons both for the product list and the single product page for products inserted in a certain category.

Thank you

Attachments:

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

  • Posts: 81504
  • Thank you received: 13063
  • MODERATOR
5 years 4 months ago #301311

Hi,

If you don't set a price for these products and have the "display add to cart button for free products" setting turned off, then the add to cart buttons won't display on both the listings and the product pages for all these products.
Now if you want the price filled in the products of that category but no add to cart buttons there is no option. You would have to first create a custom product field to be able to select yes/no for each product to display the add to cart or not, and then, have some view override for the view file displaying the button on the different pages (the exact view file can vary based on your settings so the best is to use the "display view files" setting of the HikaShop configuration to find out which view file is used where on the frontend) which would check the custom product field value and turn off the add to cart display. It's just a few lines of code.
Any PHP developer should be able to do that for you for cheap.

The following user(s) said Thank You: oloccina

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

Time to create page: 0.066 seconds
Powered by Kunena Forum