• arturs4

    (@arturs4)


    HellO!

    I noticed that in product page I get the same related products again and again, and again.

    I have 170 different products in category “office desks”, but the related products always shows the same 5 products (of 170!) over and over again. Sometimes some of products are different, but even those substitutes repeats, so total product count that I can see on related products is maybe 8 (of 170!).

    I disabled all plugins, I removed all custom code, but it’s still working wrong.

    Why is this happening? Can you offer a solution?

    Regards,
    Arturs

Viewing 2 replies - 1 through 2 (of 2 total)
  • Its some time since I read up on this but one of the developers did a blog on the issue. What he was saying is that to get a truly random set of related products incured a performance degredation on page load, so the dev team deliberately decided not to randomise them. The thinking was that most customers would not notice and that it would not affect sales.

    There are some code examples around that will intercept and modify the database query for the relevant related products and produce some truly random ones. This is a snippet I found somewhere:
    https://pastebin.com/mPdhkSNq

    Increase the value for ‘pool size’ to your taste. The snippet is for an older version of WooCommerce and I have not tested it with the current version. Some PHP skills and effort may be needed to get it working. You’ll need to check that, in your case, the page load time is not affected beyond what you consider reasonable.

    Thread Starter arturs4

    (@arturs4)

    I tried your code, but unfortunately I couldn’t make it to work.

    If this problem is made on purpose, then I suppose I wont receive a solution here, at least not from Woo developers. I’ll try to search for a plugin who can do this then. Thanks for the info, lorro!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Related products not randomizing’ is closed to new replies.