0

My theme is using this product loop to show chosen products on the home page. However, the results are acting really weird - some products seems 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 aknowledge the error, since they cant recreate it.

Code on pastebin

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

  • 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 – Sander Mangel Sep 28 '15 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 :-) – user2806026 Sep 28 '15 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 – Michael Sep 28 '15 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 – Michael Sep 28 '15 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.. – user2806026 Sep 28 '15 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.