Changing option value causes variant to no longer exist.

Highlighted
New Member
3 0 0

We have many products where the Size option for the variant in Shopify has the value "medium" but I want it to be "Medium".

I am going to change this in bulk with an import, but to start with I am importing for one product and it's variants only.

The problem is, now that I have changed the "medium" to "Medium" on this product I am getting an error when I view the product in the front end.

I am using the Venue theme and have added some javascript to the call back function.

The code below is straight from the theme but I have added the alert line for testing.

When I first load the page, the alert shows me the correct variant SKU. If I choose another variant, I get an error that basically says the variable variant is null.

var selectCallback = function(variant, selector) 
var productId = productObj.id;
sectionClass = sectionClass;
alert (variant["sku"])
 
If I edit the product and put the option value back to "medium" (all lowercase) then it works fine again.
 
Does the Shopify DB need reindexing or something after I change variant options?
 
All our products have been migrated to Shopify from Magento and there were inconsistencies in Magento which I wanted to clean up in Shopify, before adding any new products.
 
How can I change an option value without getting this problem?
0 Likes