Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Free Shipping Within US/Charge for international

Free Shipping Within US/Charge for international

Views: 6,653

Results 1 to 20 of 59
25 Jan 2012, 4:15 AM
#1
cuddlingwolf avatar

cuddlingwolf

New Zenner

Join Date:
May 2010
Posts:
13
Plugin Contributions:
0

Free Shipping Within US/Charge for international

This has probably been answered a million times so feel free to direct me to another thread.

I want shipping to be free within the US (which I have working) but it says not available in other areas. I want it to default to normal shipping charges via USPS (shipping module already setup) if they are outside the US.

25 Jan 2012, 3:34 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Within US/Charge for international

Make sure that you have the current USPS January 22, 2012 update:
http://www.zen-cart.com/forum/showthread.php?t=191406

and make a Zone Definition with the DETAILS for everywhere that is not the US and add that Zone Definition to the USPS shipping module ...

25 Jan 2012, 4:26 PM
#3
cuddlingwolf avatar

cuddlingwolf

New Zenner

Join Date:
May 2010
Posts:
13
Plugin Contributions:
0

Re: Free Shipping Within US/Charge for international

Ajeh:

Make sure that you have the current USPS January 22, 2012 update:
http://www.zen-cart.com/forum/showthread.php?t=191406

and make a Zone Definition with the DETAILS for everywhere that is not the US and add that Zone Definition to the USPS shipping module ...

My problem is not getting the USPS to recognize international orders.

My problem is that certain products I have are drop shipped by my supplier. There is no cost within the US for me, but I have to pay regular shipping costs if it is outside of the US.

In other words, I need to make these items Free Shipping ON CONDITION of them being in the US. Outside the US I need normal shipping costs to apply.

25 Jan 2012, 4:49 PM
#4
cuddlingwolf avatar

cuddlingwolf

New Zenner

Join Date:
May 2010
Posts:
13
Plugin Contributions:
0

Re: Free Shipping Within US/Charge for international

Also I should specify that is only certain products....

Other products I charge shipping regardless of it is within the US or not...

I can't simply flag these specific products as "free shipping" and I can't tell the USPS shipping module to only work outside the US because either way I am shooting myself in the foot.

25 Jan 2012, 5:40 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Within US/Charge for international

If you want to have Products that are Free Shipping for 1 Zone but not for others ...

Build the Zone that the Products ARE Free Shipping when marked Always Free Shipping ...

On the Products, mark them as Always Free Shipping but also add the Product Weight for those who do not get the Always Free Shipping ...

Then look at post #11 of this thread:
http://www.zen-cart.com/forum/showthread.php?t=176822&highlight=shipping.php

Set the Zone id for your Zone Definition of the Zone allowed the Free Shipping ... in your case, this would be the Zone Definition that you create and define in the DETAILS to be the United States and the Zones included, and set the 21 to that Zone Definition for:
$valid_zone_id = 21;

So if your Zone Definition is 7 change the 21 to 7 ...

25 Jan 2012, 7:55 PM
#6
cuddlingwolf avatar

cuddlingwolf

New Zenner

Join Date:
May 2010
Posts:
13
Plugin Contributions:
0

Re: Free Shipping Within US/Charge for international

I think I got it working, will do a bunch of tests to confirm.

Thanks for the help and HUGE thanks for the update on the USPS module. :D

25 Jan 2012, 11:27 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Within US/Charge for international

You are most welcome ... hope this works for you ... :smile:

24 Feb 2013, 3:13 AM
#8
jusmejim avatar

jusmejim

New Zenner

Join Date:
Feb 2013
Posts:
41
Plugin Contributions:
0

Re: Free Shipping Within US/Charge for international

Linda, I appreciate all the hard work you put in on the forum here. You've already saved me several hours. This "mod" will do exactly what I'm looking for I think, but I was wondering how you come up with the valid zone id of 21? I would need the code to cover all 50 states plus the territories.

The free shipping that I offer is actually anything that can be shipped as first class, so I'm able to include all states and territories since the price is the same for all those areas.

Just to double check.

I offer free shipping on some items but not on others, and the free shipping is ONLY for U.S. states/territories. All other areas would pay shipping on the items offered for free, and then I also have items that everyone pays shipping on, both U.S. and foreign customers.

So this "mod" should work for my scenario shouldn't it? And how would I find the code to use instead of using "21".

Thanks again for everything.

26 Feb 2013, 5:01 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Within US/Charge for international

So the shipping that you need is:

1 ANY Order that is First Class ONLY

2 to the US - ALL Zones meaning US 50 States plus DC and ALL US Territories)

is this correct?

26 Feb 2013, 6:29 PM
#10
jusmejim avatar

jusmejim

New Zenner

Join Date:
Feb 2013
Posts:
41
Plugin Contributions:
0

Re: Free Shipping Within US/Charge for international

Ajeh:

So the shipping that you need is:

1 ANY Order that is First Class ONLY

2 to the US - ALL Zones meaning US 50 States plus DC and ALL US Territories)

is this correct?

Yes that is what I am trying to get. But I do need to have the weight on the item listings since I ship to all countries, so I'll need that to figure shipping for international shipments.

I was thinking I could do what you suggested in the "other post" that you referred too (post #11 in the other thread) if I could figure out the "code" for all 50 plus territories as opposed to the "code" for lower 48 only.

26 Feb 2013, 7:40 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Within US/Charge for international

Okay ... how about this question ...

I am assuming you are using USPS for your First Class ...

If so, do you still want to show the other methods with their Normal Shipping Costs from USPS?

26 Feb 2013, 9:48 PM
#12
jusmejim avatar

jusmejim

New Zenner

Join Date:
Feb 2013
Posts:
41
Plugin Contributions:
0

Re: Free Shipping Within US/Charge for international

Ajeh:

Okay ... how about this question ...

I am assuming you are using USPS for your First Class ...

If so, do you still want to show the other methods with their Normal Shipping Costs from USPS?

Yes on the first class question.

On the second question it really doesn't matter, but if I could still show them, then customers would have the option to upgrade to that type of shipping if they wanted too.

27 Feb 2013, 12:14 AM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Within US/Charge for international

For your Free Shipping on First Class, this is even easier to do ...

You do not need to make a special Zone Definition if:

1 First Class if Free Shipping ALWAYS for the US

2 If the US means ALL 50 States, DC and all US Territories

Just customize the USPS shipping module:
/includes/modules/shipping/usps.php

and add the code in RED:

          $cost = preg_replace('/[^0-9.]/', '',  $cost);

[B]// bof: set First Class to 0.00 for US
if ($this->usps_countries == 'US' && $type == 'FIRST CLASS') {
  $cost = 0.00;
}
// eof: set First Class to 0.00 for US
[/B]
// add $this->usps_countries to title to test actual country
          $methods[] = array('id' => $type,
                             'title' => $title,
                             'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? $usps_handling_fee * $shipping_num_boxes : $usps_handling_fee) );
27 Feb 2013, 1:42 AM
#14
jusmejim avatar

jusmejim

New Zenner

Join Date:
Feb 2013
Posts:
41
Plugin Contributions:
0

Re: Free Shipping Within US/Charge for international

That appears to be real close to what I need. Only 1 glitch....I have a 1.00 handling fee to pay for boxes, packing material, etc. The costs associated with first class is showing as 1.00 (I'm assuming) because of this. Any way to make that not show on first class?

27 Feb 2013, 1:49 AM
#15
jusmejim avatar

jusmejim

New Zenner

Join Date:
Feb 2013
Posts:
41
Plugin Contributions:
0

Re: Free Shipping Within US/Charge for international

Hmmmm.....thought I had typed out another question on that last post, but it's not there.

On the shipping estimator where it shows the classes of service is there a way to change the wording "first class" to "Free shipping"?

27 Feb 2013, 2:11 AM
#16
jusmejim avatar

jusmejim

New Zenner

Join Date:
Feb 2013
Posts:
41
Plugin Contributions:
0

Re: Free Shipping Within US/Charge for international

Ah, and one other issue. If someone buys several "free" items and the total weight goes over 13 oz. then it doesn't give them free shipping.

27 Feb 2013, 2:13 AM
#17
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Within US/Charge for international

Change the IF to include the line in RED:

// bof: set First Class to 0.00 for US
if ($this->usps_countries == 'US' && $type == 'FIRST CLASS') {
  $cost = 0.00;
[B]  $usps_handling_fee = 0.00;
[/B]}
// eof: set First Class to 0.00 for US
27 Feb 2013, 2:14 AM
#18
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Within US/Charge for international

JusMeJim:

Ah, and one other issue. If someone buys several "free" items and the total weight goes over 13 oz. then it doesn't give them free shipping.

That is how USPS works ...

Free Shipping is only available based on weight limitations ...

What do you want to happen on the shipping when the weight is over 13oz? :lookaroun

27 Feb 2013, 2:19 AM
#19
jusmejim avatar

jusmejim

New Zenner

Join Date:
Feb 2013
Posts:
41
Plugin Contributions:
0

Re: Free Shipping Within US/Charge for international

Ajeh:

That is how USPS works ...

Free Shipping is only available based on weight limitations ...

What do you want to happen on the shipping when the weight is over 13oz? :lookaroun

As an example, one of the items that I sell is light switch plates in various designs. I offer free shipping on all of these, and they weigh about 4 to 7 oz. each. Quite often someone will buy 2 or 3 of these, or they'll buy a single light switch, and maybe 2 plug in plates, so the total weight is going to be over 13 oz., but I still want them to get free shipping since all the items they bought offered free shipping.

27 Feb 2013, 2:31 AM
#20
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Within US/Charge for international

Now you are getting into a need for a new field in the table:
products

to make the Product as Free US shipping and then recalculate the weight based on the country which may lead to a need for a Zone Definition to recalculate what is Free Shipping as in no shipping charge to the US but still charge for shipping to everyone else ...

This may make it needed rather than using this nice and tidy method to look at Always Free Shipping and convert that to Always Free Shipping for the US only but only for First Class or for all shipping methods ...

This leads to ...

You have to have a long think over what you are really wanting to do here in regards to a cart that is ONLY these Products that you think are cheap enough in combination with one another or with other products in the cart that do not get Free Shipping and how you want to handle the shipping for:

1 All Products marked as Always Free Shipping or the new field for Free Shipping US only

2 What happens on a Mixed Cart that has these Products in the Cart, as in are the USPS shipping charges counted towards the weight or not on US Orders or only excluded from First Class and now we run into what IS First Class if your definition is not based on USPS weight constraints

You really need to think out all of the conditions to determine how these calculations should be done ... got all that? :blink: