Author Topic: Delete Item without page refresh  (Read 1194 times)

Offline sky writer

  • Posts: 926
Delete Item without page refresh
« on: October 01, 2015, 04:13:31 PM »
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

  • Guest
Re: Delete Item without page refresh
« Reply #1 on: October 05, 2015, 01:12:28 PM »
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: [Select]
function mod_bakery_delete_item_f(id) {
if (id != '') {
document.getElementById('id_' + id).value = 0;
document.getElementById('update').click();
}
}

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

Regards Christoph

 

postern-length