Copied to clipboard

Flag this post as spam?

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


  • Benjamin Howarth 300 posts 766 karma points c-trib
    25 days ago
    Benjamin Howarth
    0

    Variants not persisting due to an Angular error

    Hi folks,

    So I've got an issue with variants refusing to persist on a product. I've walked the stack trace in Devtools and it's attached.

    Teacommerce Angular bug

    The error seems to be in $scope.getCheckedVariantGroups, but I haven't been able to isolate it any further, sadly.

    This is my variant collection:

    Variant collection in Teacommerce

    Thanks,

    Benjamin

  • Benjamin Howarth 300 posts 766 karma points c-trib
    25 days ago
    Benjamin Howarth
    0

    Worked it out! If you have an attribute group, but no attributes, then it errors out. Deleting the empty attribute group fixes it.

    Line 200 of variant-editor.controller.js needs a null check on variantGroup.items!

    Cheers,

    B

  • Matt Brailsford 2281 posts 11091 karma points MVP 6x c-trib
    25 days ago
    Matt Brailsford
    0

    Hey Ben,

    Nicely figured out.

    If you are up for it, this file should form part of the OS Umbraco front end for TC, so would be super awesome if you had the time to submit a PR for it https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/pulls

    No worries if not though, I'll pick it up on my next round of updates.

    Matt

  • Benjamin Howarth 300 posts 766 karma points c-trib
    25 days ago
    Benjamin Howarth
    0

    Gladly! I'll send in a PR shortly 🙂

Please Sign in or register to post replies

Write your reply to:

Draft