$product = {"id":7407893872739,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾白風暴兵","handle":"iphone-14-plus-mod-nx-printable-pc01","description":null,"published_at":"2024-06-11T16:25:49+08:00","created_at":"2024-05-03T11:10:56+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Plus","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41880188387427,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31470639153251,"product_id":7407893872739,"position":6,"created_at":"2024-05-03T11:11:12+08:00","updated_at":"2024-05-03T11:11:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bae454c6a4ce44563e5103befc9d7f6e65ac31e_326de56a-6d30-472f-a5fa-857712a218df.webp?v=1714705872","variant_ids":[41880188387427]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾白風暴兵 - 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-PC01","featured_media":{"alt":null,"id":23875543105635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bae454c6a4ce44563e5103befc9d7f6e65ac31e_326de56a-6d30-472f-a5fa-857712a218df.webp?v=1714705872"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b203271e3f108ea130945fa118c0ba664b3267c6_113100e9-b517-4861-b25f-0c832ad5ed73.webp?v=1714705859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b1c48644ab9229dedb61b7ee169b067963ed02_6edb7b8f-dc1d-4e12-a061-4b87952332b8.webp?v=1714705862","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0a0f4b40ccfeddb2c250f35f6bd5f1cb4ee1b21_76beb352-a114-4432-b78e-83513c2189f5.webp?v=1714705864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7473280956a38211c37b9ed0bedb77168f521383_7879f3fc-3d4e-46b7-896e-1d56a96cbb48.webp?v=1714705867","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2637da2c1312f8cdc856f72d244bf2835276306a_bb422ddd-a1aa-457f-961d-79b7d8a1c978.webp?v=1714705870","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bae454c6a4ce44563e5103befc9d7f6e65ac31e_326de56a-6d30-472f-a5fa-857712a218df.webp?v=1714705872","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69678576d129ee105b3ff0ad2897981c8a6fc402_70622106-9d1c-4ff3-baa9-80c3e4419779.webp?v=1714705875","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1ac542c1f83e453d9679c688a742a2527c7f502_977b1437-fcb2-47cc-a15e-56aaa6679a47.webp?v=1714705878","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0c2c6b52c24b4df867e91b918302618007233c7_c202edad-ddec-41d5-8952-262fc8c58e28.webp?v=1714705881","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae61750431108547df4a4de880a5ae6ecc855af9_5d228380-c801-492d-9b36-5c87e73e04a4.webp?v=1714705883"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b203271e3f108ea130945fa118c0ba664b3267c6_113100e9-b517-4861-b25f-0c832ad5ed73.webp?v=1714705859","options":["color"],"media":[{"alt":null,"id":23875540385891,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b203271e3f108ea130945fa118c0ba664b3267c6_113100e9-b517-4861-b25f-0c832ad5ed73.webp?v=1714705859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b203271e3f108ea130945fa118c0ba664b3267c6_113100e9-b517-4861-b25f-0c832ad5ed73.webp?v=1714705859","width":2000},{"alt":null,"id":23875540942947,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b1c48644ab9229dedb61b7ee169b067963ed02_6edb7b8f-dc1d-4e12-a061-4b87952332b8.webp?v=1714705862"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b1c48644ab9229dedb61b7ee169b067963ed02_6edb7b8f-dc1d-4e12-a061-4b87952332b8.webp?v=1714705862","width":2000},{"alt":null,"id":23875541434467,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0a0f4b40ccfeddb2c250f35f6bd5f1cb4ee1b21_76beb352-a114-4432-b78e-83513c2189f5.webp?v=1714705864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0a0f4b40ccfeddb2c250f35f6bd5f1cb4ee1b21_76beb352-a114-4432-b78e-83513c2189f5.webp?v=1714705864","width":2000},{"alt":null,"id":23875542155363,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7473280956a38211c37b9ed0bedb77168f521383_7879f3fc-3d4e-46b7-896e-1d56a96cbb48.webp?v=1714705867"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7473280956a38211c37b9ed0bedb77168f521383_7879f3fc-3d4e-46b7-896e-1d56a96cbb48.webp?v=1714705867","width":2000},{"alt":null,"id":23875542581347,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2637da2c1312f8cdc856f72d244bf2835276306a_bb422ddd-a1aa-457f-961d-79b7d8a1c978.webp?v=1714705870"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2637da2c1312f8cdc856f72d244bf2835276306a_bb422ddd-a1aa-457f-961d-79b7d8a1c978.webp?v=1714705870","width":2000},{"alt":null,"id":23875543105635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bae454c6a4ce44563e5103befc9d7f6e65ac31e_326de56a-6d30-472f-a5fa-857712a218df.webp?v=1714705872"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bae454c6a4ce44563e5103befc9d7f6e65ac31e_326de56a-6d30-472f-a5fa-857712a218df.webp?v=1714705872","width":2000},{"alt":null,"id":23875543662691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69678576d129ee105b3ff0ad2897981c8a6fc402_70622106-9d1c-4ff3-baa9-80c3e4419779.webp?v=1714705875"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69678576d129ee105b3ff0ad2897981c8a6fc402_70622106-9d1c-4ff3-baa9-80c3e4419779.webp?v=1714705875","width":2000},{"alt":null,"id":23875544252515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1ac542c1f83e453d9679c688a742a2527c7f502_977b1437-fcb2-47cc-a15e-56aaa6679a47.webp?v=1714705878"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1ac542c1f83e453d9679c688a742a2527c7f502_977b1437-fcb2-47cc-a15e-56aaa6679a47.webp?v=1714705878","width":2000},{"alt":null,"id":23875544776803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0c2c6b52c24b4df867e91b918302618007233c7_c202edad-ddec-41d5-8952-262fc8c58e28.webp?v=1714705881"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0c2c6b52c24b4df867e91b918302618007233c7_c202edad-ddec-41d5-8952-262fc8c58e28.webp?v=1714705881","width":2000},{"alt":null,"id":23875545268323,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae61750431108547df4a4de880a5ae6ecc855af9_5d228380-c801-492d-9b36-5c87e73e04a4.webp?v=1714705883"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae61750431108547df4a4de880a5ae6ecc855af9_5d228380-c801-492d-9b36-5c87e73e04a4.webp?v=1714705883","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41880188387427,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31470639153251,"product_id":7407893872739,"position":6,"created_at":"2024-05-03T11:11:12+08:00","updated_at":"2024-05-03T11:11:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bae454c6a4ce44563e5103befc9d7f6e65ac31e_326de56a-6d30-472f-a5fa-857712a218df.webp?v=1714705872","variant_ids":[41880188387427]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾白風暴兵 - 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-PC01","featured_media":{"alt":null,"id":23875543105635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bae454c6a4ce44563e5103befc9d7f6e65ac31e_326de56a-6d30-472f-a5fa-857712a218df.webp?v=1714705872"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41880188387427,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31470639153251,"product_id":7407893872739,"position":6,"created_at":"2024-05-03T11:11:12+08:00","updated_at":"2024-05-03T11:11:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bae454c6a4ce44563e5103befc9d7f6e65ac31e_326de56a-6d30-472f-a5fa-857712a218df.webp?v=1714705872","variant_ids":[41880188387427]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾白風暴兵 - 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-PC01","featured_media":{"alt":null,"id":23875543105635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bae454c6a4ce44563e5103befc9d7f6e65ac31e_326de56a-6d30-472f-a5fa-857712a218df.webp?v=1714705872"}},"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: "停產" }