Developer forum

Forum » Development » Code in OrderTemplateExtender not able to read

Code in OrderTemplateExtender not able to read


Reply
If the option "skip payment/delivery step if only 1 method exists" is enabled, then inside an OrderTemplateExtender we are not able to read Form values from HttpContext.Current.Request.Form anymore from values posted in step 2.

1. Enable the option "skip payment/delivery step if only 1 method exists"
2. Create OrderTemplateExtender that tries to read posted Form values from step 2 of the order process

This way we cannot skip delivery/payment method selection with ordertemplateextenders enabled.

Replies

 
Reply
Hi Emil

If you want to do stuff rather than extend a template you should try using a Notification Subscriber that listens to the event Notifications.eCommerce.Order.Steps.CustomerInfoHarvested.

TemplateExtenders are called when a template is rendered, but the template in step 3 is never rendered (the step is skipped), however the event CustomerInfoHarvested is thrown to the notification subscribers each time we submit step 2.

 - Lasse

 

You must be logged in to post in the forum