$product = {"id":7415926816867,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Batman - 小丑女圖騰","handle":"iphone-xs-mod-nx-printable-sb17","description":null,"published_at":"2024-06-11T16:48:07+08:00","created_at":"2024-05-06T12:26:17+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone XS","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","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":41915603910755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-SB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31490755690595,"product_id":7415926816867,"position":5,"created_at":"2024-05-06T12:26:31+08:00","updated_at":"2024-05-06T12:26:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfcaed414a634d060433eae78ee98e7aa317f86_eedc46bc-88c1-4726-a042-346698584831.webp?v=1714969591","variant_ids":[41915603910755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Batman - 小丑女圖騰 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-SB17","featured_media":{"alt":null,"id":23896162500707,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfcaed414a634d060433eae78ee98e7aa317f86_eedc46bc-88c1-4726-a042-346698584831.webp?v=1714969591"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e97b4e50f773549e7b968050f7b5ea26ee01e3be_8d644990-b39f-4ebb-bf15-358fcd305db3.webp?v=1714969580","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4e2bd4b2548e2920813497f15c363b53872efbd_ddd0e60d-207f-46a4-9b60-5afce92eea4c.webp?v=1714969583","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1527eeaafd249f75f5a23a96f4457430064473fa_03690ad9-472d-4610-a765-38ff6ffcf169.webp?v=1714969585","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c62babeedbc99f176bff78d9505d6ca19c01c5_583f44a0-05fa-4653-b75d-44883127ad4b.webp?v=1714969588","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfcaed414a634d060433eae78ee98e7aa317f86_eedc46bc-88c1-4726-a042-346698584831.webp?v=1714969591","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb395ccaf3fd70e3f3aabcae1853d9a07d39f_8e10c865-abb4-427d-a0ce-0edcc0cb967d.webp?v=1714969593","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d655e25081e13f084af2a4bdecf002112df045cf_0b5e7ae3-7cbc-4cc3-b2f8-e856c47ff940.webp?v=1714969595","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/667887694c4c4d6f276090ab9c3f7e8628d30ddf_b3aa518a-78e9-4625-bbb3-0f1d34f560c5.webp?v=1714969598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c8f6dbcd25b108fd81aa918f88af8ed741af528_9123ac47-9465-472b-8cff-f59306208bdd.webp?v=1714969601","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96530e8935969518a07169a5b15e3d6178d7abd5_4caa27ac-a6a0-4bec-ac70-021ff2a11137.webp?v=1714969604"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e97b4e50f773549e7b968050f7b5ea26ee01e3be_8d644990-b39f-4ebb-bf15-358fcd305db3.webp?v=1714969580","options":["color"],"media":[{"alt":null,"id":23896160403555,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e97b4e50f773549e7b968050f7b5ea26ee01e3be_8d644990-b39f-4ebb-bf15-358fcd305db3.webp?v=1714969580"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e97b4e50f773549e7b968050f7b5ea26ee01e3be_8d644990-b39f-4ebb-bf15-358fcd305db3.webp?v=1714969580","width":2000},{"alt":null,"id":23896161091683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4e2bd4b2548e2920813497f15c363b53872efbd_ddd0e60d-207f-46a4-9b60-5afce92eea4c.webp?v=1714969583"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4e2bd4b2548e2920813497f15c363b53872efbd_ddd0e60d-207f-46a4-9b60-5afce92eea4c.webp?v=1714969583","width":2000},{"alt":null,"id":23896161517667,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1527eeaafd249f75f5a23a96f4457430064473fa_03690ad9-472d-4610-a765-38ff6ffcf169.webp?v=1714969585"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1527eeaafd249f75f5a23a96f4457430064473fa_03690ad9-472d-4610-a765-38ff6ffcf169.webp?v=1714969585","width":2000},{"alt":null,"id":23896162140259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c62babeedbc99f176bff78d9505d6ca19c01c5_583f44a0-05fa-4653-b75d-44883127ad4b.webp?v=1714969588"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c62babeedbc99f176bff78d9505d6ca19c01c5_583f44a0-05fa-4653-b75d-44883127ad4b.webp?v=1714969588","width":2000},{"alt":null,"id":23896162500707,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfcaed414a634d060433eae78ee98e7aa317f86_eedc46bc-88c1-4726-a042-346698584831.webp?v=1714969591"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfcaed414a634d060433eae78ee98e7aa317f86_eedc46bc-88c1-4726-a042-346698584831.webp?v=1714969591","width":2000},{"alt":null,"id":23896163450979,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb395ccaf3fd70e3f3aabcae1853d9a07d39f_8e10c865-abb4-427d-a0ce-0edcc0cb967d.webp?v=1714969593"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb395ccaf3fd70e3f3aabcae1853d9a07d39f_8e10c865-abb4-427d-a0ce-0edcc0cb967d.webp?v=1714969593","width":2000},{"alt":null,"id":23896163942499,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d655e25081e13f084af2a4bdecf002112df045cf_0b5e7ae3-7cbc-4cc3-b2f8-e856c47ff940.webp?v=1714969595"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d655e25081e13f084af2a4bdecf002112df045cf_0b5e7ae3-7cbc-4cc3-b2f8-e856c47ff940.webp?v=1714969595","width":2000},{"alt":null,"id":23896164630627,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/667887694c4c4d6f276090ab9c3f7e8628d30ddf_b3aa518a-78e9-4625-bbb3-0f1d34f560c5.webp?v=1714969598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/667887694c4c4d6f276090ab9c3f7e8628d30ddf_b3aa518a-78e9-4625-bbb3-0f1d34f560c5.webp?v=1714969598","width":2000},{"alt":null,"id":23896165253219,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c8f6dbcd25b108fd81aa918f88af8ed741af528_9123ac47-9465-472b-8cff-f59306208bdd.webp?v=1714969601"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c8f6dbcd25b108fd81aa918f88af8ed741af528_9123ac47-9465-472b-8cff-f59306208bdd.webp?v=1714969601","width":2000},{"alt":null,"id":23896166006883,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96530e8935969518a07169a5b15e3d6178d7abd5_4caa27ac-a6a0-4bec-ac70-021ff2a11137.webp?v=1714969604"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96530e8935969518a07169a5b15e3d6178d7abd5_4caa27ac-a6a0-4bec-ac70-021ff2a11137.webp?v=1714969604","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915603910755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-SB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31490755690595,"product_id":7415926816867,"position":5,"created_at":"2024-05-06T12:26:31+08:00","updated_at":"2024-05-06T12:26:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfcaed414a634d060433eae78ee98e7aa317f86_eedc46bc-88c1-4726-a042-346698584831.webp?v=1714969591","variant_ids":[41915603910755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Batman - 小丑女圖騰 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-SB17","featured_media":{"alt":null,"id":23896162500707,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfcaed414a634d060433eae78ee98e7aa317f86_eedc46bc-88c1-4726-a042-346698584831.webp?v=1714969591"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915603910755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-SB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31490755690595,"product_id":7415926816867,"position":5,"created_at":"2024-05-06T12:26:31+08:00","updated_at":"2024-05-06T12:26:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfcaed414a634d060433eae78ee98e7aa317f86_eedc46bc-88c1-4726-a042-346698584831.webp?v=1714969591","variant_ids":[41915603910755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Batman - 小丑女圖騰 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-SB17","featured_media":{"alt":null,"id":23896162500707,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfcaed414a634d060433eae78ee98e7aa317f86_eedc46bc-88c1-4726-a042-346698584831.webp?v=1714969591"}},"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: "停產" }