$product = {"id":7369173991523,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Snoopy 史努比 - 潛水趣","handle":"iphone-xs-max-mod-nx-printable-pl60","description":null,"published_at":"2024-06-11T16:13:48+08:00","created_at":"2024-04-23T15:38:07+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 XS Max","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":41793282277475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PL60","requires_shipping":true,"taxable":true,"featured_image":{"id":31386979106915,"product_id":7369173991523,"position":1,"created_at":"2024-04-23T15:38:10+08:00","updated_at":"2024-04-23T15:38:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fee4bce4d09cee02a4614dea7279ee3c68cfedb_b9f2b8d8-cfc6-468f-916d-584c0eaa3531.webp?v=1713857890","variant_ids":[41793282277475]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 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":"NPB0108624-PL60","featured_media":{"alt":null,"id":23789217415267,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fee4bce4d09cee02a4614dea7279ee3c68cfedb_b9f2b8d8-cfc6-468f-916d-584c0eaa3531.webp?v=1713857890"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fee4bce4d09cee02a4614dea7279ee3c68cfedb_b9f2b8d8-cfc6-468f-916d-584c0eaa3531.webp?v=1713857890","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cb1149700f736a598d1e126344db6ad3303f49c_cbab8eec-95c9-456c-975a-ccdf916f25a2.webp?v=1713857892","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1280be93e14e03e664f73b02f7259712b9374ebb_4362c1a6-823d-4fcf-89e7-904e3a4809c6.webp?v=1713857895","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/487cabfb0f17a9bf1e50d30e32f1d8bcf9d11f4e_765d5bab-e524-44da-9a28-a0937d8bfac5.webp?v=1713857898","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d25dabfc7cf1a453d26f966f04323654e625fa36_a5673f4a-9890-4248-892c-2f86d4023074.webp?v=1713857900","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d4099ea0a0ed2c50497794fe2ec4749c78729bd_eedafd7d-2b97-49a9-a675-b5809fb4e7cf.webp?v=1713857902","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e06419ad9cb7199cafecb0988e5238fd776f286f_fa932c82-cca6-4ed0-887b-4be75a5f5db1.webp?v=1713857905","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ae31d36e9f39511fd9a9eb54ffbbaca8650fb97_508e7957-8a0c-439f-b2d8-814dba2ec1db.webp?v=1713857907","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cbccefbecb90681a76cb41b09defb831e3ae42_ccf512b1-de2f-471a-836d-10647846a497.webp?v=1713857910","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f63b4fcb776d10dff6773147e9882e3c4f46705b_71b8c28c-59b2-4229-a00a-a0c4062a6841.webp?v=1713857912"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fee4bce4d09cee02a4614dea7279ee3c68cfedb_b9f2b8d8-cfc6-468f-916d-584c0eaa3531.webp?v=1713857890","options":["color"],"media":[{"alt":null,"id":23789217415267,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fee4bce4d09cee02a4614dea7279ee3c68cfedb_b9f2b8d8-cfc6-468f-916d-584c0eaa3531.webp?v=1713857890"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fee4bce4d09cee02a4614dea7279ee3c68cfedb_b9f2b8d8-cfc6-468f-916d-584c0eaa3531.webp?v=1713857890","width":2000},{"alt":null,"id":23789217939555,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cb1149700f736a598d1e126344db6ad3303f49c_cbab8eec-95c9-456c-975a-ccdf916f25a2.webp?v=1713857892"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cb1149700f736a598d1e126344db6ad3303f49c_cbab8eec-95c9-456c-975a-ccdf916f25a2.webp?v=1713857892","width":2000},{"alt":null,"id":23789218660451,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1280be93e14e03e664f73b02f7259712b9374ebb_4362c1a6-823d-4fcf-89e7-904e3a4809c6.webp?v=1713857895"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1280be93e14e03e664f73b02f7259712b9374ebb_4362c1a6-823d-4fcf-89e7-904e3a4809c6.webp?v=1713857895","width":2000},{"alt":null,"id":23789219053667,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/487cabfb0f17a9bf1e50d30e32f1d8bcf9d11f4e_765d5bab-e524-44da-9a28-a0937d8bfac5.webp?v=1713857898"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/487cabfb0f17a9bf1e50d30e32f1d8bcf9d11f4e_765d5bab-e524-44da-9a28-a0937d8bfac5.webp?v=1713857898","width":2000},{"alt":null,"id":23789219643491,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d25dabfc7cf1a453d26f966f04323654e625fa36_a5673f4a-9890-4248-892c-2f86d4023074.webp?v=1713857900"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d25dabfc7cf1a453d26f966f04323654e625fa36_a5673f4a-9890-4248-892c-2f86d4023074.webp?v=1713857900","width":2000},{"alt":null,"id":23789220233315,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d4099ea0a0ed2c50497794fe2ec4749c78729bd_eedafd7d-2b97-49a9-a675-b5809fb4e7cf.webp?v=1713857902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d4099ea0a0ed2c50497794fe2ec4749c78729bd_eedafd7d-2b97-49a9-a675-b5809fb4e7cf.webp?v=1713857902","width":2000},{"alt":null,"id":23789220823139,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e06419ad9cb7199cafecb0988e5238fd776f286f_fa932c82-cca6-4ed0-887b-4be75a5f5db1.webp?v=1713857905"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e06419ad9cb7199cafecb0988e5238fd776f286f_fa932c82-cca6-4ed0-887b-4be75a5f5db1.webp?v=1713857905","width":2000},{"alt":null,"id":23789221380195,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ae31d36e9f39511fd9a9eb54ffbbaca8650fb97_508e7957-8a0c-439f-b2d8-814dba2ec1db.webp?v=1713857907"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ae31d36e9f39511fd9a9eb54ffbbaca8650fb97_508e7957-8a0c-439f-b2d8-814dba2ec1db.webp?v=1713857907","width":2000},{"alt":null,"id":23789222035555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cbccefbecb90681a76cb41b09defb831e3ae42_ccf512b1-de2f-471a-836d-10647846a497.webp?v=1713857910"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cbccefbecb90681a76cb41b09defb831e3ae42_ccf512b1-de2f-471a-836d-10647846a497.webp?v=1713857910","width":2000},{"alt":null,"id":23789222527075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f63b4fcb776d10dff6773147e9882e3c4f46705b_71b8c28c-59b2-4229-a00a-a0c4062a6841.webp?v=1713857912"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f63b4fcb776d10dff6773147e9882e3c4f46705b_71b8c28c-59b2-4229-a00a-a0c4062a6841.webp?v=1713857912","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793282277475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PL60","requires_shipping":true,"taxable":true,"featured_image":{"id":31386979106915,"product_id":7369173991523,"position":1,"created_at":"2024-04-23T15:38:10+08:00","updated_at":"2024-04-23T15:38:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fee4bce4d09cee02a4614dea7279ee3c68cfedb_b9f2b8d8-cfc6-468f-916d-584c0eaa3531.webp?v=1713857890","variant_ids":[41793282277475]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 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":"NPB0108624-PL60","featured_media":{"alt":null,"id":23789217415267,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fee4bce4d09cee02a4614dea7279ee3c68cfedb_b9f2b8d8-cfc6-468f-916d-584c0eaa3531.webp?v=1713857890"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793282277475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PL60","requires_shipping":true,"taxable":true,"featured_image":{"id":31386979106915,"product_id":7369173991523,"position":1,"created_at":"2024-04-23T15:38:10+08:00","updated_at":"2024-04-23T15:38:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fee4bce4d09cee02a4614dea7279ee3c68cfedb_b9f2b8d8-cfc6-468f-916d-584c0eaa3531.webp?v=1713857890","variant_ids":[41793282277475]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 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":"NPB0108624-PL60","featured_media":{"alt":null,"id":23789217415267,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fee4bce4d09cee02a4614dea7279ee3c68cfedb_b9f2b8d8-cfc6-468f-916d-584c0eaa3531.webp?v=1713857890"}},"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: "停產" }