Aioras Posted July 15, 2015 Share Posted July 15, 2015 (edited) 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} {/if} for example.. And update total_cart price Any other suggestion is welcome! Reggards ***EDITED*** 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! Edited July 15, 2015 by Aioras (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 16, 2015 Share Posted July 16, 2015 You can call module static functions, {YourModule::YourFunction()} in this case you can create YourFunction() in your module .php file with some return value 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