Close

Dynamic ProductBox

IvanSlater
7 years ago
#12215 Quote
Avatar
  • 89
Hi!!

Im adding some dynamic products to categorypage but the wishlist button is not receiving your script. For buy button I just replaced the default html tags with your code, applied to the button and it worked. The wishlist is appear to be the same, with or without your plugin activated.

Can you help 
iliyan.tanev
7 years ago
#12218 Quote
Avatar
  • Moderator
  • 347
Hi,

Maybe it is a selector problem. Make sure that your wishlist button selector is the same as the specified in the AjaxCart -> Settings.
Regards,
Iliyan Tanev
Nop-Templates Dev Team
IvanSlater
7 years ago
#12223 Quote
Avatar
  • 89
iliyan.tanev wrote:
Hi,

Maybe it is a selector problem. Make sure that your wishlist button selector is the same as the specified in the AjaxCart -> Settings.


I mean.. the productbox wishlist button is working good, only the dynamically ajax inserted that is not.

Both productbox html content are exactly the same, same tags, same styles, etc.

Is there a JS function that I need to force call after ajax content loaded?
iliyan.tanev
7 years ago
#12232 Quote
Avatar
  • Moderator
  • 347
Hi,

Yes, we have a replaceWishlistButtons function that is triggered when the ajax cart buy buttons are added. When we add the buy buttons we trigger nopAjaxCartButtonsAddedEvent event.

Unfortunately, we are not exposing the replaceWishlistButtons function and everything in the script is in IIFE so you won't be able to access the function. Your only option would be to trigger the nopAjaxCartButtonsAddedEvent event after your ajax content has loaded.

Hope this helps!
Regards,
Iliyan Tanev
Nop-Templates Dev Team
IvanSlater
7 years ago
#12233 Quote
Avatar
  • 89
Can you show me how to do it?

thanks!
iliyan.tanev
7 years ago
#12235 Quote
Avatar
  • Moderator
  • 347
Sure

$.event.trigger({ type: "nopAjaxCartButtonsAddedEvent" });
Regards,
Iliyan Tanev
Nop-Templates Dev Team
IvanSlater
7 years ago
#12237 Quote
Avatar
  • 89
One more question. 

Why the ajax cart plugin doesnt work on mobile devices? Is there a way to enable it?
Boyko
7 years ago
#12238 Quote
Avatar
  • Moderator
  • 1570
IvanSlater wrote:
One more question. 

Why the ajax cart plugin doesnt work on mobile devices? Is there a way to enable it?


Hi IvanSlater,

We have intentionally disabled the Ajax Cart on mobile devices as we consider popups as a bad user experience. But there is a hidden setting that you can set to enable the Ajax Cart on mobile devices although it is not officially supported and you might need to adjust the styling of the plugin for mobile devices. Please set this setting "nopajaxcartsettings.enableonmobiledevices" to true.
Regards,
Nop-Templates.com Team