HomeHome Product Discus... Product Discus...RazorCartRazorCartSurfacing error messages in customization codeSurfacing error messages in customization code
Previous
 
Next
New Post
1/23/2019 8:20 PM
 
I have a RazorCart site that has a bit of custom code and I'm having trouble showing an error message in some of the code. Setting the ActionEndResult to false and passing the desired error text in FailureMessage. But this doesn't seem to be working for me in code for the Calc and Checkout pipelines, specifically in our overridden CalculateSubtotal.

Is there a different way to surface an error message there? Or should the above method work?

Thank you,
G
 
New Post
2/6/2019 3:01 PM
 
The CalculatorPipeline usually followed by another pipeline in the same request thread like the CheckoutPipeline or CartPipeline, so the FailureMessage from these two pipelines would be what is actually returning. Also the PipelineAction property "IsDisposable" will allow the pipeline process to continue if there was an error or you even returned Success = false, so the message will be ignored.
But can you share in which action you're returning Success = false, and where you expecting the message to show up (which module/button/action)?

Regards,
Wael
 
Previous
 
Next
HomeHome Product Discus... Product Discus...RazorCartRazorCartSurfacing error messages in customization codeSurfacing error messages in customization code