Jump to content

Display voucher value in cart


Recommended Posts

When displaying available vouchers in cart, is it possible to show the amounted discount of every voucher without having to adding them to the cart?


Something like {$voucher.amount} or {$voucher.value} ?

Share this post

Link to post
Share on other sites

I'm using 1.4.3 and the "display voucher in cart" is active, but what I'm after is the ability to show the actual value of every discount.

As of now its:

{$voucher.value} Description: Bla bla

{$voucher.code } Code: bla-bla


But I also want to show the actual amount every voucher is worth with something like {$voucher.value/amount}

Share this post

Link to post
Share on other sites

  • 3 months later...



I've PS 1.4.6 version.


when I've inserted the voucher code in the cart (voucher name random create by prestashop with the 10% on total amount, with correct data, all clients and etc.. ) and I clicked add, it shows "voucher code don't applicable" and didn't calculate nothing. in the cart i've added 3 items. The theme is the prestashop default.


How I can solve this problem?How I can modify my file .php?


This my DiscountController.php in the path public_html/controllers/DiscountController.php


class DiscountControllerCore extends FrontController


public $auth = true;

public $php_self = 'discount.php';

public $authRedirection = 'discount.php';

public $ssl = true;


public function process()




$discounts = Discount::getCustomerDiscounts((int)(self::$cookie->id_lang), (int)(self::$cookie->id_customer), true, false);

$nbDiscounts = 0;

foreach ($discounts AS $discount)

if ($discount['quantity_for_user'])



self::$smarty->assign(array('nbDiscounts' => (int)($nbDiscounts), 'discount' => $discounts));



public function displayContent()







If you need more information please post or contact me

Share this post

Link to post
Share on other sites

Ive done one more test, but don't work


I've uploaded my screenshots, _FrontController.php, DiscountController.php, shopping-cart.tpl files in a test platform because i can't post them




username : u786317092

password : travel


I hope this information are useful for you..if you can post my files without problem..



Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More