Campaign code on free fright is invalid in checkout

We seem to be able to enter campaign codes on “Free Delivery Discounts”, but when entering these campaign codes into the checkout we seem to get “Invalid Discount Code” back from cartContext.AddDiscountCodeAsync.

Are we doing something wrong? Is this a bug?

EDIT: Litium 8.6.1

Ensure that you not have any conflicting discounts that already have been applied on the cart, example a discount that cant be combined with the selected free delivery discount that you setup.

Can you give me a few examples what cannot be combined with a “Free Delivery” Discount? - I do however still get the same behaviour when I remove all Discounts and Campaigns and then create a new campaign.

Steps I just performed:

  1. Remove all Campaigns and Discounts - Including the inactive ones
  2. Create a new campaign valid through 1 of februari to last of februari
  3. Create a new Free Delivery Discount
  4. Add a product list to Produkturval containing a set of published products
  5. Add discount code “test” with validity for 9999 times
  6. Activate the campaign
  7. Add one of the products to the cart
  8. Try to apply the discount code “test”
  9. Fail

You will set that yourself with the “combinations” on the discount itself.

It’s working when I testing on demo-site right now, try to add Court Dress – Northern Green Litium Accelerator into the cart and go to checkout page. If you enter test without having a delivery method with a fee the discount will not be applied, so try first with only enter the code and press the Use button and you will get that the discount code is invalid. Then select the Express delivery for 99 kr and press the Use button again for discount code and it will be applied.

Also this is only used together with the cart amount so if that not is set, this selection will not do anything.

Now this is interesting :slight_smile: - Because that kinda goes against the flow of the checkout page. The code is applied at the top and the delivery method is applied after a query to nShift and a selection has been made by the customer. I would like to argue that you should be able to apply a discount code even before selecting the delivery method, and even if the sum is 0 (for pickup for example) - It just shouldn’t build towards the statistics.

Interesting… thanks.

Another thing regarding this, we had to write logic to set the sum of the delivery to 0 on free delivery since we’re using “SelectedDeliveryOptionArgs” to set the price fetched from nShift, which seems to override even the Discount system.

What would even happen in this case? You would select a delivery option that costs X amount, and then apply the discount code which would make our code set the price to 0 again which would invalidate the discount code again?

Also if you using an external integration system for deliveries it’s in that system the free delivery should be configured in. Example if using Klarna Shipping Assistant the shipping fee is defined in the shipping integration to Klarna and the shipping system and should be delivered to Litium including applied shipping discounts.

There seems to be some confusions over how this is suppose to work vs. our implementation. Do you have time for a 15 minutes meeting this week?

It’s little problematic to apply the discount code before, then we need to accept all codes even if there not is any discount that can be applied with that code. I understand and can agree somehow agree with the feeling about that entering the code is in wrong place but not sure where in the flow it should be. If you have implemented an own shipping selector on the checkout page, you can also change where the discount code section is displayed.

Please, open a support case to take it from there.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.