$product = {"id":7415886053475,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 1G - G本款","handle":"iphone-xs-max-mod-nx-printable-iv07","description":null,"published_at":"2024-06-11T16:47:03+08:00","created_at":"2024-05-06T12:18:20+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-1chun","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":41915197620323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490654437475,"product_id":7415886053475,"position":2,"created_at":"2024-05-06T12:18:25+08:00","updated_at":"2024-05-06T12:18:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea8bfe959d73276e27e6480c1305a8722221ef82_e47b2f60-9e50-4d94-88b0-f467365bab2a.webp?v=1714969105","variant_ids":[41915197620323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 1G - G本款 - 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-IV07","featured_media":{"alt":null,"id":23896060952675,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea8bfe959d73276e27e6480c1305a8722221ef82_e47b2f60-9e50-4d94-88b0-f467365bab2a.webp?v=1714969105"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11904d01e9aab6522f912b905e6882e9741dd373_5219ce68-2478-4743-b0da-cac47f72cfa5.webp?v=1714969103","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea8bfe959d73276e27e6480c1305a8722221ef82_e47b2f60-9e50-4d94-88b0-f467365bab2a.webp?v=1714969105","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef2d02c7a19ca46481772d42ca93946625603be9_8c4af5af-9d29-424a-a09d-dad1b2852601.webp?v=1714969109","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9d60b183f28440c44903a18d349d97086366478_f90e99c3-5cf8-4983-a490-d09bb6c968d5.webp?v=1714969111","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a22b1b3a69285f8d10bb7597fa43d10fdf29b79_3de92a33-fd8a-4936-8686-6a22b9db746d.webp?v=1714969114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/638cb2ea6a6bbc967b76e1c8662926b59f17f3cb_5494078e-f66a-42b0-9f17-db30698bb9f4.webp?v=1714969116","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bad0261ee12274937a38accd2e198e06ff335cff_8f369c51-e630-4ea6-815c-6ad997589add.webp?v=1714969118","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55096872f1259c071d6b61cc014185e8c927b3d6_1fc8d2cc-7dbe-44d6-bdf4-91e5e1d24c9a.webp?v=1714969121","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/075233d3d73aa920f4d3dcc1b65b2996762b99c0_869e8813-293f-444e-a424-d570a9884690.webp?v=1714969123","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/409b57a70497bd6f32b9c82364e0dddcd14405c5_27b8a34c-954f-4c65-9434-338ccf36d67f.webp?v=1714969126"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11904d01e9aab6522f912b905e6882e9741dd373_5219ce68-2478-4743-b0da-cac47f72cfa5.webp?v=1714969103","options":["color"],"media":[{"alt":null,"id":23896060559459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11904d01e9aab6522f912b905e6882e9741dd373_5219ce68-2478-4743-b0da-cac47f72cfa5.webp?v=1714969103"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11904d01e9aab6522f912b905e6882e9741dd373_5219ce68-2478-4743-b0da-cac47f72cfa5.webp?v=1714969103","width":2000},{"alt":null,"id":23896060952675,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea8bfe959d73276e27e6480c1305a8722221ef82_e47b2f60-9e50-4d94-88b0-f467365bab2a.webp?v=1714969105"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea8bfe959d73276e27e6480c1305a8722221ef82_e47b2f60-9e50-4d94-88b0-f467365bab2a.webp?v=1714969105","width":2000},{"alt":null,"id":23896061837411,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef2d02c7a19ca46481772d42ca93946625603be9_8c4af5af-9d29-424a-a09d-dad1b2852601.webp?v=1714969109"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef2d02c7a19ca46481772d42ca93946625603be9_8c4af5af-9d29-424a-a09d-dad1b2852601.webp?v=1714969109","width":2000},{"alt":null,"id":23896062328931,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9d60b183f28440c44903a18d349d97086366478_f90e99c3-5cf8-4983-a490-d09bb6c968d5.webp?v=1714969111"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9d60b183f28440c44903a18d349d97086366478_f90e99c3-5cf8-4983-a490-d09bb6c968d5.webp?v=1714969111","width":2000},{"alt":null,"id":23896062885987,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a22b1b3a69285f8d10bb7597fa43d10fdf29b79_3de92a33-fd8a-4936-8686-6a22b9db746d.webp?v=1714969114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a22b1b3a69285f8d10bb7597fa43d10fdf29b79_3de92a33-fd8a-4936-8686-6a22b9db746d.webp?v=1714969114","width":2000},{"alt":null,"id":23896063311971,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/638cb2ea6a6bbc967b76e1c8662926b59f17f3cb_5494078e-f66a-42b0-9f17-db30698bb9f4.webp?v=1714969116"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/638cb2ea6a6bbc967b76e1c8662926b59f17f3cb_5494078e-f66a-42b0-9f17-db30698bb9f4.webp?v=1714969116","width":2000},{"alt":null,"id":23896063836259,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bad0261ee12274937a38accd2e198e06ff335cff_8f369c51-e630-4ea6-815c-6ad997589add.webp?v=1714969118"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bad0261ee12274937a38accd2e198e06ff335cff_8f369c51-e630-4ea6-815c-6ad997589add.webp?v=1714969118","width":2000},{"alt":null,"id":23896064295011,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55096872f1259c071d6b61cc014185e8c927b3d6_1fc8d2cc-7dbe-44d6-bdf4-91e5e1d24c9a.webp?v=1714969121"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55096872f1259c071d6b61cc014185e8c927b3d6_1fc8d2cc-7dbe-44d6-bdf4-91e5e1d24c9a.webp?v=1714969121","width":2000},{"alt":null,"id":23896064852067,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/075233d3d73aa920f4d3dcc1b65b2996762b99c0_869e8813-293f-444e-a424-d570a9884690.webp?v=1714969123"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/075233d3d73aa920f4d3dcc1b65b2996762b99c0_869e8813-293f-444e-a424-d570a9884690.webp?v=1714969123","width":2000},{"alt":null,"id":23896065278051,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/409b57a70497bd6f32b9c82364e0dddcd14405c5_27b8a34c-954f-4c65-9434-338ccf36d67f.webp?v=1714969126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/409b57a70497bd6f32b9c82364e0dddcd14405c5_27b8a34c-954f-4c65-9434-338ccf36d67f.webp?v=1714969126","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915197620323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490654437475,"product_id":7415886053475,"position":2,"created_at":"2024-05-06T12:18:25+08:00","updated_at":"2024-05-06T12:18:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea8bfe959d73276e27e6480c1305a8722221ef82_e47b2f60-9e50-4d94-88b0-f467365bab2a.webp?v=1714969105","variant_ids":[41915197620323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 1G - G本款 - 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-IV07","featured_media":{"alt":null,"id":23896060952675,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea8bfe959d73276e27e6480c1305a8722221ef82_e47b2f60-9e50-4d94-88b0-f467365bab2a.webp?v=1714969105"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915197620323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490654437475,"product_id":7415886053475,"position":2,"created_at":"2024-05-06T12:18:25+08:00","updated_at":"2024-05-06T12:18:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea8bfe959d73276e27e6480c1305a8722221ef82_e47b2f60-9e50-4d94-88b0-f467365bab2a.webp?v=1714969105","variant_ids":[41915197620323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 1G - G本款 - 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-IV07","featured_media":{"alt":null,"id":23896060952675,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea8bfe959d73276e27e6480c1305a8722221ef82_e47b2f60-9e50-4d94-88b0-f467365bab2a.webp?v=1714969105"}},"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: "停產" }