Author Topic: Currency module problem  (Read 908 times)

roman5527

  • Jr. Member
  • **
  • Posts: 159
Currency module problem
« on: May 27, 2019, 23:32:43 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2750
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Currency module problem
« Reply #1 on: May 27, 2019, 23:35:11 pm »
VM version ?
Joomla version ?
Trying to use bootstrap?

Jörgen@ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

roman5527

  • Jr. Member
  • **
  • Posts: 159
Re: Currency module problem
« Reply #2 on: May 28, 2019, 00:02:39 am »
Oh sorry .

Joomla : 3.9.5
VM : 3.4.2
i using bootstrap in template

url : piratarmy.com/en

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4330
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Currency module problem
« Reply #3 on: May 28, 2019, 00:11:48 am »
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

  • Jr. Member
  • **
  • Posts: 159
Re: Currency module problem
« Reply #4 on: May 28, 2019, 00:22:35 am »
Hi, web url is piratarmy.com/en


roman5527

  • Jr. Member
  • **
  • Posts: 159
Re: Currency module problem
« Reply #5 on: May 28, 2019, 00:34:53 am »
Hi, patrick . where is problem with css ? i dont see it.

Thnaks

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4330
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Currency module problem
« Reply #6 on: May 28, 2019, 00:37:18 am »
The problem is
Code: [Select]
<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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4330
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Currency module problem
« Reply #7 on: May 28, 2019, 00:41:21 am »
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

  • Jr. Member
  • **
  • Posts: 159
Re: Currency module problem
« Reply #8 on: May 28, 2019, 00:45:38 am »
hi, patrick .

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

Code: [Select]
<?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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2750
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Currency module problem
« Reply #9 on: May 28, 2019, 06:52:15 am »
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)

roman5527

  • Jr. Member
  • **
  • Posts: 159
Re: Currency module problem
« Reply #10 on: May 28, 2019, 07:44:38 am »
Hi, Jorgen.

you think:

Code: [Select]
<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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2750
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Currency module problem
« Reply #11 on: May 28, 2019, 07:54:22 am »
Where do You create this function ?
Code: [Select]
user_mode89.submit is not a functionLooks 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)

roman5527

  • Jr. Member
  • **
  • Posts: 159
Re: Currency module problem
« Reply #12 on: May 28, 2019, 08:07:02 am »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2750
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Currency module problem
« Reply #13 on: May 28, 2019, 08:46:08 am »
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)