Coupon code not showing in the invoice

Wei Wang asked on May 5, 2021 20:34

Hi,

We are on Kentico 11 portal engine.

How can I get the coupon code setup in the Product options to show up in the order invoice? I followed the online documents to use the macros {%OrderDiscount.Format(Currency.CurrencyFormatString)%} but only the Order discounts information is shown in the invoice. The document doesn't have anything on how to configure Product coupon into the invoices. https://docs.xperience.io/k11/e-commerce-features/configuring-your-store/configuring-invoices

Please help.

Thanks Wei Wang

Recent Answers


Jake Kula answered on May 6, 2021 06:47 (last edited on May 6, 2021 11:44)

Hi Wei,

You can add this macro to your invoice HTML:

{% Order.OrderCouponCodes#%}

0 votesVote for this answer Mark as a Correct answer

Wei Wang answered on May 6, 2021 16:14

Thank you! I tried this macro and it works. But it only displays the couponcode, how can I add the coupon dollar amount?

0 votesVote for this answer Mark as a Correct answer

Jake Kula answered on May 7, 2021 07:45 (last edited on May 7, 2021 08:12)

Hi Wei,

To get the actual value of the coupon discount is possible but will take a little effort.

To look at isolating a specific discount value, this doc might be able to give you some more insight into how that is possible:

https://docs.xperience.io/k11/e-commerce-features/configuring-your-store/checkout-process/displaying-shopping-cart-details-on-pages

Alternatively, you could write your own macro (which is what I would recommend if you want something very specific) which queries the order and retrieves the discount that was applied by the coupon.

0 votesVote for this answer Mark as a Correct answer

Wei Wang answered on May 7, 2021 13:54

Thank Jake!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.