Feature Request - Set scrollTo offset

Phoca Cart - complex e-commerce extension
dangermark
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 24 Nov 2020, 03:38

Feature Request - Set scrollTo offset

Post by dangermark »

Hi,

It would be great to be able to set a scrollTo offset value in the checkout.

For example we have a sticky navigation so when the scrollTo gets triggered (when enabled) the address/shipping etc panels get partially hidden behind it.

So being able to set maybe an offset value would be awesome.

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Feature Request - Set scrollTo offset

Post by Jan »

Hi, added to feature request list.

For now it can be customized in:
administrator/components/com_phocacart/libraries/phocacart/render/js.php

method: renderJsScrollTo (line cca 1165)

for example

FROM:

Code: Select all

jQuery(\'html,body\').animate({scrollTop: jQuery("#' . $scrollTo . '").offset().top}, 1500 );
TO:

Code: Select all

jQuery(\'html,body\').animate({scrollTop: jQuery("#' . $scrollTo . '").offset().top - 100}, 1500 );
Jan
If you find Phoca extensions useful, please support the project
Post Reply