Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 7 replies, has 2 voices.

Last updated by hooiC 1 year, 1 month ago.

Assigned support staff: Jamal.

Author Posts
December 20, 2018 at 2:55 pm

hooiC

I am trying to: in the woo multicurrency i have set £ and euro for english site but no currency switcher ie dropdown of these currency available on the product page. i am not a technical person.

Link to a page where the issue can be seen:hidden link or hidden link

I expected to see: currency switcher dropdown on product page

Instead, I got: can only see £ amount for the product, not the euro.

December 20, 2018 at 7:12 pm #3022251

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for contacting WPML Support. I will be glad to help with this.

I connected to your website and everything seems ok for that product, and should normally work, so i wen to customizer and previewed the product with the default theme "twentyseventeen" and the currency switcher appeared, so i tought it is possibly the theme.
I tried on my clean server the theme avada, with WPML plugins, WooCommerce and WooCommerce Multilingual, and i could not reproduce the error for the product page, so i suspect a confilict with another plugin.
To verify this, i will need to ask you to try the following, please check if this issue appears when:
- Only WPML plugins are activated. It will tell us if there is an interaction issue with other plugin.
- If the problem disappears, start activating one at the time to track where the incompatibility is produced.

For the shop page, it will not appear as it is not configured to. in WooCommerce->WooCommerce Multilingual, you will see that the currency switcher is attached to sidebar widget, this widget is not used in the shop page.

Let me know what you get, any plugin that causes the conflict.

Jamal
WPML Support

December 20, 2018 at 8:55 pm #3022505

hooiC

I deactivated all plugins except the followings plugins. where am i meant to see the currency switcher? i went to the link below and can't see it here: hidden link. where is this sidebar widget appearing?

WPML Media
WPML Multilingual CMS
WPML String Translation
WPML Translation Management
WC Custom Add to Cart labels
WooCommerce
WooCommerce Multilingual
WooCommerce PayPal Checkout Gateway
WooCommerce Services

December 20, 2018 at 9:12 pm #3022526

hooiC

on this link below, it says the currency swictcher with a shortcode or as a hook. i don't understand what this means ie shortcode or a hook. can you give me a guide where to put this shortcode or hook.? the instruction below i don't understand at all. sorry. please advise. thankyou.
https://wpml.org/documentation/related-projects/woocommerce-multilingual/multi-currency-support-woocommerce/

Once you have added the support for multiple currencies, you should display a currency switcher in your site’s theme. You can display the currency switcher with a shortcode or as a hook.
Currency switcher shortcode
Shortcode: [currency_switcher]
Attributes: format (Available tags: %name%, %code%, %symbol%) Default: %name% (%symbol%)

The shortcode version is the most convenient when you display the currency switcher inline with WordPress content, for example in Content Templates, by the Views plugin.

Currency switcher as PHP code
PHP code: do_action('wcml_currency_switcher', array('format' => '%name% (%symbol%)'));

The other available parameter besides “format”:

switcher_style: wcml-dropdown, wcml-dropdown-click, wcml-horizontal-list, wcml-vertical-list
Outputs a basic drop-down menu with currency codes for option values. The client’s current currency or the configured default currency for a specific language will be auto-selected.

December 21, 2018 at 10:32 am #3024299

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for your feedback.

Now we can be sure that this is not due to conflicts with other plugins.
For now, you cannot see the currency switcher on the shop page, because it is not added.
I added a shortcode to the shop page, go to hidden link to see how the shortcode was added.

I also added a short code with a parameter switcher_style in the product edit screen, go to hidden link to see how i added the shortcode.

About hooks, this is the wordpress way for developpers to integrate with wordpress or other plugins, read more about it here https://codex.wordpress.org/Plugin_API/Hooks

Let me know if this helps.

Jamal
WPML Support

December 21, 2018 at 12:17 pm #3024660

hooiC

Hi Jamal i was so happy to see the currency switcher on the shop. thank you so much! you are a star! so we need to put the shortcode on both the shop and product page? i wanted to move the switcher to the right hand side. so i have moved both codes to the right hand side but its still on the left hand side. what do i need to do to move it to the right hand side?

December 21, 2018 at 1:47 pm #3024959

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you,

so we need to put the shortcode on both the shop and product page?
As we are using shortcodes, we need to put shortcodes in both pages.

I added the following code to WooCommerce->WooCommerce Multilingual->Multi-Currency->Currency switcher options->Additional CSS.

.woocommerce .wcml-dropdown.product { float: right; }

This corrects alignement for /shop page.
I am not very familiar with the Avada theme, but i have installed it locally and i managed to add currency switcher on product page without shortcode. I am curious why it does not show in your product page without shortcode.

Let me know how it goes.

Jamal
WPML Support

December 21, 2018 at 4:53 pm #3025739

hooiC

My issue is resolved now. Thank you!