$product = {"id":7369136603235,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒","handle":"iphone-14-plus-mod-nx-printable-pl59","description":null,"published_at":"2024-06-11T16:13:03+08:00","created_at":"2024-04-23T15:31:51+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 14 Plus","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-snoopy","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":41792928940131,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386886602851,"product_id":7369136603235,"position":8,"created_at":"2024-04-23T15:32:11+08:00","updated_at":"2024-04-23T15:32:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6be4199b595c4496cc17983569632c28d4fc4_3852af71-5cfa-4b4a-b59e-4aa82ce29a29.webp?v=1713857531","variant_ids":[41792928940131]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-PL59","featured_media":{"alt":null,"id":23789124517987,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6be4199b595c4496cc17983569632c28d4fc4_3852af71-5cfa-4b4a-b59e-4aa82ce29a29.webp?v=1713857531"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b993c243d17187c6fcd7b995faaf3e818871a520_c3c5cb59-433d-4550-afa0-fb39e0aa6f64.webp?v=1713857513","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25f79fa9fbe30aa6f3c97050dbd95b1c30b23017_f76d4a68-5ecf-4539-a56a-822035c63f12.webp?v=1713857516","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1695faefdc5d055aeac9d122365e5fc259897b39_929b4204-ac2b-412f-a8c5-2574475c8967.webp?v=1713857519","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42cda332c9f385f0122318fe89b5843a9cf764ad_1e15f022-f162-4d17-ad37-8b4ac6062008.webp?v=1713857521","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d88caaa1b1c34046fe7791b8157ecd35ef89906c_a744ea22-a0af-4dd9-9e97-c929c6735c19.webp?v=1713857523","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0a450f08da39d838109a88f604b7f216d933cda_5b96c814-f6a8-4001-baed-eb928fa8e09d.webp?v=1713857525","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed47300d774096e73994e8a75b29c05987ff1306_ee433720-26e5-4599-8e7a-b73427afbe9f.webp?v=1713857529","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6be4199b595c4496cc17983569632c28d4fc4_3852af71-5cfa-4b4a-b59e-4aa82ce29a29.webp?v=1713857531","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/966d5429da6a8f7553c47ff3d6562e8c30553460_faa0f5b5-b681-426a-891d-13c1514ea3d7.webp?v=1713857534","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15fa6bc4baee30564afcbc47d0f97ce49a25e5a2_29d21e1b-669d-433c-a097-6cf893373ae3.webp?v=1713857537"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b993c243d17187c6fcd7b995faaf3e818871a520_c3c5cb59-433d-4550-afa0-fb39e0aa6f64.webp?v=1713857513","options":["color"],"media":[{"alt":null,"id":23789119504483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b993c243d17187c6fcd7b995faaf3e818871a520_c3c5cb59-433d-4550-afa0-fb39e0aa6f64.webp?v=1713857513"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b993c243d17187c6fcd7b995faaf3e818871a520_c3c5cb59-433d-4550-afa0-fb39e0aa6f64.webp?v=1713857513","width":2000},{"alt":null,"id":23789120127075,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25f79fa9fbe30aa6f3c97050dbd95b1c30b23017_f76d4a68-5ecf-4539-a56a-822035c63f12.webp?v=1713857516"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25f79fa9fbe30aa6f3c97050dbd95b1c30b23017_f76d4a68-5ecf-4539-a56a-822035c63f12.webp?v=1713857516","width":2000},{"alt":null,"id":23789120946275,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1695faefdc5d055aeac9d122365e5fc259897b39_929b4204-ac2b-412f-a8c5-2574475c8967.webp?v=1713857519"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1695faefdc5d055aeac9d122365e5fc259897b39_929b4204-ac2b-412f-a8c5-2574475c8967.webp?v=1713857519","width":2000},{"alt":null,"id":23789121437795,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42cda332c9f385f0122318fe89b5843a9cf764ad_1e15f022-f162-4d17-ad37-8b4ac6062008.webp?v=1713857521"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42cda332c9f385f0122318fe89b5843a9cf764ad_1e15f022-f162-4d17-ad37-8b4ac6062008.webp?v=1713857521","width":2000},{"alt":null,"id":23789122060387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d88caaa1b1c34046fe7791b8157ecd35ef89906c_a744ea22-a0af-4dd9-9e97-c929c6735c19.webp?v=1713857523"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d88caaa1b1c34046fe7791b8157ecd35ef89906c_a744ea22-a0af-4dd9-9e97-c929c6735c19.webp?v=1713857523","width":2000},{"alt":null,"id":23789122748515,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0a450f08da39d838109a88f604b7f216d933cda_5b96c814-f6a8-4001-baed-eb928fa8e09d.webp?v=1713857525"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0a450f08da39d838109a88f604b7f216d933cda_5b96c814-f6a8-4001-baed-eb928fa8e09d.webp?v=1713857525","width":2000},{"alt":null,"id":23789123436643,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed47300d774096e73994e8a75b29c05987ff1306_ee433720-26e5-4599-8e7a-b73427afbe9f.webp?v=1713857529"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed47300d774096e73994e8a75b29c05987ff1306_ee433720-26e5-4599-8e7a-b73427afbe9f.webp?v=1713857529","width":2000},{"alt":null,"id":23789124517987,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6be4199b595c4496cc17983569632c28d4fc4_3852af71-5cfa-4b4a-b59e-4aa82ce29a29.webp?v=1713857531"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6be4199b595c4496cc17983569632c28d4fc4_3852af71-5cfa-4b4a-b59e-4aa82ce29a29.webp?v=1713857531","width":2000},{"alt":null,"id":23789125206115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/966d5429da6a8f7553c47ff3d6562e8c30553460_faa0f5b5-b681-426a-891d-13c1514ea3d7.webp?v=1713857534"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/966d5429da6a8f7553c47ff3d6562e8c30553460_faa0f5b5-b681-426a-891d-13c1514ea3d7.webp?v=1713857534","width":2000},{"alt":null,"id":23789125894243,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15fa6bc4baee30564afcbc47d0f97ce49a25e5a2_29d21e1b-669d-433c-a097-6cf893373ae3.webp?v=1713857537"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15fa6bc4baee30564afcbc47d0f97ce49a25e5a2_29d21e1b-669d-433c-a097-6cf893373ae3.webp?v=1713857537","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41792928940131,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386886602851,"product_id":7369136603235,"position":8,"created_at":"2024-04-23T15:32:11+08:00","updated_at":"2024-04-23T15:32:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6be4199b595c4496cc17983569632c28d4fc4_3852af71-5cfa-4b4a-b59e-4aa82ce29a29.webp?v=1713857531","variant_ids":[41792928940131]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-PL59","featured_media":{"alt":null,"id":23789124517987,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6be4199b595c4496cc17983569632c28d4fc4_3852af71-5cfa-4b4a-b59e-4aa82ce29a29.webp?v=1713857531"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41792928940131,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386886602851,"product_id":7369136603235,"position":8,"created_at":"2024-04-23T15:32:11+08:00","updated_at":"2024-04-23T15:32:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6be4199b595c4496cc17983569632c28d4fc4_3852af71-5cfa-4b4a-b59e-4aa82ce29a29.webp?v=1713857531","variant_ids":[41792928940131]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-PL59","featured_media":{"alt":null,"id":23789124517987,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6be4199b595c4496cc17983569632c28d4fc4_3852af71-5cfa-4b4a-b59e-4aa82ce29a29.webp?v=1713857531"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (mergedImg) { $('.merged-img').attr('src', mergedImg); }); }); }; var sellingStatusData window.fetchSellingStatus().then(data => { try { sellingStatusData = data; } catch (error) { sellingStatusData = null console.error('Unable to parse selling status', error) } $(document).ready(function() { handleSellingStatus($defaultVariant.sku); }); }) function handleSellingStatus(currentSku) { if (!sellingStatusData) { console.error('No selling status available!') return } const sellingStatusElement = document.getElementById('selling-status') const addToCartButton = document.getElementById('AddToCart-product-template') const currentProductSku = currentSku.replace(/-(.*)$/, '-') if ($variants) { const flattenedSellingStatus = [...sellingStatusData.pending, ...sellingStatusData.preorder] const matchSellingStatusProduct = flattenedSellingStatus.filter(product => currentProductSku === product.sku) if (matchSellingStatusProduct.length > 0) { const isProductPending = matchSellingStatusProduct[0].status === 'pending' const matchDate = matchSellingStatusProduct[0].date sellingStatus = isProductPending ? "缺貨中" : "預購完成出貨日:" + matchDate sellingStatusElement.textContent = sellingStatus if (sellingStatus.includes("缺貨中")){ addToCartButton.disabled ='true'; addToCartButton.textContent = "缺貨中無法加入購物車" } else { addToCartButton.textContent = "加到購物車" } } else { sellingStatusElement.textContent = '' addToCartButton.textContent = "加到購物車" }; }; }; document.addEventListener('DOMContentLoaded', function () { var currentVariantSelect = document.getElementById('SingleOptionSelector-0') currentVariantSelect.addEventListener('change', function() { var currentSku = $('#current_sku').text() var skuElement = document.getElementById('current-sku') skuElement.textContent = currentSku handleSellingStatus(currentSku) }); });
// Override default values of shop.strings for each template. // Alternate product templates can change values of // add to cart button, sold out, and unavailable states here. theme.productStrings = { addToCart: "加到購物車", soldOut: "售完", unavailable: "停產" }