Forums / Currencies & Sales Taxes, VAT, GST, etc. / Using the URL to apply Zone definitions

Using the URL to apply Zone definitions

Results 1 to 7 of 7
11 Aug 2011, 23:38
#1
tesefoti avatar

tesefoti

New Zenner

Join Date:
Jul 2010
Posts:
66
Plugin Contributions:
0

Using the URL to apply Zone definitions

Is it possible to use the URL to load Zone definitions on product prices?

Imagine on Admin > Locations > Zones Definitions I have:
Zone 1 - Hungary - Tax 25%
Zone 2 - Europe - Tax 16%
Zone 3 - Tax-Free - Tax 0%

Can I use something like:

http://www.mysite.com/index.php?main_page=index&zID=1

and it would show prices with the 25% tax included

http://www.mysite.com/index.php?main_page=index&zID=2

and it would show prices with the 16% tax included, etc.

Thank you!
13 Aug 2011, 01:35
#2
tesefoti avatar

tesefoti

New Zenner

Join Date:
Jul 2010
Posts:
66
Plugin Contributions:
0

Re: Using the URL to apply Zone definitions

Does anyone know if this is possible?
13 Aug 2011, 01:56
#3
ajeh avatar

ajeh

Oba-san

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

Re: Using the URL to apply Zone definitions

If you are displaying prices with tax, the Prices will display with the customer's matching Zone when they login ...

What are you trying to do that is different? :unsure:
13 Aug 2011, 17:40
#4
tesefoti avatar

tesefoti

New Zenner

Join Date:
Jul 2010
Posts:
66
Plugin Contributions:
0

Re: Using the URL to apply Zone definitions

Thanks Ajeh for the reply.

I want to show the zone definitions before they login.

If I can have
http://www.mysite.com/index.php?main_page=index&zID=1
http://www.mysite.com/index.php?main_page=index&zID=2
http://www.mysite.com/index.php?main_page=index&zID=3

I can register:
www.mysite.hu and redirect to http://www.mysite.com/index.php?main_page=index&zID=1
www.mysite.eu and redirect to http://www.mysite.com/index.php?main_page=index&zID=2
www.mysite.us and redirect to http://www.mysite.com/index.php?main_page=index&zID=3

and use www.mysite.com to display a page with "Chose your country" and redirect to each website.

That way I can use the same database for the different sites, using stock information. Otherwise I would have to create several sites with several databases and it looks very difficult to syncronyze stocks between different sites/databases.

Any idea? Thanks again!
13 Aug 2011, 17:50
#5
ajeh avatar

ajeh

Oba-san

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

Re: Using the URL to apply Zone definitions

You could try editing the function file functions_taxes.php and see if using this in each of the functions as needed works:
if ($_SESSION['customer_zone_id'] == 0 && $_GET['zID'] != 0) {
  // use paramater
  $zone_id = $_GET['zID'];
}


You would really need to test this out ...
13 Aug 2011, 21:07
#6
tesefoti avatar

tesefoti

New Zenner

Join Date:
Jul 2010
Posts:
66
Plugin Contributions:
0

Re: Using the URL to apply Zone definitions

I will install a clean Zen Cart to try that. Thanks for the suggestion will report asap:smile:
13 Aug 2011, 21:36
#7
ajeh avatar

ajeh

Oba-san

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

Re: Using the URL to apply Zone definitions

Note: if you keep losing the zID after first click, then you will want to store that to something like:
$_SESSION['zID']

when it is found and then use that when either the $_SESSION['customer_zone_id'] is 0 or the $_SESSION['customer_id'] is 0 ...