Result

This class models an item result from the recommendation page (EndSlide).

/**
 * Returns the Id.
 *
 * @returns {string}
 */
getId() 

/**
 * Returns the groupId.
 *
 * When a product is composed of multiple variants, each variant will be a Result and the groupId ties them together
 *
 * @returns {string}
 */
getGroupId() 

/**
 * Returns the title.
 *
 * @returns {string}
 */
getTitle() 

/**
 * Returns true if the product has stock.
 *
 * @return {boolean}
 */
hasStock() 

/**
 * Returns the image.
 *
 * @returns {string}
 */
getImage() 

/**
 * Returns the vendor.
 *
 * @returns {string}
 */
getVendor() 

/**
 * Returns the price.
 *
 * @returns {number}
 */
getPrice() 

/**
 * Returns the weight. Products with higher weight have preference.
 *
 * @returns {*}
 */
getWeight()

/**
 * In case of tie in the weight, the results with less position takes precedence.
 *
 * @returns {integer}
 */
getPosition() 

/**
 * Returns the price with the currency and format defined.
 *
 * @returns {string}
 */
getLocalizedPrice()

/**
 * Returns the description.
 *
 * @returns {string}
 */
getDescription() 

/**
 * Returns the label to go to the product page.
 *
 * @returns {string}
 */
getViewCTA()

/**
 * Returns the label to add the product to the cart.
 *
 * @returns {string}
 */
getCartCTA()

/**
 * Returns the URL.
 *
 * @returns {string}
 */
getLink() 

/**
 * Returns the features table.
 *
 * @returns {object}
 */
getSpecs() 

/**
 * Returns the slots this item belongs to.
 *
 * @returns {string[]}
 */
getSlots() 

/**
 * Adds this item to cart and returns a promise with a message.
 *
 * @returns {Promise<string>}
 */
addToCart() 

/**
 * Redirects to the product page.
 */
view() 

Last updated