module currency radio button

  • Posts: 138
  • Thank you received: 4
6 years 9 months ago #288041

-- HikaShop version -- : 3.2.1

hi,
how change module currency switcher to radio button?
thanks


Joomla Developer | am.ebrahimzadeh[at]gmail.com

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

  • Posts: 12953
  • Thank you received: 1778
6 years 9 months ago #288042

Hello,

There's actually no option to do that, so the solution will be to directly edit the code of the currency switcher module.

The following user(s) said Thank You: aminweb

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

  • Posts: 138
  • Thank you received: 4
6 years 9 months ago #288058

thansk,
but currency switcher module dont have a lot code!!!!
tmpl--> default.php

<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>
which one file must be edit?


Joomla Developer | am.ebrahimzadeh[at]gmail.com
Last edit: 6 years 9 months ago by aminweb.

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
6 years 9 months ago #288063

Hi,

It's the code:

 $currency->display('hikashopcurrency',hikashop_getCurrency(),'class="hikashopcurrency" onchange="document.hikashop_currency_form_'.$module->id.'.submit();"');
which displays the dropdown.
That function is defined in administrator/components/com_hikashop/types/currency.php

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

Time to create page: 0.074 seconds
Powered by Kunena Forum