$product = {"id":7416026038371,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI","handle":"iphone-xs-max-mod-nx-printable-pb25","description":null,"published_at":"2024-06-11T16:50:45+08:00","created_at":"2024-05-06T12:44:30+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 XS Max","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":41916641640547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31491021832291,"product_id":7416026038371,"position":9,"created_at":"2024-05-06T12:44:53+08:00","updated_at":"2024-05-06T12:44:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac63879222ed23db08c9167ec6684ba9736fb58_265a2ff4-8548-4361-9055-2b40b8e70b6b.webp?v=1714970693","variant_ids":[41916641640547]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23896429068387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac63879222ed23db08c9167ec6684ba9736fb58_265a2ff4-8548-4361-9055-2b40b8e70b6b.webp?v=1714970693"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/923b0b9dd8ddd4dcb183440f827536b8954e4cab_76d7ef2f-f1c8-427e-97bb-21a13cea8c8f.webp?v=1714970673","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ba92f63c12e936f1e93fc803384773cc86a758f_c5c423d9-a74a-41e2-91d2-e3ac5b652105.webp?v=1714970675","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9653b1b41cda83eeb3ed4ea339d0bfdcecc864c3_c78eca77-375d-4020-a6b2-afb076d4bde2.webp?v=1714970678","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89d3a769b8b850735adc58e3e736b8afc59ed7cc_45e9a456-72a9-4e04-85b3-4384cc9b660c.webp?v=1714970680","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e09c63f8d2df0aa4dddbc0b99d9ac6e1cbb37b6_023297aa-530b-4d1f-b1f2-c9024b4b4fea.webp?v=1714970683","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e694002a6146fc9be2ebe4280117a352fed85b4d_cc28c898-bff2-447e-aa4e-b3cc4496bd0f.webp?v=1714970686","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55e659b49b37e0a6e5890d6905329c056769c06e_bbe20c24-282d-439a-b811-5d9faa782b78.webp?v=1714970688","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1497a9171c18a3ebec7d107823a99395480da747_ba798d69-c2bd-4c03-b44a-11c67ec9b772.webp?v=1714970691","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac63879222ed23db08c9167ec6684ba9736fb58_265a2ff4-8548-4361-9055-2b40b8e70b6b.webp?v=1714970693","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bc8cbbadec0a41733e591f9185078dd8e92c377_52ce3688-a2e8-4e4d-809e-bb27eb0cee2a.webp?v=1714970695"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/923b0b9dd8ddd4dcb183440f827536b8954e4cab_76d7ef2f-f1c8-427e-97bb-21a13cea8c8f.webp?v=1714970673","options":["color"],"media":[{"alt":null,"id":23896424218723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/923b0b9dd8ddd4dcb183440f827536b8954e4cab_76d7ef2f-f1c8-427e-97bb-21a13cea8c8f.webp?v=1714970673"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/923b0b9dd8ddd4dcb183440f827536b8954e4cab_76d7ef2f-f1c8-427e-97bb-21a13cea8c8f.webp?v=1714970673","width":2000},{"alt":null,"id":23896424939619,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ba92f63c12e936f1e93fc803384773cc86a758f_c5c423d9-a74a-41e2-91d2-e3ac5b652105.webp?v=1714970675"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ba92f63c12e936f1e93fc803384773cc86a758f_c5c423d9-a74a-41e2-91d2-e3ac5b652105.webp?v=1714970675","width":2000},{"alt":null,"id":23896425496675,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9653b1b41cda83eeb3ed4ea339d0bfdcecc864c3_c78eca77-375d-4020-a6b2-afb076d4bde2.webp?v=1714970678"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9653b1b41cda83eeb3ed4ea339d0bfdcecc864c3_c78eca77-375d-4020-a6b2-afb076d4bde2.webp?v=1714970678","width":2000},{"alt":null,"id":23896426479715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89d3a769b8b850735adc58e3e736b8afc59ed7cc_45e9a456-72a9-4e04-85b3-4384cc9b660c.webp?v=1714970680"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89d3a769b8b850735adc58e3e736b8afc59ed7cc_45e9a456-72a9-4e04-85b3-4384cc9b660c.webp?v=1714970680","width":2000},{"alt":null,"id":23896426971235,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e09c63f8d2df0aa4dddbc0b99d9ac6e1cbb37b6_023297aa-530b-4d1f-b1f2-c9024b4b4fea.webp?v=1714970683"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e09c63f8d2df0aa4dddbc0b99d9ac6e1cbb37b6_023297aa-530b-4d1f-b1f2-c9024b4b4fea.webp?v=1714970683","width":2000},{"alt":null,"id":23896427429987,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e694002a6146fc9be2ebe4280117a352fed85b4d_cc28c898-bff2-447e-aa4e-b3cc4496bd0f.webp?v=1714970686"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e694002a6146fc9be2ebe4280117a352fed85b4d_cc28c898-bff2-447e-aa4e-b3cc4496bd0f.webp?v=1714970686","width":2000},{"alt":null,"id":23896427888739,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55e659b49b37e0a6e5890d6905329c056769c06e_bbe20c24-282d-439a-b811-5d9faa782b78.webp?v=1714970688"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55e659b49b37e0a6e5890d6905329c056769c06e_bbe20c24-282d-439a-b811-5d9faa782b78.webp?v=1714970688","width":2000},{"alt":null,"id":23896428347491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1497a9171c18a3ebec7d107823a99395480da747_ba798d69-c2bd-4c03-b44a-11c67ec9b772.webp?v=1714970691"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1497a9171c18a3ebec7d107823a99395480da747_ba798d69-c2bd-4c03-b44a-11c67ec9b772.webp?v=1714970691","width":2000},{"alt":null,"id":23896429068387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac63879222ed23db08c9167ec6684ba9736fb58_265a2ff4-8548-4361-9055-2b40b8e70b6b.webp?v=1714970693"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac63879222ed23db08c9167ec6684ba9736fb58_265a2ff4-8548-4361-9055-2b40b8e70b6b.webp?v=1714970693","width":2000},{"alt":null,"id":23896429559907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bc8cbbadec0a41733e591f9185078dd8e92c377_52ce3688-a2e8-4e4d-809e-bb27eb0cee2a.webp?v=1714970695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bc8cbbadec0a41733e591f9185078dd8e92c377_52ce3688-a2e8-4e4d-809e-bb27eb0cee2a.webp?v=1714970695","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916641640547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31491021832291,"product_id":7416026038371,"position":9,"created_at":"2024-05-06T12:44:53+08:00","updated_at":"2024-05-06T12:44:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac63879222ed23db08c9167ec6684ba9736fb58_265a2ff4-8548-4361-9055-2b40b8e70b6b.webp?v=1714970693","variant_ids":[41916641640547]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23896429068387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac63879222ed23db08c9167ec6684ba9736fb58_265a2ff4-8548-4361-9055-2b40b8e70b6b.webp?v=1714970693"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916641640547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31491021832291,"product_id":7416026038371,"position":9,"created_at":"2024-05-06T12:44:53+08:00","updated_at":"2024-05-06T12:44:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac63879222ed23db08c9167ec6684ba9736fb58_265a2ff4-8548-4361-9055-2b40b8e70b6b.webp?v=1714970693","variant_ids":[41916641640547]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23896429068387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ac63879222ed23db08c9167ec6684ba9736fb58_265a2ff4-8548-4361-9055-2b40b8e70b6b.webp?v=1714970693"}},"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: "停產" }