Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello guys,
On my store, I currently have ?variant url for every product linked on my collections pages while I don't use variants. I have dedicated product pages by color, for example.
For SEO matters (crawl budget), I duplicated my theme and I've changed the liquid to only have abosulte product urls without ?variant on my website and it works BUT I have a problem :
My stock tracking is no longer working as it tracks the variant and not the product itself. So, when I go on the abolute product url without any parameter the inventory management is displaying "No stock" (cause I'm not on the variant url) while stock is not empty.
Do you guys could help me with this please ? I would like my inventory management to be related to the product itself regardless the variant.
Many thanks for your valuable help guys,
Hi @jroll,
If I understand correctly, you're creating separate products for different colors but still want to maintain individual inventory tracking while also establishing cross-product links. Is that accurate?
In that case, you might find the Easify Product Options app quite useful. It allows you to create cross-product links between distinct items using option display types like Image/Color Swatches to display your color variations. Additionally, you can utilize the Option URL feature to direct customers to each specific product color page. This setup creates a seamless switching experience for customers, akin to Shopify variants, while actually navigating among different products.
You can check out a demo here. Once you provide me with your product details, I can offer more tailored suggestions on how to set it up 🤗.
Hi @jroll ,
would you mind sharing more implementation steps you have follow to make changes and the store URL of you theme to check?
Hello,
I went to this section in my theme.js :
And I've replaced the "return this.product.variants[0]" by "return this.product.url" :
It worked as, now, when I click on a product, I'am landing on an absolute url withou parameter but the thing is : my inventory tracking is set to 0 :
(means "The product is not available")