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!
Re: Using the URL to apply Zone definitions
Does anyone know if this is possible?
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:
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!
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:
Code:
if ($_SESSION['customer_zone_id'] == 0 && $_GET['zID'] != 0) {
// use paramater
$zone_id = $_GET['zID'];
}
You would really need to test this out ...
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:
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 ...