Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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?
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.
PS We are on a national holiday in the UK today so it'll probably be tomorrow when I can look into this further.
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
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.
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.
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.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted