Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon 81 posts 184 karma points
    Jan 09, 2017 @ 12:44
    Simon
    0

    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

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 09, 2017 @ 16:51
    Rusty Swayne
    0

    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 ...

  • Simon 81 posts 184 karma points
    Jan 09, 2017 @ 17:44
    Simon
    0

    OK - any pointers as to where to start looking?

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 09, 2017 @ 20:09
    Rusty Swayne
    0

    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).

Please Sign in or register to post replies

Write your reply to:

Draft