Delay the hover effect on minicart module

  • Posts: 162
  • Thank you received: 0
6 years 4 months ago #295211

Hi,

As it is now the cart module effect is too fast. I need to slow down the drop down cart display on hover.

1. Please let me know where I can do that? Is there a setting?

2. If there is no setting, please point me to the file that contains the code? Can the code be overwritten via template overrides?

thanks!

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
6 years 4 months ago #295213

Hi,

There is no setting.
You'll want to change the line:
jQuery(el).slideToggle('fast');
in the file media/com_hikashop/js/hikashop.js
You can replace fast by slow or a number of microseconds.
It's possible to override the toggleOverlayBlock function by redefining the function, for example in the file "cart" of the view "product" via the menu Display>Views.
Now you'll need to know javascript pretty well to be able to write an override of that function. Here is a starting point if you know javascript but you're not familiar with redefining functions:
stackoverflow.com/questions/6885404/javascript-override-methods

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

  • Posts: 162
  • Thank you received: 0
6 years 4 months ago #295415

Hi,

I've done that. The change is working fine.

The problem is that the cart module is acting a bit chaotic when the hover effect is enabled in back-end and that is with my overrides disabled. I mean by default.

Sometimes I have to hover a second time on it to hide the drop-down. Sometimes is not closing the drop-down at all and sometimes it stays stuck.

thanks!

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
6 years 4 months ago #295420

Hi,

Yes. A hover effect for a collapsable element is complex to handle and the way we did it (which was first done for the click and not the hover), is not adapted, and that's why it gets chaotic. A lot of work would be needed to get the hover to work properly in any case.
I would rather recommend to stick with the "click" version.

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

  • Posts: 162
  • Thank you received: 0
6 years 4 months ago #295484

Hi Nicolas,

thank you for the info.

1. When do you think this will be fixed? We expected some time for the Hikashop default mini cart module to replace a third-party module which was a time-wasting product with a lot of issues and poor support. For us the mini cart module is very important.

2. Another great idea related to mini cart will be to display a message to users when they try to update the product quantity in the quantity inputbox of the cart module and the product doesn't have any stock left.

Let's say we have only on item left from a product and the user has one piece in the cart but he wants to change the quantity to 2 pieces. Once he does that the page will reload and the quantity box is left with 1 piece as it was before. I think will be best to notify the customer after page reload or before that there is no more stock for the desired product.

Please let me know your thoughts?

thanks!

Last edit: 6 years 4 months ago by info@vesica.org.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
6 years 4 months ago #295496

Hi,

1. We'll look at improving that for the next release but it won't be perfect either.

2. It's a good idea yes. We'll look at doing that.

The following user(s) said Thank You: info@vesica.org

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

  • Posts: 162
  • Thank you received: 0
6 years 4 months ago #295815

Hi,

I've seen you've released some improvements for drop-down cart module. This is great. Thank you for that, but the cart drop-down still has issues. Maybe you can improve it in future versions.

Anyway we've switched to the click version. This version is better for touch screens also. The problem is that after the update the click version doesn't work as it did. For example when the drop-down was active we could click anywhere outside of it and the drop-down will disappear. Now it will hide only when clicked on the link and when is hidden and we click anywhere on the page it will display.

During tests I've disabled all overrides.

thanks!

Last edit: 6 years 4 months ago by info@vesica.org.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
6 years 4 months ago #295822

Hi,

Yes, this has been fixed:
www.hikashop.com/forum/install-update/89...t/295795.html#295801
We've also improved again a bit the hover effect so that you can use the click outside to close the dropdown even in hover mode.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum