Configure onValidPreference() method to be notified of user’s preferred product, if it’s available from the Hyper API.
If you are using Hyper’s checkout template, you can use selectRecommendedProduct() method to be select user’s preferred product to review and checkout.
widget.onValidPreference = function(data) {
if(window.checkout && typeof window.checkout.selectRecommendedProduct === 'function') {
window.checkout.selectRecommendedProduct(data.sku);
}
}