News:

Looking for documentation? Take a look on our wiki

Main Menu

Virtuemart 3 Product Filter by Custom Fields by Dmitriy Usov has BUG!!

Started by Piero_M, January 28, 2019, 17:37:31 PM

Previous topic - Next topic

Piero_M

Hi everyone I have a problem with this plugin and I hope that someone here can help me because I no longer know what to do, the support no longer responds!

Virtuemart 3 Product Filter by Custom Fields (Developer Dmitriy Usov)

The plugin after the update php 7.1 and after update Joomla and VM no longer works properly, in fact, when I filter a product and add it to the cart no longer adds it!

I've read some discussions in Russian where they say to change some code in the file  modules/mod_virtuemart_param_filter/assets/js.js (https://joomlaforum.ru/index.php/topic,210063.660.html) but the problem can't be solved!

Maybe someone has already managed to solve this problem?

Thank you for help!

Piero


Joomla 3.9.1
VM 4.4.2
Virtuemart 3 multiple customfield plugin 3.0.7




Studio 42


Piero_M

Hi Studio 42,

my site is https://63.33.218.98/new.auroranutriceutics/negozio

the plugin is https://myext.eu/en/update version 3.0.7

in this link you can see the type of error ($this is not defined) that the filter gives http://recordit.co/hYkI2Fmj8M

The file that seems to give problems maybe is this:
modules/mod_virtuemart_param_filter/assets/js.js

I have seen other users with this problem, but no one has left a solution to the problem, I could change plugins, but a lot of work on my site is based on this plugin and to replace it I would have a lot to do again.

Thank you in advance for your help!
Piero


Studio 42

Have you a link to the old shop without updates?
$this is never defined, so this error should exist before your updates. and i dont really understand why you have $this in the javascript code because it is never initialized.

Studio 42

I checked the logic.
You should try to replace $this with this or search for
if($('*:checked,*:selected', $this).length > 0){
ajaxParamFilter($($('*:checked,*:selected', $this)[0]));
}

and replace with
if($('*:checked,*:selected', this).length > 0){
ajaxParamFilter($($('*:checked,*:selected', this)[0]));
}

in modules/mod_virtuemart_param_filter/assets/js.js
And of course refresh or delete the gk cache file /new.auroranutriceutics/t3-assets/js/js-bab04-60112.js

Piero_M

Hi, it's not working!

The error no longer appears in the console but the product is not added to the cart.

Piero_M

[v3.0.7] - fixed installation error in Joomla 3.7 (Using $this when not in object context)

the developer talks about this in the last chengelog, but I don't understand what it refers to.

Studio 42

Piero_M, the fix was not about cart problem, but you need to have no error before, to be sure other scripts are working.
If you call this javascript in the console
Virtuemart.product(jQuery("form.product"));
It work.
So the Template is certainly obsolete and dont add correctly all the new Virtuemart scripts.
You have to compare Virtuemart and the template override to find the file to modify or contact the template developper.

Piero_M

The developer of the template tells me that the problem is the filter, if you disable the module the product is added without problems

Studio 42

This code should be called after the category product list
<script id="ready.vmprices-js" type="text/javascript">//<![CDATA[
jQuery(document).ready(function($) {

Virtuemart.product($("form.product"));
}); //]]>
</script>

But your filter reload directly the page and dont recall the script, because document is already loaded.
You have to readd this function on after ajax loading
Virtuemart.product($("form.product"));
Certainly in js.js near end of
function ajaxParamFilter
PM me if you want i do the Job.


Studio 42

Quote from: Piero_M on February 05, 2019, 13:39:14 PM
Hi, I sent you PM
Please give me the email in the PM. I cannot answer you your inbox is always full when i try to send answer.

Piero_M