Track inventory on an product without variant

jroll
New Member
5 0 0

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,

 

Replies 4 (4)

EasifyApps
Shopify Partner
550 16 42

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 🤗.

EASIFY - MAKING SHOPIFY SIMPLE & SWEET!
Easify Product Options: Create custom product options 10X faster & easier!
Easify Product Attachments: Effortlessly add downloadable PDF files (or any other format) to Shopify pages!
Try for Free | 24/7 Live Chat Support
jroll
New Member
5 0 0
Hello,

Thanks for your quick answer !

I didn’t specify I’m trying to do it manually in the code as I’m a SEO
consultant and I need to find a solution without plugin 😅

gr_trading
Shopify Partner
1765 142 187

Hi @jroll ,

 


would you mind sharing more implementation steps you have follow to make changes and the store URL of you theme to check?

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
jroll
New Member
5 0 0

Hello,

I went to this section in my theme.js : 

 

Capture d'écran 2024-05-01 122049.png

 

And I've replaced the "return this.product.variants[0]" by "return this.product.url" :

 

Capture d'écran 2024-05-01 122241.png

 

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 :

jroll_0-1714559272499.png(means "The product is not available")