Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Restricting Products By Zones

Restricting Products By Zones

Locked

Views: 1,843

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
29 Jan 2007, 9:17 PM
#1
jimmyjohn avatar

jimmyjohn

New Zenner

Join Date:
Mar 2005
Posts:
4
Plugin Contributions:
0

Restricting Products By Zones

I have a question about creating a customized product restriction based upon zones. I would like to set it up to where certain products cannot be added to the cart the the buyer's shipping address is in a particular zone. Specifically, there are certain products that I do not want to be sold/shipped outside of the U.S. By creating this zone/restriction, if a person from a foreign country tries to add a product with that restriction to their cart, they will not be able to and given an error (letting them know that they product they chose cannot be purchased or shipped outside of the U.S.).

30 Jan 2007, 4:47 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Restricting Products By Zones

This can be done, but it does take some thought ...

1 a customer not logged in can do anything

2 a customer gets logged in and the shipping is not US ... so need to fix the cart

3 a customer gets logged in and is US but then goes to checkout and changes shipping to canada ... so need to fix the cart ...

There are a number of ways to customize this in the header_php.php of the various pages in the /pages directories for where you want/need the testing done ...

The best thing is to write a function to manage this then call that function when needed to handle what to do such as:

1 remove product from cart or return customer to shopping cart until product is removed by customer

2 or send customer to shopping cart when attempting to add or checkout and wrong address is used on shipping

3 give customer message that product was removed and why if done auto or give message that customer must remove product so they are aware of what is happening

4 might be a good idea to mark these products as US ONLY which involves a new field or something to flag the product as being US ONLY which could be a product type or a new field or a model number code or something that can be used as a trigger ...

22 Aug 2008, 9:25 PM
#3
haxialelite avatar

haxialelite

New Zenner

Join Date:
Aug 2008
Posts:
2
Plugin Contributions:
0

Re: Restricting Products By Zones

Hi, I am having the same problem. I have a product that is not allowed to be exported outside of the USA. So I also need to prevent customers from purchasing those products (if they live internationally). I have "NOT FOR EXPORT OUTSIDE OF THE USA" plainly stated in the product description; but still have some who order that product, shipping to another country. I have searched the posts exhaustively and this is the only result that matches. I read the reply from Ajeh to jimmyjohn, is there any way you may have the step by step on completing that?

Thanks for all of your help and time!