I have a webshop where I need to run some custom code on the Cart before it is rendered. The scenario is that a user will post some data while the Cart is showing, and I want to use this data to manipulate some values in the Cart.
Cart V1 had the notification "Dynamicweb.Notifications.eCommerce.Cart.BeforeRender" which fit my requirement quite well as I want to make sure it is always done before the Cart is rendered. But unfortunatly we are using Cart V2 which do not throw that notification. I have looked through the notifications in "Dynamicweb.Ecom7.Cart.Notifications" but I can't seem to find anyone that I can use. The closest is BeforeRenderEmptyCart, but that is not particularly useful in my situation.
So my question is in part two-fold:
Can anyone see a notification in the Cart V2 namespace that I can use?
Or failing that, is there another approach? I have some custom fields on the Order and OrderLine that I want to manipulate related to the information the user posts. I could use a custom module, but I want to be sure the code is always run before the cart is being rendered.
Developer forum
E-mail notifications
What Cart V2 notification to use?
Kasper Vesth
Posted on 24/11/2011 09:51:48
Replies
Jeppe Eriksson Agger
Posted on 24/11/2011 12:02:45
This post has been marked as an answer
Hi Kasper
You can find all the available CartV2 notifications in this document: http://developer.dynamicweb-cms.com/Admin/Public/DWSDownload.aspx?File=Files%2fFiler%2fDocumentation%2fDevelopment%2feCommerce%2f(en-US)+Shopping+Cart+v2+Extensibility.pdf
But the specific one you're looking for is called BeforeRenderingNewStep.
Hope this helps :)
- Jeppe
Votes for this answer: 0
Kasper Vesth
Posted on 24/11/2011 12:39:23
I see :) It would seem you are correct. I mistakenly thought that it would only fire when you actually started rendering step you hadn't rendered before. Thank you for your answer.
Kasper Vesth
Posted on 24/11/2011 12:46:59
You must be logged in to post in the forum