The items in the shopping cart do not participate in any recommendation rule. Add the participating items to your shopping cart to check the design.This product did not participated in any recommendation rule. Switch to another product to check the design.The items in this collection do not participate in any recommendation rule. Switch the participating items to check the design.The home page do not participate in any recommendation rule.
(This prompt would not display on client-side)
`
}()}
${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":"017d851b-c228-45ff-87c8-5bd7f0cdcee4","product_id":"65493bf7-c582-45f2-b373-751f94b35a93","title":"\ud83d\udd25Purle-No box-\ud83d\udca5Add the colors you like best to your shopping cart for automatic price reduction\ud83d\udca5","weight_unit":"kg","inventory_quantity":1000,"sku":"a-\ud83d\udd25Purle-No box-\ud83d\udca5Add the colors you like best to your shopping cart for automatic price reduction\ud83d\udca5-A002358737","barcode":"","position":1,"option1":"\ud83d\udd25Purle","option2":"No box","option3":"\ud83d\udca5Add the colors you like best to your shopping cart for automatic price reduction\ud83d\udca5","note":"","image":{"src":"\/\/img.staticdj.com\/f0fe871b2dfe13cd4412807576116317.jpeg","path":"f0fe871b2dfe13cd4412807576116317.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":6.99,"min_quantity":1}],"weight":"0","compare_at_price":"13.7","price":"6.99","retail_price":"13.7","available":true,"url":"\/products\/bunny?variant=017d851b-c228-45ff-87c8-5bd7f0cdcee4","available_quantity":1000,"options":[{"name":"Colour","value":"\ud83d\udd25Purle"},{"name":"Box \ud83c\udf81","value":"No box"},{"name":"\ud83d\udc9cFor different colors\ud83d\udc9b","value":"\ud83d\udca5Add the colors you like best to your shopping cart for automatic price reduction\ud83d\udca5"}],"off_ratio":"49","flashsale_info":{"variant_id":"017d851b-c228-45ff-87c8-5bd7f0cdcee4","product_id":"","quantity":0,"discount_id":"","limit_time":0,"limit_buy":0,"user_limit_buy":0,"discount_sales":0,"discount_sales_rate":"","discount_stock":0,"ends_at":0,"starts_at":0,"allow_oversold":"","allocation_method":"","price":"6.99","compare_at_price":"","discount_price":"6.99","customary_saved_price":"","customary_off_ratio":"","discount_saved_price":"","discount_off_ratio":"49","use_before_price":false,"before_price":"","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 `