Infinity scroll and voting stars

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #278681

-- HikaShop version -- : 1708101552

Hi,

We just found that using infinity scroll, when new products are loaded on scroll, voting stars are missing for those new products.

Can you please check.

Thanks

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 2 months ago #278693

Hi,

Thank you for your feedback. Indeed, this wasn't taken into account properly.
I've made a patch which should fix that.
Download the install package again on our website, install it on yours and clear your browser's cache and it should hopefully work.
If not, please provide a link to the page so that we can look into it more in depth.

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

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #278863

Hi,

Sorry for late replay. We have just updated to Hikashop 3.2.0 and the issue with votes still there.
Inspecting with firebug i see that vote.js does not create hk-rating div for new products loaded via infinity scroll...

Anyway. I have sent a link and login details via contact us form so you could take a look. You will see that the last item has no votes...

Kind Regards

Last edit: 7 years 2 months ago by kyratn.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 2 months ago #278868

Hi,

Looking at your website, you do have the modification I've added in the file media/com_hikashop/js/vote.js but you're missing the other modification I've added in the file components/com_hikashop/views/product/tmpl/listing_div.php
I suppose that you must have overridden that view file in your template and thus you didn't get the change in your override.
Add the code

<?php if($this->params->get('show_vote_product')) { ?>
		if(window.hikaVotes)
			initVote(newNode);
<?php } ?>
after the code:
var newNode = container.parentNode.insertBefore(div, container);
in the view file "listing_div.php" of the view "product".

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

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #278913

Hi,

Thanks for looking into this. However it still doesnt work. After new product is loaded i see js error in console from vote.js file.

TypeError: mainDiv.getElementsByName is not a function

I also have tried with clean protostar template and same results.
Could you please check again.

Thanks

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

  • Posts: 12953
  • Thank you received: 1778
7 years 2 months ago #278932

Hi,

We just added another fix regarding that issue through the last Hikashop version, can you download it through our website, install it and test it again ?

Thank you.

Last edit: 7 years 2 months ago by Mohamed Thelji.

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

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #278990

Hi,

Just downloaded new hikashop version. Installed it and cleared browser cache. No voting stars for new elements and same JS error.

Also tried with protostar template.

Kind Regards

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

  • Posts: 12953
  • Thank you received: 1778
7 years 2 months ago #279039

Hello,

The fix wasn't added to the last version of Hikashop when you downloaded it (my bad), you can download it again through our website, install it and test it again !

Best regards,
Mohamed Thelji.

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

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #279061

Hi,

Working fine now.

Thanks for your support and have a great day
Kind Regards

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

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #279069

Sorry been to fast. Voting stars are added but tooltip isnt displayed. I see class "state-hover" is added on hover but tooltip not shows and no div hk-tooltip is added to the bottom of body.

Thanks

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

  • Posts: 12953
  • Thank you received: 1778
7 years 2 months ago #279072

Hello,

Can you give us more information about the new issue you are having through some screenshots for example so that we can try to reproduce it on our end ?

Thank you !

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

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #279175

Hi,

Its really easy to reproduce it.
Hover on voting stars and you will see a tooltip.
Hover on voting stars of the product which was added with infinity scroll and no tooltip. Screenshots attached.

Thanks

Attachments:

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 2 months ago #279179

Hi,

Add the line:

hkjQuery('[data-toggle="hk-tooltip"]').hktooltip({"html": true,"container": "body"});
before the line:
if(window.hikaVotes)
in the file "listing_div" of the view "product" and that should fix that.
Please confirm that it works for you so that we can also include that patch.

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

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #279221

Hi,

Unfortunately it doesnt work. Div hk-tooltip isnt added to body and no tooltip is shown...

Thans

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 2 months ago #279230

Hi,

Ok, then add that same line of code before the line:
window.localPage.checkInfiniteScroll('<?php echo $mainDivName; ?>');
in the same place and that should definitely make the tooltip work.

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

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #279277

Hi,

Yep, that did the trick!

Thanks for your support Nicolas

Have a great day

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

Time to create page: 0.064 seconds
Powered by Kunena Forum