LisaM Posted December 5, 2008 Share Posted December 5, 2008 Hello. I've set up the shipping table for incremental shipping fees up to $150. Anything over $150 is the order total * 13%. Is there an easy way to do this? Thanks much. Quote Link to comment Share on other sites More sharing options...
LisaM Posted December 5, 2008 Author Share Posted December 5, 2008 Hello. I've set up the shipping table for incremental shipping fees up to $150. Anything over $150 is the order total * 13%. Is there an easy way to do this? Thanks much. Say, I was trolling and found this. If someone could just highlight the portion that would be altered, showing where to plug in if >150 then order total *13% I would be thrilled. $table_cost = split("[:,]" , MODULE_SHIPPING_TABLE_COST); $size = sizeof($table_cost); for ($i=0, $n=$size; $i<$n; $i+=2) { if ($order_total <= $table_cost[$i]) { $prcnt_char = stristr($table_cost[$i+1], ‘%’); $prcnt = substr($table_cost[$i+1], 0, 1); if ($prcnt_char == ‘FALSE’) { /* percent calculation only used if '%' found */ $shipping = $table_cost[$i+1]; break;} else {$shipping = $order_total * ($prcnt / 100); break;} } } Thanks in advance... Quote Link to comment Share on other sites More sharing options...
rayisms Posted August 21, 2009 Share Posted August 21, 2009 Try This, might work! ;) # ################### Greg Whitehead gregory.j.whitehead@gmail.com 12-20-2007 ================================================== Modification to the original contribution by the author above. 06.21/2008 Richard C. Rosario richard@adoncreative.com ============================================= This modification will allow you to set percentages in the Table Rate Shipping method. ie 5.00:3.00,25:10%,500:25999999:3% Note: DO NOT USE "," ON ANY AMOUNT YOU ENTER, OTHER WISE THE PERCENT WILL NOT WORK FOR YOU. The location of the edit is /catalog/includes/modules/shipping/table.php Around Line 64 After $table_cost = split("[:,]" , MODULE_SHIPPING_TABLE_COST); $size = sizeof($table_cost); for ($i=0, $n=$size; $i<$n; $i+=2) { if ($order_total <= $table_cost[$i]) { $shipping = $table_cost[$i+1]; break; } } Place //Percentage Mod if ( strpos($shipping,"%") > 0 && MODULE_SHIPPING_TABLE_MODE == 'price') { $shipping = $order_total * round(($shipping/100),2); } //end Percentage Mod That is it. Quote Best Regards, Rayisms ~SEEKER~ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.