$product = {"id":7408408526947,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy","handle":"iphone-12-mini-mod-nx-printable-pb59","description":null,"published_at":"2024-06-11T16:36:25+08:00","created_at":"2024-05-03T15:20:47+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":41885152804963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31472190488675,"product_id":7408408526947,"position":3,"created_at":"2024-05-03T15:20:54+08:00","updated_at":"2024-05-03T15:20:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147d4d00c855d2476f4ad147b323f209cff5ab8a_fe06333a-5f75-4de5-bdf9-4c094894cbc2.webp?v=1714720854","variant_ids":[41885152804963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23877106303075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147d4d00c855d2476f4ad147b323f209cff5ab8a_fe06333a-5f75-4de5-bdf9-4c094894cbc2.webp?v=1714720854"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d55594b5fbda11743f510a8a59db20352f59d3e4_6a905002-a54d-4b59-9d0c-4c1889c991e8.webp?v=1714720849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24214a6d7d674e6df7aa192c39f7f3e7803ad67a_0d6243a6-3632-4a76-99aa-5b92dc0a538b.webp?v=1714720852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147d4d00c855d2476f4ad147b323f209cff5ab8a_fe06333a-5f75-4de5-bdf9-4c094894cbc2.webp?v=1714720854","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fca9e002b185b8b54025348687cca157a82a23f8_35b7ec55-a687-4a41-8f54-77edccfc1bf4.webp?v=1714720856","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb2624a20663629a833dabed95bdf45fd9d8ca84_61be3ae9-d561-49eb-95c7-f5fc76483db6.webp?v=1714720859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcefef67815c40e745504cabf885ba31de24218d_5868e123-20bc-490d-b3b2-ac269fec1a63.webp?v=1714720861","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3a616139228a8d7aea6a618f0adbc9331d9356f_27d9cb58-cee8-4312-9fea-97ca5123e7b1.webp?v=1714720863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad2147d87fadc83ce2104e473721b54088b72e41_824a4329-37fc-4964-8fde-62ae44a785d4.webp?v=1714720866","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69dacd62716a3c5c2a23deb0ebbfe8fbc8c9e661_d1c32e96-108b-4277-930a-6dbac613be21.webp?v=1714720868","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd291a0bd0a682bf41c90fdea930248e46b817d5_2b85f1ff-cd9b-4868-bd7b-7403db0328e5.webp?v=1714720871","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9133c4024ec69a4134f5aa2b7914c6d0a4fea197_326031c6-bdbe-4d10-aa9e-366e37ed8229.webp?v=1714720873"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d55594b5fbda11743f510a8a59db20352f59d3e4_6a905002-a54d-4b59-9d0c-4c1889c991e8.webp?v=1714720849","options":["color"],"media":[{"alt":null,"id":23877104500835,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d55594b5fbda11743f510a8a59db20352f59d3e4_6a905002-a54d-4b59-9d0c-4c1889c991e8.webp?v=1714720849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d55594b5fbda11743f510a8a59db20352f59d3e4_6a905002-a54d-4b59-9d0c-4c1889c991e8.webp?v=1714720849","width":2000},{"alt":null,"id":23877105352803,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24214a6d7d674e6df7aa192c39f7f3e7803ad67a_0d6243a6-3632-4a76-99aa-5b92dc0a538b.webp?v=1714720852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24214a6d7d674e6df7aa192c39f7f3e7803ad67a_0d6243a6-3632-4a76-99aa-5b92dc0a538b.webp?v=1714720852","width":2000},{"alt":null,"id":23877106303075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147d4d00c855d2476f4ad147b323f209cff5ab8a_fe06333a-5f75-4de5-bdf9-4c094894cbc2.webp?v=1714720854"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147d4d00c855d2476f4ad147b323f209cff5ab8a_fe06333a-5f75-4de5-bdf9-4c094894cbc2.webp?v=1714720854","width":2000},{"alt":null,"id":23877107220579,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fca9e002b185b8b54025348687cca157a82a23f8_35b7ec55-a687-4a41-8f54-77edccfc1bf4.webp?v=1714720856"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fca9e002b185b8b54025348687cca157a82a23f8_35b7ec55-a687-4a41-8f54-77edccfc1bf4.webp?v=1714720856","width":2000},{"alt":null,"id":23877108727907,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb2624a20663629a833dabed95bdf45fd9d8ca84_61be3ae9-d561-49eb-95c7-f5fc76483db6.webp?v=1714720859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb2624a20663629a833dabed95bdf45fd9d8ca84_61be3ae9-d561-49eb-95c7-f5fc76483db6.webp?v=1714720859","width":2000},{"alt":null,"id":23877109383267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcefef67815c40e745504cabf885ba31de24218d_5868e123-20bc-490d-b3b2-ac269fec1a63.webp?v=1714720861"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcefef67815c40e745504cabf885ba31de24218d_5868e123-20bc-490d-b3b2-ac269fec1a63.webp?v=1714720861","width":2000},{"alt":null,"id":23877110333539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3a616139228a8d7aea6a618f0adbc9331d9356f_27d9cb58-cee8-4312-9fea-97ca5123e7b1.webp?v=1714720863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3a616139228a8d7aea6a618f0adbc9331d9356f_27d9cb58-cee8-4312-9fea-97ca5123e7b1.webp?v=1714720863","width":2000},{"alt":null,"id":23877111742563,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad2147d87fadc83ce2104e473721b54088b72e41_824a4329-37fc-4964-8fde-62ae44a785d4.webp?v=1714720866"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad2147d87fadc83ce2104e473721b54088b72e41_824a4329-37fc-4964-8fde-62ae44a785d4.webp?v=1714720866","width":2000},{"alt":null,"id":23877112528995,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69dacd62716a3c5c2a23deb0ebbfe8fbc8c9e661_d1c32e96-108b-4277-930a-6dbac613be21.webp?v=1714720868"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69dacd62716a3c5c2a23deb0ebbfe8fbc8c9e661_d1c32e96-108b-4277-930a-6dbac613be21.webp?v=1714720868","width":2000},{"alt":null,"id":23877113086051,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd291a0bd0a682bf41c90fdea930248e46b817d5_2b85f1ff-cd9b-4868-bd7b-7403db0328e5.webp?v=1714720871"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd291a0bd0a682bf41c90fdea930248e46b817d5_2b85f1ff-cd9b-4868-bd7b-7403db0328e5.webp?v=1714720871","width":2000},{"alt":null,"id":23877113708643,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9133c4024ec69a4134f5aa2b7914c6d0a4fea197_326031c6-bdbe-4d10-aa9e-366e37ed8229.webp?v=1714720873"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9133c4024ec69a4134f5aa2b7914c6d0a4fea197_326031c6-bdbe-4d10-aa9e-366e37ed8229.webp?v=1714720873","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885152804963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31472190488675,"product_id":7408408526947,"position":3,"created_at":"2024-05-03T15:20:54+08:00","updated_at":"2024-05-03T15:20:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147d4d00c855d2476f4ad147b323f209cff5ab8a_fe06333a-5f75-4de5-bdf9-4c094894cbc2.webp?v=1714720854","variant_ids":[41885152804963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23877106303075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147d4d00c855d2476f4ad147b323f209cff5ab8a_fe06333a-5f75-4de5-bdf9-4c094894cbc2.webp?v=1714720854"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885152804963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31472190488675,"product_id":7408408526947,"position":3,"created_at":"2024-05-03T15:20:54+08:00","updated_at":"2024-05-03T15:20:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147d4d00c855d2476f4ad147b323f209cff5ab8a_fe06333a-5f75-4de5-bdf9-4c094894cbc2.webp?v=1714720854","variant_ids":[41885152804963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23877106303075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147d4d00c855d2476f4ad147b323f209cff5ab8a_fe06333a-5f75-4de5-bdf9-4c094894cbc2.webp?v=1714720854"}},"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: "停產" }