$product = {"id":7408541696099,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - G本款","handle":"iphone-12-mini-mod-nx-printable-iv07","description":null,"published_at":"2024-06-11T16:40:10+08:00","created_at":"2024-05-03T15:46:56+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-1chun","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":41886662393955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472544514147,"product_id":7408541696099,"position":8,"created_at":"2024-05-03T15:47:15+08:00","updated_at":"2024-05-03T15:47:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794b3d6b9785acf12a11c33a3c92472ea93c3883_8df73a15-5420-4af0-9bd7-0d47cdea20ce.webp?v=1714722435","variant_ids":[41886662393955]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - G本款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-IV07","featured_media":{"alt":null,"id":23877461835875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794b3d6b9785acf12a11c33a3c92472ea93c3883_8df73a15-5420-4af0-9bd7-0d47cdea20ce.webp?v=1714722435"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffe94be879d1e6c6b47d703c5d49cfb273e442a3_de8e4f1f-7d74-451a-bb2e-b2442f04782d.webp?v=1714722419","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3827b3f969e4320de845b0b531f016e07c307b19_7de6e56a-f768-449a-96bc-5036a3d91a3a.webp?v=1714722421","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f02d72753f77d1e9aa688e78999093bc36cd3df_893e57bb-b1f7-4ea0-947f-ca8d2fb3ff76.webp?v=1714722423","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24248ce4483bcaeee7346c8032d2329328bbec45_449dae3e-88c3-473e-ab71-5e8e014b11da.webp?v=1714722425","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a3f15fb7a4c4a7fde1ad2aa88f36b370b3ab0e7_dcf51845-8481-4089-b228-e1048ceb91b0.webp?v=1714722428","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cd53046c2e4e804af9bc500ee3c6b9163d5c3dd_1cef009c-3645-4666-b2b8-2d0460014c99.webp?v=1714722430","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6f39c8fe9215287b28c5b0489c5f532c9283ea_c52aab53-3c6c-458d-b4c4-8deaad6d713a.webp?v=1714722432","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794b3d6b9785acf12a11c33a3c92472ea93c3883_8df73a15-5420-4af0-9bd7-0d47cdea20ce.webp?v=1714722435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f39e941d8ce88c0dcccb886470edaf69a5fb09a_cd38387c-09bc-4f34-b2f3-61147911a80c.webp?v=1714722437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cedbd2fde6b716915f45f7a00158fa0fc5f02ab9_abd645a5-4985-4f94-a62d-5ed71cbc5775.webp?v=1714722440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31b7fe5d36fe4e003024d338646be70755591f71_3d212ced-185a-413a-acf2-368bd156490a.webp?v=1714722442"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffe94be879d1e6c6b47d703c5d49cfb273e442a3_de8e4f1f-7d74-451a-bb2e-b2442f04782d.webp?v=1714722419","options":["color"],"media":[{"alt":null,"id":23877458100323,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffe94be879d1e6c6b47d703c5d49cfb273e442a3_de8e4f1f-7d74-451a-bb2e-b2442f04782d.webp?v=1714722419"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffe94be879d1e6c6b47d703c5d49cfb273e442a3_de8e4f1f-7d74-451a-bb2e-b2442f04782d.webp?v=1714722419","width":2000},{"alt":null,"id":23877458657379,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3827b3f969e4320de845b0b531f016e07c307b19_7de6e56a-f768-449a-96bc-5036a3d91a3a.webp?v=1714722421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3827b3f969e4320de845b0b531f016e07c307b19_7de6e56a-f768-449a-96bc-5036a3d91a3a.webp?v=1714722421","width":2000},{"alt":null,"id":23877459017827,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f02d72753f77d1e9aa688e78999093bc36cd3df_893e57bb-b1f7-4ea0-947f-ca8d2fb3ff76.webp?v=1714722423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f02d72753f77d1e9aa688e78999093bc36cd3df_893e57bb-b1f7-4ea0-947f-ca8d2fb3ff76.webp?v=1714722423","width":2000},{"alt":null,"id":23877459869795,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24248ce4483bcaeee7346c8032d2329328bbec45_449dae3e-88c3-473e-ab71-5e8e014b11da.webp?v=1714722425"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24248ce4483bcaeee7346c8032d2329328bbec45_449dae3e-88c3-473e-ab71-5e8e014b11da.webp?v=1714722425","width":2000},{"alt":null,"id":23877460328547,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a3f15fb7a4c4a7fde1ad2aa88f36b370b3ab0e7_dcf51845-8481-4089-b228-e1048ceb91b0.webp?v=1714722428"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a3f15fb7a4c4a7fde1ad2aa88f36b370b3ab0e7_dcf51845-8481-4089-b228-e1048ceb91b0.webp?v=1714722428","width":2000},{"alt":null,"id":23877460820067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cd53046c2e4e804af9bc500ee3c6b9163d5c3dd_1cef009c-3645-4666-b2b8-2d0460014c99.webp?v=1714722430"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cd53046c2e4e804af9bc500ee3c6b9163d5c3dd_1cef009c-3645-4666-b2b8-2d0460014c99.webp?v=1714722430","width":2000},{"alt":null,"id":23877461278819,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6f39c8fe9215287b28c5b0489c5f532c9283ea_c52aab53-3c6c-458d-b4c4-8deaad6d713a.webp?v=1714722432"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6f39c8fe9215287b28c5b0489c5f532c9283ea_c52aab53-3c6c-458d-b4c4-8deaad6d713a.webp?v=1714722432","width":2000},{"alt":null,"id":23877461835875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794b3d6b9785acf12a11c33a3c92472ea93c3883_8df73a15-5420-4af0-9bd7-0d47cdea20ce.webp?v=1714722435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794b3d6b9785acf12a11c33a3c92472ea93c3883_8df73a15-5420-4af0-9bd7-0d47cdea20ce.webp?v=1714722435","width":2000},{"alt":null,"id":23877462589539,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f39e941d8ce88c0dcccb886470edaf69a5fb09a_cd38387c-09bc-4f34-b2f3-61147911a80c.webp?v=1714722437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f39e941d8ce88c0dcccb886470edaf69a5fb09a_cd38387c-09bc-4f34-b2f3-61147911a80c.webp?v=1714722437","width":2000},{"alt":null,"id":23877463212131,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cedbd2fde6b716915f45f7a00158fa0fc5f02ab9_abd645a5-4985-4f94-a62d-5ed71cbc5775.webp?v=1714722440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cedbd2fde6b716915f45f7a00158fa0fc5f02ab9_abd645a5-4985-4f94-a62d-5ed71cbc5775.webp?v=1714722440","width":2000},{"alt":null,"id":23877463670883,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31b7fe5d36fe4e003024d338646be70755591f71_3d212ced-185a-413a-acf2-368bd156490a.webp?v=1714722442"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31b7fe5d36fe4e003024d338646be70755591f71_3d212ced-185a-413a-acf2-368bd156490a.webp?v=1714722442","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886662393955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472544514147,"product_id":7408541696099,"position":8,"created_at":"2024-05-03T15:47:15+08:00","updated_at":"2024-05-03T15:47:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794b3d6b9785acf12a11c33a3c92472ea93c3883_8df73a15-5420-4af0-9bd7-0d47cdea20ce.webp?v=1714722435","variant_ids":[41886662393955]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - G本款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-IV07","featured_media":{"alt":null,"id":23877461835875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794b3d6b9785acf12a11c33a3c92472ea93c3883_8df73a15-5420-4af0-9bd7-0d47cdea20ce.webp?v=1714722435"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886662393955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472544514147,"product_id":7408541696099,"position":8,"created_at":"2024-05-03T15:47:15+08:00","updated_at":"2024-05-03T15:47:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794b3d6b9785acf12a11c33a3c92472ea93c3883_8df73a15-5420-4af0-9bd7-0d47cdea20ce.webp?v=1714722435","variant_ids":[41886662393955]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - G本款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-IV07","featured_media":{"alt":null,"id":23877461835875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794b3d6b9785acf12a11c33a3c92472ea93c3883_8df73a15-5420-4af0-9bd7-0d47cdea20ce.webp?v=1714722435"}},"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: "停產" }