Collections
These methods are used to get the details for product collections created within Buddi and the details pertaining to each.
getProductCollections
The method returns the retailer product collections. Backend cache time is 10mins.
Example:Buddi.getProductCollections();
Events: product-collections:loaded, product-collections:loading-error
Returns:
[{
image: 'url',
id: 1,
}, ....]
getProductCollection
The method returns the retailer product collection by the given ID.
Example:
Buddi.getProductCollection(1);
Events: product-collection:loaded, product-collection:loading-error
Returns:
{
image: 'url',
id: 1,
products: [ShortProduct, ShortProduct, ...],
}