• Resolved michalrama

    (@michalrama)


    Hello,

    When I view the product, the related products are displayed below.

    Unfortunately, no more than 3 products (even if the products in the category are more), which are randomly selected. (after a page update, a random selection is always displayed)

    It’s possible to change it to show all products in the same category.

    I did not find anything in the settings.

    Please advise.

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter michalrama

    (@michalrama)

    Hello,

    In Settings, in the Products tab, the switch is on Related products. But nothing more.

    Would it be possible to increase the number of related products?

    Thank you

    The code would be add_filter('jigoshop/frontend/page/product/render/related_products_count',function(){return x;}); in your theme’s functions.php
    The related products are from the same category or from the same tag – if either of the aforementioned are assigned to the product.

    Thread Starter michalrama

    (@michalrama)

    Hello,

    Yesm thank you.

    Just in the file src/Jigoshop/Frontend/Page/Product.php

    ...applyFilters('jigoshop/frontend/page/product/render/related_products_count', number);

    change the number.

    Nevertheless, I would be very grateful if it was possible, in settings, not only to change the display of related products but also to influence their number (by entering a number or all of the category).

    Thank you.

    Never do the above. Changes in the plugin’s files are not update-safe and as such they will disappear after each and every update of the plugin. Add the line add_filter('jigoshop/frontend/page/product/render/related_products_count',function(){return x;});, where x is the number of products you want to display, to your theme’s functions.php.

    Thread Starter michalrama

    (@michalrama)

    Yes. It works.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Number of related products displayed’ is closed to new replies.