deepee Posted December 21, 2010 Share Posted December 21, 2010 Hi AllI'm running the standard prestashop template currently on Version 1.2.4.0 and want to add a short message showing the dates we'll be shut over the Christmas holidays.I'm thinking the blank white space to the right of my logo would probably be the best spot.Any recommendations on the easiest way to accomplish this?Thanksdeepee Link to comment Share on other sites More sharing options...
rocky Posted December 21, 2010 Share Posted December 21, 2010 I always add my holiday message on my contact form and in my forum signature. It doesn't seem to stop people contacting me though. I get just as many orders and work requests when I have the holiday message as when I don't.To add a holiday message in the header, I suggest adding code like the following to header.tpl in your theme's directory in the header div: {l s='Your holiday message goes here'} Then add CSS like the following to position it wherever you like: div#header p#holiday_message { position: absolute; left: 50px; top: 20px } Change 50px to how far from the left of the header you want the message and 20px to how far from the top of the header.I think you may also need to add position: relative to the header div in your global.css for it to work. Link to comment Share on other sites More sharing options...
deepee Posted December 21, 2010 Author Share Posted December 21, 2010 Hi RockyYes, it seems nobody reads the messages in the contact form!Last year I modified an image in the "Block Advertising" module to contain the message.Trouble is, this block gets picked up by anyone using an adblocker and doesn't display.Which lines, after and before, should your first piece of code go?Does the second piece of code go directly below it?Thanksdeepee Link to comment Share on other sites More sharing options...
rocky Posted December 21, 2010 Share Posted December 21, 2010 The first code should go before the that matches . The second code should go into css/global.css in your theme's directory. Link to comment Share on other sites More sharing options...
deepee Posted December 22, 2010 Author Share Posted December 22, 2010 Hi RockyI've been looking through the css/global.css and can't see an obvious place to enter the code.Where should it go?Thanksdeepee Link to comment Share on other sites More sharing options...
rocky Posted December 22, 2010 Share Posted December 22, 2010 In the /* global layout */ section is a good place. Link to comment Share on other sites More sharing options...
deepee Posted December 22, 2010 Author Share Posted December 22, 2010 Excellent Rocky, that works!It currently appears above my logo and extends across the top of * contact * sitemap * bookmark and the search bar.How do I get it below these elements and to the right of the logo so it's more prominent?Thanksdeepee Link to comment Share on other sites More sharing options...
rocky Posted December 22, 2010 Share Posted December 22, 2010 Adjust the left and top values in the CSS code above until you are happy with the position. Link to comment Share on other sites More sharing options...
justdogwalking.com Posted December 22, 2010 Share Posted December 22, 2010 Another way might be to use one of the available lines of text under the main page image - needs no code but only appears on the front page. Link to comment Share on other sites More sharing options...
deepee Posted January 6, 2011 Author Share Posted January 6, 2011 Thanks to all for the feedback.I really needed it to be viewable on all pages and managed to work it using Rocky's instructions.It left me thinking it would be great to have a module that can insert a text or image box for this purpose and be easily configured from the back office, without the need to edit any code. Link to comment Share on other sites More sharing options...
mandrin Posted January 12, 2011 Share Posted January 12, 2011 Hi Rocky,I did what you suggested, but I can't seem to shift the text towards the right or increase the width...Apon inspection it seems it still pulling the global css settings and not it's own...Please see attached picture. Link to comment Share on other sites More sharing options...
deepee Posted January 13, 2011 Author Share Posted January 13, 2011 I also tried adjusting the left and top values but it made no difference. However, I was in a hurry and had to settle for a basic message at the top left of the screen. Link to comment Share on other sites More sharing options...
AmauryUK Posted March 27, 2011 Share Posted March 27, 2011 thanks for the tip Link to comment Share on other sites More sharing options...
mandrin Posted March 28, 2011 Share Posted March 28, 2011 Soz guys, I got it to work but forgot to post the solution... Thanks Rocky!Ok, my Header.tpl file looks like this: >{$HOOK_HEADER} </head> <body {if $page_name}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if}> {if !$content_only} </pre> <ul>{l s='This shop requires JavaScript to run correctly. Please activate JavaScript in your browser.'}</ul> <br><div> <!-- Header --> {l s='Toys | Cars | Shoes | Kids | Clothes | Bikes | Bags | Boards | Caps | Gloves'} {$HOOK_TOP} <!-- Left --> {$HOOK_LEFT_COLUMN} <!-- Center --> < Link to comment Share on other sites More sharing options...
mandrin Posted March 28, 2011 Share Posted March 28, 2011 I was struggling to get it centred but the " " did the trick! Link to comment Share on other sites More sharing options...
GardusTech Posted July 5 Share Posted July 5 In case somebody needs to add a quick message for the holiday and have Prestashop 8 like me, aside from a free pop module I added a text string in the header.tpl Between the header_top block name and the div class header top right (line 74 for me) It'll appear between the logo on the left and the search bar on the right, on every pages. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now