$product = {"id":7415936942179,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 人在做 北極冰川在看","handle":"iphone-xs-max-mod-nx-printable-af05","description":null,"published_at":"2024-06-11T16:48:23+08:00","created_at":"2024-05-06T12:28:07+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":41915709194339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490783871075,"product_id":7415936942179,"position":8,"created_at":"2024-05-06T12:28:29+08:00","updated_at":"2024-05-06T12:28:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99008f245348d7fe8c745ce2c5c5b9d29f0b3648_7f9580a8-6a67-42be-97cd-8786dd5ab601.webp?v=1714969709","variant_ids":[41915709194339]},"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-AF05","featured_media":{"alt":null,"id":23896190713955,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99008f245348d7fe8c745ce2c5c5b9d29f0b3648_7f9580a8-6a67-42be-97cd-8786dd5ab601.webp?v=1714969709"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2779d4824e57124b72f2c9cbc859fa3b9a6e69f8_d6c40cdf-4a3b-471f-957d-da99d21b3326.webp?v=1714969689","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd33528d9d97a9fb8f55bfc28e383fc1e1e0f42b_6f1f3205-9ee9-4ab1-b424-6ff392fcce53.webp?v=1714969691","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc59a00f785c6cb7bf91590ba4d972168f387f3_459b0539-7f0d-47bb-bfb8-a7c418f0617e.webp?v=1714969696","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c81508cfd906b6736881036d5ddda00a4cc175fc_102a409a-ab71-4843-bb32-f724d178e412.webp?v=1714969699","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d28acc204b740dba061ae98eb8bd6361f1444f88_cf10a681-44c1-494d-8f7d-a94c3ccd034b.webp?v=1714969702","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81243d606f900ebd73e7a2dbc4fb256b139a7567_4d25c9b1-5c0e-4e64-af47-3aa348658ebc.webp?v=1714969704","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ba2709f8ceac154df62f0ea05691299af5fb2cd_b9c69c9c-2004-48b3-9e68-dac8280d2220.webp?v=1714969707","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99008f245348d7fe8c745ce2c5c5b9d29f0b3648_7f9580a8-6a67-42be-97cd-8786dd5ab601.webp?v=1714969709","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcc0e497ef0de67225f6517441f30399641c8990_7f5243dc-831b-48e1-964f-c8eeb22e0d06.webp?v=1714969711"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2779d4824e57124b72f2c9cbc859fa3b9a6e69f8_d6c40cdf-4a3b-471f-957d-da99d21b3326.webp?v=1714969689","options":["color"],"media":[{"alt":null,"id":23896186617955,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2779d4824e57124b72f2c9cbc859fa3b9a6e69f8_d6c40cdf-4a3b-471f-957d-da99d21b3326.webp?v=1714969689"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2779d4824e57124b72f2c9cbc859fa3b9a6e69f8_d6c40cdf-4a3b-471f-957d-da99d21b3326.webp?v=1714969689","width":2000},{"alt":null,"id":23896187076707,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd33528d9d97a9fb8f55bfc28e383fc1e1e0f42b_6f1f3205-9ee9-4ab1-b424-6ff392fcce53.webp?v=1714969691"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd33528d9d97a9fb8f55bfc28e383fc1e1e0f42b_6f1f3205-9ee9-4ab1-b424-6ff392fcce53.webp?v=1714969691","width":2000},{"alt":null,"id":23896187961443,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc59a00f785c6cb7bf91590ba4d972168f387f3_459b0539-7f0d-47bb-bfb8-a7c418f0617e.webp?v=1714969696"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc59a00f785c6cb7bf91590ba4d972168f387f3_459b0539-7f0d-47bb-bfb8-a7c418f0617e.webp?v=1714969696","width":2000},{"alt":null,"id":23896188354659,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c81508cfd906b6736881036d5ddda00a4cc175fc_102a409a-ab71-4843-bb32-f724d178e412.webp?v=1714969699"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c81508cfd906b6736881036d5ddda00a4cc175fc_102a409a-ab71-4843-bb32-f724d178e412.webp?v=1714969699","width":2000},{"alt":null,"id":23896189141091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d28acc204b740dba061ae98eb8bd6361f1444f88_cf10a681-44c1-494d-8f7d-a94c3ccd034b.webp?v=1714969702"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d28acc204b740dba061ae98eb8bd6361f1444f88_cf10a681-44c1-494d-8f7d-a94c3ccd034b.webp?v=1714969702","width":2000},{"alt":null,"id":23896189894755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81243d606f900ebd73e7a2dbc4fb256b139a7567_4d25c9b1-5c0e-4e64-af47-3aa348658ebc.webp?v=1714969704"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81243d606f900ebd73e7a2dbc4fb256b139a7567_4d25c9b1-5c0e-4e64-af47-3aa348658ebc.webp?v=1714969704","width":2000},{"alt":null,"id":23896190287971,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ba2709f8ceac154df62f0ea05691299af5fb2cd_b9c69c9c-2004-48b3-9e68-dac8280d2220.webp?v=1714969707"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ba2709f8ceac154df62f0ea05691299af5fb2cd_b9c69c9c-2004-48b3-9e68-dac8280d2220.webp?v=1714969707","width":2000},{"alt":null,"id":23896190713955,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99008f245348d7fe8c745ce2c5c5b9d29f0b3648_7f9580a8-6a67-42be-97cd-8786dd5ab601.webp?v=1714969709"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99008f245348d7fe8c745ce2c5c5b9d29f0b3648_7f9580a8-6a67-42be-97cd-8786dd5ab601.webp?v=1714969709","width":2000},{"alt":null,"id":23896191271011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcc0e497ef0de67225f6517441f30399641c8990_7f5243dc-831b-48e1-964f-c8eeb22e0d06.webp?v=1714969711"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcc0e497ef0de67225f6517441f30399641c8990_7f5243dc-831b-48e1-964f-c8eeb22e0d06.webp?v=1714969711","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915709194339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490783871075,"product_id":7415936942179,"position":8,"created_at":"2024-05-06T12:28:29+08:00","updated_at":"2024-05-06T12:28:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99008f245348d7fe8c745ce2c5c5b9d29f0b3648_7f9580a8-6a67-42be-97cd-8786dd5ab601.webp?v=1714969709","variant_ids":[41915709194339]},"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-AF05","featured_media":{"alt":null,"id":23896190713955,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99008f245348d7fe8c745ce2c5c5b9d29f0b3648_7f9580a8-6a67-42be-97cd-8786dd5ab601.webp?v=1714969709"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915709194339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490783871075,"product_id":7415936942179,"position":8,"created_at":"2024-05-06T12:28:29+08:00","updated_at":"2024-05-06T12:28:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99008f245348d7fe8c745ce2c5c5b9d29f0b3648_7f9580a8-6a67-42be-97cd-8786dd5ab601.webp?v=1714969709","variant_ids":[41915709194339]},"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-AF05","featured_media":{"alt":null,"id":23896190713955,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99008f245348d7fe8c745ce2c5c5b9d29f0b3648_7f9580a8-6a67-42be-97cd-8786dd5ab601.webp?v=1714969709"}},"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: "停產" }