Hello Jacques
Currencies links is just link like:
* http://demo.currency-switcher.com/?currency=USD
* http://demo.currency-switcher.com/?currency=GBP
For example drop usual text widget and write there HTML code:
<a href="/?currency=USD">USD</a> <a href="/?currency=GBP">GBP</a>
+
You can set view of switcher as flags http://clip2net.com/s/3vRfHhO and just drop in the same text widget usual shortcode [woocs]
Thanks a lot for your feedback.
The links do change the currency, but they take me back to the homepage.
I would like to be able to change the currency while staying on the current page.
The shortcode [woocs] does just that, but for aesthetic reasons i would like to display the switcher as text links instead of flags or dropdown.
How can i generate links that grab the current address and amend e.g. “/?currency=GBP” ?
Thanks
Hello
In such case enable flags view and make customization here:
* wp-content\plugins\woocommerce-currency-switcher\views\shortcodes\woocs.php
* replace
if ($drop_down_view == 'flags')
{
foreach ($this->get_currencies() as $key => $currency)
{
if (!empty($currency['flag']))
{
?>
<a href="#" class="woocs_flag_view_item <?php if ($this->current_currency == $key): ?>woocs_flag_view_item_current<?php endif; ?>" data-currency="<?php echo $currency['name'] ?>" title="<?php echo $currency['name'] . ', ' . $currency['symbol'] . ' ' . $currency['description'] ?>">
<img src="<?php echo $currency['flag'] ?>" alt="<?php echo $currency['name'] . ', ' . $currency['symbol'] ?>" />
</a>
<?php
}
}
}
to
if ($drop_down_view == 'flags')
{
foreach ($this->get_currencies() as $key => $currency)
{
if (!empty($currency['flag']))
{
?>
<a href="#" class="woocs_flag_view_item <?php if ($this->current_currency == $key): ?>woocs_flag_view_item_current<?php endif; ?>" data-currency="<?php echo $currency['name'] ?>" title="<?php echo $currency['name'] . ', ' . $currency['symbol'] . ' ' . $currency['description'] ?>">
<?php echo $currency['name'] ?>
</a>
<?php
}
}
}