$product = {"id":7415987535971,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Look - 願傷疤 有天開出花(亞馬遜雨林)","handle":"iphone-xs-mod-nx-printable-af01","description":null,"published_at":"2024-06-11T16:49:43+08:00","created_at":"2024-05-06T12:37:33+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","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":41916240625763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490916515939,"product_id":7415987535971,"position":4,"created_at":"2024-05-06T12:37:43+08:00","updated_at":"2024-05-06T12:37:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509914cf1023a67fcf06a2a4738b45b22956c304_cc9411ef-58fe-4cef-92f7-72390454db7b.webp?v=1714970263","variant_ids":[41916240625763]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 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":"NPB0108424-AF01","featured_media":{"alt":null,"id":23896323588195,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509914cf1023a67fcf06a2a4738b45b22956c304_cc9411ef-58fe-4cef-92f7-72390454db7b.webp?v=1714970263"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c26c045092bdb423aa6a60a2351318ce9a2615b_a4f9bb58-f8db-4608-97e5-4fa9cc1abfd3.webp?v=1714970255","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edcc2694010e3a209be9484e553da2709d486bc1_79ed26a9-36c8-477f-b088-c5982db13aa7.webp?v=1714970258","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f57606baaf1ce77c8fdfef59e6270a60bee7eaa1_ec469d16-7e47-4c53-beb9-0839742bdc55.webp?v=1714970260","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509914cf1023a67fcf06a2a4738b45b22956c304_cc9411ef-58fe-4cef-92f7-72390454db7b.webp?v=1714970263","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14457572329ac6ecf59f719b3d339955b3711602_69089fc4-42e5-4a1b-ad93-02e6e880d030.webp?v=1714970265","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/796f5eb8051ddeaa7917ac275ce06f029d0b39a0_f083dcc2-0cc7-48d3-b102-8228933cd6cf.webp?v=1714970268","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41c07c075575545e7578da658cd7f89c81494e6d_350c142e-e1bd-4122-b67a-4c6dcce2a85e.webp?v=1714970270","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a18e4b91249495bbf299c6fadfb938c7c359002_e1c5ea90-57c8-4f14-8a3a-c66e3af34471.webp?v=1714970273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0361093269823282e8cfdb75cc1da7d02599920_6f5f989a-0655-44b3-ab15-1e4a75d9e9d6.webp?v=1714970275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a4f4da6db489e65e66eb9f1d71797c6bfbfa4f1_387f6ea1-f4c8-46aa-bdd7-06aa72b27193.webp?v=1714970278"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c26c045092bdb423aa6a60a2351318ce9a2615b_a4f9bb58-f8db-4608-97e5-4fa9cc1abfd3.webp?v=1714970255","options":["color"],"media":[{"alt":null,"id":23896322015331,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c26c045092bdb423aa6a60a2351318ce9a2615b_a4f9bb58-f8db-4608-97e5-4fa9cc1abfd3.webp?v=1714970255"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c26c045092bdb423aa6a60a2351318ce9a2615b_a4f9bb58-f8db-4608-97e5-4fa9cc1abfd3.webp?v=1714970255","width":2000},{"alt":null,"id":23896322506851,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edcc2694010e3a209be9484e553da2709d486bc1_79ed26a9-36c8-477f-b088-c5982db13aa7.webp?v=1714970258"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edcc2694010e3a209be9484e553da2709d486bc1_79ed26a9-36c8-477f-b088-c5982db13aa7.webp?v=1714970258","width":2000},{"alt":null,"id":23896322998371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f57606baaf1ce77c8fdfef59e6270a60bee7eaa1_ec469d16-7e47-4c53-beb9-0839742bdc55.webp?v=1714970260"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f57606baaf1ce77c8fdfef59e6270a60bee7eaa1_ec469d16-7e47-4c53-beb9-0839742bdc55.webp?v=1714970260","width":2000},{"alt":null,"id":23896323588195,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509914cf1023a67fcf06a2a4738b45b22956c304_cc9411ef-58fe-4cef-92f7-72390454db7b.webp?v=1714970263"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509914cf1023a67fcf06a2a4738b45b22956c304_cc9411ef-58fe-4cef-92f7-72390454db7b.webp?v=1714970263","width":2000},{"alt":null,"id":23896323915875,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14457572329ac6ecf59f719b3d339955b3711602_69089fc4-42e5-4a1b-ad93-02e6e880d030.webp?v=1714970265"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14457572329ac6ecf59f719b3d339955b3711602_69089fc4-42e5-4a1b-ad93-02e6e880d030.webp?v=1714970265","width":2000},{"alt":null,"id":23896324538467,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/796f5eb8051ddeaa7917ac275ce06f029d0b39a0_f083dcc2-0cc7-48d3-b102-8228933cd6cf.webp?v=1714970268"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/796f5eb8051ddeaa7917ac275ce06f029d0b39a0_f083dcc2-0cc7-48d3-b102-8228933cd6cf.webp?v=1714970268","width":2000},{"alt":null,"id":23896324898915,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41c07c075575545e7578da658cd7f89c81494e6d_350c142e-e1bd-4122-b67a-4c6dcce2a85e.webp?v=1714970270"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41c07c075575545e7578da658cd7f89c81494e6d_350c142e-e1bd-4122-b67a-4c6dcce2a85e.webp?v=1714970270","width":2000},{"alt":null,"id":23896326078563,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a18e4b91249495bbf299c6fadfb938c7c359002_e1c5ea90-57c8-4f14-8a3a-c66e3af34471.webp?v=1714970273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a18e4b91249495bbf299c6fadfb938c7c359002_e1c5ea90-57c8-4f14-8a3a-c66e3af34471.webp?v=1714970273","width":2000},{"alt":null,"id":23896326439011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0361093269823282e8cfdb75cc1da7d02599920_6f5f989a-0655-44b3-ab15-1e4a75d9e9d6.webp?v=1714970275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0361093269823282e8cfdb75cc1da7d02599920_6f5f989a-0655-44b3-ab15-1e4a75d9e9d6.webp?v=1714970275","width":2000},{"alt":null,"id":23896326996067,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a4f4da6db489e65e66eb9f1d71797c6bfbfa4f1_387f6ea1-f4c8-46aa-bdd7-06aa72b27193.webp?v=1714970278"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a4f4da6db489e65e66eb9f1d71797c6bfbfa4f1_387f6ea1-f4c8-46aa-bdd7-06aa72b27193.webp?v=1714970278","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41916240625763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490916515939,"product_id":7415987535971,"position":4,"created_at":"2024-05-06T12:37:43+08:00","updated_at":"2024-05-06T12:37:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509914cf1023a67fcf06a2a4738b45b22956c304_cc9411ef-58fe-4cef-92f7-72390454db7b.webp?v=1714970263","variant_ids":[41916240625763]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 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":"NPB0108424-AF01","featured_media":{"alt":null,"id":23896323588195,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509914cf1023a67fcf06a2a4738b45b22956c304_cc9411ef-58fe-4cef-92f7-72390454db7b.webp?v=1714970263"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916240625763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490916515939,"product_id":7415987535971,"position":4,"created_at":"2024-05-06T12:37:43+08:00","updated_at":"2024-05-06T12:37:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509914cf1023a67fcf06a2a4738b45b22956c304_cc9411ef-58fe-4cef-92f7-72390454db7b.webp?v=1714970263","variant_ids":[41916240625763]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 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":"NPB0108424-AF01","featured_media":{"alt":null,"id":23896323588195,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509914cf1023a67fcf06a2a4738b45b22956c304_cc9411ef-58fe-4cef-92f7-72390454db7b.webp?v=1714970263"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }