Assign one product to multiple category that different template layout

  • Posts: 79
  • Thank you received: 0
7 years 5 months ago #282857

-- HikaShop version -- : HikaShop Business 3.0.1
-- Joomla version -- : 3.8.2

Hi, I am trying created one product and assign that product to 2 category that having different template layout

Category A (Normal Layout that Have Add to cart Button)
asiamart.com.my/furniture/product/1112-t...ture-do-not-purchase

Category B (Catalog Layout that Dont Have Add to Cart Button)
asiamart.com.my/furniture-list/product/1...ture-do-not-purchase

However once i assign this product to both category, template layout on category b is override even i view this product from category a.

How can i solve this issue so that it will show the specific template style that i assign on category when i view the product from that category.

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

  • Posts: 83779
  • Thank you received: 13567
  • MODERATOR
7 years 5 months ago #282861

Hi,

There is no such system. Regardless from where you reach the product page, HikaShop picks the "main category" of the product and then use the layout of that template, always.
That way, you can add several categories to a product and be sure that it's always the same layout that will be used.
So it's actually normal that it works like that and was made on purpose to be like that.
If you want to change that behavior, you'll have to edit the file "show" of the view "product" via the menu Display>Views.
There you can change the $this->productlayout value based on $this->categories and your custom needs.

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

Time to create page: 0.043 seconds
Powered by Kunena Forum