When a product variation is created or updated during sync, the SKU field is being set to "PF-". In my case, I'm not seeing a value being returned for SKU in the API responses. I've looked for a way to define the SKU on the Printful side and I'm not able to find one in their UI.
It's been confirmed that Printful doesn't use the SKU field anyway, so it makes sense to me that we not replace it when products are synced. We still need to define one when new variations are created because it's a required field, but I'm not sure what to set it to. Maybe a sequence?
Going to start with a patch to prevent deleting custom SKU values for existing product variations.
Comments
Comment #2
cameron prince commentedI wonder now if we shouldn't make a dependency on https://www.drupal.org/project/commerce_autosku and default to something derived from the product ID.
Comment #3
cameron prince commentedThis patch updates the ProductIntegrator so that new product variations created during sync have SKU values set to [PRODUCT_ID]-[VARIATION_ID]. When the ProductIntegrator processes existing variations, the SKU field is left unchanged. This should provide reasonable default SKU values which could be customized for internal use and not lost during the next sync.
Comment #5
cameron prince commentedFixed and committed.