Copied to clipboard

Flag this post as spam?

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


  • Frans Lammers 57 posts 400 karma points c-trib
    May 27, 2019 @ 09:06
    Frans Lammers
    0

    Tea Commerce saving variants of new product node

    Hallo,

    In TC 3.3.0 I have a problem saving variants: I can enter a new product node with all its properties and add some variants. Then, on saving the node there are no variants saved, only the general product properties. In order to add the variants I have to add them again and only then they are saved.

    The variant properties consist of an SKU, a price, some strings and the Stock management data type.

    Is there any way to get the variants saved the first time?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    May 27, 2019 @ 14:35
    Matt Brailsford
    0

    Hmm, it sounds like there could be a bug with the variants prop editor. By the sounds of it, it could be requiring your node to have an ID before saving variants so it fails on initial save but then works on the second save.

    I'll have to look into it and see if that is the case. Untill then, it might be best to ensure a node is saved before setting the variants.

    Matt

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    May 27, 2019 @ 14:39
    Matt Brailsford
    0

    PS We are on a national holiday in the UK today so it'll probably be tomorrow when I can look into this further.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 17, 2019 @ 09:36
    Matt Brailsford
    100

    Hi Frans,

    Ok, so I've not managed to come up with a fix for it yet, but I have been able to replicate it on the demo site so I do know what is going on. Essentially what I mentioned previously is the case that the prop editor needs to know the product nodes ID and because it doesn't exist on initial create, it's causing it to fail and is just wiping out the value.

    I've added an issue for this on the issue tracker so that it can be looking in to and tracked which you can find here https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/issues/88

    There are a few other variant prop editor related issue on there so I'll look to try and fix them all together.

    Thanks for raising this

    Matt

  • Frans Lammers 57 posts 400 karma points c-trib
    Jun 17, 2019 @ 11:41
    Frans Lammers
    0

    Hallo Matt,

    Thanks for looking in to it. Since your answer points to the issuetracker I have marked it as the solution. In the meantime we still have the workaround of saving the product node twice.

    Frans

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 18, 2019 @ 12:30
    Matt Brailsford
    0

    Hi Frans,

    Not the perfect solution, but I've committed a change to the project to at least hide the variants prop editor and display a message until the node has been initially saved. This is essentially how the stock input works too.

    enter image description here

    I will see what we can do to improve this, however it'll likely only happen in the v8 version. In the meantime I think this at least avoids confusion of data being added and then lost.

Please Sign in or register to post replies

Write your reply to:

Draft