Variations Not Recalcuating
-
Hello,
Is it possible to have discovered a bug in WooCommerce? If not, then I have a problem with Attributes and Variants. Thank you in advance for your time and consideration in helping to solve this problem.
In a development environment I am running WP 4.8.2 and WooCommerce 3.2.1. They are both clean installs. The only plugins installed are WooCommerce and WooCommerce Stripe Gateway. I am using the Storefront theme.
I am selling shirts and have set up two attributes; Color and Size. Shirts come in red, green and blue and in sizes small, medium and large. For each size shirt I want to charge, 1.99, 2.99 and 3.99 for each respective size. But if the shirt is red I want to charge 1.00 extra. As such under the Shirts product there are two Attributes selected (Color and Size). Color is listed first and Size second. (Please know, for this issue Attribute order does not seem to matter). In the Variations tab I have Any Shirts listed first and Color second. So the order is.
- Any Color – Small – $1.99
- Any Color – Medium – $2.99
- Any Color – Large – $3.99
- Red – Small – $2.99
- Red – Medium – $3.99
- Red – Large – $4.99
Makes sense? Good.
Notice how I have Any Color listed above the more specific Red. When shopping, if I select a Red shirt I am expecting to see the $1.00 difference, but I am not. However, if I change the above order so that Red is above Any Color the price is properly adjusted.
When setting up your environment be sure to create the Any variants first then the more specific Red. This way, the initial IDs are set to 1,2,3 then 4,5,6. After moving Red above Any Color, the order will be 4,5,6 then 1,2,3. This seems to be important when duplicating the error.
Question: How can I use variants without being concerned about the order in which they are added? Consider: What if I wanted to charge more for two different colored shirts or if I wanted to make a distinction between boys and girls? Being concerned about order in addition to creating variations seems like it would be problematic. This looks like a bug. Is it?
The topic ‘Variations Not Recalcuating’ is closed to new replies.