0

My theme is using this product loop to show chosen products on the home page. However, the results are acting weird - some products seem to cause it to stop before getting all products, hence only showing around 13 products instead of the desired 16 ones. When trying to load more, it loads some of the same products again.

I have tried contacting my theme developer, but they won't acknowledge the error, since they cant recreate it.

Code on pastebin

Life demo of the error - see featured products just below the banner on the frontpage

8
  • Did you try any debugging to pinpoint the error? It's quite some code and having the actual error or some idea where or for what to look would help Commented Sep 28, 2015 at 10:01
  • I have tried changing settings back and forth, trying to pinpoint what causes the error, but I haven't found an answer. Originally I thought it was some specific products that caused it, but upon investigating this doesn't seem to be the case, since it seems to stop at the same product number (currently 14) no matter which product this or the next is. Any debugging suggestions are warmly welcome :-) Commented Sep 28, 2015 at 10:09
  • My guess is that it's to do with the random functions in your code. When the next page is reached, the 16 products are randomised again, and it doesn't save what appeared already, so repeats some
    – MW Millar
    Commented Sep 28, 2015 at 10:24
  • This is a solution I found worked when I wanted to randomise a product listing across pages: magento.stackexchange.com/a/16982/17221
    – MW Millar
    Commented Sep 28, 2015 at 10:24
  • Thanks for your suggestion. Do you have an idea why it doesn't load the correct number of products in the first place? That is my primary problem, but someone changed my title to not address it.. Commented Sep 28, 2015 at 10:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.