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
