6 replies [Last post]
timjahn's picture
Offline
Joined: 11/12/2008
Juice: 3
Was this information Helpful?

I need to limit the zip codes of the delivery address. For example, only people from certain zip codes are allowed to order products. How can I accomplish this?

ledom's picture
Offline
Joined: 10/08/2008
Juice: 81
Hi, Same request, I'm

Hi,

Same request, I'm looking for a similar functionnality. I get the zip code list into a sql table.

setfree's picture
Offline
Uber Donor
Joined: 12/16/2007
Juice: 436
Re: How can I limit the zip codes products can be delivered to?

I have accomplished this with Conditional Actions (admin/store/ca) in both Ubercart 1 and 2.

  • Create your Shipping Method
  • Head over to Conditional Actions and edit your Shipping Method Predicate
  • Set the Conditions as Check an order's SHipping Postal Code
  • Enter the Zipcode - Note: you can use wildcard characters.
  • You will likely have to create multiple conditions to account for all of your zipcodes. The wild cards help greatly, but with a very large amount of zipcodes this may become unpractical

If the zipcode they enter does not match what you set up then there will be no shipping quote generated and they will not be able to complete their order.

HTH

ledom's picture
Offline
Joined: 10/08/2008
Juice: 81
Hi Thanks Setfree I found

Hi
Thanks Setfree
I found another solution with workflow ng and it seems to work fine
I wrote a condition on zipcode, then an action (redirect+cancel order).

wackyxaky's picture
Offline
Joined: 11/09/2011
Juice: 6
Re: Re: How can I limit the zip codes products can be delivered

The limits I need to put on shipping for certain zip codes doesn't make using the wild cards very helpful; is there any way to do this without creating multiple conditions?

Basically, I'm trying to create a system of shipping to some customers on Saturday, but the shipping service I use has certain zip codes where it doesn't provide saturday delivery. It only applies to one state, but it still means inputing hundreds of zip codes. Any ideas to make this easier would be much appreciated.

allanp's picture
Offline
Joined: 05/27/2010
Juice: 74
Still Looking for a Solution

I realize this is an old thread and would like to know if anyone has figured out a way to do this with Conditional Actions
I'm using Drupal 6.20 and Ubercart 2.4

We give away some items to a specific list of zip codes.

I have figured out the condition for specific zip codes, but do not have any actions to remove from the cart or to cancel the order.

Any assistance would be appreciated.

ledom's picture
Offline
Joined: 10/08/2008
Juice: 81
Re: Still Looking for a Solution

Hi, have a look at ubercart API, you can do this using a php type action: http://www.ubercart.org/forum/development/10207/function_remove_item_cart