Change Hikashop layout and behaviour per category

  • Posts: 30
  • Thank you received: 0
10 years 10 months ago #178643

I have a site with Hikashop that sells courses and physical items. I want to customize Courses a bit by adding a 'Starting Date' custom field and change 'Add to cart' button to 'Book it Now!'

My first tought was to create a copy of current template, apply it to one product listing category page and use Views to customize the output in the copied template but I'd like to know if there were a simpler way to achieve it.

Thanks in advance

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

  • Posts: 13201
  • Thank you received: 2322
10 years 10 months ago #178650

Hi,

In the category edition page in backend, you can select the layout to use for the product detail page.
So select different layout for the different categories, for example show_default for the virtual products and show_reversed for the other ones, or create a new view file in your template folder.

Then you will indeed have to edit the views to have the desired layout.

The following user(s) said Thank You: zaratustra27

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

  • Posts: 30
  • Thank you received: 0
10 years 10 months ago #178843

I set the category parameter as instructed, but products keep displaying default layout. The hardest part is solved at least, and I can override the layout manually one product at a time but I'd like to enforce different layouts per category as it were supposed to be.

Anyway, as said before, your advice solved the hardest part. Thank you!

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 10 months ago #178868

Hi,

The product page layout can be set in the global configuration, overridden per category and per product.
Because a product can be in several categories, you have to check that your product layout is not set several time.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.073 seconds
Powered by Kunena Forum