X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   General questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=66)
-   -   Green drop down info bar (https://forum.x-cart.com/showthread.php?t=75063)

dr_killer_uk 03-06-2017 06:04 PM

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!

qualiteam 03-13-2017 03:49 AM

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).

dr_killer_uk 03-13-2017 10:12 AM

Re: Green drop down info bar
 
Appreciate you taking the time to reply!
I'll give that a try.

kevinrm 03-17-2017 06:21 PM

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...

dr_killer_uk 03-17-2017 06:35 PM

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

kevinrm 03-17-2017 06:39 PM

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.

qualiteam 03-21-2017 09:24 PM

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.

kevinrm 03-23-2017 07:28 PM

Re: Green drop down info bar
 
I am not a module developer, I guess I'll just learn to live with this annoying feature.

dr_killer_uk 06-04-2017 10:08 AM

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.

kevinrm 06-04-2017 06:32 PM

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.


All times are GMT -8. The time now is 03:43 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.