Combined listing app odd behavior

Short description of issue

Issue with the option_value.product_url

Reproduction steps

Hello,

We’ve got a report from a Plus merchant using the Combined listing app, that breaks all our themes. We’ve tested on Dawn where it is also broken, but works on Horizon, that seems to use a different approach.

However, during this debugging, we’ve found a behavior that we consider being a bug of the app, and that is the reason it is causing this issue.

This merchant has a rather unusual use of the app, where all the combinations are a unique product, but where second level options don’t map to any options across the first level options.

It is a bit hard to understand, so please watch at the screenshot showing their hierarchy. In a nutshell, their first-level options are: Paar and Set, but no second-level options overlap. All the weights for the Paar options are not applicable to Set, and vice-versa.

Their combined listing parent product has the URL /products/4h-gripper-plates.

When reaching this product, the first combination, Paar - 10kg is selected.

Additional info

However, when iterating through options in Liquid, when reaching Set, I anticipated the {{ option_value.product_url }} to give a link to the actual first product for Set, that is to say the URL for Set / 75kg, so that the button can directly deep-link to this specific variant.

However, this is not what is happening. The Set option value product_url field will actually loop back to the parent product, which does not make sense and makes it way harder to work for complex combined listings.

The doc also does not reflect this behavior (Liquid objects: product_option_value), as it says: “Returns a URL if the option value may be associated with another product, nil otherwise.”

The emphasize on “another” product here. Which is not happening here as it redirects back to itself.

Dawn is not working, but Horizon seems to workaround the problem by doing an extra call to the section rendering API using option_values.

What type of topic is this

Bug report

Upload screenshot(s) of issue

1 Like

I could not finish my explanations due to the text size limit so I continue here.

The solution that Horizon is doing to workaround this issue is that it does a call to the section rendering API on the combination Set / 10kg. But from a user experience point of view this is pretty bad, because the user will have to do another click on the weight to actually find the good variant.

If Shopify would properly return the correct product_url for the option, the code could be simplified and would not require an extra click from buyers.

Hey @bakura10 - thanks for flagging as always! I’m taking a look into this, will loop back with you once I have more info.

1 Like