Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Green drop down info bar

 
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 03-06-2017, 06:04 PM
 
dr_killer_uk dr_killer_uk is offline
 

Advanced Member
  
Join Date: Feb 2017
Posts: 65
 

Default Green drop down info bar

This is in reference to the annoying green box that shows up at the top of the website when you add something to cart or do other things (as a normal user browsing and using the site) it says things like "product has been added to your cart" and so on.
Is there any way to change its color from green or to stop it showing up completely? The green box just doesn't go with my site theme at all. Even if i could just change it to white that would be 100% better.

Thanks in advance!
__________________
X-Cart
Business 5.3.4.7
Reply With Quote
  #2  
Old 03-13-2017, 03:49 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Green drop down info bar

You should decorate the \XLite\Controller\Customer\Cart::processAddItemSuc cess() method from your custom module and make it do nothing (check how Add2CartPopup module does the same thing) - this will disable the "product has been added" top message completely.

However, there are other messages that may appear as a green top message. You can override the CSS rules for "#status-messages .info" selector and change the colours to yours from either a custom module, or by using Theme Tweaker module (Look & Feel -> Custom CSS).
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote

The following user thanks qualiteam for this useful post:
dr_killer_uk (03-13-2017)
  #3  
Old 03-13-2017, 10:12 AM
 
dr_killer_uk dr_killer_uk is offline
 

Advanced Member
  
Join Date: Feb 2017
Posts: 65
 

Default Re: Green drop down info bar

Appreciate you taking the time to reply!
I'll give that a try.
__________________
X-Cart
Business 5.3.4.7
Reply With Quote
  #4  
Old 03-17-2017, 06:21 PM
 
kevinrm kevinrm is offline
 

X-Adept
  
Join Date: Aug 2003
Posts: 998
 

Default Re: Green drop down info bar

How can I get the green box removed at the top? It is interrupting and not necessary. I can't figure out the CSS to remove that, I have no clue how to "decorate" this...
__________________
X-Cart 5.4.1.21 Live
PHP 7.3
FPM/FastCGI - enabled
Zend OpCache OFF - Won't work with phar extension in cPanel on
10.3 MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote
  #5  
Old 03-17-2017, 06:35 PM
 
dr_killer_uk dr_killer_uk is offline
 

Advanced Member
  
Join Date: Feb 2017
Posts: 65
 

Default Re: Green drop down info bar

I also tried to change the color to no avail so just gave up and started working on other things instead. I'm not sure how to use the Look and Feel CSS as there is no reference to #status-messages .info in there
__________________
X-Cart
Business 5.3.4.7
Reply With Quote
  #6  
Old 03-17-2017, 06:39 PM
 
kevinrm kevinrm is offline
 

X-Adept
  
Join Date: Aug 2003
Posts: 998
 

Default Re: Green drop down info bar

The box only pops up for a certain amount of time then disappears, making the code hard to inspect. I don't know why it needs to tell someone, again, that items have been added to the cart…they know that already.
__________________
X-Cart 5.4.1.21 Live
PHP 7.3
FPM/FastCGI - enabled
Zend OpCache OFF - Won't work with phar extension in cPanel on
10.3 MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote
  #7  
Old 03-21-2017, 09:24 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Green drop down info bar

The easiest way is creating a small custom module and making the \XLite\Controller\Customer\Cart::processAddItemSuc cess() method return false from there.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #8  
Old 03-23-2017, 07:28 PM
 
kevinrm kevinrm is offline
 

X-Adept
  
Join Date: Aug 2003
Posts: 998
 

Default Re: Green drop down info bar

I am not a module developer, I guess I'll just learn to live with this annoying feature.
__________________
X-Cart 5.4.1.21 Live
PHP 7.3
FPM/FastCGI - enabled
Zend OpCache OFF - Won't work with phar extension in cPanel on
10.3 MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote
  #9  
Old 06-04-2017, 10:08 AM
 
dr_killer_uk dr_killer_uk is offline
 

Advanced Member
  
Join Date: Feb 2017
Posts: 65
 

Default Re: Green drop down info bar

Here is how to hide it.

Go to "Look & Feel" -> "Custom JS", enable it and add the following code:
Code:
TopMessages.prototype.messageHandler = function (text, type) { if (type != MESSAGE_INFO) { this.addRecord(text, type); } };

Looks so much better with out it! Now you just see the item fly into the cart with out the big green box telling you it just went it the cart lol.
Just so you know it hides it for everything though including errors.
__________________
X-Cart
Business 5.3.4.7

Last edited by qualiteam : 06-04-2017 at 10:42 PM.
Reply With Quote

The following user thanks dr_killer_uk for this useful post:
qualiteam (06-04-2017)
  #10  
Old 06-04-2017, 06:32 PM
 
kevinrm kevinrm is offline
 

X-Adept
  
Join Date: Aug 2003
Posts: 998
 

Default Re: Green drop down info bar

I was going to kill that because I use the pop-up module instead. However, I just found out from a customer that if you use a pop-up notification that something is in the cart and a visit your site with a mobile device, it takes up half the mobile device's screen and you can't escape from it, making your site basically useless for mobile devices. So in retrospect, the green thing is better than using pop-up instead.
__________________
X-Cart 5.4.1.21 Live
PHP 7.3
FPM/FastCGI - enabled
Zend OpCache OFF - Won't work with phar extension in cPanel on
10.3 MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:13 AM.

   

 
X-Cart forums © 2001-2020