Author Topic: mod_virtuemart_cart - vmprice.js substitues "confirm" in place of "show cart"  (Read 1163 times)

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3506
  • VirtueMart Version: 3.8.9
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

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


Code: [Select]
<div class="show_cart"rel="nofollow">
to

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