$product = {"id":7408566370403,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 絕地武士-光劍系列","handle":"iphone-12-mini-mod-nx-printable-pb71","description":null,"published_at":"2024-06-11T16:40:54+08:00","created_at":"2024-05-03T15:52:27+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41886937284707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB71","requires_shipping":true,"taxable":true,"featured_image":{"id":31472605888611,"product_id":7408566370403,"position":1,"created_at":"2024-05-03T15:52:29+08:00","updated_at":"2024-05-03T15:52:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9483282648c7cc1b47b6e0cbaa8d02d4d3f061be_9631028a-e87c-4719-8a8f-06bb46981910.webp?v=1714722749","variant_ids":[41886937284707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 絕地武士-光劍系列 - 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":"NPB0118424-PB71","featured_media":{"alt":null,"id":23877523538019,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9483282648c7cc1b47b6e0cbaa8d02d4d3f061be_9631028a-e87c-4719-8a8f-06bb46981910.webp?v=1714722749"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9483282648c7cc1b47b6e0cbaa8d02d4d3f061be_9631028a-e87c-4719-8a8f-06bb46981910.webp?v=1714722749","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e507b5c598b20512753cca9e2f5fcea80d8ec8f8_79bb7f63-3cea-4363-adeb-0dfce286a07f.webp?v=1714722751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f209b028f4ee9a72747f2638fefb571a6bde75e_d9bc0b05-2f00-4ead-b3fe-bc119d2151db.webp?v=1714722754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3003b2d41219245935e72e2ac0401b3749c52ae_1fd27582-165c-4e79-a571-ddee11b72ebd.webp?v=1714722756","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b3d01508410d2a17e3ef99df7ceba4df7d38da_ebc70821-e0f5-4c34-8c14-f4701656e58d.webp?v=1714722758","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d806d13d73b3bb9d725a36850c26819743703f42_6529cfb6-8ca5-407a-b62a-8f74fbc97d45.webp?v=1714722760","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/425d457b41d36bd6e6cc86eb5f2f849780682639_19a19ec7-46b4-4a6e-b183-31cf87b3862d.webp?v=1714722763","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f3678b803f63a672eecdd370d5d58a96b0b424_454e35ad-e8d6-4b0a-9285-f31e694496e3.webp?v=1714722765","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701debd59f271f2eef7c4d3a9dd13bbd5cc44cc5_4b1d09b1-4186-4444-a41e-3ce2d465232c.webp?v=1714722767","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83741ac9dec763f67ce3856a581a42e9f4a9c692_d09b5e18-5fdc-4344-965c-6f843b0ca291.webp?v=1714722770","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae997d2a102a8caf06ca04fb420637e798348608_278ca486-eb49-4a2c-8bb1-6c4e337cca32.webp?v=1714722772"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9483282648c7cc1b47b6e0cbaa8d02d4d3f061be_9631028a-e87c-4719-8a8f-06bb46981910.webp?v=1714722749","options":["color"],"media":[{"alt":null,"id":23877523538019,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9483282648c7cc1b47b6e0cbaa8d02d4d3f061be_9631028a-e87c-4719-8a8f-06bb46981910.webp?v=1714722749"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9483282648c7cc1b47b6e0cbaa8d02d4d3f061be_9631028a-e87c-4719-8a8f-06bb46981910.webp?v=1714722749","width":2000},{"alt":null,"id":23877524127843,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e507b5c598b20512753cca9e2f5fcea80d8ec8f8_79bb7f63-3cea-4363-adeb-0dfce286a07f.webp?v=1714722751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e507b5c598b20512753cca9e2f5fcea80d8ec8f8_79bb7f63-3cea-4363-adeb-0dfce286a07f.webp?v=1714722751","width":2000},{"alt":null,"id":23877524815971,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f209b028f4ee9a72747f2638fefb571a6bde75e_d9bc0b05-2f00-4ead-b3fe-bc119d2151db.webp?v=1714722754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f209b028f4ee9a72747f2638fefb571a6bde75e_d9bc0b05-2f00-4ead-b3fe-bc119d2151db.webp?v=1714722754","width":2000},{"alt":null,"id":23877525405795,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3003b2d41219245935e72e2ac0401b3749c52ae_1fd27582-165c-4e79-a571-ddee11b72ebd.webp?v=1714722756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3003b2d41219245935e72e2ac0401b3749c52ae_1fd27582-165c-4e79-a571-ddee11b72ebd.webp?v=1714722756","width":2000},{"alt":null,"id":23877526061155,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b3d01508410d2a17e3ef99df7ceba4df7d38da_ebc70821-e0f5-4c34-8c14-f4701656e58d.webp?v=1714722758"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b3d01508410d2a17e3ef99df7ceba4df7d38da_ebc70821-e0f5-4c34-8c14-f4701656e58d.webp?v=1714722758","width":2000},{"alt":null,"id":23877526749283,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d806d13d73b3bb9d725a36850c26819743703f42_6529cfb6-8ca5-407a-b62a-8f74fbc97d45.webp?v=1714722760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d806d13d73b3bb9d725a36850c26819743703f42_6529cfb6-8ca5-407a-b62a-8f74fbc97d45.webp?v=1714722760","width":2000},{"alt":null,"id":23877527339107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/425d457b41d36bd6e6cc86eb5f2f849780682639_19a19ec7-46b4-4a6e-b183-31cf87b3862d.webp?v=1714722763"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/425d457b41d36bd6e6cc86eb5f2f849780682639_19a19ec7-46b4-4a6e-b183-31cf87b3862d.webp?v=1714722763","width":2000},{"alt":null,"id":23877528027235,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f3678b803f63a672eecdd370d5d58a96b0b424_454e35ad-e8d6-4b0a-9285-f31e694496e3.webp?v=1714722765"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f3678b803f63a672eecdd370d5d58a96b0b424_454e35ad-e8d6-4b0a-9285-f31e694496e3.webp?v=1714722765","width":2000},{"alt":null,"id":23877528453219,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701debd59f271f2eef7c4d3a9dd13bbd5cc44cc5_4b1d09b1-4186-4444-a41e-3ce2d465232c.webp?v=1714722767"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701debd59f271f2eef7c4d3a9dd13bbd5cc44cc5_4b1d09b1-4186-4444-a41e-3ce2d465232c.webp?v=1714722767","width":2000},{"alt":null,"id":23877528879203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83741ac9dec763f67ce3856a581a42e9f4a9c692_d09b5e18-5fdc-4344-965c-6f843b0ca291.webp?v=1714722770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83741ac9dec763f67ce3856a581a42e9f4a9c692_d09b5e18-5fdc-4344-965c-6f843b0ca291.webp?v=1714722770","width":2000},{"alt":null,"id":23877529239651,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae997d2a102a8caf06ca04fb420637e798348608_278ca486-eb49-4a2c-8bb1-6c4e337cca32.webp?v=1714722772"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae997d2a102a8caf06ca04fb420637e798348608_278ca486-eb49-4a2c-8bb1-6c4e337cca32.webp?v=1714722772","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886937284707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB71","requires_shipping":true,"taxable":true,"featured_image":{"id":31472605888611,"product_id":7408566370403,"position":1,"created_at":"2024-05-03T15:52:29+08:00","updated_at":"2024-05-03T15:52:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9483282648c7cc1b47b6e0cbaa8d02d4d3f061be_9631028a-e87c-4719-8a8f-06bb46981910.webp?v=1714722749","variant_ids":[41886937284707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 絕地武士-光劍系列 - 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":"NPB0118424-PB71","featured_media":{"alt":null,"id":23877523538019,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9483282648c7cc1b47b6e0cbaa8d02d4d3f061be_9631028a-e87c-4719-8a8f-06bb46981910.webp?v=1714722749"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886937284707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB71","requires_shipping":true,"taxable":true,"featured_image":{"id":31472605888611,"product_id":7408566370403,"position":1,"created_at":"2024-05-03T15:52:29+08:00","updated_at":"2024-05-03T15:52:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9483282648c7cc1b47b6e0cbaa8d02d4d3f061be_9631028a-e87c-4719-8a8f-06bb46981910.webp?v=1714722749","variant_ids":[41886937284707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 絕地武士-光劍系列 - 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":"NPB0118424-PB71","featured_media":{"alt":null,"id":23877523538019,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9483282648c7cc1b47b6e0cbaa8d02d4d3f061be_9631028a-e87c-4719-8a8f-06bb46981910.webp?v=1714722749"}},"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: "停產" }