Post by Buildanewcomputer » Thu Mar 17, 2011 9:46 am

Hello,

I was looking into removing this Confirm? message when a product is being removed from the cart. I modified the code to now remove the product on click. if you interested i have posted directions below.


1. find your cart.tpl file in your template directory exp: catalog\view\theme\default\template\module

2. remove the following code in bold and leave no spaces.

Before:

$(document).ready(function () {
$('.cart_remove').live('click', function () {
if (!confirm('<?php echo $text_confirm; ?>')) {
return false;
}

$(this).removeClass('cart_remove').addClass('cart_remove_loading');
$.ajax({
type: 'post',
url: 'index.php?route=module/cart/callback',
dataType: 'html',
data: 'remove=' + this.id,
success: function (html) {
$('#module_cart .middle').html(html);
if (getUrlParam('route').indexOf('checkout') != -1) {
window.location.reload();


After:

$(document).ready(function () {
$('.cart_remove').live('click', function () {
$(this).removeClass('cart_remove').addClass('cart_remove_loading');
$.ajax({
type: 'post',
url: 'index.php?route=module/cart/callback',
dataType: 'html',
data: 'remove=' + this.id,
success: function (html) {
$('#module_cart .middle').html(html);
if (getUrlParam('route').indexOf('checkout') != -1) {
window.location.reload();


Hope this helps :)


Posts

Joined
Thu Mar 17, 2011 9:19 am

Post by RJonesUSC » Sat Mar 19, 2011 1:11 am

Thanks, that will be useful.

New member

Posts

Joined
Tue Feb 15, 2011 4:03 am
Who is online

Users browsing this forum: No registered users and 77 guests