Im trying to adjust the order total at the time of check out. I need to add hazmat fee for certain orders that obtain items that have a certain value in a field. I am able to change the confirm.tpl file and get the totals to look right. but im not able to actually change the order total being process into the order and payment system. Any help at which file i need to look at or what variable i need to change to get the order to show the right amount.
Last edited by PGMComputer on Thu Sep 05, 2013 9:48 am, edited 1 time in total.
you shouldn't be adjusting anything manually. Checkout fees are handled by the Extensions->Order Total section of the admin. There isn't a hazmat fee module yet but you could repurpose one of the other ones like low_order_fee and add some code there to only trigger if certain products are in the cart that have some misc field set to "hazmat". Set the fee to always apply then use that other logic to disable the fee for non-hazmat items. Then edit the catalog/language/english/total/low_order_fee.php file to have the title of "Hazmat fee"
thank you for your help. this was such a better solution. I did not even know there was a totals area. I got it implemented and it took much less time to do then hacking and slashing through the tpl files.
I have one more question. Is there away to only add the fee if they are having it shipped. my client also has store pickup as an option and if that is selected then they will not need to pay the hazmat shipping fee.
Thanks in advance.
I have one more question. Is there away to only add the fee if they are having it shipped. my client also has store pickup as an option and if that is selected then they will not need to pay the hazmat shipping fee.
Thanks in advance.
Code: Select all
if (isset($this->session->data['shipping_method']) && $this->session->data['shipping_method']['code'] != 'pickup') {
// some code here
}
that worked had to make an adjustment the shipping_method code for pickup is actually pickup.pickup for 1.5.5.1
Code: Select all
if (isset($this->session->data['shipping_method']) && $this->session->data['shipping_method']['code'] != 'pickup.pickup') {
// some code here
}
Who is online
Users browsing this forum: No registered users and 45 guests