How do I remove the pop up success message when I add a product to my cart?
I don't want any popup confirmation, just want it to smoothly go into the cart with any fuss .
Website address removed
I don't want any popup confirmation, just want it to smoothly go into the cart with any fuss .
Website address removed
Last edited by astott2014 on Sun Jan 18, 2015 7:20 pm, edited 2 times in total.
What version of OpenCart?
- Mel
- Mel
http://online.enterpriseconsulting.com.au
Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates
Go to "\catalog\view\theme\default\template\product\product.tpl" and look for this code towards the bottom:
This is the section that creates the notification that you need to comment out/over ride with mod.
- Mel
Code: Select all
if (json['success']) {
$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
$('.success').fadeIn('slow');
$('#cart-total').html(json['total']);
$('html, body').animate({ scrollTop: 0 }, 'slow');
}
- Mel
http://online.enterpriseconsulting.com.au
Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates
When you say comment out/over ride by mod, what do you mean exactly?melbagnato wrote:Go to "\catalog\view\theme\default\template\product\product.tpl" and look for this code towards the bottom:
This is the section that creates the notification that you need to comment out/over ride with mod.Code: Select all
if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); }
- Mel
I have tried to comment it out, but it still shows. I then tried to delete it, and it still shows. I may be missing the "over ride with mod"?
First edit catalog/view/javascript/common.js
At line 131 find:
Change into:
Second edit catalog/view/theme/YOUR_THEME/template/product/product.tpl
At line 406 in default product.tpl, find:
Change into:
At line 131 find:
Code: Select all
$('.success').fadeIn('slow');
Code: Select all
// $('.success').fadeIn('slow');
At line 406 in default product.tpl, find:
Code: Select all
$('.success').fadeIn('slow');
Code: Select all
// $('.success').fadeIn('slow');
Done exactly what you said, and it still hasn't worked.pprmkr wrote:First edit catalog/view/javascript/common.js
Second edit catalog/view/theme/YOUR_THEME/template/product/product.tpl
The second step you told me to do, the code was on a completely different line if thats helps. It was on line 747.
Bellow is the surrounding code to see if it helps you a little?:
Code: Select all
if (json['error']['profile']) {
$('select[name="profile_id"]').after('<span class="error">' + json['error']['profile'] + '</span>');
}
}
if (json['success']) {
if (!Journal.showNotification(json['success'], json['image'])) {
$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
}
// $('.success').fadeIn('slow');
$('#cart-total').html(json['total']);
$('html, body').animate({ scrollTop: 0 }, 'slow');
if (json['redirect']) {
location = json['redirect'];
}
Not sure if this is relevant, but I have VQMod installed using a custom template, not default.
Wait!!, I got it.... It only turned out to be that the custom admin theme has the feature to turn it on or off .
Thanks to anyone who helped .
Thanks to anyone who helped .
Last edited by astott2014 on Mon Jan 19, 2015 1:22 pm, edited 1 time in total.
Great to see you solved it. I spent much of the weekend tracking down a Romanian hacker trying to hack my site!
- Mel
- Mel
http://online.enterpriseconsulting.com.au
Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates
Who is online
Users browsing this forum: No registered users and 114 guests