Jump to content

Show coupon code in checkout


andevit

Recommended Posts

Hi,

I'm a newcomer on Prestashop.

I have this issue: in the checkout if i add a coupon code, I would like to show the coupon code instead of the coupon name.

Can i override the file src/Adapter/Presenter/Cart/CartPresenter.php?

I found the function getTemplateVarVouchers() that I would like to override. Is it possibile?

 

 

Link to comment
Share on other sites

You can modify file: Fsrc\Adapter\Presenter\Cart\CartPresenter.php

function: getTemplateVarVouchers

Change

$vouchers[$cartVoucher['id_cart_rule']]['name'] = $cartVoucher['name'];

To

$vouchers[$cartVoucher['id_cart_rule']]['name'] = $cartVoucher['code'];

Because prestashop does not allow overrride SRC directory

Link to comment
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...