Jump to content

Use Module variable, outside module template


Recommended Posts

Hello everybody!


I'm finishing a module to add a special tax for clients, but I'm having one issue and is that I can show the added tax in the shopping cart because I added a hook on shopping-cart.tpl, to show the tax quantity and that's ok.


The problem appears when I try to add that tax to the total_price variable on the shopping cart, because that's not on my module and I can't access the module variable value...

My question is if it's posible to create a variable that could be accessed from shopping-cart.tpl so I could check:

{if $useCustomTax}

   {displayPrice price=$total_price+$customTaxQuantity}



for example..


And update total_cart price :)


Any other suggestion is welcome!







For now I'd discover in Cart.php this function:


getSummaryDetails() in wich I can set the smarty values for the template so I will try to override cart.php file to add one variable with my $useCustomTax and my $customTaxQuantity .. and let see if it works!


then I would include those overrides in my module folder, hope it works! :ph34r:

Edited by Aioras (see edit history)
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...