Need help with Variables
-
Hello. I want to create a variable product with 2 attributes:
- 3 Sizes (3 sizes with separate stock for each size)
- 2 Options (2 different prices)
My problem is that no matter what I do either the number stock doesn’t decrease or the price difference doesn’t reflect.
Please tell me how to make this working. Thank you.
-
This topic was modified 2 years, 4 months ago by
nikolaygeorgiev.
-
Hi @nikolaygeorgiev,
For better assistance, can you provide screenshots showing the issue on your end? For screenshots, you may use https://snipboard.io – please follow the instructions on that page, then paste the URL in this thread.
In the meantime, you can run a conflict test to help you identify the cause of the issue. More info: https://woo.com/document/how-to-test-for-conflicts/
Let us know how that goes for you.
My setup looks like this:
Size Variation:
- Size M – 1 stock
- Size L – 1 stock
- Size XL – 1 stock
Stamp Variation
- No stamp – (no stock managment – 10 usd price)
- Stamp option -(no stock managment – 15usd price)
The problem is that when I buy a shirt of any Size it reduces to 0 but the size is still available with unlimited stocks.
Hey, @nikolaygeorgiev!
Thank you for the information.
Did you generate the variations under the Variations section? How are the variations set up?
If you could share screenshots of the set up as my colleague mentioned it would be great. This way we would be able to see exactly how you set this up and try to replicate the issue on our end to investigate it further.
If you can please share how the variation section is looking overall and how each variation is set up.
Furthermore, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:
System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.
Fatal error logs (if any) under WooCommerce > Status > Logs. Then you can use the selector to search for Fatal Errors.
You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.Looking forward to your reply.
Have a wonderful day!
Hey, @nikolaygeorgiev!
Thank you for the screenshot, it helped us better understand the issue.
So, the way the variations are set up is creating a conflict.
When you add:
- Any size / Yes
- Any size / No
And then also add each size to the variations you create variations duplicates. This happens because when you have the “any sizes” option, every size has already a variation, you don’t need to also add each size.
The issue is that, from what I understood about your goal, by default it is not possible to set it up exactly as you mentioned.
Let me explain by sharing the different ways you could set this up:
1 – You only have the variation options to Any Size-Yes and Any Size-No. This will generate every possible combination on the product page, but it will make it harder to manage stock for each size as the stock would be tied to the stamp, which you don’t want.
Here’s how it should look:

2 – You remove the Any Size options and add one option to each size, having “any stamp option” to each one. This would make it easy to manage the stock for each t-shirt size without having the stamp affect the stock, but you wouldn’t be able to charge different prices for the Stamp/no stamp option.
Here’s how it should look:

3 – The final option, you add all the possible combinations for sizes and stamps. This way you would be able to set different prices for the stamp options and they wouldn’t affect stock. But each variation of the size would be treated as a different stock. So, if someone buys a S-No Stamp, it wouldn’t change the stock of S-Stamp.
Here’s how it should look:

If one of those options is something you can work with, that is great!
To set it up exactly as you mentioned, I recommend you checking Variation Shared Inventory for WooCommerce. From what I understood from your goal, it seems this plugin should allow you to set it up how you want it by going with option 3 and setting the same size variations to share stock.
I hope this was clarifying.
If you face any issues or have any questions, please let us know so we can assist you further.
Have a wonderful day!
The topic ‘Need help with Variables’ is closed to new replies.