Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Customize Product-Line Based on Customer's Country

Customize Product-Line Based on Customer's Country

Locked

Views: 1,220

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
21 May 2009, 8:45 PM
#1
tea4tamara avatar

tea4tamara

New Zenner

Join Date:
Feb 2006
Posts:
7
Plugin Contributions:
0

Customize Product-Line Based on Customer's Country

How do you customize product lines by country? For example, how do I hide products for customers in the US that are visible to customers in Canada?

21 May 2009, 10:02 PM
#2
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Customize Product-Line Based on Customer's Country

How good are you at programming?

This is possible, but not a simple tweak.

22 May 2009, 2:00 AM
#3
tea4tamara avatar

tea4tamara

New Zenner

Join Date:
Feb 2006
Posts:
7
Plugin Contributions:
0

Re: Customize Product-Line Based on Customer's Country

Yeah, I thought I might have to go in and do some coding. I was just hoping that there was a quick and easy solution that I hadn't noticed yet.

22 May 2009, 6:53 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Customize Product-Line Based on Customer's Country

You'll have to start by sorting out who's in the US and who's in Canada, and for that the best technique is IP GeoLocation

There is a mySQL database of IP addresses **here**

Then you'll need some PHP to read that data, and say to your zencart shop...

"If IP address (address range) =XXX.XXX.XXX then products in category ID's 123 and 234 are available, else..."

The challenge will be writing php to render some products inactive for some IP addresses and not for others.

22 May 2009, 6:58 AM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Customize Product-Line Based on Customer's Country

Another technique could be the following, and while it's a bit "clunky", it would work.

Install 2 sets of zencart in separate directories on your server:

https://www.mywebsite.com/usa (this houses only the US products)
https://www.mywebsite.com/canada (this houses only the Canada products)

then in the root directory, use IP GeoLocation to identify the visitor's IP address and then auto redirects to either the US shop or the Canada shop.

24 May 2009, 3:11 AM
#6
tea4tamara avatar

tea4tamara

New Zenner

Join Date:
Feb 2006
Posts:
7
Plugin Contributions:
0

Re: Customize Product-Line Based on Customer's Country

My client would like the customer to select their country upon entering the site, and then they will see products and prices that are specific to that chosen country, so there doesn't need to be any automation. I was just hoping to avoid having two different stores, which just makes all the edits later on twice as much work.