Favorites

Favorites in AIKI is a way for users to save their favorite products, it can be used with your existing favorites system, or implement the AIKI soloution directly to let your users save favorites and at the same time make more accurate product recommendations.


Add Favorite

Aikey.favorites.add("product-id-abc-123");

Remove

Aikey.favorites.remove("product-id-abc-123");

Get All

Gets all the products the user has saved as their favorites as a array of product ids.

Aikey.favorites.all(function(data){
  //callback
});

Exists In

This function checks if the product exists in the favorites list

Aikey.favorites.in("product-id-abc-123", function(data){
    console.log(data); // true or false
});