Thanks for replying @SantoshKori . I can't see excatly in your code where are you applying a discount code. Can you explain it to me?As I can see, you're only updating quantity of an item.Thnaks again.
Dear friend, I'm struggled in the same situation. Could you find a solution for such problem? I need to apply discount in ajax cart so it's showed on cart like automatic discounts are.