One of my fellow project team members have faced very strange problem. Whenever they are executing basket update/performing checkout the total pipeline is not called but surprisingly basket and checkout pipeline is called resulting the total always be at zero. I followed below steps to cross check whether all settings are correct.
- Settings in web.config and channel confirmation are properly set.
- Enable pipeline logging (under the logs directory, I can able to see values in other log files but not in total log file).
Thought of environment issue, started checking the problem in other development machines. Then we moved the sequence of pipelines like commenting basket pipeline or keeping only total pipeline to execute (if frustration comes, man doesn’t know what is doing) but no luck, total pipeline is not executed. Finally I have decided to check what is happening in CS2009 assemblies. With the help of reflector tool, I start going through the commerce server methods and found the root cause for the problem.
Total pipeline is executed only if the basket status is “ReadyForCheckout” and line items shipmentmethodIDs doesn’t have empty GUID. Unfortunately for the application we don’t have shipment methods so if condition never is true and total pipeline never executes.
The temporary fix is change the below setting
<Pipeline name=”total” type=”Total” />
To
<Pipeline name=”total” type=”Custom” />
After that the total pipeline is executed without any problem. Now I started thinking why Microsoft has kept this condition. I feel, the application will gain performance by not calling Total pipeline in initial stages and only be called once basket status is set to “ReadyForCheckout” and shipping details are added but MS team forgot that few of the projects doesn’t use shipping methods.
If you like this post, please click on our sponsor advertisement.
