$product = {"id":7416002445411,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 願傷疤 有天開出花(澳洲叢林大火)","handle":"iphone-xs-max-mod-nx-printable-af02","description":null,"published_at":"2024-06-11T16:50:07+08:00","created_at":"2024-05-06T12:40:20+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-look","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":41916394537059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490963046499,"product_id":7416002445411,"position":10,"created_at":"2024-05-06T12:40:44+08:00","updated_at":"2024-05-06T12:40:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/858228a5900de9199263f7e27996e1f47400cfed_06583366-9f3e-4dbe-b88a-7717ca9b533d.webp?v=1714970444","variant_ids":[41916394537059]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 願傷疤 有天開出花(澳洲叢林大火) - 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-AF02","featured_media":{"alt":null,"id":23896370118755,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/858228a5900de9199263f7e27996e1f47400cfed_06583366-9f3e-4dbe-b88a-7717ca9b533d.webp?v=1714970444"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/237090d9ef6e42a7d762a33700294502e03cbfba_ab480933-95a5-4f15-ae0f-71d158875a7e.webp?v=1714970423","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb67671ee59be267ca9517750280b4ec09434af4_f38315d7-9ce3-433f-b113-0d506c3941b9.webp?v=1714970425","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cae718e8b46618fdf3805af4e8e342f4177bf0d5_387be27c-d8b0-4531-bd4c-01e037cedd4b.webp?v=1714970428","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea620bd082611198f8d12342982b175c5640dabe_11031236-9927-4cb1-acff-70f034f14bb5.webp?v=1714970430","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebc206745a2b21d9a352feb9a381b5408a95f934_f5c7e2cb-89e8-4967-8ff2-8332ba68a1d1.webp?v=1714970432","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f623b1fb6caac46b258d282a9f1a6a0d4a64ce_79ad799f-6a29-4685-abbf-1141b159ecc9.webp?v=1714970435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bf3e0af8fc82776b8269b6c498cc0f479b4f77_13742d4e-a3da-420d-8e28-2f423ccd3245.webp?v=1714970437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86514eab7be46c7e7c43f68554517387bd30294d_1819969a-db2e-421d-8d7b-92643887e149.webp?v=1714970440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/876fd1adc2ae45b1e9d8916b85ed14f692bbbcbe_7014410c-a75a-461c-8862-4c05c142a088.webp?v=1714970442","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/858228a5900de9199263f7e27996e1f47400cfed_06583366-9f3e-4dbe-b88a-7717ca9b533d.webp?v=1714970444"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/237090d9ef6e42a7d762a33700294502e03cbfba_ab480933-95a5-4f15-ae0f-71d158875a7e.webp?v=1714970423","options":["color"],"media":[{"alt":null,"id":23896364253283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/237090d9ef6e42a7d762a33700294502e03cbfba_ab480933-95a5-4f15-ae0f-71d158875a7e.webp?v=1714970423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/237090d9ef6e42a7d762a33700294502e03cbfba_ab480933-95a5-4f15-ae0f-71d158875a7e.webp?v=1714970423","width":2000},{"alt":null,"id":23896365432931,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb67671ee59be267ca9517750280b4ec09434af4_f38315d7-9ce3-433f-b113-0d506c3941b9.webp?v=1714970425"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb67671ee59be267ca9517750280b4ec09434af4_f38315d7-9ce3-433f-b113-0d506c3941b9.webp?v=1714970425","width":2000},{"alt":null,"id":23896365924451,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cae718e8b46618fdf3805af4e8e342f4177bf0d5_387be27c-d8b0-4531-bd4c-01e037cedd4b.webp?v=1714970428"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cae718e8b46618fdf3805af4e8e342f4177bf0d5_387be27c-d8b0-4531-bd4c-01e037cedd4b.webp?v=1714970428","width":2000},{"alt":null,"id":23896366350435,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea620bd082611198f8d12342982b175c5640dabe_11031236-9927-4cb1-acff-70f034f14bb5.webp?v=1714970430"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea620bd082611198f8d12342982b175c5640dabe_11031236-9927-4cb1-acff-70f034f14bb5.webp?v=1714970430","width":2000},{"alt":null,"id":23896366809187,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebc206745a2b21d9a352feb9a381b5408a95f934_f5c7e2cb-89e8-4967-8ff2-8332ba68a1d1.webp?v=1714970432"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebc206745a2b21d9a352feb9a381b5408a95f934_f5c7e2cb-89e8-4967-8ff2-8332ba68a1d1.webp?v=1714970432","width":2000},{"alt":null,"id":23896367464547,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f623b1fb6caac46b258d282a9f1a6a0d4a64ce_79ad799f-6a29-4685-abbf-1141b159ecc9.webp?v=1714970435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f623b1fb6caac46b258d282a9f1a6a0d4a64ce_79ad799f-6a29-4685-abbf-1141b159ecc9.webp?v=1714970435","width":2000},{"alt":null,"id":23896367988835,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bf3e0af8fc82776b8269b6c498cc0f479b4f77_13742d4e-a3da-420d-8e28-2f423ccd3245.webp?v=1714970437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bf3e0af8fc82776b8269b6c498cc0f479b4f77_13742d4e-a3da-420d-8e28-2f423ccd3245.webp?v=1714970437","width":2000},{"alt":null,"id":23896368709731,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86514eab7be46c7e7c43f68554517387bd30294d_1819969a-db2e-421d-8d7b-92643887e149.webp?v=1714970440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86514eab7be46c7e7c43f68554517387bd30294d_1819969a-db2e-421d-8d7b-92643887e149.webp?v=1714970440","width":2000},{"alt":null,"id":23896369168483,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/876fd1adc2ae45b1e9d8916b85ed14f692bbbcbe_7014410c-a75a-461c-8862-4c05c142a088.webp?v=1714970442"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/876fd1adc2ae45b1e9d8916b85ed14f692bbbcbe_7014410c-a75a-461c-8862-4c05c142a088.webp?v=1714970442","width":2000},{"alt":null,"id":23896370118755,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/858228a5900de9199263f7e27996e1f47400cfed_06583366-9f3e-4dbe-b88a-7717ca9b533d.webp?v=1714970444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/858228a5900de9199263f7e27996e1f47400cfed_06583366-9f3e-4dbe-b88a-7717ca9b533d.webp?v=1714970444","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916394537059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490963046499,"product_id":7416002445411,"position":10,"created_at":"2024-05-06T12:40:44+08:00","updated_at":"2024-05-06T12:40:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/858228a5900de9199263f7e27996e1f47400cfed_06583366-9f3e-4dbe-b88a-7717ca9b533d.webp?v=1714970444","variant_ids":[41916394537059]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 願傷疤 有天開出花(澳洲叢林大火) - 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-AF02","featured_media":{"alt":null,"id":23896370118755,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/858228a5900de9199263f7e27996e1f47400cfed_06583366-9f3e-4dbe-b88a-7717ca9b533d.webp?v=1714970444"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916394537059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490963046499,"product_id":7416002445411,"position":10,"created_at":"2024-05-06T12:40:44+08:00","updated_at":"2024-05-06T12:40:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/858228a5900de9199263f7e27996e1f47400cfed_06583366-9f3e-4dbe-b88a-7717ca9b533d.webp?v=1714970444","variant_ids":[41916394537059]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 願傷疤 有天開出花(澳洲叢林大火) - 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-AF02","featured_media":{"alt":null,"id":23896370118755,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/858228a5900de9199263f7e27996e1f47400cfed_06583366-9f3e-4dbe-b88a-7717ca9b533d.webp?v=1714970444"}},"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: "停產" }