Horizon theme bug - variant code appends in url

Short description of issue

When you hover over or click a product, it automatically appears ?variant= even if the product has no variant

Reproduction steps

Basically it applies to all where you can click to a product.

You can see the ?variant= with a random number appended when you hover over a product or click it.

If you manually enter the url, it doesn’t redirect to a link with variant slug.

Additional info

I also checked previous versions of the theme, same issue (currently v2.1.5)

This behavior doesn’t happen on Dawn theme.

What type of topic is this

Bug report

I’m also having this issue. Did you find a solution to it?

Hi,

Unfortunately no. I have tried testing older versions, creating a new Shopify account from scratch and test it with initial installation but it still is there.

Hey folks,

Thanks for flagging - digging into this on my side!

@Mag - is this behaviour breaking functionality for you? It’s likely this is an intended feature.

Hi Liam,

Technically, this doesn’t break anything, as we all know.

However, it’s also clear that this isn’t the intended behavior—if it were, removing the slug should cause an issue, but it doesn’t.

Here’s what happens:

  • When you click a product from any page (e.g., the products page or the featured products section on the home page), it loads with the variant slug in the URL:
    https://domain.com/product/product-name?variant=55554694840706

  • If you remove the slug and visit the link directly, it still works:
    https://domain.com/product/product-name

So the variant slug isn’t actually functionally necessary.

For example, in the Dawn theme, this behavior never occurs.

Overall, it feels like something the designer overlooked, and it doesn’t look quite right.

Thank you,

Yes, agreed with Mag. If you could fix this that would be a a huge help. From a client and SEO perspective, it’s not a good look to have messy URLs when a product has no variants. I know Horizon is a newer theme and sounds like it will be replacing Dawn overtime so it would make sense to have this resolved. Thank you for the quick reply!

Hi @Liam-Shopify Just following up to see if this issue can be resolved. It seems like it should be a fairly easy fix!

I am literally waiting for this to be solved to make my site live.

I wasn’t expecting such flaw from a theme which supposely replace Dawn.

I came accross another discussion about slugs. You may want to follow it.

Yes, I am in the same boat. Thank you for sharing that other thread. I tried updating the product variant url to href=“{{ product.url }}” as suggested in the thread you provided. Unfortunately, this then creates an issue with the related products widget urls. It fixes one problem but then causes another… Not sure how this isn’t resolved by Shopify, seems like a simple code fix for a Shopify developer. Let me know if you come across a solution!

Hi folks - From digging into this more we’ve found that the slug on URLs where there is no variant should not impact SEO as search engines target the canonical URL. However we will be investigating the other issues described in the merchant community post to prevent out of stock variants being a first selected variant.

Hi Liam,

What I understand is that Shopify team will not be addressing the main issue -variant slug on products without variant- we described here, am I correct?

Because the issue posted under merch community and what you addressed is something else.

Thank you.

Correct - we investigated how the slug appears on products with a single variant and concluded this current behaviour is intentional.

The final verdict is we won’t be able to have this feature anytime soon - according to what Liam says, we will never.

I will be searching for a solution and keep here posted if I come across anything.