[Skip to main content](#vessel-content)

#   Disable Scroll to top after add to cart button

##

- **[Multi555](/forum/user/13430-multi555 "View Multi555's Profile")**
- [![Multi555's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13430-multi555 "View Multi555's Profile") Topic Author
- [ Offline](/forum/user/13430-multi555)

Less More

- Posts: 9
- Thank you received: 0
-
-

12 years 2 months ago [\#167887](#167887) by [Multi555](/forum/user/13430-multi555 "View Multi555's Profile")  *[Disable Scroll to top after add to cart button](/forum/26-product-category-display/870437-disable-scroll-to-top-after-add-to-cart-button#167887 "-- HikaShop version -- : 2.2.0 -- Joomla version -- : 2.5  Hi! I use Business edition of hikashop (2.2.0). I want to disable browser scrolling to top, after pushing add to cart button on product listing. Now when I push the add to cart button the pop up window show (its fine), then scroll up to top of the page. Is it possible to disbale this function? (I try to modify the custom css trought display, but with no lucky) Thank's for answer, and for a very good shopping cart system.")* was created by *[Multi555](/forum/user/13430-multi555 "View Multi555's Profile")*

-- HikaShop version -- : 2.2.0
-- Joomla version -- : 2.5

Hi!
I use Business edition of hikashop (2.2.0).
I want to disable browser scrolling to top, after pushing add to cart button on product listing.
Now when I push the add to cart button the pop up window show (its fine), then scroll up to top of the page.
Is it possible to disbale this function? (I try to modify the custom css trought display, but with no lucky) Thank's for answer, and for a very good shopping cart system.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA0MzctZGlzYWJsZS1zY3JvbGwtdG8tdG9wLWFmdGVyLWFkZC10by1jYXJ0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 2 months ago [\#167889](#167889) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Disable Scroll to top after add to cart button](/forum/26-product-category-display/870437-disable-scroll-to-top-after-add-to-cart-button#167889 "-- HikaShop version -- : 2.2.0 -- Joomla version -- : 2.5  Hi! I use Business edition of hikashop (2.2.0). I want to disable browser scrolling to top, after pushing add to cart button on product listing. Now when I push the add to cart button the pop up window show (its fine), then scroll up to top of the page. Is it possible to disbale this function? (I try to modify the custom css trought display, but with no lucky) Thank's for answer, and for a very good shopping cart system.")*

Hi,

You have to enable the option "Use AJAX button when possible" in Configuration &gt; Main &gt; Advanced.
This way the page will not be reloaded and it will stay at the same position.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA0MzctZGlzYWJsZS1zY3JvbGwtdG8tdG9wLWFmdGVyLWFkZC10by1jYXJ0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Multi555](/forum/user/13430-multi555 "View Multi555's Profile")**
- [![Multi555's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13430-multi555 "View Multi555's Profile") Topic Author
- [ Offline](/forum/user/13430-multi555)

Less More

- Posts: 9
- Thank you received: 0
-
-

12 years 2 months ago [\#167944](#167944) by [Multi555](/forum/user/13430-multi555 "View Multi555's Profile")  Replied by *[Multi555](/forum/user/13430-multi555 "View Multi555's Profile")* on topic *[Disable Scroll to top after add to cart button](/forum/26-product-category-display/870437-disable-scroll-to-top-after-add-to-cart-button#167944 "-- HikaShop version -- : 2.2.0 -- Joomla version -- : 2.5  Hi! I use Business edition of hikashop (2.2.0). I want to disable browser scrolling to top, after pushing add to cart button on product listing. Now when I push the add to cart button the pop up window show (its fine), then scroll up to top of the page. Is it possible to disbale this function? (I try to modify the custom css trought display, but with no lucky) Thank's for answer, and for a very good shopping cart system.")*

Hi Xavier!
Thank's for answer, but it was alredy enabled, with or without this option page is reloading.
In privat message I give you access to front end. Maybe you can figure out something.

[ ![111.jpg](/forum/attachment/19066) ](/forum/attachment/19066 "111.jpg")

- [ ![111.jpg](/forum/attachment/19066) ](/forum/attachment/19066 "111.jpg") [ ](/forum/attachment/19066?download=1 "111.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA0MzctZGlzYWJsZS1zY3JvbGwtdG8tdG9wLWFmdGVyLWFkZC10by1jYXJ0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

12 years 2 months ago [\#167946](#167946) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Disable Scroll to top after add to cart button](/forum/26-product-category-display/870437-disable-scroll-to-top-after-add-to-cart-button#167946 "-- HikaShop version -- : 2.2.0 -- Joomla version -- : 2.5  Hi! I use Business edition of hikashop (2.2.0). I want to disable browser scrolling to top, after pushing add to cart button on product listing. Now when I push the add to cart button the pop up window show (its fine), then scroll up to top of the page. Is it possible to disbale this function? (I try to modify the custom css trought display, but with no lucky) Thank's for answer, and for a very good shopping cart system.")*

Hi,

Then there is no way to disable that.
It's not really a "scroll to top". It's that the full page is refreshed and thus the browser puts you back at the top of the page since it's a new page being displayed. It is necessary in order to send the add to cart data to the web server. With the AJAX option turned on, HikaShop will use an AJAX process to send the data when possible, and in such cases, the page won't have to be refreshed. But it's not always possible to do it, and sicne it doesn't change the behavior on your website, it means that you're not in a case where the AJAX process can be used.

The following user(s) said Thank You: [Multi555](/forum/user/13430-multi555 "View Multi555's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA0MzctZGlzYWJsZS1zY3JvbGwtdG8tdG9wLWFmdGVyLWFkZC10by1jYXJ0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Multi555](/forum/user/13430-multi555 "View Multi555's Profile")**
- [![Multi555's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13430-multi555 "View Multi555's Profile") Topic Author
- [ Offline](/forum/user/13430-multi555)

Less More

- Posts: 9
- Thank you received: 0
-
-

12 years 1 month ago [\#169732](#169732) by [Multi555](/forum/user/13430-multi555 "View Multi555's Profile")  Replied by *[Multi555](/forum/user/13430-multi555 "View Multi555's Profile")* on topic *[Disable Scroll to top after add to cart button](/forum/26-product-category-display/870437-disable-scroll-to-top-after-add-to-cart-button#169732 "-- HikaShop version -- : 2.2.0 -- Joomla version -- : 2.5  Hi! I use Business edition of hikashop (2.2.0). I want to disable browser scrolling to top, after pushing add to cart button on product listing. Now when I push the add to cart button the pop up window show (its fine), then scroll up to top of the page. Is it possible to disbale this function? (I try to modify the custom css trought display, but with no lucky) Thank's for answer, and for a very good shopping cart system.")*

Hi Nicolas!

Only one more try, then I will give up "fighting" with AJAX.
After a lot of testing, I found the problem what causing: add to cart button with ajax not working.

On product listing I use custom "item" field (sometimes my customers need to add comments to product, color, type of pruduct ect.)
- When this custom "item" field is publised (turned on), the "add to cart ajax process" is not working.
- When I unpublish (turn off) custom "item" field, the "add to cart ajax process" working perfectly.

Custom item fields, and AJAX is a great funkction, but not working together. Unfortunately my customers realy need both function, thats why I trying to find solution for my problem.

Is it possible to make this two function work together?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA0MzctZGlzYWJsZS1zY3JvbGwtdG8tdG9wLWFmdGVyLWFkZC10by1jYXJ0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 1 month ago [\#169734](#169734) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Disable Scroll to top after add to cart button](/forum/26-product-category-display/870437-disable-scroll-to-top-after-add-to-cart-button#169734 "-- HikaShop version -- : 2.2.0 -- Joomla version -- : 2.5  Hi! I use Business edition of hikashop (2.2.0). I want to disable browser scrolling to top, after pushing add to cart button on product listing. Now when I push the add to cart button the pop up window show (its fine), then scroll up to top of the page. Is it possible to disbale this function? (I try to modify the custom css trought display, but with no lucky) Thank's for answer, and for a very good shopping cart system.")*

Hi,

Without a re-factoring of the system it won't be possible.
The custom item fields allow the user to enter some specific data ; but it can be a text, a checkbox or something more complicated like an upload of file;
That's why the ajax is not compatible with the custom item fields, it can't know if the custom item field will be compatible with the "ajax call" so it always make a classical form submission where there is a custom item field.

We introduced the "ajax file" and "ajax image" in HikaShop, our goal is to have compatible custom fields for ajax and let the "add to cart" detect if it can work or not.
But it is something in our TODO list, we are currently on other big developments ; so the improvement of the "add to cart" will be done but not in a short delay.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [Multi555](/forum/user/13430-multi555 "View Multi555's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA0MzctZGlzYWJsZS1zY3JvbGwtdG8tdG9wLWFmdGVyLWFkZC10by1jYXJ0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Multi555](/forum/user/13430-multi555 "View Multi555's Profile")**
- [![Multi555's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13430-multi555 "View Multi555's Profile") Topic Author
- [ Offline](/forum/user/13430-multi555)

Less More

- Posts: 9
- Thank you received: 0
-
-

12 years 1 month ago [\#169811](#169811) by [Multi555](/forum/user/13430-multi555 "View Multi555's Profile")  Replied by *[Multi555](/forum/user/13430-multi555 "View Multi555's Profile")* on topic *[Disable Scroll to top after add to cart button](/forum/26-product-category-display/870437-disable-scroll-to-top-after-add-to-cart-button#169811 "-- HikaShop version -- : 2.2.0 -- Joomla version -- : 2.5  Hi! I use Business edition of hikashop (2.2.0). I want to disable browser scrolling to top, after pushing add to cart button on product listing. Now when I push the add to cart button the pop up window show (its fine), then scroll up to top of the page. Is it possible to disbale this function? (I try to modify the custom css trought display, but with no lucky) Thank's for answer, and for a very good shopping cart system.")*

Hi Jerome!

OK, I understand, and thank's for your answer.

Best regards,

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA0MzctZGlzYWJsZS1zY3JvbGwtdG8tdG9wLWFmdGVyLWFkZC10by1jYXJ0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.355 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
