Simulate (test) currency switcher

  • Posts: 68
  • Thank you received: 2
10 years 1 month ago #210459

-- 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

Please Log in or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 1 month ago #210465

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,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 3
10 years 1 week ago #213483

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:

$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/>';
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).

Attachments:
Last edit: 10 years 1 week ago by hactic. Reason: clarification for code

Please Log in or Create an account to join the conversation.

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 1 week ago #213489

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); ?>

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum