Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2004
    Posts
    112
    Plugin Contributions
    0

    Default Weight not being calculated properly for freeshippng items going overseas

    Hi,

    This is a continuation from here http://www.zen-cart.com/forum/showpo...&postcount=143

    I'm based in the UK
    I want to give free shipping to items going to the UK
    I want to charge postage to items going overseas.
    I've installed the UKtemplates and big_royalmail_v2.0-beta-2

    When the item is set to no free shipping, the weight calculates properly. 0.4kg with the correct postage.

    I set item to be freeshipping all the time. Weight 0.4kg. Within the UK the weight is 0kg. Fine.
    I set the freeshipper module zone to UK (I've tried both UKVAT and UKZR: Zone 1 Mainland UK)
    When I try to deliver to the US the other correct postage options available but the weight of the item is 0kg so the cost is wrong.

    Have I setup things wrongly or is there a 'bug' in the freeshipper module in not considering the zone UK?
    Do I need to use the special/combination shipping option to get this to work?

    Thanks
    Alan

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

    Default Re: Weight not being calculated properly for freeshippng items going overseas

    If you look at the /includes/modules/shipping/item.php and look for the usage of:
    $_SESSION['cart']->free_shipping_items()
    You will see how that adjusts the item count ...

    Note: for price adjustment this is done with:
    $_SESSION['cart']->free_shipping_prices()
    Note: weight is adjust automatically when calculated

    WARNING: Shipping Modules that do not come with the current Zen Cart may or may not be up to date on the proper methods of calculating: price, item and weight
    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
    Oct 2004
    Posts
    112
    Plugin Contributions
    0

    Default Re: Weight not being calculated properly for freeshippng items going overseas

    Hi,
    Quote Originally Posted by Ajeh View Post
    WARNING: Shipping Modules that do not come with the current Zen Cart may or may not be up to date on the proper methods of calculating: price, item and weight
    I tried using "Per Unit" shipping module.

    If the item is not free shipping, the correct weight comes up.

    If the item is free shipping, and the zone is correct then the free shipping option appears.

    If the item is free shipping, but delivery address is not correct then
    1) the free shipping does not appear
    2) BUT neither does the "Per Unit" shipping!
    3) The weight is also set to 0 kg.

    This is using zencart modules which should be calculating the weight correctly for an invalid free shipping zone, but it is not.

    Alan

  4. #4
    Join Date
    Oct 2004
    Posts
    112
    Plugin Contributions
    0

    Default Re: Weight not being calculated properly for freeshippng items going overseas

    Replace
    "If the item is free shipping, but delivery address is not correct then"
    with
    "If the item is free shipping, but the delivery address is in an invalid free shipping zone then "

  5. #5
    Join Date
    Oct 2004
    Posts
    112
    Plugin Contributions
    0

    Default Re: Weight not being calculated properly for freeshippng items going overseas

    Hi Ajeh,

    Thanks for the pointer, I followed
    Code:
    $_SESSION['cart']->free_shipping_items()
    "free_shipping_items()" is in /includes/classes/shoppingcart.php

    Code:
    function free_shipping_items() {
        $this->calculate();
        return $this->free_shipping_item;
      }
    So I tracked down calculate and found this piece of code inside
    Code:
            // shipping adjustments
            if (($product->fields['product_is_always_free_shipping'] == 1) or ($product->fields['products_virtual'] == 1) or (ereg('^GIFT', addslashes($product->fields['products_model'])))) {
              $this->free_shipping_item += $qty;
              $this->free_shipping_price += zen_add_tax($products_price, $products_tax) * $qty;
              $this->free_shipping_weight += ($qty * $products_weight);
            }
    I think this bit

    "($product->fields['product_is_always_free_shipping'] == 1)"

    needs to be changed to

    "($product->fields['product_is_always_free_shipping'] == 1 AND (check it is in valid free shipping zone or the free shipping zone is 'none') )"

    Does this qualify as a bug or is there another way to configure zencart to do this?

    Thanks
    Alan

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

    Default Re: Weight not being calculated properly for freeshippng items going overseas

    All the little quirks as far as I know are fixed and in v1.3.6 ...

    I may even have had all the free_somethings fixed in v1.3.5 ... but I am tired and have not looked to see which version got them all ...

    There are more features on shipping modules fixed in v1.3.6 that were quirks more or less but a bother when they happened ...

    And upgrade is always a good idea ...
    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
    Oct 2004
    Posts
    112
    Plugin Contributions
    0

    Default Re: Weight not being calculated properly for freeshippng items going overseas

    Hi,
    Quote Originally Posted by Ajeh View Post
    And upgrade is always a good idea ...
    Thanks for all your hard work. I've upgraded to 1.3.6 but the error is still there.

    /includes/classes/shoppingcart.php

    Line 655
    Code:
            if (($product->fields['product_is_always_free_shipping'] == 1) or ($product->fields['products_virtual'] == 1) or (ereg('^GIFT', addslashes($product->fields['products_model'])))) {
    I believe the part

    "($product->fields['product_is_always_free_shipping'] == 1)"

    should be changed to

    "($product->fields['product_is_always_free_shipping'] == 1 AND (check it is in valid free shipping zone or the free shipping zone is 'none') )"

    Many thanks
    Alan

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

    Default Re: Weight not being calculated properly for freeshippng items going overseas

    There isn't a relationship to the free_shipping_something functions and zones ...

    If you mark something Always Free Shipping or 0 weight and 0 weight is Free Shipping then those products are Free Shipping regardless of Zone ...
    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
    Oct 2004
    Posts
    112
    Plugin Contributions
    0

    Default Re: Weight not being calculated properly for freeshippng items going overseas

    Thanks for the reply

    Alan

 

 

Similar Threads

  1. v139g shipping weight not being calculated correctly
    By greenman161 in forum Addon Shipping Modules
    Replies: 4
    Last Post: 13 Jul 2015, 12:11 AM
  2. Per Weight Shipping not Calculated when Tax is Calculated
    By CascianoLtd in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 28 Sep 2009, 04:29 AM
  3. Cart Total not calculated properly
    By kotharisa in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 17 Sep 2008, 07:12 PM
  4. Taxes not calculated properly
    By osuwariboy in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 5
    Last Post: 15 May 2008, 05:45 PM
  5. Shipping is not being calculated
    By Mon3 in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 5 May 2008, 10:08 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