Currency Module problem when place it in mainnav

  • Posts: 72
  • Thank you received: 0
10 years 5 months ago #196474

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.12

Dear sir
thanks for great product
I have a problem in making Currency module working , I use Module anywhere to place the hikashop Currency module in the main menu, the module shows and list of currencies shows, but if I select any currency it just do nothing, it do not switched to that currency
if I publish the module in any other position using Module anywhere it works, so its not module anywhere problem I think!
I published other modules in the same way (like cart module, filtering module, ..., all worked except the currency module
thanks

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 5 months ago #196515

Hi,

I don't know why this happen but try to change the option "Do not use a form" of that module. It might help avoid the problem.

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

  • Posts: 72
  • Thank you received: 0
10 years 5 months ago #196534

hi
changing the "Do not use a form" to yes did not help
any thoughts?

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 5 months ago #196540

Hi,

Ok, replace the whole content of the file modules/mod_hikashop_currency/tmpl/default.php by this code:

<div class="hikashop_currency_module" id="hikashop_currency_module_<?php echo $module->id; ?>">
<?php if(empty($mode_noform)) { ?>
	<form action="<?php echo hikashop_completeLink('currency&task=update'); ?>" method="post" name="hikashop_currency_form_<?php echo $module->id; ?>">
		<input type="hidden" name="return_url" value="<?php echo urlencode($redirectUrl); ?>" />
		<?php echo $currency->display('hikashopcurrency',hikashop_getCurrency(),'class="hikashopcurrency" onchange="document.hikashop_currency_form_'.$module->id.'.submit();"'); ?>
	</form>
<?php } else {
	echo $currency->display(null, hikashop_getCurrency(), 'class="hikashopcurrency" id="hikashopcurrency_'.$module->id.'" onchange="window.localPage.switchCurrency(this);"');
?>
<script type="text/javascript">
if(!window.localPage) window.localPage = {};
window.localPage.switchCurrency = function(el) {
	var url = "<?php echo hikashop_completeLink('currency&task=update&hikashopcurrency={ID}'); ?>";
	url += ((url.indexOf("?") !== false) ? "?" : "&") + "return_url=<?php echo urlencode($redirectUrl); ?>";
	window.location = url.replace("{ID}", el.value);
};
</script>
<?php } ?>
</div>
and keep the "Do not use a form" option turned on and try again.

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

  • Posts: 72
  • Thank you received: 0
10 years 5 months ago #196564

Great Product with Great Support
it worked :woohoo:

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

Time to create page: 0.059 seconds
Powered by Kunena Forum