I am using TeaCommerce 2 with the TeaCommerce Starter Kit (downloaded 24th May 2013) with Umbraco v6.0.5.
I am attempting to implement dynamic VAT rules for EU VAT numbers. This has been covered in a number of forum posts but only for TeaCommerce 1.x.
So far I have managed to adapt Rune's technique (http://rune.gronkjaer.dk/en-US/2011/04/12/tea-commerce-dynamic-vat/) along with Paul Blair's adjustment (http://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/29297-Euro-VAT-checking).
However, I have not been able to work out how to actually save the order property I have introduced (companyVATNo) despite having introduced it into the cart form and also the back-end order details page.
I did find this post (http://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/22378-Adding-custom-properties-to-an-order) which refers to modifying teacommerce_simple.js file but this does not appear to exist for TeaCommerce 2.
What is the correct method for saving new custom properties for an order?
Thanks for the quick feedback. I looked at that API page earlier as it seemed to be the sort of thing I needed but I cannot work out when/where/how to use it. It's as though I'm missing some key bit of information/documentation that matches up the API info to what I have in front of me in the VS solution!
Is there some way you could guide me to using this within the context of the starter kit. For example, I can imagine other properties that would need to be captured in the step-information page and stored along with the order and so this would be really helpful to many of us TC Newbies.
Aha - for some reason I missed reading the home page of the HTML API section on the documentation portal (was this in place last week?) and I've now read that and I can now see how that API is intended to be used.
I've also just popped online to see the online Starter Kit demo and checked the source code for that to see how the order properties are saved (I don't have my own project to hand right now) and I can see the lines:
First the good news: I can report that the custom property companyVATNo is now being updated.
Now the bad news:The OrderPropertiesUpdated event appears to only be firing once - it fires the first time the "Shipping/Payment" button is pressed on the "information" page but going back to the information page and repeating that button press (after modifying the field contents e.g. a user correcting the VAT number) does not trigger the OrderPropertiesUpdated event again.
I have tried various combinations of user activity (adding another product to the cart and repeating, changing various fields etc.) but I can only get the OrderPropertiesUpdated event to trigger once.
The OnApplicationStartedEvent is triggering at the start - so I know that the OrderPropertiesUpdated event is being set - hence the initial event firing.
I can see the data for the order being changed in the database (TeaCommerce_CustomOrderProperty and TeaCommerce_Order) so there's some sort of postback happening.
I've tried searching the forum for anything similar but haven't found anything yet.
I think you found a bug in the notification center. I can replicate the bug - I have not tested it in the context of the starter kit, but a local install I have using the JavaScript API.
We will correct this as soon as possible. Please follow the @teacommerce twitter account if you want to be notified when we release a new version.
I've been checking the twitter feed regularly but I haven't heard anything.
Any news on this custom order propeties event that's not firing?
I've tried other events (I've discovered them using the Object Browser) but none seem suitable. I've even considered adding some javascript that will modify the Comments field whenever the custom EU VAT field is changed just so that it will fire the Order.Updated event. Perhaps I should just get the Comments field to be modified (add a space perhaps) every time that the page is loaded. A bit crazy but I have few other options at present.
I've actually discovered a workaround! It's not pretty (and I make no apologies for that!) but it works. Basically I always force an update to the Comments field (adding/removing a trailing space) and this then forces the Order.Update event. From that event handler I am able to do the checking I need to make on the various other fields.
Obviously having the OrderPropertiesUpdated event will help clean this up - but at least I am able to continue with the EU VAT checking etc.
Thanks for offering the build but hopefully I can wait until the official release.
I've actually discovered a workaround! It's not pretty (and I make no apologies for that!) but it works. Basically I always force an update to the Comments field (adding/removing a trailing space) and this then forces the Order.Update event. From that event handler I am able to do the checking I need to make on the various other fields.
Obviously having the OrderPropertiesUpdated event will help clean this up - but at least I am able to continue with the EU VAT checking etc.
Thanks for offering the build but hopefully I can wait until the official release.
Feel free to ask more questions on the forum. If you like - there is also training courses in Tea Commerce you can attend and get great knowledge and become certified. See the schedule here: http://www.teacommerce.net/en/training.aspx
Just to finish this thread by letting you know that the site has gone live at www.attachaware.com
This is an Umbraco/TeaCommerce site with EU VAT Number checking, custom order finalization with custom properties, software licence generation and management (including single, multiple and domain licences) and custom email templates.
I feel now as though I have a platform on which to launch other software-based products.
It's still early days - just launched - so I will be happy to receive any bug reports etc.
PS: Please excuse me if I paste this to complete the various forum threads I started over the past few months!
Saving a custom order property (TeaCommerce 2)
I am using TeaCommerce 2 with the TeaCommerce Starter Kit (downloaded 24th May 2013) with Umbraco v6.0.5.
I am attempting to implement dynamic VAT rules for EU VAT numbers. This has been covered in a number of forum posts but only for TeaCommerce 1.x.
So far I have managed to adapt Rune's technique (http://rune.gronkjaer.dk/en-US/2011/04/12/tea-commerce-dynamic-vat/) along with Paul Blair's adjustment (http://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/29297-Euro-VAT-checking).
However, I have not been able to work out how to actually save the order property I have introduced (companyVATNo) despite having introduced it into the cart form and also the back-end order details page.
I did find this post (http://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/22378-Adding-custom-properties-to-an-order) which refers to modifying teacommerce_simple.js file but this does not appear to exist for TeaCommerce 2.
What is the correct method for saving new custom properties for an order?
Cheers,
Martin
Hi Martin
If you are using the starter kit you have properly added the companyVATNo to the HTML. So you should read about the HTML API and how to add order properties using that. See this link for the documentation:
http://documentation.teacommerce.net/html-api/order-property/addorupdateorderproperties/
Kind regards
Anders
Hi Anders,
Thanks for the quick feedback. I looked at that API page earlier as it seemed to be the sort of thing I needed but I cannot work out when/where/how to use it. It's as though I'm missing some key bit of information/documentation that matches up the API info to what I have in front of me in the VS solution!
Is there some way you could guide me to using this within the context of the starter kit. For example, I can imagine other properties that would need to be captured in the step-information page and stored along with the order and so this would be really helpful to many of us TC Newbies.
Cheers,
Martin
Hi again Anders,
Aha - for some reason I missed reading the home page of the HTML API section on the documentation portal (was this in place last week?) and I've now read that and I can now see how that API is intended to be used.
I've also just popped online to see the online Starter Kit demo and checked the source code for that to see how the order properties are saved (I don't have my own project to hand right now) and I can see the lines:
which correspond to your answer above. I'm looking forward to giving this a go in the morning.
Many thanks,
Martin
Hi Anders,
First the good news: I can report that the custom property companyVATNo is now being updated.
Now the bad news: The OrderPropertiesUpdated event appears to only be firing once - it fires the first time the "Shipping/Payment" button is pressed on the "information" page but going back to the information page and repeating that button press (after modifying the field contents e.g. a user correcting the VAT number) does not trigger the OrderPropertiesUpdated event again.
I have tried various combinations of user activity (adding another product to the cart and repeating, changing various fields etc.) but I can only get the OrderPropertiesUpdated event to trigger once.
The OnApplicationStartedEvent is triggering at the start - so I know that the OrderPropertiesUpdated event is being set - hence the initial event firing.
I can see the data for the order being changed in the database (TeaCommerce_CustomOrderProperty and TeaCommerce_Order) so there's some sort of postback happening.
I've tried searching the forum for anything similar but haven't found anything yet.
Cheers,
Martin
Hi Martin
I think you found a bug in the notification center. I can replicate the bug - I have not tested it in the context of the starter kit, but a local install I have using the JavaScript API.
We will correct this as soon as possible. Please follow the @teacommerce twitter account if you want to be notified when we release a new version.
Thanks for helping us find a bug!
Kind regards
Anders
Hi Anders,
I would obviously much appreciate a swift correction - I appreciate you have to juggle a number of other issues at the same time.
I will skip on to the next step in my development - the payment gateway - and come back to this VAT checking issue when the events are firing again.
Cheers
Martin
We hope to have a release soon. Be sure to follow @teacommerce on twitter so you know when its released :)
Kind regards
Anders
Hi,
I've been checking the twitter feed regularly but I haven't heard anything.
Any news on this custom order propeties event that's not firing?
I've tried other events (I've discovered them using the Object Browser) but none seem suitable. I've even considered adding some javascript that will modify the Comments field whenever the custom EU VAT field is changed just so that it will fire the Order.Updated event. Perhaps I should just get the Comments field to be modified (add a space perhaps) every time that the page is loaded. A bit crazy but I have few other options at present.
Cheers,
Martin
Hi Martin
We have not released 2.1.2 yet - that is why you havent heard anything. Maybe I can send you the latest build of 2.1.2 - but not the final.
Kind regards
Anders
Hi Anders,
I've actually discovered a workaround! It's not pretty (and I make no apologies for that!) but it works. Basically I always force an update to the Comments field (adding/removing a trailing space) and this then forces the Order.Update event. From that event handler I am able to do the checking I need to make on the various other fields.
Obviously having the OrderPropertiesUpdated event will help clean this up - but at least I am able to continue with the EU VAT checking etc.
Thanks for offering the build but hopefully I can wait until the official release.
Cheers,
Martin
Hi Anders,
I've actually discovered a workaround! It's not pretty (and I make no apologies for that!) but it works. Basically I always force an update to the Comments field (adding/removing a trailing space) and this then forces the Order.Update event. From that event handler I am able to do the checking I need to make on the various other fields.
Obviously having the OrderPropertiesUpdated event will help clean this up - but at least I am able to continue with the EU VAT checking etc.
Thanks for offering the build but hopefully I can wait until the official release.
Cheers,
Martin
Hi Martin
2.1.2 is released and should fix your bug :)
Kind regards
Anders
Hi Anders,
I've managed to upgrade to 2.1.2 and I can confirm that the order custom property updated events are now being triggered correctly :)
It's been quite a learning curve - but I'm now a bit more skilled in debugging and finding workarounds and my confidence is growing in TeaCommerce.
I have a few more questions on other topics but I will post as separate forum posts.
I just wanted to say thanks for fixing this bug and providing me with support.
Cheers,
Martin
Great that it works as expected now :)
Feel free to ask more questions on the forum. If you like - there is also training courses in Tea Commerce you can attend and get great knowledge and become certified. See the schedule here:
http://www.teacommerce.net/en/training.aspx
Kind regards
Anders
Hi Anders and Rune,
Just to finish this thread by letting you know that the site has gone live at www.attachaware.com
This is an Umbraco/TeaCommerce site with EU VAT Number checking, custom order finalization with custom properties, software licence generation and management (including single, multiple and domain licences) and custom email templates.
I feel now as though I have a platform on which to launch other software-based products.
It's still early days - just launched - so I will be happy to receive any bug reports etc.
PS: Please excuse me if I paste this to complete the various forum threads I started over the past few months!
Cheers,
Martin
is working on a reply...