Size Attribute of “0” does not save
-
TL;DR
When the client adds a new product that has a size “0” as one of the options for the size attribute, the variation for that attribute saves, but does not associate the variation with size 0.Full Explanation
The website sells clothing. Let’s say they want to add a dress which comes in size 0 and size 1. The client adds the new product through the Add Product screen (not through an import). The product is set as Variable and an Attribute is created for size. Two values are entered: “0” and “1”. Client clicks “Save attributes”.When the client goes to the Variations tab, she chooses “Create Variations from all attributes” and two variations are created, one for each size: 0 and 1. She fills out all of the information for each Variation: SKU, stock count, price, weight/dimensions etc. Then she clicks “Save changes”.
At this point, all of the information is saved properly. But, at some point, the client looks at the new product on the front end, and there is a size missing from the dropdown. When you go into the Edit Product screen, the Variations are listed as “Any size…” and “1”.
In order to fix the problem, all she has to do is add the add the attribute, she does not have to recreate the variation. So, going to “Attributes” and adding “0” will automatically change the “Any size…” variation to “0”. Somehow, that variation is already associated with the size “0” attribute. She shows this happening in this video.
https://drive.google.com/file/d/1_HoAukVJFHL2C-c4R9Wj7tA3z8ddeuM7/view
I guess what I can’t figure out is why this would be. I strongly suspect that it has something to do with the size being “0”. In code, 0 means false. I’m wondering if there is a hiccup in the data validation somewhere. That wouldn’t explain why the issue happens after the initial setup, or why it only happens on some products and not others.
Any suggestions as to how I solve this would be greatly appreciated.
Thanks,
Swani
- The topic ‘Size Attribute of “0” does not save’ is closed to new replies.