Try our conversational search powered by Generative AI!

Shipping Promotions Not Working (11.8.2)


All our shipping promotions don't seem to be working with the cart's GetTotal() method. We don't have any custom calculators or anything orderriding the shipping calculators or the orders/carts but when I apply any shipping discount the GetTotal returns the shipping on top even know it's on a promotion that's been successfully applied to the cart.

I've pulled the default calculator code in to my solution for debugging and it seems the call to GetShipmentDiscountPrice is returning back 0 where I imagine this should be coming back with the discount with would be equivilent to the value of that shipping method

Does anyone have any ideas on this?

Mar 21, 2018 18:39

Can you post a configuration of a builtin promotion which is not working? I'm pretty sure our QAs have them covered - so it would be very strange if it suddenly stops working.

Mar 21, 2018 20:43

The thing is as well we have some custom code for loading and displaying the correct prices of the shipping amounts for our checkout jouryney and in this we load the promotion reward descriptions and when we have the shipping method set on the shipment it's coming through a both Fulfilled and with the SavedAmount set to the amount we'd expect when the discount is applied. That logic works and our code is displaying everything correct loading shipping costs but the GetTotal() just doesn't seem to think it's applied.

It's strange...

Mar 22, 2018 9:43

I can confirm the shipping promotion is working fine with Quicksilver. Can you try to create a promotion (with your configurations) in Quicksilver and see if that works? 

Do you have any custom implementation of the calculators ?

Mar 22, 2018 9:56

I don't have quicksilver set up at the moment to check on but it's a pretty basic standard promotion, just over 50 free shipping, no custom calculators but I copied the default one using reflection so I could debug through it which is configured at the moment but it comes out exactly the same. We do have our own shipping provider and class that implements IShippingPlugin, IShippingGateway for returning the shipping methods but that's about it.

Mar 22, 2018 10:05

Quicksilver can be set up and running in a few minutes :). We use it as the standard to divide between implementations and frameworks. A problem which can be reproduced in Quicksilver is likely a bug in framework, otherwise it's more likely a problem in implementation. Of course it's not definitive, but it's a starting point. 

Mar 22, 2018 10:27

Yes I have a 3-4 month out of date version of the code that I've based some of our code on which I'd like to refresh as it's out of date with our commerce version. Also I'd have to move over and configure our shipping providers to be able to replicate the issue, but as I said we're not doing anything custom with calculators and using the out of the box order totals. I'll have to do that when I get a chance because we also have a problem with our baskets not merging when users log in to investigate but we have our client in yesterday and total for a sprint review so it won't be right now.

I was just hoping maybe there was something easy that needed to be configured that I'd missed :-( Thanks

Mar 22, 2018 10:38

I think I finally figured it out. We have some code for loading shipping options in a custom way that one of my developers wrote that runs the promotion engine with AppyReward = false. However in my basket manager I was applying the rewards at the start, the getting the shipping options, then getting the totals. Therefore the promotion engine was turning off the rewards, until now I did realise it worked like that but now it's all good. 

Edited, Mar 23, 2018 9:28
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.