glossier / solidus_retail

Solidus Extension to Support Retail Operations
BSD 3-Clause "New" or "Revised" License
7 stars 5 forks source link

Call the Shopify on the Solidus Update / Destroy / Create for a variant #34

Closed thisiscab closed 8 years ago

thisiscab commented 8 years ago

Problematic case:

Once a Solidus gets updated, we want to trigger an after_update event that will trigger the task that will update this product to Shopify.

When we update it on Shopify, in a certain case the product on Shopify may have been deleted so we need to re-create it. When we re-create it, we need to save the shopify_variant_id to the Solidus variant. And there goes an infinite loop

This solves that.

thisiscab commented 8 years ago

With setting a flag like that, this causes many problems. One of them is that during associating parts to bundles, we can't set the flag to say that the product should not be exported to Shopify and it always exports it. Which is bad. We need to find a work around that