Add HikaShop Currency Switcher to checkout page

  • Posts: 5
  • Thank you received: 0
13 years 2 months ago #24035

Hi.
I want to show the Currency Switcher in Checkout page. I know there is a module named "HikaShop Currency Switcher Module" for Hikashop to do switches between currencies, but I don't want to show that switcher in any module.
So I've found a solution myself. To do so, change the module position of module "HikaShop Currency Switcher Module" to any custom position. I did changed to "currencyswitcher". The only thing you need now, is to use that position in Content - Load Module plugin. You may put

{loadposition currencyswitcher}
in any article you want.
But I did not wanted to put the switcher to an article. I wanted to put that in checkout page. So I did found another solution. I've found "cart.php" in ../components/com_hikashop/views/checkout/tmpl that presents our checkout page. So the only change I needed to do in this file was to add a Joomla API that bring this ability to render modules in scripts.
Here it is :
jimport('joomla.application.module.helper');
$mods = JModuleHelper::getModules('currencymanager');
And put this line of code where ever the switcher must appear:
echo JModuleHelper::renderModule($mods[0]);
It shows the switcher in checkout page, But it does not switch the currencies anyway. So I asked you for help, if it's possible to add switcher in checkout page only. Any help will be appreciated.

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

  • Posts: 82760
  • Thank you received: 13346
  • MODERATOR
13 years 2 months ago #24036

You can just restrict the module to one page with its page assignment option and set force the menu checkout to be that page with the option "force a menu on checkout" of the config. Thus, the module will only be displayed on the checkout.

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

  • Posts: 5
  • Thank you received: 0
13 years 2 months ago #24038

I did not see that. Thank you.

Last edit: 11 years 8 months ago by mohsenr1.

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

  • Posts: 15
  • Thank you received: 0
11 years 5 months ago #103225

Hello,

I would like to display the currency module on the checkout page as well,
but my problem is multilingual site, so i can't force a single menu item on the checkout page.

I have made menu items for each checkout in each language and i'm able to display the module on these pages.

Well but still when i click on the hikashop cart module, which goes to checkout, the currency module is hidden, cause it doesn't follow the checkout menu items.

Please can you guide me how to fix this ?
I guess a solution could be to add some code to the checkout view file to display the module.

THank youu

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

  • Posts: 82760
  • Thank you received: 13346
  • MODERATOR
11 years 5 months ago #103227

Hi,

You can use extensions.joomla.org/extensions/core-en...embed-a-include/6402 and add the tag at the beginning or the end of the file "step" via the menu Display->Views and that will display the module at the top or bottom of the checkout.

The following user(s) said Thank You: Hátle

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

Time to create page: 0.049 seconds
Powered by Kunena Forum