I am facing a problem - can not update the price of the variant using the ShopifyAPI..
while updating the price of the variant, it is giving the error
@remote_errors=#<\ActiveResource::ResourceInvalid: Failed. Response code = 422. Response message = Unprocessable Entity.>, @validation_context=nil, @errors=#<\ActiveResource::Errors:0x000000029eb1d0 ...>>, @messages={:base=>["Options are not unique"]}
'\' after '<' is required to show the error, otherwise stack overflow is hiding the error.
as required on another question
on production store, the request id is "38f5c3b3b7bdf4433724a845c6df4571"
on test store, the request id is "6050f165586b631e81b840dc0e1e6807"
More Findings
variant price change on test store
p = ShopifyAPI::Product.last
v = p.variants.first
v.price = "8.00"
v.save
initial price of variant = "9.00"
returns false, with error @messages={:base=>["Options are not unique"]}
request id 978ad18483f40ff3946df18df0a9d1d8
.
.
variant price change on live store
p = ShopifyAPI::Product.first
p.variants[0].price = "24.65"
p.save
initial price of variant = "25.65"
return true, but price is not changed
request id a9a798b631e3dd10fc81b723f2883af1
.
.
variant price change through product on test store
p = ShopifyAPI::Product.first
p.variants[0].price = "8.00"
p.save
initial price of variant = "7.00"
return true and price is updated
request id 7d995f6f6ed3bf515e69a1640f27f44a
.
.
variant price change through product on live store
p = ShopifyAPI::Product.last
v = p.variants.first
v.price = "4.00"
v.save
initial price of variant = "3.00"
returns false, with error @messages={:base=>["Options are not unique"]}
request id c6aaa5b65576eb4ec0d89715d25b787e