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 / exclude non continental united states zones from free shipping.

exclude non continental united states zones from free shipping.

Started by gloerick on 3 Mar 2012, 5:14 PM · Views: 8,564

Results 41 to 60 of 104
4 Mar 2012, 1:57 AM
#41
ajeh avatar

ajeh

Oba-san

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

Post #41 by ajeh

What are you using to edit your files? :unsure:

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!

4 Mar 2012, 2:00 AM
#42
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #42 by gloerick

USPS is not showing in states IN the 48 zone like Idaho and Montana, but IS when out of the 48.

also the fedex is altering the shipping when adding and removing the food "free shipping" to and from the cart.

4 Mar 2012, 2:01 AM
#43
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #43 by gloerick

wordpad, and notepad

4 Mar 2012, 2:12 AM
#44
ajeh avatar

ajeh

Oba-san

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

Post #44 by ajeh

You need a better TEXT Editor likeNoteTab Pro or UltraEdit so that you are able to customize the files correctly ...

You need to customize your other shipping modules same as the USPS shipping module ...

NOTE: if your other shipping modules do not have code similar to:

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

then they need further customization ...

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!

4 Mar 2012, 2:18 AM
#45
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #45 by gloerick

ok, and not sure how to do that.
is that why if IN the 48 USPS will not show ?

4 Mar 2012, 2:36 AM
#46
ajeh avatar

ajeh

Oba-san

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

Post #46 by ajeh

I am going to have to play with this for awhile and I am too tired to continue right now ...

So either later tonight or tomorrow when I am perky again ... :flex:

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!

4 Mar 2012, 2:44 AM
#47
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #47 by gloerick

Thank you SO MUCH.. it is SO close..

4 Mar 2012, 3:19 AM
#48
ajeh avatar

ajeh

Oba-san

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

Post #48 by ajeh

Try changing the code in the file:
/includes/modules/usps.php

using a proper TEXT Editor, to the code in RED:

// check if all keys are in configuration table
      if (IS_ADMIN_FLAG) {
        $chk_sql = $db->Execute("select * from " . TABLE_CONFIGURATION . " where configuration_key like 'MODULE\_SHIPPING\_USPS\_%' ");
        $chk_keys = $this->keys();
        if (sizeof($chk_keys) != $chk_sql->RecordCount()) {
          $this->title = $this->title . '<span class="alert">' . ' - Missing Keys you should reinstall!' . '</span>';
        }
      }
    }

// 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 = 21;
        $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

    if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_USPS_ZONE > 0) ) {

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!

4 Mar 2012, 3:22 AM
#49
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #49 by gloerick

copied it from the email text :-) looks great..

4 Mar 2012, 3:33 AM
#50
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #50 by gloerick

looking great :-)

FREE SHIPPING single item only in cart
SHOWS $0.00 free shipping to both test 48 states - Perfect

Canada, HI, AK & PR only showing USPS ? no others show ?
but the canada shows 4 USPS options and the others only show 2 USPS options.

NON free shipping item single item only in cart
UPS is not showing to Puorto rico ?

all shipping shows to Hawaii, Alaska & Canada

all showing in my 2, 48 states of Idaho and Montana
"this has MOST shipping options?" others have fewer ?

4 Mar 2012, 3:50 AM
#51
ajeh avatar

ajeh

Oba-san

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

Post #51 by ajeh

Did you add the customized code to the UPS shipping module? :unsure:

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!

4 Mar 2012, 4:05 AM
#52
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #52 by gloerick

Umm, :( does it matter where in the file ?

same code the USPS ?

4 Mar 2012, 4:15 AM
#53
ajeh avatar

ajeh

Oba-san

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

Post #53 by ajeh

You have to put the new code in the same place in the
/includes/modules/shipping/ups.php

NOTE: you need one more change to the:
/includes/modules/shipping/usps.php

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

        $valid_zone_id = 21;
        $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

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!

4 Mar 2012, 4:26 AM
#54
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #54 by gloerick

ok added..

same place... right.. giving it a shot,
same for fedex ?

4 Mar 2012, 4:37 AM
#55
ajeh avatar

ajeh

Oba-san

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

Post #55 by ajeh

I am guessing that you should find a similar place in FedEx as I do not have that 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!]
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!

4 Mar 2012, 4:43 AM
#56
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #56 by gloerick

I know it is a lot and you have done SO MUCH, but I suck..
can I have a hint ? :-)

4 Mar 2012, 2:17 PM
#57
ajeh avatar

ajeh

Oba-san

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

Post #57 by ajeh

I think this is what you need, putting the same code in the same place of these shipping modules ...

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!

4 Mar 2012, 4:25 PM
#58
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #58 by gloerick

Fedex now shows :-) UPS is not showing to puorto rico?

4 Mar 2012, 4:44 PM
#59
ajeh avatar

ajeh

Oba-san

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

Post #59 by ajeh

When you use Puerto Rico, where Country is US and State is Puerto Rico, UPS does not know what to do ...

If you use, Country: Puerto Rico, then UPS knows what to do and I built in a translator info USPS to adjust the info as if this was Country: US and State Puerto Rico so it can work ...

What are your settings in the Configuration ... Shipping/Packaging ...

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!

4 Mar 2012, 5:00 PM
#60
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Post #60 by gloerick

Country of Origin United States
Postal Code 84014
Enter the Maximum Package Weight you will ship 150
Package Tare Small to Medium - added percentage:weight
Larger packages - added packaging percentage weight
Display Number of Boxes and Weight Status 3
Order Free Shipping 0 Weight Status 0
Shipping Estimator Display Settings for Shopping Cart 2
Display Order Comments on Admin Invoice 1
Display Order Comments on Admin Packing Slip 1