Carpe_diem Posted March 4 Share Posted March 4 Hi, I am currently working on a project and my client wants that current total discount is displayed on the cart page above the current total price. As I use $cart with print_r or var_dump there is no discount available like $cart.totals.discount. Could someone please give me some help or clue how to set this up Link to comment Share on other sites More sharing options...
WebDesk Solution Posted May 15 Share Posted May 15 (edited) Hello @Carpe_diem, To show the current total discount on the cart page above the total price, follow the below steps: Step 1: First, locate the discount coupon generated in the PrestaShop back office.Step 2: Next, replace the existing code with the following Smarty code instead of "$cart.totals.discount": {if $cart.vouchers.added} {foreach from=$cart.vouchers.added item=voucher} <span class="label">Discount</span> <span>{$voucher.reduction_formatted}</span> {/foreach} {/if} By using this code, the total discounts will be printed on the cart page. Edited May 16 by WebDesk Solution (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now