WebsiteBaker Support (2.8.x) > Bakery Shop

Delete Item without page refresh

(1/1)

sky writer:
Is it possible for the page not to refresh after deleting an item from the cart?  I am not using minicart.
I know there seemed to be this kind of functionality being worked on (for minicart, anyway) some time ago, but it looks like it was abandoned - http://forum.WebsiteBaker.org/index.php/topic,18490.msg123213.html#msg123213

freeSbee:
Hi sky writer

You could, using Ajax, but this requires a greater programing effort. You can, however, set the quantity field value to 0 without reloading the page.

Go to the file /bakery/frontend.js, about line 21. Replace the js code:

--- Code: ---function mod_bakery_delete_item_f(id) {
if (id != '') {
document.getElementById('id_' + id).value = 0;
document.getElementById('update').click();
}
}

--- End code ---

by:

--- Code: ---function mod_bakery_delete_item_f(id) {
if (id != '') {
document.getElementById('id_' + id).value = 0;
/* document.getElementById('update').click(); */
}
}

--- End code ---

Regards Christoph

Navigation

[0] Message Index

Go to full version