I used to be able to set compare_at_price to null after a product was on sale but now I get an error. This is making use of the ShopifySharp C# library from NozzleGear.
Example:
Price was: 1000, Compare at 1200
I want to reset it the Price to 1200, with compare at 0.
(422 Unprocessable Entity) compare_at_price: Compare at price needs to be higher than Price
I can neither set it to 0, so how will I disable the compare_at_price to 0 or null or remove it?
var variant = await productVariantService.UpdateAsync(product.VariantId.Value, new ProductVariant()
{
Price = updatePrice,
CompareAtPrice = updateCompareAtPrice
});
There seems to be a bug, here is the workaround...
https://github.com/nozzlegear/ShopifySharp/issues/373
Create and use the below Service