Related Products Looper

Hi there,

I followed the steps in this thread to attempt to make a Related Products looper on this product layout, but I’m running into two problems:

  1. No matter where I add the query string on the page (separate section, row, column, etc) it is changing the primary product that is being displayed to a different product. I assume this is a conflict of some kind, but I can’t figure out where it’s occurring outside of knowing that it happens when I add the secondary looper/query string.

  2. Though I am able to summon a 4-column product view along the bottom, they are not the products from the given category and are simply random (as far as I can tell).

Can you assist me with this? I’m also happy to build this a different way.

Thank you!

Hey @Nuera,

Yes, we’d be happy to help.

We need to ensure first that no 3rd party code and/or plugin is conflicting with the query so please first confirm that you tried using the parent theme and deactivated all 3rd party plugins and the looper output is still the same.

Please then give us the following information in a Secure Note so we could check your exact setup.

  • WordPress Login URL
  • Admin username and password

You can find the Secure Note button at the bottom of your posts.

Thanks.

Hey Christian,

To answer the first part of your question - this is a heavily customized page and our team has put a ton of custom code into it. So yes, it could very well be a conflict, but we are not in a position to remove all of that code or deactivate the plugins as we have other pieces of development going on in the site that require all of that to stay live at this time. If that is a deal-breaker then I understand.

I’ve added our credentials as requested, but will request that you please do not touch any of the other code on this page.

Thank you for your assistance.

Hi @Nuera,

It will be very difficult to understand problem number 1 you are having without any proper screenshot or description of what exactly happening at your end.
In the second problem, I have thoroughly investigated and found an extra {{dc:terms:slug}}), within the Query String, this might be due to the copy and paste from the reference thread. I went ahead and removed it. I have also added another column and hide using the Hide During the Breakpoint option after implementing the Looper into it. Please make that visible for all the devices to view. Please find the details below.

  1. Duplicated the Column 1
  2. Added a Div with Looper Consumer.
  3. Added the Products with Looper Provider inside the Div.

Screenshot-491-

In the first Looper Provider the {{dc:term:slug}} is not getting the slug as it is not within the Looper Consumer so it doesn’t know what {{dc:term:slug}} means because there’s no term available yet. While adding the Div with Looper Consumer the {{dc:term:slug}} is available within the Query String, and that is why it starts showing the product that is related to the term of current product you are showing.

Hope it helps.
Thanks

Thank you guys, but this is turning into more of a project than we were after.

I appreciate all of your help.

Glad that we could be of help

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.