Jack_mcs Posted May 15, 2016 Share Posted May 15, 2016 (edited) This addon provides a quick way to display messages in the header of a Bootstrap shop. It is a vert simple installation. Edited May 15, 2016 by Jack_mcs Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥altoid Posted May 16, 2016 Share Posted May 16, 2016 Hi Jack, testing this out. php version 5.6 Got this notice: Notice: Use of undefined constant TEXT_MESSAGE_PLACEHOLDER - assumed 'TEXT_MESSAGE_PLACEHOLDER' in ...... Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 16, 2016 Author Share Posted May 16, 2016 I'm not seeing that here but it is probably due to the strict error setting in that php version. But, regardless, the code causing the problem should not even be there. Please edit the includes/modules/content/header/cm_header_messagebox.php file and remove the following. Please let me know if there are any other problems and, if not, I will get a revised version uploaded. $message_box = '<div class="messagebox-margin">'; $message_box .= tep_draw_form('quick_find', tep_href_link('advanced_message_result.php', '', $request_type, false), 'get', 'class="form-horizontal"'); $message_box .= ' <div class="input-group">' . tep_draw_input_field('keywords', '', 'required placeholder="' . TEXT_MESSAGE_PLACEHOLDER . '"', 'message') . '<span class="input-group-btn"><button type="submit" class="btn btn-info"><i class="fa fa-message"></i></button></span>' . ' </div>'; $message_box .= tep_hide_session_id() . '</form>'; $message_box .= '</div>'; Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥altoid Posted May 16, 2016 Share Posted May 16, 2016 @@Jack_mcs After modifying as above, that notice does not appear now. This is in a uniserver test shop, with the php as above and error reporting as follows: // set the level of error reporting // error_reporting(E_ALL & ~E_NOTICE); error_reporting(E_ALL); Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 17, 2016 Author Share Posted May 17, 2016 Are you just letting me know the error has gone or is there still a problem? Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥altoid Posted May 17, 2016 Share Posted May 17, 2016 Are you just letting me know the error has gone or is there still a problem? Errors gone, I was just showing the error checking setting in case you wanted to try something else to test it. Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 17, 2016 Author Share Posted May 17, 2016 Oh, I see. Thanks. The problem is that the php developers changed what error_reporting shows in the latest versions of php. I don't develop using those versions so unless I enable strict reporting, such errors won't show up. It's usually not a problem but silly mistakes like the one I made here will trigger it. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
hyepo Posted June 9, 2016 Share Posted June 9, 2016 is it possible to see a working sample of this addon? Quote Link to comment Share on other sites More sharing options...
Mikepo Posted June 30, 2016 Share Posted June 30, 2016 @@Jack_mcs, I have this addon on a live site, works ok and very useful, thanks. however , I've just noticed that on mobile devices the message box appears slightly to the right of it's location, see attached image. Can you advise? running 2.34.BS gold Thanks Mike Quote osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!) Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 30, 2016 Author Share Posted June 30, 2016 @@Mikepo In the user.css file, find this code .message-box {margin-top:14px; margin-left:40px; padding:5px 4px; border:1px solid red; background:#FEE60A; -moz-box-shadow: 0 0 5px rgba(0,0,0,0.5); -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.5); box-shadow: 0 0 15px rgba(0,0,0,0.5);} And add this below it @[member=media] (max-width: 640px) { .message-box {margin-left:0px} } Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 4, 2017 Author Share Posted January 4, 2017 A new version has been uploaded with these changes: Added a second message option. Added code to rotate the messages. Changed css to better display with mobile devices - found by member Mikepo. Removed unnecessary code. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Dennisra Posted January 5, 2017 Share Posted January 5, 2017 Terrific!! Thanks Jack. Dennis A. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 6, 2017 Share Posted January 6, 2017 Thank you Jack! Although mine is not working the way you intended, it is perfect for my purpose. Just FYI, in your original version, I had a few lines of HTML followed by a line of plain text. In the latest version I put the HTML in box one & plain text in box two. It would fade and message two never showed, fade back to one. I put my whole original string in box one and other plain text in box two. Box one HTML fades, plain text stays, message two never shows. Leave box two empty and it doesn't fade. I'm happy with the results of the blue line configuration with long show, quick fade out-in as it brings attention to the important part. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 6, 2017 Author Share Posted January 6, 2017 I setup my test shop here to have the messages as you describe and it works as expected. Please make sure the first delay setting is at least twice the fade delay setting, as mentioned in the settings. If not, it will cause problems like that. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Mikepo Posted January 6, 2017 Share Posted January 6, 2017 @@Jack_mcs @@Big Bear I noticed the same scenario, when I used £ the text (html) in the second box wouldn't appear, so instead of £ I used £, now everything works as it should. Hope this helps Mike Quote osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!) Link to comment Share on other sites More sharing options...
Guest Posted January 7, 2017 Share Posted January 7, 2017 @@Jack_mcs Hi Jack Great addon. Just one thing how do you change the height of the box, Im thinking so as the box is say 40px high. Many thanks Grandpa Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 7, 2017 Author Share Posted January 7, 2017 In the user.css file, change the .message-box class to include height:XXpx; where XX is the height. Note that there are two instances of that class, one for desktop and one for mobile. You need to change them both to what works in each case. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 17, 2017 Author Share Posted January 17, 2017 Just FYI, in your original version, I had a few lines of HTML followed by a line of plain text. In the latest version I put the HTML in box one & plain text in box two. It would fade and message two never showed, fade back to one. I put my whole original string in box one and other plain text in box two. Box one HTML fades, plain text stays, message two never shows. Leave box two empty and it doesn't fade. I ran across this in a new installation. The problem was that the previous messages used a closed br ( <br /> ) and the / was preventing the code from working as it should. Change that to <br> allowed it to work. I haven't looked at why that fails but if you, anyone, has this problem, try removing the / to see if it helps. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted January 25, 2017 Share Posted January 25, 2017 This addon provides a quick way to display messages in the header of a Bootstrap shop. It is a vert simple installation. Jack; I have installed the latest version of the message box (01/04/2017) and I love it, but the second box feature does not work. If I set up the second box, I get the first box over and over. I use just one box (first or second) and it works fine Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 25, 2017 Author Share Posted January 25, 2017 @@stevenlemon Did you make sure about the time settings and use closing slashes? Both are mentioned above. If you are not sure, change both messages to plain text and see if that works. Then, assuming it does, add some of the changes back in until it fails to find the problem. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 7, 2019 Author Share Posted July 7, 2019 A new version has been uploaded with these changes: Added code to automatically handle all languages so it is now possible to have a different message for each language. Added code to allow messages to be loaded from the Information Pages SEO addon Just use INP_X, where X is the message ID. Added an entry for the message text class so the font color can be changed. Added an entry for the message text class so the font background color can be changed. Added an option to allow the messages to be displayed in a box, as before, or in a circle. Changed the code to use a textarea for the messages. Changed the code to make it compatible with Phoenix. Moved the css to the template file. valquiria23 and kgtee 1 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
kgtee Posted July 8, 2019 Share Posted July 8, 2019 This is really useful as I can use it to display festive messages with nice pictures now. In our multi-racial home country, there are simply many occasions we need to greet the customers. Thanks, Jack! Quote Link to comment Share on other sites More sharing options...
nsf43 Posted July 8, 2019 Share Posted July 8, 2019 I believe I applied your changes properly, but when I attempt to do the "install", there is no "messagebox" in the functions list. What did I miss? --N Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted July 8, 2019 Share Posted July 8, 2019 @Jack_mcs On 7/7/2019 at 11:22 AM, Jack_mcs said: A new version has been uploaded with these changes: Added code to automatically handle all languages so it is now possible to have a different message for each language. Added code to allow messages to be loaded from the Information Pages SEO addon Just use INP_X, where X is the message ID. Added an entry for the message text class so the font color can be changed. Added an entry for the message text class so the font background color can be changed. Added an option to allow the messages to be displayed in a box, as before, or in a circle. Changed the code to use a textarea for the messages. Changed the code to make it compatible with Phoenix. Moved the css to the template file. Thank you for your support of the Phoenix project! M valquiria23 1 Quote Link to comment Share on other sites More sharing options...
Heatherbell Posted July 8, 2019 Share Posted July 8, 2019 @Jack_mcs Many thanks for this module - just loaded into a new Phoenix and works great. Jack_mcs 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.