Just an idea, off the top of my head, havent tested this though.
BTW this is for 1.3.2 so other revs may vary
template/checkout/cart.tpl line 23
Replace with
Make a copy of your old cart.tpl file first before you try this as i am only guessing to whether it will work.
BTW this is for 1.3.2 so other revs may vary
template/checkout/cart.tpl line 23
Code: Select all
<td align="center"><input type="checkbox" name="remove[<?php echo $product['key']; ?>]" /></td>
Code: Select all
<td align="center"><a onclick="$('#cart').submit();" name="remove[<?php echo $product['key']; ?>]" class="button"><span>Remove</span></a></td>
Last edited by i2Paq on Sat Feb 27, 2010 9:21 pm, edited 1 time in total.
Reason: code-tags added
Reason: code-tags added
Thx man it works..much appreciatedSXGuy wrote:Just an idea, off the top of my head, havent tested this though.
BTW this is for 1.3.2 so other revs may vary
template/checkout/cart.tpl line 23Replace withCode: Select all
<td align="center"><input type="checkbox" name="remove[<?php echo $product['key']; ?>]" /></td>
Make a copy of your old cart.tpl file first before you try this as i am only guessing to whether it will work.Code: Select all
<td align="center"><a onclick="$('#cart').submit();" name="remove[<?php echo $product['key']; ?>]" class="button"><span>Remove</span></a></td>

Last edited by i2Paq on Sat Feb 27, 2010 9:33 pm, edited 1 time in total.
Reason: code-tags added
Reason: code-tags added
Ill try and help you, if im honest, ive only just gotten into 1.40 myself, so im a newbie with that
Lets see...
catalog/view/theme/default/template/checkout/cart.tpl line 32
replace with
Lets see...
catalog/view/theme/default/template/checkout/cart.tpl line 32
Code: Select all
<td align="center"><input type="checkbox" name="remove[<?php echo $product['key']; ?>]" /></td>
Code: Select all
<td align="center"><a onclick="$('#cart').submit();" name="remove[<?php echo $product['key']; ?>]" class="button"><span>Remove</span></a></td>
didn't seem to work for me, though i have modified the cart page a tad i don't think that's why it's not working. i think it's because the form would be looking for a checked input box and then remove the item based on thats key, which isn't happening here. any idea on a fix? also would be nice if JavaScript wasn't required to remove the item as if a user had js disabled there'd be no way to remove the item
my opencart carpet cleaning woking guildford and Office Cleaning Services in Guildford
well a link to a page that simple removes the item based on key which then redirects back to cart will do fine without the need for js. js should only be used imo for when you want to remove without page refresh, but atm one is needed for it to disappear.SXGuy wrote:Your right it doesnt work, just tried it myself.
I think the only way it would work is to replace the onclick with a JS function that removes the item.
I dont know how it could be done without JS to be honest.
thinking about it i quite like the old standard method of a checkbox as then you can remove more then one item at a time. much quicker then a page refresh every time.
my opencart carpet cleaning woking guildford and Office Cleaning Services in Guildford
1. I tried this on 1.4.7 and i got the buttons on but if i click it nothing hapend , i mean that product still remain on cart ,any idea why?SXGuy wrote:Ill try and help you, if im honest, ive only just gotten into 1.40 myself, so im a newbie with that
Lets see...
catalog/view/theme/default/template/checkout/cart.tpl line 32
replace withCode: Select all
<td align="center"><input type="checkbox" name="remove[<?php echo $product['key']; ?>]" /></td>
Code: Select all
<td align="center"><a onclick="$('#cart').submit();" name="remove[<?php echo $product['key']; ?>]" class="button"><span>Remove</span></a></td>

2. Also can any one help me out to do the same but on right side on cart ,side cart



you could upgrade to 1.4.8 which has this out of the box.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Ok i got it working.
For those in need:
<a onclick="$('#cart').submit();" class="delete">
<input type="checkbox" name="remove[<?php echo $product['key']; ?>]" class="checkbox" checked="checked" />
<img src="catalog/view/theme/default/image/redcross.jpg" />
</a>
and than in your css:
.delete .checkbox{
display:none;
}
For those in need:
<a onclick="$('#cart').submit();" class="delete">
<input type="checkbox" name="remove[<?php echo $product['key']; ?>]" class="checkbox" checked="checked" />
<img src="catalog/view/theme/default/image/redcross.jpg" />
</a>
and than in your css:
.delete .checkbox{
display:none;
}
Almost there borrie. Using the code to replace the checkbox works, but if I change the quantity of an item and click "Update", it removes the item from my cart instead.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
This seems to do the opposite to borrie's code. I can update the quantity, but the new "Remove" button doesn't delete the item.<td align="center"><a onclick="$('#cart').submit();" name="remove[<?php echo $product['key']; ?>]" class="button"><span>Remove</span></a></td>
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Ok ive done it!,
<a onclick="$('#cart').submit();" class="delete" />
<input type="checkbox" id="<?php echo $product['key']; ?>" name="remove[<?php echo $product['key']; ?>]" class="checkbox"/>
<img src="catalog/view/theme/default/image/image.png" onclick="remove('<?php echo $product['key']; ?>');"/>
</a>
---END OF THE DOCUMENT BEFORE <FOOTER>
<script language="javascript" type="text/javascript">
function remove(id)
{
document.getElementById(id).checked=true;
}
</script>
CSS
----
.delete .checkbox{
display:none;
}
<a onclick="$('#cart').submit();" class="delete" />
<input type="checkbox" id="<?php echo $product['key']; ?>" name="remove[<?php echo $product['key']; ?>]" class="checkbox"/>
<img src="catalog/view/theme/default/image/image.png" onclick="remove('<?php echo $product['key']; ?>');"/>
</a>
---END OF THE DOCUMENT BEFORE <FOOTER>
<script language="javascript" type="text/javascript">
function remove(id)
{
document.getElementById(id).checked=true;
}
</script>
CSS
----
.delete .checkbox{
display:none;
}
a slight mod for 1.5.1.3 worked for me
<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="catalog/view/theme/default/image/close.png" onclick="remove('<?php echo $product['key']; ?>');"/>
</a>
<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="catalog/view/theme/default/image/close.png" onclick="remove('<?php echo $product['key']; ?>');"/>
</a>
Please help me....
i have the 1.5.1.3 version and don't work...
I'd really like this but do not know how
i have the 1.5.1.3 version and don't work...
I'd really like this but do not know how
Who is online
Users browsing this forum: No registered users and 8 guests