${function() {
const variantData = data.variant || {"id":"45c1e443-7626-4197-8e91-fe23d3b2a8ad","product_id":"5c346931-b198-4e4a-8163-1cb2f1632049","title":"Gray","weight_unit":"kg","inventory_quantity":0,"sku":"ZT-YSBL-34545765647-Gray","barcode":"6949545604981","position":1,"option1":"Gray","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/6fce84db5d4ae4b160ee4c0eab1a9d3e.png","path":"6fce84db5d4ae4b160ee4c0eab1a9d3e.png","width":600,"height":800,"alt":"Latex Pillow Silk Sri Lanka Natural Latex Style","aspect_ratio":0.75},"wholesale_price":[{"price":239,"min_quantity":1}],"weight":"0.4","compare_at_price":"219","price":"239","retail_price":"219","available":true,"url":"\/products\/silk-latex-pillow-sri-lanka-natural-latex-style?variant=45c1e443-7626-4197-8e91-fe23d3b2a8ad","available_quantity":999999999,"options":[{"name":"Color","value":"Gray"}],"off_ratio":0,"flashsale_info":[],"sales":1691};
const saveType = "percentage";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = false;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Color
: Gray
${function(){
const optName = "Color";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (': ' + optionValue) : '';
return `
${optionValueText}
`
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Add to cart
$239.00
${function(){
const wholesale_enabled = false;
const qty = data.quantity || 1;
const currentSelectVariant = data.variant;
const defaultVariant = (data.product && data.product.variants && data.product.variants[0]);
const productVariant = {"id":"45c1e443-7626-4197-8e91-fe23d3b2a8ad","product_id":"5c346931-b198-4e4a-8163-1cb2f1632049","title":"Gray","weight_unit":"kg","inventory_quantity":0,"sku":"ZT-YSBL-34545765647-Gray","barcode":"6949545604981","position":1,"option1":"Gray","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/6fce84db5d4ae4b160ee4c0eab1a9d3e.png","path":"6fce84db5d4ae4b160ee4c0eab1a9d3e.png","width":600,"height":800,"alt":"Latex Pillow Silk Sri Lanka Natural Latex Style","aspect_ratio":0.75},"wholesale_price":[{"price":239,"min_quantity":1}],"weight":"0.4","compare_at_price":"219","price":"239","retail_price":"219","available":true,"url":"\/products\/silk-latex-pillow-sri-lanka-natural-latex-style?variant=45c1e443-7626-4197-8e91-fe23d3b2a8ad","available_quantity":999999999,"options":[{"name":"Color","value":"Gray"}],"off_ratio":0,"flashsale_info":[],"sales":1691};
const variantData = currentSelectVariant || defaultVariant || productVariant;
const wholesale_price = variantData.wholesale_price || [];
if(wholesale_enabled && wholesale_price.length > 0) {
let wholesaleIndex = wholesale_price.findIndex(item => {
return item.min_quantity > qty;
});
if(wholesaleIndex < 0){
wholesaleIndex = wholesale_price.length - 1;
}else if(wholesaleIndex > 0){
wholesaleIndex = wholesaleIndex - 1;
}
const wholesalePrice = wholesale_price[wholesaleIndex] || '';
return `
`
}else {
return `
`
}
}()}
Buy now
Product was out of stock.
Product is unavailable.