$product = {"id":7407818637411,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Look - 人在做 北極冰川在看","handle":"iphone-14-plus-mod-nx-printable-af05","description":null,"published_at":"2024-06-11T16:23:42+08:00","created_at":"2024-05-03T10:55:40+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 14 Plus","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":41879197384803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31470446084195,"product_id":7407818637411,"position":9,"created_at":"2024-05-03T10:56:01+08:00","updated_at":"2024-05-03T10:56:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/223e058159aed5bfda605322087db480590cff7b_42f25d24-28e6-4fe0-86ba-233d89eb8fa9.webp?v=1714704961","variant_ids":[41879197384803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 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":"NPB0126124-AF05","featured_media":{"alt":null,"id":23875349479523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/223e058159aed5bfda605322087db480590cff7b_42f25d24-28e6-4fe0-86ba-233d89eb8fa9.webp?v=1714704961"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40387e304d3415bd412e94220ab2c51cd439c406_776f53e5-b4fb-4ae4-b0a0-1561dfd54065.webp?v=1714704942","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2699b1220b23b3bb4b7a0aaddcc4449995e0a1f_cbf15a62-78e1-4ba0-b23c-5cb04fbf2682.webp?v=1714704945","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30a063e64dc75fc67f897bdd952ef2ef38438330_6eebcf9d-99e4-4cab-8a9e-6155f461899a.webp?v=1714704947","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaf4717947899275f7edaf67a91f1ac203dc84f1_1c20b74e-4528-48b5-b83c-1380eed723ee.webp?v=1714704949","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692dededb8c6865b53e473a1cf600df1087ff006_deffe793-14e7-4a27-96c6-9b802bf294f5.webp?v=1714704951","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/560a158923ef47d3dc5d1db3eda80e3c44b8fb5f_ab8b03c3-8dee-4409-abad-5cc0ed437519.webp?v=1714704954","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/159ea7506cd99b306d73d17c13a9be62ccce38d2_c9755b82-bdaf-45bc-a3d0-4f0fa0fb7463.webp?v=1714704956","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e39ad451e31f4ff7503185942fa97bebf483f4e_bc45b2be-7656-40dc-bb6d-eb5b8f8c7ca2.webp?v=1714704958","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/223e058159aed5bfda605322087db480590cff7b_42f25d24-28e6-4fe0-86ba-233d89eb8fa9.webp?v=1714704961","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd0ecb0702ad9991ac512a7906a018a7a4f0dc2a_ec14e069-62d0-47b1-906e-e50e08833f94.webp?v=1714704963"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40387e304d3415bd412e94220ab2c51cd439c406_776f53e5-b4fb-4ae4-b0a0-1561dfd54065.webp?v=1714704942","options":["color"],"media":[{"alt":null,"id":23875345350755,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40387e304d3415bd412e94220ab2c51cd439c406_776f53e5-b4fb-4ae4-b0a0-1561dfd54065.webp?v=1714704942"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40387e304d3415bd412e94220ab2c51cd439c406_776f53e5-b4fb-4ae4-b0a0-1561dfd54065.webp?v=1714704942","width":2000},{"alt":null,"id":23875345875043,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2699b1220b23b3bb4b7a0aaddcc4449995e0a1f_cbf15a62-78e1-4ba0-b23c-5cb04fbf2682.webp?v=1714704945"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2699b1220b23b3bb4b7a0aaddcc4449995e0a1f_cbf15a62-78e1-4ba0-b23c-5cb04fbf2682.webp?v=1714704945","width":2000},{"alt":null,"id":23875346301027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30a063e64dc75fc67f897bdd952ef2ef38438330_6eebcf9d-99e4-4cab-8a9e-6155f461899a.webp?v=1714704947"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30a063e64dc75fc67f897bdd952ef2ef38438330_6eebcf9d-99e4-4cab-8a9e-6155f461899a.webp?v=1714704947","width":2000},{"alt":null,"id":23875346759779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaf4717947899275f7edaf67a91f1ac203dc84f1_1c20b74e-4528-48b5-b83c-1380eed723ee.webp?v=1714704949"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaf4717947899275f7edaf67a91f1ac203dc84f1_1c20b74e-4528-48b5-b83c-1380eed723ee.webp?v=1714704949","width":2000},{"alt":null,"id":23875347218531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692dededb8c6865b53e473a1cf600df1087ff006_deffe793-14e7-4a27-96c6-9b802bf294f5.webp?v=1714704951"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692dededb8c6865b53e473a1cf600df1087ff006_deffe793-14e7-4a27-96c6-9b802bf294f5.webp?v=1714704951","width":2000},{"alt":null,"id":23875347644515,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/560a158923ef47d3dc5d1db3eda80e3c44b8fb5f_ab8b03c3-8dee-4409-abad-5cc0ed437519.webp?v=1714704954"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/560a158923ef47d3dc5d1db3eda80e3c44b8fb5f_ab8b03c3-8dee-4409-abad-5cc0ed437519.webp?v=1714704954","width":2000},{"alt":null,"id":23875348627555,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/159ea7506cd99b306d73d17c13a9be62ccce38d2_c9755b82-bdaf-45bc-a3d0-4f0fa0fb7463.webp?v=1714704956"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/159ea7506cd99b306d73d17c13a9be62ccce38d2_c9755b82-bdaf-45bc-a3d0-4f0fa0fb7463.webp?v=1714704956","width":2000},{"alt":null,"id":23875349086307,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e39ad451e31f4ff7503185942fa97bebf483f4e_bc45b2be-7656-40dc-bb6d-eb5b8f8c7ca2.webp?v=1714704958"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e39ad451e31f4ff7503185942fa97bebf483f4e_bc45b2be-7656-40dc-bb6d-eb5b8f8c7ca2.webp?v=1714704958","width":2000},{"alt":null,"id":23875349479523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/223e058159aed5bfda605322087db480590cff7b_42f25d24-28e6-4fe0-86ba-233d89eb8fa9.webp?v=1714704961"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/223e058159aed5bfda605322087db480590cff7b_42f25d24-28e6-4fe0-86ba-233d89eb8fa9.webp?v=1714704961","width":2000},{"alt":null,"id":23875349872739,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd0ecb0702ad9991ac512a7906a018a7a4f0dc2a_ec14e069-62d0-47b1-906e-e50e08833f94.webp?v=1714704963"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd0ecb0702ad9991ac512a7906a018a7a4f0dc2a_ec14e069-62d0-47b1-906e-e50e08833f94.webp?v=1714704963","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879197384803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31470446084195,"product_id":7407818637411,"position":9,"created_at":"2024-05-03T10:56:01+08:00","updated_at":"2024-05-03T10:56:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/223e058159aed5bfda605322087db480590cff7b_42f25d24-28e6-4fe0-86ba-233d89eb8fa9.webp?v=1714704961","variant_ids":[41879197384803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 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":"NPB0126124-AF05","featured_media":{"alt":null,"id":23875349479523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/223e058159aed5bfda605322087db480590cff7b_42f25d24-28e6-4fe0-86ba-233d89eb8fa9.webp?v=1714704961"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879197384803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31470446084195,"product_id":7407818637411,"position":9,"created_at":"2024-05-03T10:56:01+08:00","updated_at":"2024-05-03T10:56:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/223e058159aed5bfda605322087db480590cff7b_42f25d24-28e6-4fe0-86ba-233d89eb8fa9.webp?v=1714704961","variant_ids":[41879197384803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 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":"NPB0126124-AF05","featured_media":{"alt":null,"id":23875349479523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/223e058159aed5bfda605322087db480590cff7b_42f25d24-28e6-4fe0-86ba-233d89eb8fa9.webp?v=1714704961"}},"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: "停產" }