There seems to be a problem when updating shared product options. It doesn't seem possible to change the SKU for the option and also the options don't update for the products that use them.
The only workaround I could come up with was to change the SKU of the option in the merchProductAttribute table but even then that didn't update the products.
I had to go to each of the products that used the shared option, delete it, save the product, re-add the option and then save the product again.
Would it be possible to have changes propagated out? If you've got lots of products all sharing a set of options - it's really painful!
I've encountered this as well - http://issues.merchello.com/youtrack/issue/M-1084 but it keeps being bumped back in priority when we look at various feature requests. It'd be awesome to get some help with it ...
The trick, as you've found, will be with the shared product options -> choices. So you will first need to determine all of the products that the option is used. I'd start in the ProductOptionRepository where you'll find a methods that can find these keys (now only used for cache clearing).
You'll then need to look in the ProductService (maybe ProductVariantService) and isolate the logic to generate skus into a new method. Ideally the SKUs for each variant would be "updated" rather than completely recreating the variant (like is done when it is detected when a new option is added to the product).
Problem updating shared product options
Hi Rusty,
There seems to be a problem when updating shared product options. It doesn't seem possible to change the SKU for the option and also the options don't update for the products that use them.
The only workaround I could come up with was to change the SKU of the option in the merchProductAttribute table but even then that didn't update the products.
I had to go to each of the products that used the shared option, delete it, save the product, re-add the option and then save the product again.
Would it be possible to have changes propagated out? If you've got lots of products all sharing a set of options - it's really painful!
Thanks
Simon
I've encountered this as well - http://issues.merchello.com/youtrack/issue/M-1084 but it keeps being bumped back in priority when we look at various feature requests. It'd be awesome to get some help with it ...
OK - any pointers as to where to start looking?
The trick, as you've found, will be with the shared product options -> choices. So you will first need to determine all of the products that the option is used. I'd start in the ProductOptionRepository where you'll find a methods that can find these keys (now only used for cache clearing).
You'll then need to look in the
ProductService
(maybeProductVariantService
) and isolate the logic to generate skus into a new method. Ideally the SKUs for each variant would be "updated" rather than completely recreating the variant (like is done when it is detected when a new option is added to the product).is working on a reply...