$product = {"id":7416071258211,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 願傷疤 有天開出花(亞馬遜雨林)","handle":"iphone-xs-max-mod-nx-printable-af01","description":null,"published_at":"2024-06-11T16:51:58+08:00","created_at":"2024-05-06T12:52:49+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":41917140631651,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491147038819,"product_id":7416071258211,"position":9,"created_at":"2024-05-06T12:53:11+08:00","updated_at":"2024-05-06T12:53:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbe402645b59fa15d1f4e762ce32881f1a84d42_519196c1-d354-4a14-870e-ea64dc388c5b.webp?v=1714971191","variant_ids":[41917140631651]},"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-AF01","featured_media":{"alt":null,"id":23896554471523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbe402645b59fa15d1f4e762ce32881f1a84d42_519196c1-d354-4a14-870e-ea64dc388c5b.webp?v=1714971191"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17725f802850b81c00891ed1c62968be97ee4339_ec320257-5416-41d2-9235-fdbdba19519c.webp?v=1714971171","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d019d191e7710996d6c6d89ec9bcc650f9a1fc2b_eb13bae3-dcc2-4e3b-a3f8-c1a94226fd86.webp?v=1714971174","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6639c24163b5026fdd30138e89b177dcc990abf0_6d58b809-3602-4898-9385-3548bfb87b11.webp?v=1714971177","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/761c7d89553b3fb0f41727be374a4216e28c8586_ee3815f8-3065-4986-b64c-4bd3c2ac3637.webp?v=1714971179","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/071245dab77fbf3a6641ccee1b94a32e937b1451_e5115866-bd5d-4873-b804-f33db5700aa5.webp?v=1714971181","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9703bb2394b5adf80871e9fe4d680b9a98c2136b_5990b3a2-8d47-4c5e-8709-f8b7b543999c.webp?v=1714971184","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18613b6d55ec078b85ffc0983ef537b649205ba2_236dfe0e-43df-4f45-aceb-d16e7c82fde6.webp?v=1714971186","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42938fd09772cae7a8da5b22a4994db801f3f691_37695263-1178-47e9-8d64-0c9e090aad3c.webp?v=1714971188","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbe402645b59fa15d1f4e762ce32881f1a84d42_519196c1-d354-4a14-870e-ea64dc388c5b.webp?v=1714971191","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21dbe1987a8375c9742657ef0c2e45ff7194c273_40c86538-bda7-41f3-b739-b76451c2a439.webp?v=1714971193"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17725f802850b81c00891ed1c62968be97ee4339_ec320257-5416-41d2-9235-fdbdba19519c.webp?v=1714971171","options":["color"],"media":[{"alt":null,"id":23896548769891,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17725f802850b81c00891ed1c62968be97ee4339_ec320257-5416-41d2-9235-fdbdba19519c.webp?v=1714971171"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17725f802850b81c00891ed1c62968be97ee4339_ec320257-5416-41d2-9235-fdbdba19519c.webp?v=1714971171","width":2000},{"alt":null,"id":23896549982307,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d019d191e7710996d6c6d89ec9bcc650f9a1fc2b_eb13bae3-dcc2-4e3b-a3f8-c1a94226fd86.webp?v=1714971174"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d019d191e7710996d6c6d89ec9bcc650f9a1fc2b_eb13bae3-dcc2-4e3b-a3f8-c1a94226fd86.webp?v=1714971174","width":2000},{"alt":null,"id":23896551030883,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6639c24163b5026fdd30138e89b177dcc990abf0_6d58b809-3602-4898-9385-3548bfb87b11.webp?v=1714971177"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6639c24163b5026fdd30138e89b177dcc990abf0_6d58b809-3602-4898-9385-3548bfb87b11.webp?v=1714971177","width":2000},{"alt":null,"id":23896551555171,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/761c7d89553b3fb0f41727be374a4216e28c8586_ee3815f8-3065-4986-b64c-4bd3c2ac3637.webp?v=1714971179"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/761c7d89553b3fb0f41727be374a4216e28c8586_ee3815f8-3065-4986-b64c-4bd3c2ac3637.webp?v=1714971179","width":2000},{"alt":null,"id":23896552013923,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/071245dab77fbf3a6641ccee1b94a32e937b1451_e5115866-bd5d-4873-b804-f33db5700aa5.webp?v=1714971181"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/071245dab77fbf3a6641ccee1b94a32e937b1451_e5115866-bd5d-4873-b804-f33db5700aa5.webp?v=1714971181","width":2000},{"alt":null,"id":23896552472675,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9703bb2394b5adf80871e9fe4d680b9a98c2136b_5990b3a2-8d47-4c5e-8709-f8b7b543999c.webp?v=1714971184"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9703bb2394b5adf80871e9fe4d680b9a98c2136b_5990b3a2-8d47-4c5e-8709-f8b7b543999c.webp?v=1714971184","width":2000},{"alt":null,"id":23896553095267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18613b6d55ec078b85ffc0983ef537b649205ba2_236dfe0e-43df-4f45-aceb-d16e7c82fde6.webp?v=1714971186"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18613b6d55ec078b85ffc0983ef537b649205ba2_236dfe0e-43df-4f45-aceb-d16e7c82fde6.webp?v=1714971186","width":2000},{"alt":null,"id":23896553717859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42938fd09772cae7a8da5b22a4994db801f3f691_37695263-1178-47e9-8d64-0c9e090aad3c.webp?v=1714971188"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42938fd09772cae7a8da5b22a4994db801f3f691_37695263-1178-47e9-8d64-0c9e090aad3c.webp?v=1714971188","width":2000},{"alt":null,"id":23896554471523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbe402645b59fa15d1f4e762ce32881f1a84d42_519196c1-d354-4a14-870e-ea64dc388c5b.webp?v=1714971191"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbe402645b59fa15d1f4e762ce32881f1a84d42_519196c1-d354-4a14-870e-ea64dc388c5b.webp?v=1714971191","width":2000},{"alt":null,"id":23896555356259,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21dbe1987a8375c9742657ef0c2e45ff7194c273_40c86538-bda7-41f3-b739-b76451c2a439.webp?v=1714971193"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21dbe1987a8375c9742657ef0c2e45ff7194c273_40c86538-bda7-41f3-b739-b76451c2a439.webp?v=1714971193","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41917140631651,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491147038819,"product_id":7416071258211,"position":9,"created_at":"2024-05-06T12:53:11+08:00","updated_at":"2024-05-06T12:53:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbe402645b59fa15d1f4e762ce32881f1a84d42_519196c1-d354-4a14-870e-ea64dc388c5b.webp?v=1714971191","variant_ids":[41917140631651]},"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-AF01","featured_media":{"alt":null,"id":23896554471523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbe402645b59fa15d1f4e762ce32881f1a84d42_519196c1-d354-4a14-870e-ea64dc388c5b.webp?v=1714971191"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917140631651,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491147038819,"product_id":7416071258211,"position":9,"created_at":"2024-05-06T12:53:11+08:00","updated_at":"2024-05-06T12:53:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbe402645b59fa15d1f4e762ce32881f1a84d42_519196c1-d354-4a14-870e-ea64dc388c5b.webp?v=1714971191","variant_ids":[41917140631651]},"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-AF01","featured_media":{"alt":null,"id":23896554471523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbe402645b59fa15d1f4e762ce32881f1a84d42_519196c1-d354-4a14-870e-ea64dc388c5b.webp?v=1714971191"}},"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: "停產" }