Disable Scroll to top after add to cart button

  • Posts: 9
  • Thank you received: 0
11 years 3 weeks ago #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.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 3 weeks ago #167889

Hi,

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

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
11 years 3 weeks ago #167944

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.


Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 84301
  • Thank you received: 13697
  • MODERATOR
11 years 3 weeks ago #167946

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

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
11 years 1 week ago #169732

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 or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
11 years 1 week ago #169734

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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: Multi555

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
11 years 1 week ago #169811

Hi Jerome!

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

Best regards,

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum