bestsource

WooCommerce stock per attribute

bestsource 2023. 10. 1. 21:05
반응형

WooCommerce stock per attribute

I have a technical problem with the WooCommerce plugin that I can't seem to find an answer for. I got a variable product that has two different times for workshops. So an example to simplify:

Product: Event day ticket

Workshop 1: Red | Blue | Green

Workshop 2: Red | Blue | green

On workshop 1, every attribute needs to have 5 stock but on workshop 2 every attribute needs to have 10 stock.

I can make combination variables but if I do that, every combination has it's own stock. Not the attribute itself.

Any idea on how to work with issue?

I hope I explained it well enough.

I ran into something similar and the answer is a Variable Product with addons (one option is WooCommerce's own plugin @ https://woocommerce.com/products/product-add-ons/). You'd create Workshop as a variable attribute, then create product variations and set each Workshop's total number of tickets in the variations. Then create product addons for Red, Blue, and Green (you can set the cost of addons to any value including 0). That should give you the result you're seeking.

Attributes define available "options" (like colors as you have it) but you need to set the product to be a variable product (the default is simple product) using the dropdown at the top of that configuration section. Then, on the attributes section, check the box to use the attributes as variations. Finally, on the variations tab, create the variations from attributes.

Now, you can set stock levels, prices, and more for each variation of the product where a variation is a single or combination of attributes.

Note: You may need to go into the Woocommerce settings and check the box to manage inventory at the variation level. This is from memory so I don't recall if it's in the Woocommerce settings or an option when you switch the product to variable.

ReferenceURL : https://stackoverflow.com/questions/42296143/woocommerce-stock-per-attribute

반응형