`
}()}
${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":"4f335d01-798d-4c4e-9503-04f817c7ecce","product_id":"5f4ec730-0b34-4600-ae73-a29d360db933","title":"Black and white-star X style (with ring and beads on the side and belt-adjustable","weight_unit":"g","inventory_quantity":999,"sku":"30ced861-3fd7-474d-b14d-3839a8e376a2","barcode":"","position":1,"option1":"Black and white-star X style (with ring and beads on the side and belt","option2":"adjustable","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/6a84396b1d8504bb7f1a6cb529dd7381.jpeg","path":"6a84396b1d8504bb7f1a6cb529dd7381.jpeg","width":800,"height":800,"alt":"Hip-hop Korean Casual All-match Baseball Cap","aspect_ratio":1},"wholesale_price":[{"price":11.99,"min_quantity":1}],"weight":"0","compare_at_price":"23.99","price":"11.99","retail_price":"23.99","available":true,"url":"\/products\/hip-hop-korean-casual-all-match-baseball-cap?variant=4f335d01-798d-4c4e-9503-04f817c7ecce","available_quantity":999999999,"options":[{"name":"Color","value":"Black and white-star X style (with ring and beads on the side and belt"},{"name":"Size","value":"adjustable"}],"off_ratio":50,"flashsale_info":[],"sales":1};
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 `