- Posts: 68
- Thank you received: 2
Simulate (test) currency switcher
11 years 2 months ago #210459
by squareweb
Simulate (test) currency switcher was created by squareweb
-- HikaShop version -- : latest business
-- Joomla version -- : latest
-- PHP version -- : 5.5
-- Browser(s) name and version -- : na
-- Error-message(debug-mod must be tuned on) -- : na
Hi,
I've added the geolocation plugin and configured it (ipDBinfo account api-key etc.).
I wonder if there is a possibility to test (simulate) a different country.
I live in Europe (the Netherlands) and would like to check if US and UK-citizens wil see the right currency?
What happens if Australian citizen is visiting the site? will it display the main currency if Australian is not configured?
Thanks in advance.
Mark
Mark
-- Joomla version -- : latest
-- PHP version -- : 5.5
-- Browser(s) name and version -- : na
-- Error-message(debug-mod must be tuned on) -- : na
Hi,
I've added the geolocation plugin and configured it (ipDBinfo account api-key etc.).
I wonder if there is a possibility to test (simulate) a different country.
I live in Europe (the Netherlands) and would like to check if US and UK-citizens wil see the right currency?
What happens if Australian citizen is visiting the site? will it display the main currency if Australian is not configured?
Thanks in advance.
Mark
Mark
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210465
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Simulate (test) currency switcher
Hi,
You can try proxies.
But if you want more details about it ; we won't be able to help, so I recommend you to perform some search.
Regards,
You can try proxies.
But if you want more details about it ; we won't be able to help, so I recommend you to perform some search.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
11 years 4 weeks ago - 11 years 4 weeks ago #213483
by hactic
Replied by hactic on topic Simulate (test) currency switcher
Hi, I have language switcher (flags) and currency switcher active. - So far, so good. But:
1. For the geolocation plugin, is it possible to output the detected/derived value (the country) in a module?
Best would be to then also allow for manual override of the country (of an anonymous site visitor).
2. On the checkout / cart view, I have done a manual extension to explicitly display the tax rate:
Unfortunately this does not work out of the box for the product / listing_price view, as $taxes and $tax are not defined.
Hints and code snippets welcome on how to drill this up.
Both of these would help to make very explicit to a first-time web user what to expect from the shop (exact pricing, flexibility).
The attached screenshot from etsy shows something similar (just an inspiration).
1. For the geolocation plugin, is it possible to output the detected/derived value (the country) in a module?
Best would be to then also allow for manual override of the country (of an anonymous site visitor).
2. On the checkout / cart view, I have done a manual extension to explicitly display the tax rate:
Code:
$taxes = round($this->full_total->prices[0]->price_value_with_tax-$this->full_total->prices[0]->price_value,$this->currencyHelper->getRounding($this->full_total->prices[0]->price_currency_id));
$tax = $this->full_total->prices[0]->taxes[0]
echo '<br/><span>inkl. ' . $tax->tax_namekey . '(' . round($tax->tax_rate * 100, 1) . '%)</span><br/>';
Hints and code snippets welcome on how to drill this up.
Both of these would help to make very explicit to a first-time web user what to expect from the shop (exact pricing, flexibility).
The attached screenshot from etsy shows something similar (just an inspiration).
Last edit: 11 years 4 weeks ago by hactic. Reason: clarification for code
Please Log in or Create an account to join the conversation.
11 years 4 weeks ago #213489
by nicolas
Replied by nicolas on topic Simulate (test) currency switcher
Hi,
1. The zone_id of the current country found by the geolocation plugin is available like that:
$app = JFactory::getApplication();
echo $app->getUserState(HIKASHOP_COMPONENT.'.zone_id');
So if you want to display the name and/or a dropdown to let the user change it, you would have to develop a small module using that zone_id.
2. You should also have access to that in the listings.
for example, you can use this code to load the price data (with the taxes array in each price) on the listings (view file listing_img_title for example):
<?php var_dump($this->row->prices); ?>
1. The zone_id of the current country found by the geolocation plugin is available like that:
$app = JFactory::getApplication();
echo $app->getUserState(HIKASHOP_COMPONENT.'.zone_id');
So if you want to display the name and/or a dropdown to let the user change it, you would have to develop a small module using that zone_id.
2. You should also have access to that in the listings.
for example, you can use this code to load the price data (with the taxes array in each price) on the listings (view file listing_img_title for example):
<?php var_dump($this->row->prices); ?>
Please Log in or Create an account to join the conversation.
Time to create page: 0.193 seconds