Wishlist API

Froonze

Last Update 3 hari yang lalu


We trigger a JS event when the module script runs and also when the widget initializes and after every submit action (add or remove). So if you want to modify an object you just need to listen to the event and modify it.

These are our 3 events:

  • frcp.wishlist.initialize
  • frcp.wishlist.installed
  • frcp.wishlist.update { data: data }

Here's an example:




For our Wishlist Collection Button, and in the case the products are rendered after the page loads, the next script can be used to reload the widget:


  • frcp.wishlist.attachOnCollection();


Here's an example: