This is a discussion on Shipping table as percent of price above $xx.xx within the osCMax v1.7 General Mods Discussion forums, part of the osCMax v1.7 Forums category; Is there a simple way to have the shipping be calculated as a percentage of the total price of items ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Is there a simple way to have the shipping be calculated as a percentage of the total price of items in the cart after it goes above a certain threshold amount. So the shipping table woud be 15:3.50,25:5.75,50:8.50,75:9.50,100:10.50,199:12:0 0,10000:6% Thanks, Brian |
| Sponsored Links | ||
| ||
| |
|
#2
| |||
| |||
| I think this does the trick in shipping.php : $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;} } } |
|
#3
| |||
| |||
| Actually the file is \catalog\includes\modules\shipping\table.php |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Price-based table rate shipping | jbanda | osCMax v1.7 Discussion | 6 | 04-15-2005 06:42 AM |
| Setting up Table based shipping based on price | royjones | osCMax v1.7 Discussion | 5 | 04-14-2005 07:19 PM |
| how do i add shipping price under the product price ? | Roy_Shiker | osCMax v1.7 Discussion | 0 | 09-08-2004 05:40 AM |
| UPS Special Shipping code - need to reduce prices by percent | dasher99 | osCommerce 2.2 Modification Help | 0 | 12-03-2003 03:18 PM |
| Percent Price | djavet | osCommerce 2.2 Modification Help | 1 | 09-27-2003 06:24 PM |