Jump to content

Add custom voucher (from module) to $displayVouchers in shopping-cart.tpl


galkowskit

Recommended Posts

Hi,

I have a module that adds X number of vouchers to the database. Everything works just fine except one little, annoying thing. When I add my vouchers the voucher input field won't appear on the shopping-cart.tpl. Because of this code:

 

 

    {foreach $displayVouchers as $voucher}

When I add even a single voucher from back office cart rules everything will work great: the input field will be shown and I can use my own vouchers generated by my module. When I remove that voucher the input field will disappear. Of course I can alter the shopping-cart.tpl itself and fix that but I want my module to work without altering themes.

Is there any way to add anything to $displayVouchers array from inside my module? I was thinking about install() function.

 
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...