Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / Free Shipping to USA, Charge Shpiping for the rest of the world - How?

Free Shipping to USA, Charge Shpiping for the rest of the world - How?

28 May 2013, 8:49 PM
#1
bobbibop avatar

bobbibop

New Zenner

Join Date:
Jul 2004
Location:
Beaverton, Oregon, USA
Posts:
53
Plugin Contributions:
0

Post #1 by bobbibop

It seems like this should be a common situation, but I can't seem to find a simple answer.

I want to offer Free Shipping on some items to all USA destinations. For these same items, I want to charge postage for deliveries to anywhere else in the world.

Putting the weight at 0 will not calculate a postage charge at all.
Using the "Free Shipping Always" does not allow weight calculations for any deliveries.
Using a Zone chart gives the dreaded "We are not shipping to your area" alert.

What do I need to do to my shipping modules, to my product details, to my shipping weights or anything else to implement this simple request?

I am running 1.5.0 on an Apache server through Bluehost.

Thanks,
John L

BobbiBop
John Larson
The BobbiBopStuff Store

29 May 2013, 12:09 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

What shipping modules are you using?

You might look at this thread and see if it helps you on Always Free Shipping being Free Shipping just for your US Zone ...
http://www.zen-cart.com/showthread.php?191528-Free-Shipping-Within-US-Charge-for-international/page2

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!]
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!

10 Jun 2013, 7:05 PM
#3
bobbibop avatar

bobbibop

New Zenner

Join Date:
Jul 2004
Location:
Beaverton, Oregon, USA
Posts:
53
Plugin Contributions:
0

Post #3 by bobbibop

Hi Linda,

I just updated to the March 2013 USPS module.

I followed the advice given in the thread, but now, ALL my USA shipments are Free Shipping, and the nifty "Free Shipping" icon has disappeared from my Free Shipping items.

I would like to be able to ship some items in the USA with postage charge, offer many items with USA Free Shipping, and, finally, offer USA Free Shipping on orders over $X.

I looked at the thread on how to create Zone Definitions, but I don't understand how to define a Zone that operates this way.

Thanks for your help...
John L

BobbiBop
John Larson
The BobbiBopStuff Store

10 Jun 2013, 7:21 PM
#4
bobbibop avatar

bobbibop

New Zenner

Join Date:
Jul 2004
Location:
Beaverton, Oregon, USA
Posts:
53
Plugin Contributions:
0

Post #4 by bobbibop

Ooops! Sorry...

I had earlier read a different thread, not the one you recommended.

I am reading it now...

John L

BobbiBop
John Larson
The BobbiBopStuff Store

10 Jun 2013, 9:26 PM
#5
bobbibop avatar

bobbibop

New Zenner

Join Date:
Jul 2004
Location:
Beaverton, Oregon, USA
Posts:
53
Plugin Contributions:
0

Post #5 by bobbibop

So, on the very final page of the thread, you and JustMeJim have defined perfectly how I want my cart to operate.

  1. Some USA products have postage charges.
  2. Some USA products have Free Shipping.
  3. No non-USA shipments have Free Shipping.
  4. If a USA shipment has mixed Free and non-Free Shipping, the postage cost is based only on the weight of the Non-Free items.
  5. Non-USA weights include the weight of the Free Shipping USA products.

In another thread I had read, your advice was to modify the Order Total Shipping module to "National", etc. I had done that, but found that all my items were now Free Shipping, not just the ones marked "Always Free Shipping" in the Product fields.

In your indicated thread here, You advised JustMeJim to modify both the usps.php, and the shipping.php files.

I did that to mine.

The non-Always Free Shipping items show postage in the USA and Internationally.

The Free Shipping items show the Free Shipping Icon, and no shipping during checkout. However, it is also listed as Free Shipping internationally.

How about a simple way to indicate the shipping charges for each item similar to eBay?

I can indicate Calculated or Flat Rate independently for both USA and International for each product. I can indicate Free Shipping for USA, and independently, offer Free Shipping or not to International. No mucking about with tables or Zones or Product Types...

Instead of modifying OSC or other code to fit Zen, how about emulating someone else's solution to this issue?

What do I do now?

John L

BobbiBop
John Larson
The BobbiBopStuff Store

11 Jun 2013, 2:28 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #6 by ajeh

To have Free Shipping for Products to the US on Products marked as Always Free Shipping with weight set for charging regular prices to those outside the US ...

Turn off the Free Shipping in the Order Total module Shipping ot_shipping ...

Then, check that you have used the code from post #53 from:
http://www.zen-cart.com/showthread.php?191528-Free-Shipping-Within-US-Charge-for-international

What have you used for your Zone Definition DETAILS ...

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!]
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!

11 Jun 2013, 4:12 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #7 by ajeh

NOTE: there were some changes to the March 27, 2013 USPS shipping module ...

To clarify the customization needed for usps.php, you would add the code in RED to the function update_status:

  function update_status() {
    global $order, $db;
    if (IS_ADMIN_FLAG == TRUE) return;

    // disable when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
    }

[B]// bof: allow 1 zone only for Always Free Shipping
//    global $db, $order, $cart;
//echo 'I see quantity: ' . ($_SESSION['cart']->in_cart_check('product_is_always_free_shipping', 1)) . '<br>';

        $valid_zone_id = 2;
        $check_flag = false;
        $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . $valid_zone_id . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
        while (!$check->EOF) {
          if ($check->fields['zone_id'] < 1) {
            $check_flag = true;
            break;
          } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
            $check_flag = true;
            break;
          }
          $check->MoveNext();
        }

        if ($check_flag == true) {
          if ($_SESSION['cart']->count_contents() == $_SESSION['cart']->in_cart_check('product_is_always_free_shipping', 1)) {
            $this->enabled = false;
          } else {
            $this->enabled = true;
          }
        } else {
          $this->enabled = true;
        }
// eof: allow 1 zone only for Always Free Shipping
[/B]
    if ($this->enabled == true) {

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!]
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!

11 Jun 2013, 7:51 PM
#8
bobbibop avatar

bobbibop

New Zenner

Join Date:
Jul 2004
Location:
Beaverton, Oregon, USA
Posts:
53
Plugin Contributions:
0

Post #8 by bobbibop

Thanks, Linda,

I don't have a Zone set up. I'll try to work that out for myself in the next couple days.

I did the earlier mod to both files, but I will revise as you have outlined.

Thanks again.
John L

BobbiBop
John Larson
The BobbiBopStuff Store

11 Jun 2013, 11:57 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #9 by ajeh

Gotta setup your Zones for this to work ...

If you search the FAQs for:
zone

you will find this one that will help in setting up Zone Definitions:
http://www.zen-cart.com/content.php?308-prepared-zone-definitions

Then, check which one you use for the US Free Shipping and its ID number you can replace that value for the:
$valid_zone_id = 2;

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!]
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!