- Posts: 5
- Thank you received: 0
Add HikaShop Currency Switcher to checkout page
15 years 2 months ago #24035
by mohsenr1
Add HikaShop Currency Switcher to checkout page was created by mohsenr1
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
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 :
And put this line of code where ever the switcher must appear:
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.
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
Code:
{loadposition currencyswitcher}
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 :
Code:
jimport('joomla.application.module.helper');
$mods = JModuleHelper::getModules('currencymanager');
Code:
echo JModuleHelper::renderModule($mods[0]);
Please Log in or Create an account to join the conversation.
15 years 2 months ago #24036
by nicolas
Replied by nicolas on topic Re: Add HikaShop Currency Switcher to checkout page
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.
15 years 2 months ago - 13 years 8 months ago #24038
by mohsenr1
Replied by mohsenr1 on topic Re: Add HikaShop Currency Switcher to checkout page
I did not see that. Thank you.
Last edit: 13 years 8 months ago by mohsenr1.
Please Log in or Create an account to join the conversation.
13 years 5 months ago #103225
by Hátle
Replied by Hátle on topic Add HikaShop Currency Switcher to checkout page
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
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.
13 years 5 months ago #103227
by nicolas
Replied by nicolas on topic Add HikaShop Currency Switcher to checkout page
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.
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.077 seconds