Results 1 to 5 of 5
  1. #1

    Default Extra Shipping Cost per Heavy Item

    Hi,
    I have a problem with the shipping modules and can't seem to find a work around solution.

    Basically, i want to charge a flat rate shipping charge of £6.95 to mainland UK destinations. I then also have about 20 items which i would like to charge an extra £5 per item shipped. To get around this at the moment, i am setting all items to weight 0, and the heavier items to weight 20, this is then adding an extra £5 per heavier item when i calculate shipping by weight.

    Now, the problem is that to ship to Non mainland UK destinations the costs are higher. To work around this i had a notice on the shipping page for customers to ring up for a shipping quote from these destinations, however most customers are ignoring this notice and either slipping through the net or taking time up having to ring up and process the extra charge.

    I have now installed the UK shipping by postcode mod which enables me to charge more per weight for non-mainland UK destinations. The only problem is that now i am back to not being able to charge more per extra heavy item, as i am going to have to input the actual weights of all our items to be able to use this mod.

    Ideally, i need a way to just add £5 extra per unit ordered of each of these roughly 20 bulky items, £10 extra per unit if shipped to non-mainland UK.

    I came across a work around, which is to add an attribute to each of these 20 items which is always selected and adds £5 to the shipping, however i want to keep the website as clean looking as possible so would not like to go down this route.

    Any help, or even ideas would be greatly appreciated.

    Thanks

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

    Default Re: Extra Shipping Cost per Heavy Item

    You could test for the:
    $order->delivery['country_id']

    and if that is not the UK (by default 222) then do your calculations to add the extra charges ...

    To make sure that is accessible in the function of the shipping module you are customize, make sure there is a:
    global $order;

    or add it to the code ...

    Do you have a way to identify the 20 items for the extra charge or just with the products_id ...

    If it is the same master_categories_id then you could use:
    Code:
      global $cart;
      $chk_cat = $_SESSION['cart']->in_cart_check('master_categories_id','12');
    Or if you need to test for the products_id you could use:
    Code:
      global $cart;
      $chk_products = 0;
      $chk_products += $_SESSION['cart']->in_cart_check('products_id','10');
      $chk_products += $_SESSION['cart']->in_cart_check('products_id','13');
      $chk_products += $_SESSION['cart']->in_cart_check('products_id','27');
    (etc etc etc)
    to get your count of how many are in the cart ...
    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

    Default Re: Extra Shipping Cost per Heavy Item

    Hi,
    I'm not too good with coding to be honest. I can follow instructions well and do basic modifications myself but don't really understand some of what you are saying.

    The items are all split across 3 different subcategories, but have no other 'normal' items in the subcategories with them.

    Thanks

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

    Default Re: Extra Shipping Cost per Heavy Item

    So if the Products all use 1 of 3 different master_categories_id and no other Products use those master_categories_id values you could get the count of the Products x quantity in the cart that use master_categories_id 12. 15 or 17 with:
    Code:
      global $order, $cart;
      $chk_cat = 0;
      $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','12');
      $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','15');
      $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','17');
      if ($order->delivery['country_id'] == 222) {
        $chk_cat_shipping = $chk_cat * 5.00;
      } else {
        $chk_cat_shipping = $chk_cat * 10.00;
      }
    Then find the code similar to:
    Code:
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
                                                         'cost' => MODULE_SHIPPING_FLAT_COST)));
    and change it to:
    Code:
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
                                                         'cost' => MODULE_SHIPPING_FLAT_COST +  $chk_cat_shipping)));
    That is based on the Flat Rate flat shipping module but can be adapted to any other shipping module ...
    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

    Default Re: Extra Shipping Cost per Heavy Item

    Hi,

    Thanks for the help. I haven't given it a try yet as i have decided upon an easier workaround which is to set a flat rate postage cost for non-mainland UK, which is easier to incorporate the £10 extra charge into the per unit weight workings. I decided it may be too much hassle inputting the weights of the hundreds of items i am stocking.

    Thanks for your help though

 

 

Similar Threads

  1. v139h Calculating Shipping - First Item a Set Cost, Each Additional Item $1.00 Per Item
    By Beachcovers in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 31 Mar 2012, 04:00 AM
  2. each item(individually) has it own shipping cost per state depending on item
    By vandiermen in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 31 Oct 2010, 12:02 PM
  3. Individual Shipping Per Item, and reduced cost per extra item
    By canad1an in forum Addon Shipping Modules
    Replies: 7
    Last Post: 6 Feb 2009, 11:41 PM
  4. Shipping cost per item
    By jwball in forum Built-in Shipping and Payment Modules
    Replies: 16
    Last Post: 19 May 2007, 04:00 PM
  5. Extra cost per item during checkout
    By beasleybub in forum General Questions
    Replies: 2
    Last Post: 6 Nov 2006, 08:36 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