$product = {"id":7407709945955,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列","handle":"iphone-14-plus-mod-nx-printable-pb44","description":null,"published_at":"2024-06-11T16:22:15+08:00","created_at":"2024-05-03T10:43:45+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":41877928575075,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31470254063715,"product_id":7407709945955,"position":6,"created_at":"2024-05-03T10:44:01+08:00","updated_at":"2024-05-03T10:44:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de4edf31de6181ca7f92ae7f427b1e11c428ef75_cf446823-1a40-4bd5-baea-05ec813ff21a.webp?v=1714704241","variant_ids":[41877928575075]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB44","featured_media":{"alt":null,"id":23875157131363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de4edf31de6181ca7f92ae7f427b1e11c428ef75_cf446823-1a40-4bd5-baea-05ec813ff21a.webp?v=1714704241"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c97ab8030720a96d008af2d8799edd39bea91cb_8abf7bf4-5b8c-4f60-bacd-a6137d8264c4.webp?v=1714704228","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/545511bd4608e1734ceeb9326d2272f8855c7f8c_1a2ee68a-2103-4706-8c25-fb0a5ca2c872.webp?v=1714704230","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfcec343f79012b480fbc48d3ee866f39b046ccc_8fc5c5b1-5376-4b15-a1dc-b43b9a7551b0.webp?v=1714704233","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9365d575fd11a7027a7e2da6c719b0f1d0ea2cec_e446e138-d09b-45d3-9362-588dfc8acc06.webp?v=1714704236","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c8b2608612b1fa3f213b79b7d124f216cb442ca_d195e368-b623-42e8-8ccf-5b5bb290fc77.webp?v=1714704239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de4edf31de6181ca7f92ae7f427b1e11c428ef75_cf446823-1a40-4bd5-baea-05ec813ff21a.webp?v=1714704241","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5763035a4b9f84b62941ef42930fcfec0856467b_4e5e3ba4-4de5-4821-aebc-b24a822a41ee.webp?v=1714704244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59861067c447a1556553d0ac764b55c4ea6dff4b_b1e2c3bb-9851-403e-b7ac-c3efc4ce2685.webp?v=1714704248","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec68af365c186661c30ace7f15adbbf587572340_a188998a-6cfe-44fe-a579-5b72c3208563.webp?v=1714704252","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c137e183a1b75959b41556b88568c4b52426ee_813cc896-9f35-4cba-a140-42f3b3c00860.webp?v=1714704254"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c97ab8030720a96d008af2d8799edd39bea91cb_8abf7bf4-5b8c-4f60-bacd-a6137d8264c4.webp?v=1714704228","options":["color"],"media":[{"alt":null,"id":23875153461347,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c97ab8030720a96d008af2d8799edd39bea91cb_8abf7bf4-5b8c-4f60-bacd-a6137d8264c4.webp?v=1714704228"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c97ab8030720a96d008af2d8799edd39bea91cb_8abf7bf4-5b8c-4f60-bacd-a6137d8264c4.webp?v=1714704228","width":2000},{"alt":null,"id":23875154215011,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/545511bd4608e1734ceeb9326d2272f8855c7f8c_1a2ee68a-2103-4706-8c25-fb0a5ca2c872.webp?v=1714704230"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/545511bd4608e1734ceeb9326d2272f8855c7f8c_1a2ee68a-2103-4706-8c25-fb0a5ca2c872.webp?v=1714704230","width":2000},{"alt":null,"id":23875154739299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfcec343f79012b480fbc48d3ee866f39b046ccc_8fc5c5b1-5376-4b15-a1dc-b43b9a7551b0.webp?v=1714704233"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfcec343f79012b480fbc48d3ee866f39b046ccc_8fc5c5b1-5376-4b15-a1dc-b43b9a7551b0.webp?v=1714704233","width":2000},{"alt":null,"id":23875155427427,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9365d575fd11a7027a7e2da6c719b0f1d0ea2cec_e446e138-d09b-45d3-9362-588dfc8acc06.webp?v=1714704236"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9365d575fd11a7027a7e2da6c719b0f1d0ea2cec_e446e138-d09b-45d3-9362-588dfc8acc06.webp?v=1714704236","width":2000},{"alt":null,"id":23875156082787,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c8b2608612b1fa3f213b79b7d124f216cb442ca_d195e368-b623-42e8-8ccf-5b5bb290fc77.webp?v=1714704239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c8b2608612b1fa3f213b79b7d124f216cb442ca_d195e368-b623-42e8-8ccf-5b5bb290fc77.webp?v=1714704239","width":2000},{"alt":null,"id":23875157131363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de4edf31de6181ca7f92ae7f427b1e11c428ef75_cf446823-1a40-4bd5-baea-05ec813ff21a.webp?v=1714704241"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de4edf31de6181ca7f92ae7f427b1e11c428ef75_cf446823-1a40-4bd5-baea-05ec813ff21a.webp?v=1714704241","width":2000},{"alt":null,"id":23875157721187,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5763035a4b9f84b62941ef42930fcfec0856467b_4e5e3ba4-4de5-4821-aebc-b24a822a41ee.webp?v=1714704244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5763035a4b9f84b62941ef42930fcfec0856467b_4e5e3ba4-4de5-4821-aebc-b24a822a41ee.webp?v=1714704244","width":2000},{"alt":null,"id":23875158736995,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59861067c447a1556553d0ac764b55c4ea6dff4b_b1e2c3bb-9851-403e-b7ac-c3efc4ce2685.webp?v=1714704248"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59861067c447a1556553d0ac764b55c4ea6dff4b_b1e2c3bb-9851-403e-b7ac-c3efc4ce2685.webp?v=1714704248","width":2000},{"alt":null,"id":23875159261283,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec68af365c186661c30ace7f15adbbf587572340_a188998a-6cfe-44fe-a579-5b72c3208563.webp?v=1714704252"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec68af365c186661c30ace7f15adbbf587572340_a188998a-6cfe-44fe-a579-5b72c3208563.webp?v=1714704252","width":2000},{"alt":null,"id":23875160178787,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c137e183a1b75959b41556b88568c4b52426ee_813cc896-9f35-4cba-a140-42f3b3c00860.webp?v=1714704254"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c137e183a1b75959b41556b88568c4b52426ee_813cc896-9f35-4cba-a140-42f3b3c00860.webp?v=1714704254","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41877928575075,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31470254063715,"product_id":7407709945955,"position":6,"created_at":"2024-05-03T10:44:01+08:00","updated_at":"2024-05-03T10:44:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de4edf31de6181ca7f92ae7f427b1e11c428ef75_cf446823-1a40-4bd5-baea-05ec813ff21a.webp?v=1714704241","variant_ids":[41877928575075]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB44","featured_media":{"alt":null,"id":23875157131363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de4edf31de6181ca7f92ae7f427b1e11c428ef75_cf446823-1a40-4bd5-baea-05ec813ff21a.webp?v=1714704241"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41877928575075,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31470254063715,"product_id":7407709945955,"position":6,"created_at":"2024-05-03T10:44:01+08:00","updated_at":"2024-05-03T10:44:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de4edf31de6181ca7f92ae7f427b1e11c428ef75_cf446823-1a40-4bd5-baea-05ec813ff21a.webp?v=1714704241","variant_ids":[41877928575075]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB44","featured_media":{"alt":null,"id":23875157131363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de4edf31de6181ca7f92ae7f427b1e11c428ef75_cf446823-1a40-4bd5-baea-05ec813ff21a.webp?v=1714704241"}},"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: "停產" }