Jump to content

Fixed header w/ Ajax Cart


Recommended Posts

Hello,

 

I have a slightly modified default theme and I would like to create a small fixed header at the top of the page (about the size of the navigation bar) and place my ajax cart up there. That way the car is always visible up top. I feel like this would be a nice update for a lot of people.

 

Is this a hard thing to do or pretty simple? If it's pretty hard, I'll just find a developer to do this for me.

 

Thanks!

Link to comment
Share on other sites

Hello ajensen27,

 

i think that solution depends on the modification, it is necessary to know something more about the theme, like css styles, blocks order etc.

 

can you please provide the url if it is possible? Or maybe you want solution for "clean" default theme?

Link to comment
Share on other sites

Well, basic fixed mode for header is easy to configure, take a look:

 

themes/mytheme/header.tpl

to the <div id="header" class="grid_9 alpha omega"> i added style="", like:

 

<div id="header" class="grid_9 alpha omega" style="position:fixed; background:#FFF; margin-top:0px; padding-top:0px;">

 

and to the: <div id="columns" class="grid_9 alpha omega clearfix" > i added style="", like:

 

<div id="columns" class="grid_9 alpha omega clearfix" style="Position:relative; top:150px;">

 

you also need to add style="postion:relative; top:150px;" to the #footer div, just open the footer.tpl file and change <div id="footer> for:

 

<div id="footer" class="grid_9 alpha omega clearfix" style="position:relative; top:150px">

 

and that's all. But as i said it is basic configuration. If you want some other changes in this case you of course need to modify modules attached to header section etc.

 

hope all is clear, if you've got any other questions - feel free to write

 

im going to write article about that :-)

article ready: how to create fixed prestashop header

 

regards

Link to comment
Share on other sites

Thanks for the response Vekia! I just saw your tutorial and it's not exactly what I was looking for but close. I basically just wanted to create a separate "bar" at the top of the page that would be fixed and contain the shopping cart and that is all.

 

Seems like it might be a little more difficult then something I can take on so I'll probably just hire a developer.

 

Thanks!

Link to comment
Share on other sites

in this case you have to edit both header.tpl file and blockuserinfo module. Well, first necessary step is change positon of blockuserinfo - move it to the top of the hook - it must be first on list.

 

next you need to create new styles for #header_user (block user info) where you must add:

 

width:100%; position:fixed; and other params like height:20px;

 

in header tpl you must define margin-top (or position:relative; top:20px) for whole content, because fixed cart will be overlaping content of the page

Link to comment
Share on other sites

  • 9 months later...

so your non default theme causing problems you've got.

solution pasted above is related to default theme or themes based on "default" theme engine.

unfortunately, without more informations (and without link) it's almost impossible to help :(

Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...

Hello again Vekia :)

 

I set homeslider on top with your great module. Now I set header to be fixed, but also homeslider remains blocked. Any solution for this?

 

Thank you.

 

 

Well, basic fixed mode for header is easy to configure, take a look:

themes/mytheme/header.tpl
to the <div id="header" class="grid_9 alpha omega"> i added style="", like:
 

<div id="header" class="grid_9 alpha omega" style="position:fixed; background:#FFF; margin-top:0px; padding-top:0px;">
and to the: <div id="columns" class="grid_9 alpha omega clearfix" > i added style="", like:

<div id="columns" class="grid_9 alpha omega clearfix" style="Position:relative; top:150px;">
you also need to add style="postion:relative; top:150px;" to the #footer div, just open the footer.tpl file and change <div id="footer> for:

<div id="footer" class="grid_9 alpha omega clearfix" style="position:relative; top:150px">
and that's all. But as i said it is basic configuration. If you want some other changes in this case you of course need to modify modules attached to header section etc.

hope all is clear, if you've got any other questions - feel free to write

im going to write article about that :-)
article ready: how to create fixed prestashop header

regards

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...