News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Currency module problem

Started by roman5527, May 27, 2019, 23:32:43 PM

Previous topic - Next topic

roman5527

Hi, i have problem with currency module selector . When i want change currency i see this error in console :

(index):794 Uncaught TypeError: user_mode89.submit is not a function
    at HTMLSelectElement.onchange ((index):794)
    at Object.trigger (jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2)
    at Object.a.event.trigger (jquery-migrate.min.js?257f9bda8ab7c1172d09b770956fbccc:2)
    at HTMLSelectElement.<anonymous> (jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2)
    at Function.each (jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2)
    at a.fn.init.each (jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2)
    at a.fn.init.trigger (jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2)
    at a.fn.init.d.fn.<computed> [as change] (jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2)
    at HTMLAnchorElement.<anonymous> (bootstrap-select.min.js:7)
    at HTMLDivElement.dispatch (jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2)
onchange @ (index):794
trigger @ jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2
a.event.trigger @ jquery-migrate.min.js?257f9bda8ab7c1172d09b770956fbccc:2
(anonymous) @ jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2
each @ jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2
each @ jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2
trigger @ jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2
d.fn.<computed> @ jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2
(anonymous) @ bootstrap-select.min.js:7
dispatch @ jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2
v.handle @ jquery.min.js?257f9bda8ab7c1172d09b770956fbccc:2

can you help me fix it ?

thanks

Jörgen

VM version ?
Joomla version ?
Trying to use bootstrap?

Jörgen@ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

roman5527

Oh sorry .

Joomla : 3.9.5
VM : 3.4.2
i using bootstrap in template

url : piratarmy.com/en

Studio 42

The only problem i have found is CSS not fine always and sharethis button not loaded using https.
I dont have your reported problem.
Is this in a specific page ?


roman5527

Hi, patrick . where is problem with css ? i dont see it.

Thnaks

Studio 42

The problem is
<select id="virtuemart_currency_id" name="virtuemart_currency_id" class="inputbox selectpicker bs-select-hidden" onchange="user_mode89.submit();return false;">
This code is not Virtuemart core i think, but a template modification

Studio 42

i have ?tmpl=comingsoon and cannot see the full site anymore.
About CSS, i had the problem only first time, so dont know the exact URL.

roman5527

hi, patrick .

modification default.php in template/html/mod_virtuemart_currencies is :

<?php // no direct access
defined('_JEXEC') or die('Restricted access');
vmJsApi::jQuery();
vmJsApi::chosenDropDowns();
?>


<!-- Currency Selector Module -->
<?php echo $text_before?>
<?php 
$this_name_form 'user_mode'.$module->id
$class "class='inputbox selectpicker' OnChange='".$this_name_form.".submit();return false;'";
?>

<div id="curVm3_<?php echo $module->id?>" class="curVm3">
<form id="cur_form" class="cur_box" name="user_mode<?php echo $module->id?>" action="<?php echo vmURI::getCleanUrl(); ?>" method="post">
<!-- <input class="button" type="submit" name="submit" value="<?php echo vmText::_('MOD_VIRTUEMART_CURRENCIES_CHANGE_CURRENCIES'?>" /> -->
<?php echo JHTML::_('select.genericlist'$currencies'virtuemart_currency_id'$class 'virtuemart_currency_id''currency_txt'$virtuemart_currency_id) ; ?>
</form>
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
$modId = $('#curVm3_<?php echo $module->id?>');
// Selectpicker
$('.selectpicker', $modId).selectpicker();
});
</script>


can you help me fix this problem ?

thanks

Jörgen

Has it ever worked you are trying to call a js function with wrong naming ?

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

roman5527

Hi, Jorgen.

you think:

<script type="text/javascript">
jQuery(document).ready(function($) {
$modId = $('#curVm3_<?php echo $module->id?>');
// Selectpicker
$('.selectpicker', $modId).selectpicker();
});
</script>


corect is change $ to jQuery ?

thanks

Jörgen

Where do You create this function ?
user_mode89.submit is not a function
Looks to me that You should compare your js function and the call, they do not look alike.

Has it ever worked? I doubt that.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

roman5527

Hi, i find this in template .
Originally I used other currency module. Can you send me in PM your IP adress so you can see website ?

But this originall module stopped working some times back. but i dont know why. console dont see error.
currency module works on iphone mobile but no on android phone and pc .

when i click to currency on pc or android mobile , website is reloaded by currency dont change.

can you help me fix it ?

Jörgen

The "original" currency module should work just fine, have you checked with protostar template ? If it works then, refer to the template developer.
This "new" module You should also refer the questions to the template developer.

This is probably a problem with Your template.

I think You can get payed support faster from somebody else in the forum, right now I have very little time to help You with this.

Jörgen @ Kreativ Fotografi

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.