`
}()}
${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":"bd3253ae-fc60-4a48-a573-3facf7c6af46","product_id":"b0f29653-bc8f-4921-8cd8-11450db0e529","title":"Three Lenses on the Front Left and Right of the Car","weight_unit":"g","inventory_quantity":1,"sku":"BP-335247-ZLL-TLOTFLAROTC","barcode":"","position":1,"option1":"Three Lenses on the Front Left and Right of the Car","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/50521913320eeae5908baeb0e55c4c9b.jpeg","path":"50521913320eeae5908baeb0e55c4c9b.jpeg","width":1600,"height":1600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":73.99,"min_quantity":1}],"weight":"360","compare_at_price":"96.19","price":"73.99","retail_price":"96.19","available":true,"url":"\/products\/2-inch-four-lens-dash-cam?variant=bd3253ae-fc60-4a48-a573-3facf7c6af46","available_quantity":999999999,"options":[{"name":"Type","value":"Three Lenses on the Front Left and Right of the Car"}],"off_ratio":23,"flashsale_info":[],"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 `