Amazon — Saved for Later, Shopping Cart
Amazon — Saved for Later, Shopping Cart

Amazon — Saved for Later, Shopping Cart

Pradeep Kumar Paijwar
1 min readJul 10, 2019

--

Tired of deleting one by one item from Amazon

While using Amazon over period of 5 years, 1000 of items got saved in “Saved for later” and another couple of items in Shopping cart.

Here is small javascript code that you can inject from developer console to Amazon website, and it will save your time while deleting “Saved for later” items.

function deleteSavedForLaterItems() {
var query = document.querySelectorAll(“#sc-saved-cart input[value=Delete]”)
if (query.length) {
query[0].click();
}
if (query.length > 1) {
setTimeout(deleteSavedForLaterItems,100);
}
else {
console.log(‘Finished deleting SavedForLaterItems’);
}
}
deleteSavedForLaterItems();

To delete all the items from the Shopping Cart above code is modified little bit by removing “#sc-saved-cart” check below code

function deleteCartItems() {
var query = document.querySelectorAll(“input[value=Delete]”)
if (query.length) {
query[0].click();
}
if (query.length > 1) {
setTimeout(deleteCartItems,100);
}
else {
console.log(‘Finished deleting cart items’);
}
}
deleteCartItems();

If you are newbie and do not know where to copy past this code snippet, then you follow below steps for Google Chrome on windows/mac

if on Mac press command+shift+C, for windows press ctrl+shift+C and then select console or right click on web page and then select inspect and then select console

now past above code and rest code should do.

#Amazon.

--

--

No responses yet