$product = {"id":7416012537955,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 星雨夜空","handle":"iphone-xs-max-mod-nx-printable-a046","description":null,"published_at":"2024-06-11T16:50:23+08:00","created_at":"2024-05-06T12:42:06+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone XS Max","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx","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":41916501524579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31490986279011,"product_id":7416012537955,"position":7,"created_at":"2024-05-06T12:42:24+08:00","updated_at":"2024-05-06T12:42:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91256c233188c6c48dd002b9ace9fc23b71e1f8_7ce68fab-fb72-419f-ac67-dd78479e495c.webp?v=1714970544","variant_ids":[41916501524579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 星雨夜空 - 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":"NPB0108624-A046","featured_media":{"alt":null,"id":23896393449571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91256c233188c6c48dd002b9ace9fc23b71e1f8_7ce68fab-fb72-419f-ac67-dd78479e495c.webp?v=1714970544"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb033ac804f2754d6987a5ab3f0a6630ebf826db_b4a103b3-87fb-4d7e-bd82-923777aa3974.webp?v=1714970528","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77ca1a6d860f3ac102bb11049564efc18f6eb06a_6ab3d75f-3fe1-4294-9f8f-e462e78f6fc8.webp?v=1714970531","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffcba9473e27fd5ceba6d501de5d88e6502a4474_1fe81655-f39b-4e8f-9c76-c699800c147e.webp?v=1714970534","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a362a5698a0fc5990753242c12a430b4b4b374_873ed0fd-0c5a-47f2-8083-7d857d411cf5.webp?v=1714970536","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e62b6b0b49512d8ff8b5952e794eb50bfd68ef3b_7a889da0-420e-43f7-bb3d-64a77b06e8ca.webp?v=1714970539","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6242987afb6ef64c7fe1f3a6b862a866f661e2d6_899050c1-d189-4cc5-ba2e-cfd44a306f5f.webp?v=1714970541","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91256c233188c6c48dd002b9ace9fc23b71e1f8_7ce68fab-fb72-419f-ac67-dd78479e495c.webp?v=1714970544","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089458d699ebd95942ee3709305aa0e59eac9124_0d01754b-3a69-4f05-b7ae-6e532ffcbbbf.webp?v=1714970546","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7e350abcfc7c5f5ee25f3738a815cf2f68c261f_48c8c588-fb4a-4ea1-bb96-fe1de6985817.webp?v=1714970548","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/926d2e8a0e810a93955c972f05c078b856c8d294_529d5cc2-86f5-4343-8d29-d558fd98b437.webp?v=1714970551"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb033ac804f2754d6987a5ab3f0a6630ebf826db_b4a103b3-87fb-4d7e-bd82-923777aa3974.webp?v=1714970528","options":["color"],"media":[{"alt":null,"id":23896389484643,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb033ac804f2754d6987a5ab3f0a6630ebf826db_b4a103b3-87fb-4d7e-bd82-923777aa3974.webp?v=1714970528"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb033ac804f2754d6987a5ab3f0a6630ebf826db_b4a103b3-87fb-4d7e-bd82-923777aa3974.webp?v=1714970528","width":2000},{"alt":null,"id":23896390205539,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77ca1a6d860f3ac102bb11049564efc18f6eb06a_6ab3d75f-3fe1-4294-9f8f-e462e78f6fc8.webp?v=1714970531"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77ca1a6d860f3ac102bb11049564efc18f6eb06a_6ab3d75f-3fe1-4294-9f8f-e462e78f6fc8.webp?v=1714970531","width":2000},{"alt":null,"id":23896391221347,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffcba9473e27fd5ceba6d501de5d88e6502a4474_1fe81655-f39b-4e8f-9c76-c699800c147e.webp?v=1714970534"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffcba9473e27fd5ceba6d501de5d88e6502a4474_1fe81655-f39b-4e8f-9c76-c699800c147e.webp?v=1714970534","width":2000},{"alt":null,"id":23896391876707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a362a5698a0fc5990753242c12a430b4b4b374_873ed0fd-0c5a-47f2-8083-7d857d411cf5.webp?v=1714970536"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a362a5698a0fc5990753242c12a430b4b4b374_873ed0fd-0c5a-47f2-8083-7d857d411cf5.webp?v=1714970536","width":2000},{"alt":null,"id":23896392466531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e62b6b0b49512d8ff8b5952e794eb50bfd68ef3b_7a889da0-420e-43f7-bb3d-64a77b06e8ca.webp?v=1714970539"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e62b6b0b49512d8ff8b5952e794eb50bfd68ef3b_7a889da0-420e-43f7-bb3d-64a77b06e8ca.webp?v=1714970539","width":2000},{"alt":null,"id":23896393023587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6242987afb6ef64c7fe1f3a6b862a866f661e2d6_899050c1-d189-4cc5-ba2e-cfd44a306f5f.webp?v=1714970541"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6242987afb6ef64c7fe1f3a6b862a866f661e2d6_899050c1-d189-4cc5-ba2e-cfd44a306f5f.webp?v=1714970541","width":2000},{"alt":null,"id":23896393449571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91256c233188c6c48dd002b9ace9fc23b71e1f8_7ce68fab-fb72-419f-ac67-dd78479e495c.webp?v=1714970544"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91256c233188c6c48dd002b9ace9fc23b71e1f8_7ce68fab-fb72-419f-ac67-dd78479e495c.webp?v=1714970544","width":2000},{"alt":null,"id":23896394072163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089458d699ebd95942ee3709305aa0e59eac9124_0d01754b-3a69-4f05-b7ae-6e532ffcbbbf.webp?v=1714970546"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089458d699ebd95942ee3709305aa0e59eac9124_0d01754b-3a69-4f05-b7ae-6e532ffcbbbf.webp?v=1714970546","width":2000},{"alt":null,"id":23896394727523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7e350abcfc7c5f5ee25f3738a815cf2f68c261f_48c8c588-fb4a-4ea1-bb96-fe1de6985817.webp?v=1714970548"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7e350abcfc7c5f5ee25f3738a815cf2f68c261f_48c8c588-fb4a-4ea1-bb96-fe1de6985817.webp?v=1714970548","width":2000},{"alt":null,"id":23896395251811,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/926d2e8a0e810a93955c972f05c078b856c8d294_529d5cc2-86f5-4343-8d29-d558fd98b437.webp?v=1714970551"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/926d2e8a0e810a93955c972f05c078b856c8d294_529d5cc2-86f5-4343-8d29-d558fd98b437.webp?v=1714970551","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916501524579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31490986279011,"product_id":7416012537955,"position":7,"created_at":"2024-05-06T12:42:24+08:00","updated_at":"2024-05-06T12:42:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91256c233188c6c48dd002b9ace9fc23b71e1f8_7ce68fab-fb72-419f-ac67-dd78479e495c.webp?v=1714970544","variant_ids":[41916501524579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 星雨夜空 - 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":"NPB0108624-A046","featured_media":{"alt":null,"id":23896393449571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91256c233188c6c48dd002b9ace9fc23b71e1f8_7ce68fab-fb72-419f-ac67-dd78479e495c.webp?v=1714970544"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916501524579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31490986279011,"product_id":7416012537955,"position":7,"created_at":"2024-05-06T12:42:24+08:00","updated_at":"2024-05-06T12:42:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91256c233188c6c48dd002b9ace9fc23b71e1f8_7ce68fab-fb72-419f-ac67-dd78479e495c.webp?v=1714970544","variant_ids":[41916501524579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 星雨夜空 - 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":"NPB0108624-A046","featured_media":{"alt":null,"id":23896393449571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91256c233188c6c48dd002b9ace9fc23b71e1f8_7ce68fab-fb72-419f-ac67-dd78479e495c.webp?v=1714970544"}},"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: "停產" }