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

mod_virtuemart_cart - vmprice.js substitues "confirm" in place of "show cart"

Started by AH, October 18, 2013, 15:22:59 PM

Previous topic - Next topic

AH

vm2.0.24

How to see this behaviour:-
Add items to your cart
Complete the checkout process to the point of finalising your payment.  Ensure that you have checked the "agree to TOS" when editing your address.
Now get out of the cart and get to a product / Add item to cart and close the popup (do not refresh the page)

You should see that the checkout link in the (minicart) module has change to a "confirm purchase" rather than "show cart" option

If you click confirm purchase you get taken to the payment completion - aaahggg!

If you refresh page, the link is replaced with "show cart"  this flips to "confirm"each time you add an item to the cart and flips back on refresh page

The culprit is  vmprice.js

mod.find(".show_cart").html(datas.cart_show);

SOLUTION
To stop this you have to stop this field getting updated.

Just change /modules/mod_virtuemart_cart/tmpl/default.php


<div class="show_cart"rel="nofollow">

to

<div class="[i]anything[/i]show_cart"rel="nofollow">
<?php echo  $data->cart_show?>
</div>


Crappy way to do it, but it works as it stops the vmprice.js modifiying the link!
Regards
A

Joomla 4.4.5
php 8.1