Jump to content

[SOLVED] add to cart message not shown when header position is fixed Pres1.6


Recommended Posts

Hi.

I try to make my header-container css "postition:fixed"( so when i scroll down it fixed on the top) . everything is ok until i click add to cart and no message appeared like usually. can anyone help me to make the message is appeared although my header position is fixed. what should i do?

 

 

Link to comment
Share on other sites

I've found the solution, the add cart message is still shown but it's not on correct  top position. so i changed the ajax-cart.js on line 710,

$('#layer_cart').css({'top': n}).fadeIn('fast');

change n to 100..

$('#layer_cart').css({'top': 100}).fadeIn('fast');

it works

thanks

Link to comment
Share on other sites

OOOOHHH NOOO CRAZY MAN... it is not solve yet swadexi

 

Look friend, I am not the Java master, but I think prestashop people prefer open this form always on the top, not fixed I do not why, but must be to avoid problems with mobile devices or maybe for use javascript to open this form.

 

If you change 'n' for 100 you break the inicial center position. try to scroll down we page and open it again: with n value it appears on the top of your window, but with 100px it appears at 100px from the top of the "page" not the window.

 

 

Look at this 4 lines over your javascript change

var n = parseInt($(window).scrollTop()) + 'px';

Is better you change this formula like this one

var n = parseInt($(window).scrollTop()) + 10 + 'px';

I think 10 is better than 100, because Prestashop 1.6 default template is a full responsiva themplate. 100px is too much for a mobile device.

 

is demonstrated that mobile devices are the future, you must design thinking in this

Link to comment
Share on other sites

  • 5 weeks later...

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