Developer forum

Forum » Ecommerce - Standard features » Send notification on Quote State change

Send notification on Quote State change

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I have set up a notification email on Quote Status change.

Nothing fancy. An empty template with a simple text in it just to see what happens.

After changing the state on the quote, I've got the following yellow error:

[NullReferenceException: Object reference not set to an instance of an object.]
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderOrderContexts(Template template) +86
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderProduct(Product product, Boolean extendedProperties, Template template, Int32 loopCounter, Boolean renderRelated, String productUrl, Int32 quantity, Int32 wishListId, Boolean renderPublicList, Int32 orderLineOfProductCount) +17764
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderVariantCombinations(Product product, Template parentTemplate, String loopName) +1704
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderProduct(Product product, Boolean extendedProperties, Template template, Int32 loopCounter, Boolean renderRelated, String productUrl, Int32 quantity, Int32 wishListId, Boolean renderPublicList, Int32 orderLineOfProductCount) +13466
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderProducts(ProductCollection products, Template parentTemplate, String loopName, Int32 loopCounter, Boolean renderRelatedProducts, Boolean renderRelatedLists) +543
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderRelatedProductLists(Template template, RelatedProductListProviderEventArgs relatedParams) +274
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderProduct(Product product, Boolean extendedProperties, Template template, Int32 loopCounter, Boolean renderRelated, String productUrl, Int32 quantity, Int32 wishListId, Boolean renderPublicList, Int32 orderLineOfProductCount) +17085
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderProduct(Product product, Boolean extendedProperties, Template template, Int32 loopCounter, Boolean renderRelated, String productUrl, Int32 quantity, Int32 wishListId) +37
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderOrderLine(OrderLine orderLine, Template template) +3395
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderOrderLines(OrderLineCollection orderLines, Template parentTemplate, String loopName) +296
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderOrderDetails(Template template, Order order, Boolean extendedProperties, OrderTemplateExtenderContext orderContext) +3983
   Dynamicweb.Ecommerce.Frontend.Renderer.RenderOrder(Order order, Template template, Boolean extendedProperties, Int32 stepNumber, OrderTemplateExtenderContext orderContext) +69
   Dynamicweb.Ecommerce.Orders.Order.SendTo(PageView& pageView, String subject, List`1 toMailAddresses, String fromMailAddress, String fromMailName, Template& mailTemplate) +80
   Dynamicweb.Ecommerce.Orders.Order.SendTo(PageView& pageView, String subject, String toMailAddress, String fromMailAddress, String fromMailName, Template& mailTemplate) +85
   Dynamicweb.Ecommerce.Orders.Order.NotifyOrderStateChanged() +616
   Dynamicweb.Ecommerce.Orders.Order.SaveOrder(String orderId, Boolean saveOldVersion) +8581
   Dynamicweb.Ecommerce.Orders.Order.Save(String orderId, Boolean saveOldVersion) +47
   Dynamicweb.Admin.eComBackend.UCOrderEdit.DoSave() +3979
   Dynamicweb.Admin.eComBackend.UCOrderEdit.Ribbon_SaveAndClose(Object sender, EventArgs e) +14
   Dynamicweb.Controls.RibbonBarButton.RaisePostBackEvent(String eventArgument) +33
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9754214
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3562

 I am using a Wrap based solution, without major changes. Version is 9.2.14

Thanks,

Adrian


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

More information on the above:

1. If there is no template assigned, no error is rendered and the email is sent. But it is a blank email.

2. You can only choose from templates from the parent Folder. Templates/ecom/order and not from the design folder: Templates/Designs/Fabryo/ecom/Order

I hope this helps.

Thanks,

Adrian

 
Martin Vang
Martin Vang
Reply

Hi Adrian,

Strange. When I use the a simple template, everything works just fine for me, when I have a notification for changing from New to Submitted.

How about with a template that only contains "test"? Does it still explode?

BR

Martin

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi MArtin,

I made more tests and I have found this:

1. It explodes if I try to use TemplateTags in it

2. I does not use the translations that are available throughout the site

3. Any type of tag using GetGlobalValue is returnes as Null error.

This being said, i have not found any default template for these notifications, considering that I am using wrap version.

Thanks,

Adrian

 
Martin Vang
Martin Vang
Reply

Hi Adrian,

What happens if you try using the standard template from wrap? Mine works, so I want to hear if this also breaks for you.

BR

Martin

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi MArtin,

I just mentioned that I could not find a default Wrap template.

I have managed to create one from scratch. You can see my comments in my previous post.

No major error, just some missbehavior in the logic of how things work.

Is seems that the template is not rendered the same way the other templates (like order conformation) are rendered.

Thanks,
Adrian

 

 

 

You must be logged in to post in the forum