Displaying Related Products by Catergory

  • Posts: 214
  • Thank you received: 1
10 years 10 months ago #138962

Hi Guys,

Just to explain my problem, the website I'm working on is going to be used for selling beer and I've now been asked to now add Related Products to all of the product pages.

Now the thing is, beers are probably going to be related because of their ABV, which I've already got set up as a category, so my question is can I have Hikashop display related products based on a catergory?

For example, I have a beer called Neck Oil which is 4.3% so I've created a catergory called AVB Range and assigned it to a sub category called 4 - 4.4% (mainly so it can be searched for here www.craftkeg.com/index.php/hikashop-menu...ting/product/listing ) and what I would want to see on Neck Oil's product page are only products related to that category (aka beers with similar ABV).

I've attached a print screen of my Related products module (renamed Similar products) for help. I know I can add Related products to each product in the Edit Product page but that would be very difficult to maintain!



Regards,

Matthew

Attachments:
Last edit: 10 years 10 months ago by matps.

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

  • Posts: 82909
  • Thank you received: 13379
  • MODERATOR
10 years 10 months ago #138967

Hi,

If you have several categories for your products, that won't work because the related products module will display the products which are in the same categories of your product, and not only for one specific category.
A solution would be to create a hikashop plugin implementing the onBeforeProductListingLoad trigger to add a condition on the query to filter the products yourself instead of having it done with the "content on product page" option of the module. That's however not easy to do and will require a developer to do that for you if you're not one yourself.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum