What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Conditional Logic for Product Options / Variants (SOLD OUT)

Solved

Conditional Logic for Product Options / Variants (SOLD OUT)

jm-design
Excursionist
25 1 6

Hi, I'm new to Shopify.

 

I make lamps and have options of different wood (Teak and Walnut are examples) and different lampshades (white and cream are examples). I show this on my website through Options and Variants. I'm using Dawn 2.0, but I have not committed to it as a theme. I will, however make sure to stay with a 2.0 theme in the future. I'm just learning how to use Shopify right now before committing to a theme. I think the best way to ask my question is through and example (which can be referenced under my Table Lamp Product):

 

I make 5 Walnut Wood lamps (physically I only have 5 in stock in my inventory) and give an option of choosing either a White or Cream lampshade. I have the Wood option listed fist, followed by the Lampshade option second. I have to set my Variants Product Quantities as 5 Walnut / White and 5 Walnut/ Cream. Even though I only technically have 5 Walnut wood lamps available for sale.

 

I understand that if one of the Lampshade option sells out, such as white, then that specific option will be out of stock and that is good, However - If I sell out of my 5 Walnut Wood lamps, I want to be able to have both Lampshade options (White and Cream) marked as sold out regardless of my Variant quantities listed for the lampshades.

 

I understand that there maybe an app that can do this, but I would like to avoid the monthly fee's and find a way to code this instead. Is there a way I can use conditional logic so that when I sell out of a selected Option (such as Walnut) then other Walnut Variant is marked as Out of Stock? And can you help me with that code?

 

Forgive me if I'm not perfectly using the correct terms here, but I hope my example is enough to ask my question. I'm familiar with editing code with other website providers, but I am a few days new to Shopify and will also need some pointers such as where exactly to go to edit the code (within the edit code form the online store) and maybe where to place it (between what code).

 

Many thanks!

Accepted Solution (1)
jm-design
Excursionist
25 1 6

This is an accepted solution.

Replies 10 (10)

jm-design
Excursionist
25 1 6

Thought I would also add a screenshot (I've changed cream to golden sand). Remember I really only have 5 Walnut made and then I have their corresponding lampshades. You can ignore Teak, but its the same concept and I will to do it for Teak as well. I truly hope this is possible in some way, some how. Even if it's a paid app.

 

this.jpg

BosiDev
Tourist
9 0 1

Hey @jm-design  🙂 

Interesting Problem that you have!
What i get out of this, that you have a two-component bundle product which your customers can assemble them self. In this case, there is no easy self-coded solution to this, since you only can put inventory on variant level and not on product level. 


In this case i would look at bundle apps, which can accomplish your desired solution. In this case, you should create two different products 
1. Woodstand
2. Lampshade
and combine them in a bundle product, where the customer can choose a wood stand and a separate lampshade. Then you can monitor the wood stand inventory separately. 
A custom solution for your store without the use of an app would cost alot upfront for the coding so i would definitely recommend looking for an app. 

Hope that helps! 
Bosi

Bosi
jm-design
Excursionist
25 1 6

hmmm. I will look into that thanks! Question below. 

jm-design
Excursionist
25 1 6

Thanks! I've spend the morning looking at Bundle Apps and I can't seem to figure out what will work for me. A lot of the apps bundle things together that seem more like an Advertisement on a page. Some just confuse me. Would you know that will work, that I can try before buying?

BosiDev
Tourist
9 0 1

Hey @jm-design 🙂 

Awesome! I think there will be fitting apps in the store within your budget. I never used apps for this occasion, but i stumbled across these two in a quick search: 
https://apps.shopify.com/product-kits-bundles-pickystory
https://apps.shopify.com/bundles

I think the pricing is reasonable and there are test phases included. Just try them out!

Bosi
jm-design
Excursionist
25 1 6

I will look these over. Thank you. I don't know how you managed to find these after I looked forever for thinks like these with keywords like Bundles etc. 

PaulNewton
Shopify Partner
7450 657 1565

There's a lot of variety so it can take research to find the app that fits your business logic for the frontend or backend.

You may also want to search for 'product option' , 'product builder', 'product personalization' etc in the app store.

 

 

An alternative is to come at it through backend automation and sync the inventory between the proper variants/products/skus.

 

Usemechanic is great for some off the shelf solutions, or building up custom business logic.

https://tasks.mechanic.dev/sync-inventory-for-shared-skus 

https://tasks.mechanic.dev/keep-inventory-levels-in-sync-within-products 

https://tasks.mechanic.dev/maintain-inventory-for-a-product-bundle 

 

An alternative is if your products do not have things like skus, and the options customers select do not affect the price then make only 1 product-variant and collect the options as line item properties instead.

https://community.shopify.com/c/shopify-design/product-pages-get-customization-information-for-produ... 

That way there literally is only 1 inventory-item to track.

 

If you need to pursue either path with help , contact me with details for pricing.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


jm-design
Excursionist
25 1 6

Thanks Paul. I haven't thought about going about it from the backend. I like this idea, cause I'm happy at how I have things setup on the front end. I'm gonna need some time to think on all this and do more digging, but I will let you know if I need anymore help!

jm-design
Excursionist
25 1 6

This is an accepted solution.

EasifyApps-Zoe
Shopify Partner
582 15 49

Hi @jm-design,

I noticed that it's been a while since you opened your topic, and you already received a suggested solution. However, I'd like to offer another simpler solution for you (and other members) to consider in case you encounter a similar issue in the future 🤗.

 

I highly recommend using the Easify Product Options app. Its Free version is sufficient to help you set up your options and solve your problem. Here's a quick demonstration on how to do it:

  • Create your product with the Wood option only, including "Teak" and "Walnut" variants, and set specific quantities for your variants (e.g., Walnut: 5). Do not create the Lampshade option.

  • Install the Easify Product Options app and create a new option set:

EasifyAppsZoe_0-1690119139193.png

 

  • Add a custom option for the Lampshade with 2 values: "White" and "Cream," using the Buttons option type (or choose another from the 25 option input types provided by the app):

EasifyAppsZoe_1-1690119318490.png

 

  • Assign the option set to your product(s), and you're all set!

EasifyAppsZoe_2-1690119337662.png

 

The result is that the inventory will only depend on your Wood variants' quantities (quantities of "Teak" and "Walnut"), while the Lampshade options won't affect the inventory, just as you want.

Give the app a try! It's incredibly easy to use and can be immensely useful for managing your product options 🙌.

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