Post by PGMComputer » Tue Sep 03, 2013 11:34 am

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.

Newbie

Posts

Joined
Mon Jun 24, 2013 8:17 am

Post by Qphoria » Tue Sep 03, 2013 9:29 pm

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"

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by PGMComputer » Wed Sep 04, 2013 4:51 pm

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.

Newbie

Posts

Joined
Mon Jun 24, 2013 8:17 am

Post by Qphoria » Wed Sep 04, 2013 11:53 pm

Code: Select all

if (isset($this->session->data['shipping_method']) && $this->session->data['shipping_method']['code'] != 'pickup') {
    // some code here
} 

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by PGMComputer » Thu Sep 05, 2013 9:46 am

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
} 

Newbie

Posts

Joined
Mon Jun 24, 2013 8:17 am
Who is online

Users browsing this forum: No registered users and 45 guests