Commit 26916852 authored by Artem's avatar Artem

Revert "Revert "add notification when product added to cart on product page""

This reverts commit 067bd701
parent 067bd701
......@@ -6,10 +6,11 @@ function setAddToCardEventListener() {
.then(function (response) {
const cartAmountElem = document.querySelector('.amount-in-cart');
cartAmountElem.textContent = response.data;
toastr.success('Product added to cart');
})
.catch(function (error) {
console.log(error);
alert('Sorry, error, we are just learning how to code');
toastr.error('Error, something went wrong');
});
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment