${function() {
const variantData = data.variant || {"id":"caaf80ee-63a7-4cc7-9633-5d0e8138f591","product_id":"c7a95773-bc98-42b3-9050-c524e7da7469","title":"gold-white","weight_unit":"kg","inventory_quantity":235,"sku":"31676411-gold-white","barcode":"","position":1,"option1":"gold-white","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/4946d396f8ce0f0e3c6e3516ccf86256.jpeg","path":"4946d396f8ce0f0e3c6e3516ccf86256.jpeg","width":640,"height":640,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":21.15,"min_quantity":1}],"weight":"0","compare_at_price":"24.88","price":"21.15","retail_price":"24.88","available":true,"url":"\/products\/angel-heart-zircon-crystal-belly-button-piercings-body-ring?variant=caaf80ee-63a7-4cc7-9633-5d0e8138f591","available_quantity":235,"options":[{"name":"Metal color","value":"gold-white"}],"off_ratio":"15","flashsale_info":{"variant_id":"caaf80ee-63a7-4cc7-9633-5d0e8138f591","product_id":"","quantity":0,"discount_id":"8244c655-56a7-4716-a760-1408dd4e9baa","limit_time":1002246,"limit_buy":2,"user_limit_buy":2,"discount_sales":0,"discount_sales_rate":"0","discount_stock":235,"ends_at":1715097599,"starts_at":1713428843,"allow_oversold":"check","allocation_method":"each","price":"21.15","compare_at_price":"24.88","discount_price":"21.15","customary_saved_price":"3.73","customary_off_ratio":"15","discount_saved_price":"3.73","discount_off_ratio":"15","use_before_price":false,"before_price":"0","title":"","properties":"","color_setting_promotional_copy":"","discount_quantity":0,"is_need_split":false},"sales":0};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Metal Color
: gold-white
${function(){
const optName = "Metal 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
$21.15
${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":"caaf80ee-63a7-4cc7-9633-5d0e8138f591","product_id":"c7a95773-bc98-42b3-9050-c524e7da7469","title":"gold-white","weight_unit":"kg","inventory_quantity":235,"sku":"31676411-gold-white","barcode":"","position":1,"option1":"gold-white","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/4946d396f8ce0f0e3c6e3516ccf86256.jpeg","path":"4946d396f8ce0f0e3c6e3516ccf86256.jpeg","width":640,"height":640,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":21.15,"min_quantity":1}],"weight":"0","compare_at_price":"24.88","price":"21.15","retail_price":"24.88","available":true,"url":"\/products\/angel-heart-zircon-crystal-belly-button-piercings-body-ring?variant=caaf80ee-63a7-4cc7-9633-5d0e8138f591","available_quantity":235,"options":[{"name":"Metal color","value":"gold-white"}],"off_ratio":"15","flashsale_info":{"variant_id":"caaf80ee-63a7-4cc7-9633-5d0e8138f591","product_id":"","quantity":0,"discount_id":"8244c655-56a7-4716-a760-1408dd4e9baa","limit_time":1002246,"limit_buy":2,"user_limit_buy":2,"discount_sales":0,"discount_sales_rate":"0","discount_stock":235,"ends_at":1715097599,"starts_at":1713428843,"allow_oversold":"check","allocation_method":"each","price":"21.15","compare_at_price":"24.88","discount_price":"21.15","customary_saved_price":"3.73","customary_off_ratio":"15","discount_saved_price":"3.73","discount_off_ratio":"15","use_before_price":false,"before_price":"0","title":"","properties":"","color_setting_promotional_copy":"","discount_quantity":0,"is_need_split":false},"sales":0};
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.
${function(){
const variantData = data.variant || {"id":"caaf80ee-63a7-4cc7-9633-5d0e8138f591","product_id":"c7a95773-bc98-42b3-9050-c524e7da7469","title":"gold-white","weight_unit":"kg","inventory_quantity":235,"sku":"31676411-gold-white","barcode":"","position":1,"option1":"gold-white","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/4946d396f8ce0f0e3c6e3516ccf86256.jpeg","path":"4946d396f8ce0f0e3c6e3516ccf86256.jpeg","width":640,"height":640,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":21.15,"min_quantity":1}],"weight":"0","compare_at_price":"24.88","price":"21.15","retail_price":"24.88","available":true,"url":"\/products\/angel-heart-zircon-crystal-belly-button-piercings-body-ring?variant=caaf80ee-63a7-4cc7-9633-5d0e8138f591","available_quantity":235,"options":[{"name":"Metal color","value":"gold-white"}],"off_ratio":"15","flashsale_info":{"variant_id":"caaf80ee-63a7-4cc7-9633-5d0e8138f591","product_id":"","quantity":0,"discount_id":"8244c655-56a7-4716-a760-1408dd4e9baa","limit_time":1002246,"limit_buy":2,"user_limit_buy":2,"discount_sales":0,"discount_sales_rate":"0","discount_stock":235,"ends_at":1715097599,"starts_at":1713428843,"allow_oversold":"check","allocation_method":"each","price":"21.15","compare_at_price":"24.88","discount_price":"21.15","customary_saved_price":"3.73","customary_off_ratio":"15","discount_saved_price":"3.73","discount_off_ratio":"15","use_before_price":false,"before_price":"0","title":"","properties":"","color_setting_promotional_copy":"","discount_quantity":0,"is_need_split":false},"sales":0};
return `
`
}()}