Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31
  1. #1
    Join Date
    Feb 2006
    Posts
    230
    Plugin Contributions
    0

    Default S & H extra charge for some items

    I have several items that are heavier than all my other items and I want to charge an additional $1.00 per item for shipping.
    I am using a table rate based on merchandise total:
    Up to $40.00 $6.49
    $40.01 to $75.00 $7.49
    $75.01 to $100.00 $8.49

    The extra charge should be per HEAVY item ordered: 3 x 1.00= 3.00 + table rate.

    Have searched the forum but can't find what I need.

    Please help.

    Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: S & H extra charge for some items

    About how many of these Heavy items do you have?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Feb 2006
    Posts
    230
    Plugin Contributions
    0

    Default Re: S & H extra charge for some items

    Hi,

    About 8 - 12 depending on inventory levels.

    Thanks

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: S & H extra charge for some items

    You could check the cart and calculate the extra charge adding the code in RED:
    /includes/modules/shipping/table.php

    Code:
    // bof: Add extra charge for heavy items in cart
    $chk_cart = 0;
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','57');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','112');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','10');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','12');
    $extra_charge = $chk_cart * 1.00;
    
        $this->quotes = array('id' => $this->code,
        'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
        'methods' => array(array('id' => $this->code,
        'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
        'cost' => $extra_charge + $shipping + (MODULE_SHIPPING_TABLE_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_TABLE_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_TABLE_HANDLING) ) ));
    // eof: Add extra charge for heavy items in cart
    
        if ($this->tax_class > 0) {
    Just set the products_id on the lines for:
    Code:
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','12');
    and change the number example 12 to what ever products_id you need ... for additional products just continue to add additional lines of:
    Code:
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','12');
    Then, set the amount to charge per item where 1.00 is the charge I put in:
    Code:
    $extra_charge = $chk_cart * 1.00;
    
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Feb 2006
    Posts
    230
    Plugin Contributions
    0

    Default Re: S & H extra charge for some items

    Thank you that's simple enough.

    But is all code added to the /includes/modules/shipping/table.php file?

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: S & H extra charge for some items

    The first section of code is the changes for table.php ...

    The other sections just explain how that code is used to identify the products_id that need to be checked or counted to calculate the extra charge ...

    The code I posted shows 4 products_id being checked and then the total number of products in the cart for those products_id are multiplied by 1.00 to get the extra charge which is added to the Table Rate charges ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Feb 2006
    Posts
    230
    Plugin Contributions
    0

    Default Re: S & H extra charge for some items

    Oops for my dense head.
    Thanks a million for your help.

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: S & H extra charge for some items

    You are most welcome ... let us know if you have success or any other problems with this ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Feb 2006
    Posts
    230
    Plugin Contributions
    0

    Default Re: S & H extra charge for some items

    Hi Ajeh,

    Just got back from a week away and have tried your suggestion. But it does not work. No errors detected. Code is below.
    Where did I go wrong?

    $show_box_weight = ' (' . $shipping_num_boxes . ' x ' . number_format($shipping_weight,2) . TEXT_SHIPPING_WEIGHT . ')';
    break;
    }
    }

    // bof: Add extra charge for heavy items in cart
    $chk_cart = 0;
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','540');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','3772');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','3734');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','3736');
    $extra_charge = $chk_cart * .75;

    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
    'cost' => $extra_charge + $shipping + (MODULE_SHIPPING_TABLE_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_TABLE_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_TABLE_HANDLING) ) ));
    // eof: Add extra charge for heavy items in cart

    if ($this->tax_class > 0) {
    $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    }

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: S & H extra charge for some items

    As a test, add this echo line in Red:
    Code:
    // bof: Add extra charge for heavy items in cart
    $chk_cart = 0;
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','540');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','3772');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','3734');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','3736');
    $extra_charge = $chk_cart * .75;
    echo 'Table Extra charges $chk_cart: ' . $chk_cart . ' $extra_charge: ' . $extra_charge . '<br>';
    When you test your cart in the shipping, you should see that line on the screen, what is in the cart and what does the line read?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Replies: 15
    Last Post: 24 Feb 2014, 06:23 PM
  2. Adding extra shipping charge to specific items
    By kevinoneil68 in forum General Questions
    Replies: 1
    Last Post: 22 Nov 2011, 02:21 AM
  3. Some items available for international shipping & some not? Anyone know how?
    By Treasuresbycaz in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 11 Jan 2009, 11:08 PM
  4. extra shipping charge on certain items
    By deer_boy in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 6 Jun 2008, 02:02 PM
  5. Extra charge for specific bulky items (table-weight module)
    By SHK in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 9 Apr 2008, 12:23 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR