$product = {"id":7416038817891,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列","handle":"iphone-xs-max-mod-nx-printable-pb44","description":null,"published_at":"2024-06-11T16:51:06+08:00","created_at":"2024-05-06T12:46:48+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":41916784377955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31491050111075,"product_id":7416038817891,"position":3,"created_at":"2024-05-06T12:46:56+08:00","updated_at":"2024-05-06T12:46:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90229e3e5f2f6db44c8a11762ba7da89a8f9fb40_d384537f-2f29-4577-a267-365a9434841c.webp?v=1714970816","variant_ids":[41916784377955]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - 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-PB44","featured_media":{"alt":null,"id":23896457347171,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90229e3e5f2f6db44c8a11762ba7da89a8f9fb40_d384537f-2f29-4577-a267-365a9434841c.webp?v=1714970816"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50a78d361b9f0a801030b7f127827b129f6f3ab_ea3678d8-020a-41a4-a956-8673be6eada0.webp?v=1714970811","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04ae3897d274b1cc1563bece14864f6ac54bc7f6_309b25c9-dda9-4bc8-89e9-a190cf3ffeb3.webp?v=1714970813","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90229e3e5f2f6db44c8a11762ba7da89a8f9fb40_d384537f-2f29-4577-a267-365a9434841c.webp?v=1714970816","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc12a15f0d75be10a51205da18f7d0857c4132d6_f1432489-c3b9-4756-8ac8-789d5ab072d1.webp?v=1714970818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70171fa9715946f5408606c592e34e3724eaae81_e2a5176a-7a6d-4a5e-bc22-32964e466e1e.webp?v=1714970821","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a9bde575b5b43bb53e5fb3c6f1b8e30f961244d_21e39b66-e0a0-41ae-b62a-3d8393b0cb03.webp?v=1714970823","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5cfb1ef07f5ece0da92881e6377a3d231cf67f3_2d8b6e5f-8308-460b-b0df-9c3f6ab99994.webp?v=1714970826","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b06ee4863b2aef429b5ad0b076d9167ba2ed4625_3bffe5de-8d48-4033-9cba-aaa186c3cf17.webp?v=1714970829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a0e3bba29710e9800323f45d44aadabe7096b96_313975bb-0560-49b9-bf91-6183704b1c40.webp?v=1714970831","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9d792fe1e07433ae5f0059bca4c983674e3eb9_1f6b5e5c-253e-4331-9608-1dab37cbbb35.webp?v=1714970833"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50a78d361b9f0a801030b7f127827b129f6f3ab_ea3678d8-020a-41a4-a956-8673be6eada0.webp?v=1714970811","options":["color"],"media":[{"alt":null,"id":23896456429667,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50a78d361b9f0a801030b7f127827b129f6f3ab_ea3678d8-020a-41a4-a956-8673be6eada0.webp?v=1714970811"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50a78d361b9f0a801030b7f127827b129f6f3ab_ea3678d8-020a-41a4-a956-8673be6eada0.webp?v=1714970811","width":2000},{"alt":null,"id":23896456921187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04ae3897d274b1cc1563bece14864f6ac54bc7f6_309b25c9-dda9-4bc8-89e9-a190cf3ffeb3.webp?v=1714970813"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04ae3897d274b1cc1563bece14864f6ac54bc7f6_309b25c9-dda9-4bc8-89e9-a190cf3ffeb3.webp?v=1714970813","width":2000},{"alt":null,"id":23896457347171,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90229e3e5f2f6db44c8a11762ba7da89a8f9fb40_d384537f-2f29-4577-a267-365a9434841c.webp?v=1714970816"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90229e3e5f2f6db44c8a11762ba7da89a8f9fb40_d384537f-2f29-4577-a267-365a9434841c.webp?v=1714970816","width":2000},{"alt":null,"id":23896457936995,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc12a15f0d75be10a51205da18f7d0857c4132d6_f1432489-c3b9-4756-8ac8-789d5ab072d1.webp?v=1714970818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc12a15f0d75be10a51205da18f7d0857c4132d6_f1432489-c3b9-4756-8ac8-789d5ab072d1.webp?v=1714970818","width":2000},{"alt":null,"id":23896458362979,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70171fa9715946f5408606c592e34e3724eaae81_e2a5176a-7a6d-4a5e-bc22-32964e466e1e.webp?v=1714970821"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70171fa9715946f5408606c592e34e3724eaae81_e2a5176a-7a6d-4a5e-bc22-32964e466e1e.webp?v=1714970821","width":2000},{"alt":null,"id":23896458920035,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a9bde575b5b43bb53e5fb3c6f1b8e30f961244d_21e39b66-e0a0-41ae-b62a-3d8393b0cb03.webp?v=1714970823"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a9bde575b5b43bb53e5fb3c6f1b8e30f961244d_21e39b66-e0a0-41ae-b62a-3d8393b0cb03.webp?v=1714970823","width":2000},{"alt":null,"id":23896459444323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5cfb1ef07f5ece0da92881e6377a3d231cf67f3_2d8b6e5f-8308-460b-b0df-9c3f6ab99994.webp?v=1714970826"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5cfb1ef07f5ece0da92881e6377a3d231cf67f3_2d8b6e5f-8308-460b-b0df-9c3f6ab99994.webp?v=1714970826","width":2000},{"alt":null,"id":23896460492899,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b06ee4863b2aef429b5ad0b076d9167ba2ed4625_3bffe5de-8d48-4033-9cba-aaa186c3cf17.webp?v=1714970829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b06ee4863b2aef429b5ad0b076d9167ba2ed4625_3bffe5de-8d48-4033-9cba-aaa186c3cf17.webp?v=1714970829","width":2000},{"alt":null,"id":23896461115491,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a0e3bba29710e9800323f45d44aadabe7096b96_313975bb-0560-49b9-bf91-6183704b1c40.webp?v=1714970831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a0e3bba29710e9800323f45d44aadabe7096b96_313975bb-0560-49b9-bf91-6183704b1c40.webp?v=1714970831","width":2000},{"alt":null,"id":23896462131299,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9d792fe1e07433ae5f0059bca4c983674e3eb9_1f6b5e5c-253e-4331-9608-1dab37cbbb35.webp?v=1714970833"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9d792fe1e07433ae5f0059bca4c983674e3eb9_1f6b5e5c-253e-4331-9608-1dab37cbbb35.webp?v=1714970833","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916784377955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31491050111075,"product_id":7416038817891,"position":3,"created_at":"2024-05-06T12:46:56+08:00","updated_at":"2024-05-06T12:46:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90229e3e5f2f6db44c8a11762ba7da89a8f9fb40_d384537f-2f29-4577-a267-365a9434841c.webp?v=1714970816","variant_ids":[41916784377955]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - 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-PB44","featured_media":{"alt":null,"id":23896457347171,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90229e3e5f2f6db44c8a11762ba7da89a8f9fb40_d384537f-2f29-4577-a267-365a9434841c.webp?v=1714970816"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916784377955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31491050111075,"product_id":7416038817891,"position":3,"created_at":"2024-05-06T12:46:56+08:00","updated_at":"2024-05-06T12:46:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90229e3e5f2f6db44c8a11762ba7da89a8f9fb40_d384537f-2f29-4577-a267-365a9434841c.webp?v=1714970816","variant_ids":[41916784377955]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - 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-PB44","featured_media":{"alt":null,"id":23896457347171,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90229e3e5f2f6db44c8a11762ba7da89a8f9fb40_d384537f-2f29-4577-a267-365a9434841c.webp?v=1714970816"}},"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: "停產" }