free related products in prestashop 1.7.4 - show product from the same category

Dear Developer,
I have been trying to get the default module ”productscategory” to work with Prestashop 1.7.4 but I have not succeeded. So I tried your relatedfree module and it does its job. However I am looking to populate the products pages with about 4 products from its id_category_default in ps_product (instead of as in your module, make it a selection for each product.) So my question is, can I modify your module for this purpose?
For example: either change the module so that it only does just that or modify the behavior so that when the setting is not chosen instead of the ”No products message” the module chooses every products id_category_default
Best regards 

Show product from the same category in PrestaShop 1.7.4

Hello
You can change the code of the module to make it work as you expect. To make it work as you expect you will need to alter main module .php file.
It will be required to create $product object instance (currently viewed product) and change
Configuration::get('related_nb' . Tools::getValue('id_product') to $product->id_category_default

If you will be interested, extended version of module named: "related products pro" has this feature

best regards,
milos
Share on Google Plus

About VEKIA

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment