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.
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:
Remove all Campaigns and Discounts - Including the inactive ones
Create a new campaign valid through 1 of februari to last of februari
Create a new Free Delivery Discount
Add a product list to Produkturval containing a set of published products
Add discount code “test” with validity for 9999 times
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.
Now this is interesting - 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.
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.
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.