Skip to the main content

Webal Phoca Currency lets visitors choose the currency that your Phoca Cart shop shows prices in. Phoca Cart does the change and works out every price itself, so the figures on your pages and in your shop always agree.

Use it in the header or above the products. It works with scripts switched off. The currency in use is marked.

This module is part of Webal Phoca Blocks, which needs Phoca Cart 6 or later.

Tip. A currency is a way of showing a price, such as Euro (EUR) or US dollar (USD). You add currencies in Phoca Cart, under Components, Phoca Cart, then Currencies. The module only shows the ones that are published.

You need two currencies

If your shop has only one published currency, there is nothing to choose. Visitors see nothing at all, not even the heading. If you are signed in as an administrator, a short message at the top of the page tells you why. Add and publish a second currency in Phoca Cart to see the switch.

The two looks

  • A list with a button. A list of the currencies and a button called Change currency. The visitor picks a currency, then presses the button.
  • A button for each currency. Each currency is its own button. The one in use is filled in, has a tick, and its name is underlined. A screen reader also says "current currency".

Nothing changes until the visitor presses a button. Moving through the list does nothing. Phoca Cart's own module has an option that changes the currency as soon as the list is moved. This module leaves that out on purpose, because it is hard to use with a keyboard or a screen reader and it cannot work without a script.

Add it to a page

These steps follow the order of the screens in Joomla. Nothing is saved until you press Save.

  1. Log in to the Joomla administrator. In the menu on the left, choose Content, then Site Modules.
  2. Press New. A list of module types opens.
  3. Choose Webal Phoca Currency from the list.
  4. Type a Title for the module.
  5. On the Module tab, under Currency, choose Show the currencies as: a list with a button, or a button for each currency.
  6. Choose What each currency is called. For example "Euro (EUR)", "EUR" or "Euro".
  7. Choose a Position in the right-hand column. A position is a named place in your template where a module can go. A header position that shows on every page works well.
  8. Press Save. The message "Module saved." appears.
  9. Open the Menu Assignment tab. To show the switch on every page, choose On all pages.
  10. Press Save & Close.
  11. Open a page of your shop. Press a currency button. The page comes back with the prices in the new currency.

Accessibility. If you put more than one Webal Phoca Currency on a page, give each a different title. If you type a Title, set Show Title to Hide, so the page does not get two headings.

Options

Module tab

Options on the Module tab
OptionWhat it doesDefault
TitleAn optional heading above the switch. If you type one, set Show Title to Hide.No title
Show the currencies asA list with a button, or a button for each currency.A list with a button
What each currency is calledName and code (Euro (EUR)), code only (EUR) or name only (Euro). They are the ones set for the currency in Phoca Cart.Name and code
Show the word CurrencyShows the word above the list or the buttons. Off hides it from the eye only. A screen reader still reads it.On
Show the currency picturesButtons only. Shows the picture set for each currency in Phoca Cart, such as a flag, before its name. A currency with no picture shows its words alone.Off

Look tab

Options on the Look tab
OptionWhat it doesDefault
Button colourThe primary colour or grey. With a button for each currency, the one in use is filled and the others are outlined.Primary colour
Button sizeSmall, normal or large. Every size is at least 44 pixels high.Small

The Layout tab and the Animation tab hold the same shared groups as other Webal modules. See the General, Spacing, Width, Colour scheme and Animation groups.

How the prices change

The switch tells Phoca Cart which currency the visitor chose. Phoca Cart remembers it for the visit. Every price in your shop, and on Webal modules such as Webal Phoca Product, is then worked out and written by Phoca Cart in that currency. This module and the other Webal modules do no sums on prices. To change a rate, change the currency in Phoca Cart.

After the visitor presses a button, they come back to the page they were on.

For keyboards and screen readers

  • The list has the label "Currency". With buttons, the group is named "Currency".
  • Tab moves to the list, then its button. With buttons, Tab moves from one currency to the next. Enter or Space presses a button.
  • The currency in use is marked in words for a screen reader, and by a filled button, a tick and an underline for the eye, so colour is never the only sign.
  • Every button is at least 44 pixels high, and the focus ring is 3 pixels wide.
  • Nothing changes when the visitor only moves through the list.

Tip. If the switch does not appear, check that Phoca Cart has two published currencies. If you are signed in as an administrator, the message at the top of the page says which module found only one.

Other ways to reach us

Ask the community