Page 2 of 2

Re: [MOD] Delete button on cart

Posted: Thu Feb 21, 2013 12:06 am
by omass
it is working fine with 1.5.1.3 as jackson wrote on FF an IE, but does not work with Chrome.

Re: [MOD] Delete button on cart

Posted: Sun May 12, 2013 1:39 pm
by avinashkalro
Does anybody have a solution to this?

Re: [MOD] Delete button on cart

Posted: Thu Sep 05, 2013 2:36 pm
by sandukadekar
use following line
<td class="remove"><img src="delete.png" onclick="$('#basket').submit();" name="remove[0]" value="<?php echo $product['key']; ?>" /></td>

instead of

<td class="remove"><input type="checkbox" name="remove[]" value="<?php echo $product['key']; ?>" /></td>

also remember you can use onclick="$('#basket').submit();" or onclick="$('#cart).submit();" as per your update button onclick

Re: [MOD] Delete button on cart

Posted: Mon Sep 09, 2013 4:36 pm
by thiskiss1990
Yes i know i could but i got some old modules that i can't run without ,but until i got updates for those i try to make it as useful as I can ,thanks

Re: [MOD] Delete button on cart

Posted: Wed Oct 09, 2013 4:39 pm
by cashless
This is odd. I had this code running and working for a long time...

Code: Select all

<a onclick="$('#basket').submit();" class="delete" />
<input type="checkbox" id="<?php echo $product['key']; ?>" name="remove[]" value="<?php echo $product['key']; ?>" style="display:none;"/>
<img src="lib/cart_remove_btn.png" onclick="remove('<?php echo $product['key']; ?>');"/>
</a>
And this at the bottom of cart.tpl

Code: Select all

<script language="javascript" type="text/javascript">
function remove(id)
{
document.getElementById(id).checked=true;
}
</script>
... But all of a sudden it stopped working in FF and Chrome. Anybody else?

Re: [MOD] Delete button on cart

Posted: Fri Nov 15, 2013 12:37 am
by iomedesimo
I know this topic is old, but maybe someone will solve this problem ....
I simply solved in this way...

Code: Select all

<td class="remove">
<a href="javascript:cancella('<?php echo $product['key']; ?>')"><img src="catalog/view/theme/default/image/close.png" /></a>
<input type="checkbox" name="remove[]" value="<?php echo $product['key']; ?>" id="<?php echo $product['key']; ?>" style="visibility:hidden"/</td>
and

Code: Select all

<script language="javascript">
<!--
function cancella(testo) {
document.getElementById(testo).checked = true;
$('#basket').submit();
}
//-->
</script>

Re: [MOD] Delete button on cart

Posted: Sat Nov 14, 2015 9:20 pm
by eastactive
Just installed Opencart 2.1.0.1 on Centos 7.0.

found the issue still exists. delete button works with IE, but not Chrome. have not try firefox yet.

client OS is windows 8.1 Pro.