Espace réservé aux bonne idées et suggestions pour Joomlack.

VM addToCart CK fix

VM addToCart CK fix was created by galicin

Posted 3 years 8 months ago #57258
Hi!
There are a few imperfections with the plugin.
1. When you click add to cart on the category page, the effect is applied to the images of all products.
2. The "jswing" transition does not exist, that's right - "swing".
3. After scrolling the page, if the cart has a fixed positioning, the product image moves past the cart.
Fixes:
1. File vmaddtocarteffectck.php line 69
Code:
var imgtodrag = $('.".$categorycontainerclass." img.".$categoryimageclass."');
change to
Code:
var imgtodrag = el.closest('.".$categorycontainerclass."').find('img.".$categoryimageclass."');
2. File vmaddtocarteffectck.xml line 33
Code:
<option value="jswing">jswing</option>
to
Code:
<option value="swing">swing</option>
3. File vmaddtocarteffectck.php line 60
add (if fixed position cart, then when scrolling, the position of the cart changes relative to the top of the page )
Code:
$(window).scroll(function () { vmcartck.top = vmcartck.offset().top; vmcartck.left = vmcartck.offset().left; })
Last Edit:3 years 8 months ago by galicin
Attachments:
Last edit: 3 years 8 months ago by galicin.

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

Replied by ced1870 on topic VM addToCart CK fix

Posted 3 years 8 months ago #57263
Hi
thank you for your effort and sharing the solution :)
I will check that and let you know soon
CEd

Joomlack Webmaster and Developer

by ced1870

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

Replied by ced1870 on topic VM addToCart CK fix

Posted 3 years 8 months ago #57294
can you please confirm which version of Joomla and Virtuemart you are using with the plugin ?

Joomlack Webmaster and Developer

by ced1870

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

Replied by galicin on topic VM addToCart CK fix

Posted 3 years 7 months ago #57345
Joomla 3.9.20
Virtuemart 3.4.2
php 7.3
Last Edit:3 years 7 months ago by galicin
Last edit: 3 years 7 months ago by galicin.

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

Replied by ced1870 on topic VM addToCart CK fix

Posted 3 years 7 months ago #57349
thank you
I'm checking but I don't have the same line number as you .. can you please send me the whole ZIP of your plugin version ? so that I can compare
I will the update it on joomlack.fr so that other people can download it

Joomlack Webmaster and Developer

by ced1870

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

Replied by galicin on topic VM addToCart CK fix

Posted 3 years 7 months ago #57351
Hi!
plg_vmaddtocarteffectck_1.1.0_j25.zip
If you mean line 60, it is empty in the plugin.
Simply put, you need to change lines 58-59
Code:
vmcartck.top = vmcartck.offset().top; vmcartck.left = vmcartck.offset().left;
to
Code:
vmcartck.top = vmcartck.offset().top; vmcartck.left = vmcartck.offset().left; $(window).scroll(function () { vmcartck.top = vmcartck.offset().top; vmcartck.left = vmcartck.offset().left; })
or, as I suggested earlier, add to line 60
Code:
$(window).scroll(function () { vmcartck.top = vmcartck.offset().top; vmcartck.left = vmcartck.offset().left; })
In the first post, I attached an archive with files that require fix. You can compare plugin files with archive files.
Last Edit:3 years 7 months ago by galicin
Last edit: 3 years 7 months ago by galicin.

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

Time to create page: 0.694 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 476 guests and no members online