Assuming you're using default theme, you must edit these files:
for add to cart button in product page
Code: Select all
catalog/view/theme/default/template/product/product.tpl
for add to cart in other pages
Ther are 4 occurrence in this file
find in both file:
Code: Select all
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');
replace with:
Code: Select all
$('#cart > button').addClass('blinker_cart').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>').delay(3000).queue(function(){
$(this).removeClass('blinker_cart');
});
open your stylesheet file:
Code: Select all
catalog/view/theme/default/stylesheet/stylesheet.css
add this:
Code: Select all
.blinker_cart {
-webkit-animation: blinker_cart 500ms linear infinite;
animation: blinker_cart 500ms linear infinite;
}
@-webkit-keyframes blinker_cart {
50% {
opacity: 0.2;
-webkit-transform: scale(1.04);
transform: scale(1.04);
}
}
@keyframes blinker_cart {
50% {
opacity: 0.2;
-webkit-transform: scale(1.04);
transform: scale(1.04);
}
}
This is a simple effect, you can write your own css.
Tested with OpenCart 2.3.0.2