AudioPro Posted May 28, 2010 Share Posted May 28, 2010 I'm trying to invert the positions of the search_block_top division and the header_user_block so that search_block_top is on the bottom right and header_user is on the top right. I get the feeling that it may be hard coded into a php or template file, but I'm not familiar enough with this to even guess where to start looking for it at this moment.I attached an image of what I'm shooting for to help clear up any possible confusion, and any suggestions on how this is done would be greatly appreciated.Regards;Carl Link to comment Share on other sites More sharing options...
rocky Posted May 29, 2010 Share Posted May 29, 2010 Have you tried going to Modules > Positions and moving the "Quick search block" in the "Top of pages" hook after "Block user info"? Link to comment Share on other sites More sharing options...
AudioPro Posted May 29, 2010 Author Share Posted May 29, 2010 Yes, that's the first thing I looked for. The problem is that header_user isn't a module so it seems pretty much defined by the css tags. And the only module option I've got is to uninstall the search block.The only way I could get their positions moved around at all was to put about 100px worth of vertical margin into their respective css properties. The problem here is that it messes up the alignment of almost every other element in the header, so I'm thinking there has to be an easier way somehow.Carl Link to comment Share on other sites More sharing options...
rocky Posted May 29, 2010 Share Posted May 29, 2010 Repositioning the blocks worked for me. See the screenshot (top is before moving the module and bottom is after). I'm using PrestaShop v1.3. If it doesn't work for you, then there is no easier way than messing around with CSS. Link to comment Share on other sites More sharing options...
AudioPro Posted May 29, 2010 Author Share Posted May 29, 2010 Well, I've done a bit of experimenting and came up with a few interesting things. Here's what I did..... I opened the page with firebug and copied the html structure of the header section into a standard html document and used a copy of the default global.css file So what I wound up with is a division structure like this... Link to comment Share on other sites More sharing options...
rocky Posted May 29, 2010 Share Posted May 29, 2010 Unfortunately, that is not possible, since the code is split into two module templates, modules/blocksearch/blocksearch-top.tpl and modules/blockuserinfo/blockuserinfo.tpl. What you want to is execute the first line of blockuserinfo.tpl, then execute blocksearch-top.tpl, then execute the rest of blockuserinfo.tpl, which is impossible. I think the only solution is to merge the blocksearch and blockuserinfo modules into one blockheader module. You'd need to copy the variables in the hookTop function in the blocksearch and blockuserinfo modules into a hookTop function for the blockheader module and then call a blockheader.tpl with your merged TPL file. 2 Link to comment Share on other sites More sharing options...
AudioPro Posted May 30, 2010 Author Share Posted May 30, 2010 Well that's just plain silly! Not sure why the developers didn't do it this way to begin with but I suppose they have their reasons. From your description though it seems like it's doable and not too much hassle IF you know what you're doing, which I don't. My only coding experience is in Fortran which is almost completely useless in this day and age...yea I'm an old fart! So, I guess I'll have to cook up some sort of work around with the css. Maybe somebody who's feeling bored will step up and make a new module in the way you described which seems like it'd be a great benefit for the community as a whole.Regards and thanks for the help you've given;Carl Link to comment Share on other sites More sharing options...
PS User Posted July 9, 2010 Share Posted July 9, 2010 I just moved my search bar from the top of the header to the bottom of the header by accident, somehow the PrestaShop recoding the CSS I think, if you want I can just provide you the CSS file and you can send me your CSS so we can have the correct seach bar position! Link to comment Share on other sites More sharing options...
vladyn Posted March 30, 2011 Share Posted March 30, 2011 Hello everyone, I have exact same issue - so thanks fot these thoughts and answers. I would not repeating the AudioPro question but must to say that I;ve got pretty good idea of how Presta shop is working - thanks again. I'm using 1.4x and the first answer was worked for me (moving the positions), but I appreciate the idea about merging the templates and creating your own modules from merged templates. I'm still not clear where some small bits of labels are generated - like for example in the left column -> block categories we have ul list of categories, but above there is a title h4 I think, which says "Categories". I don;t this title to be there - does anybody have answer for that. I think this will give me an answer about many small things further more in the implimentation process. 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