Results 1 to 3 of 3

Shipping table as percent of price above $xx.xx

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 ...

      
  1. #1
    Anonymous
    Guest


    Default Shipping table as percent of price above $xx.xx

    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

  2. #2
    New Member
    Join Date
    Feb 2004
    Posts
    24
    Rep Power
    0


    Default

    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. #3
    New Member
    Join Date
    Feb 2004
    Posts
    24
    Rep Power
    0


    Default

    Actually the file is \catalog\includes\modules\shipping\table.php

Similar Threads

  1. Price-based table rate shipping
    By jbanda in forum osCmax v1.7 Discussion
    Replies: 6
    Last Post: 04-15-2005, 06:42 AM
  2. Setting up Table based shipping based on price
    By royjones in forum osCmax v1.7 Discussion
    Replies: 5
    Last Post: 04-14-2005, 07:19 PM
  3. how do i add shipping price under the product price ?
    By Roy_Shiker in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 09-08-2004, 05:40 AM
  4. UPS Special Shipping code - need to reduce prices by percent
    By dasher99 in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 12-03-2003, 03:18 PM
  5. Percent Price
    By djavet in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 09-27-2003, 06:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •