Page 1 of 1
1.5.1 exlimation icon when adding item to cart?
Posted: Sat Jul 23, 2011 12:46 am
by tropnevad
When I add an item to the cart i get the message popping up saying that it has been successful but there is an exclimation mark on this message, Everything still works, but is there a way to change this to a tick mark or something as it makes me think there is an error.
The official opencart demo also seems to have this problem (if it is a problem)
Re: 1.5.1 exlimation icon when adding item to cart?
Posted: Sat Jul 23, 2011 3:32 am
by Moggin
You can edit most of the messages in opencart by editing the language files. In this case try
catalog/language/english/checkout/cart.
Re: 1.5.1 exlimation icon when adding item to cart?
Posted: Sat Jul 23, 2011 7:07 pm
by tropnevad
THanks for your reply, but the message is good, it was the icon i would like to change
Re: 1.5.1 exlimation icon when adding item to cart?
Posted: Sat Jul 23, 2011 7:25 pm
by jcsmithy
You actually need to edit the Javascript file
catalog/view/javascript/common.js
Find
Code: Select all
$('#notification').html('<div class="attention" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
Change to
Code: Select all
$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
And then also...
catalog/view/theme/dedault/template/product/product.tpl
Find
Code: Select all
$('#notification').html('<div class="attention" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
Change to
Code: Select all
$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
job done.
Re: 1.5.1 exlimation icon when adding item to cart?
Posted: Sat Jul 23, 2011 7:28 pm
by Moggin
... so sorry. I see now what you're getting at. I think the whole box may be styled incorrectly.
If you successfully add an item to the cart, the source code shows it generates
- with the icon and background color you see.
I think it is meant to show
with background-color #EAF7D9 (green) and the tick box in the image file - catalog/view/theme/default/image/success.png
Looks like a minor bug to me?
======
EDIT - thanks for the fix jcsmithy! You got there 2 mins before me

Re: 1.5.1 exlimation icon when adding item to cart?
Posted: Sun Jul 24, 2011 6:21 pm
by tropnevad
Thanks for helping me

but i found that your suggested fix did not properly work for me
i found that I also needed to change the line below it in the common.js
From
To
But thanks for pointing me in the right direction
I also changed the same for when the user adds to wishlist or compare, as it was also showing attention, and not success
Re: 1.5.1 exlimation icon when adding item to cart?
Posted: Sat Dec 17, 2011 1:33 am
by caag06
Hi everybody.
How can I change the time of the success message when I add product to cart?
Thanks for your answer