$product = {"id":7416067457123,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-大臉系列","handle":"iphone-xs-max-mod-nx-printable-pb78","description":null,"published_at":"2024-06-11T16:51:51+08:00","created_at":"2024-05-06T12:52:05+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 XS Max","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":41917092724835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB78","requires_shipping":true,"taxable":true,"featured_image":{"id":31491130818659,"product_id":7416067457123,"position":3,"created_at":"2024-05-06T12:52:13+08:00","updated_at":"2024-05-06T12:52:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/011d60a4302ffbb16369cd1a755beb31e3b80788_66275737-29aa-430e-b305-d6fcbe5ef863.webp?v=1714971133","variant_ids":[41917092724835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB78","featured_media":{"alt":null,"id":23896538316899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/011d60a4302ffbb16369cd1a755beb31e3b80788_66275737-29aa-430e-b305-d6fcbe5ef863.webp?v=1714971133"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdc9ec69907ef80dbdfdf7f5d0ed2421a4023bfd_3ac7b73a-3716-4184-a36b-9fb44df06e79.webp?v=1714971128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb7de238da9f67d424f188807efd5535fa754161_6a938263-1b97-4322-b3ef-85ba368240af.webp?v=1714971130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/011d60a4302ffbb16369cd1a755beb31e3b80788_66275737-29aa-430e-b305-d6fcbe5ef863.webp?v=1714971133","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40baceefe6ab966b9428b14194f25abb702dd10_b4effb04-503e-4148-bd28-9b401f03b806.webp?v=1714971135","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/783cd7f6e3cc597fb2cd5371cd0c7a56a5d643d2_98e7a105-3bd6-4f4e-85ba-29a30bf058d5.webp?v=1714971137","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afbc0b84cebee8d6c4dcd4a02c6233037b668eda_9048cf2b-d617-469d-8a24-84b676f39ba4.webp?v=1714971140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1de867df5d306cc164c8ff72ddb1da4181d919fa_9e966638-6262-4284-85ba-73b1e79a6c2c.webp?v=1714971142","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/636025453db03a3dda7b63f146c3b95833835753_04aef53e-8184-4e63-8a2d-b9c3c5f05f47.webp?v=1714971145","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e39690dded67ff32d313cee12bfe02f0930b03e3_cb92c73a-35c7-439c-aa9c-abf629b1a335.webp?v=1714971148","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e7f35a15835944cec84a6b44e1bbf37e37566c9_eac56bf1-8f4b-47b1-a33e-a58762b0ab67.webp?v=1714971150"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdc9ec69907ef80dbdfdf7f5d0ed2421a4023bfd_3ac7b73a-3716-4184-a36b-9fb44df06e79.webp?v=1714971128","options":["color"],"media":[{"alt":null,"id":23896537071715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdc9ec69907ef80dbdfdf7f5d0ed2421a4023bfd_3ac7b73a-3716-4184-a36b-9fb44df06e79.webp?v=1714971128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdc9ec69907ef80dbdfdf7f5d0ed2421a4023bfd_3ac7b73a-3716-4184-a36b-9fb44df06e79.webp?v=1714971128","width":2000},{"alt":null,"id":23896537694307,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb7de238da9f67d424f188807efd5535fa754161_6a938263-1b97-4322-b3ef-85ba368240af.webp?v=1714971130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb7de238da9f67d424f188807efd5535fa754161_6a938263-1b97-4322-b3ef-85ba368240af.webp?v=1714971130","width":2000},{"alt":null,"id":23896538316899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/011d60a4302ffbb16369cd1a755beb31e3b80788_66275737-29aa-430e-b305-d6fcbe5ef863.webp?v=1714971133"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/011d60a4302ffbb16369cd1a755beb31e3b80788_66275737-29aa-430e-b305-d6fcbe5ef863.webp?v=1714971133","width":2000},{"alt":null,"id":23896538808419,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40baceefe6ab966b9428b14194f25abb702dd10_b4effb04-503e-4148-bd28-9b401f03b806.webp?v=1714971135"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40baceefe6ab966b9428b14194f25abb702dd10_b4effb04-503e-4148-bd28-9b401f03b806.webp?v=1714971135","width":2000},{"alt":null,"id":23896539594851,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/783cd7f6e3cc597fb2cd5371cd0c7a56a5d643d2_98e7a105-3bd6-4f4e-85ba-29a30bf058d5.webp?v=1714971137"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/783cd7f6e3cc597fb2cd5371cd0c7a56a5d643d2_98e7a105-3bd6-4f4e-85ba-29a30bf058d5.webp?v=1714971137","width":2000},{"alt":null,"id":23896540053603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afbc0b84cebee8d6c4dcd4a02c6233037b668eda_9048cf2b-d617-469d-8a24-84b676f39ba4.webp?v=1714971140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afbc0b84cebee8d6c4dcd4a02c6233037b668eda_9048cf2b-d617-469d-8a24-84b676f39ba4.webp?v=1714971140","width":2000},{"alt":null,"id":23896540840035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1de867df5d306cc164c8ff72ddb1da4181d919fa_9e966638-6262-4284-85ba-73b1e79a6c2c.webp?v=1714971142"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1de867df5d306cc164c8ff72ddb1da4181d919fa_9e966638-6262-4284-85ba-73b1e79a6c2c.webp?v=1714971142","width":2000},{"alt":null,"id":23896541626467,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/636025453db03a3dda7b63f146c3b95833835753_04aef53e-8184-4e63-8a2d-b9c3c5f05f47.webp?v=1714971145"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/636025453db03a3dda7b63f146c3b95833835753_04aef53e-8184-4e63-8a2d-b9c3c5f05f47.webp?v=1714971145","width":2000},{"alt":null,"id":23896542478435,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e39690dded67ff32d313cee12bfe02f0930b03e3_cb92c73a-35c7-439c-aa9c-abf629b1a335.webp?v=1714971148"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e39690dded67ff32d313cee12bfe02f0930b03e3_cb92c73a-35c7-439c-aa9c-abf629b1a335.webp?v=1714971148","width":2000},{"alt":null,"id":23896543035491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e7f35a15835944cec84a6b44e1bbf37e37566c9_eac56bf1-8f4b-47b1-a33e-a58762b0ab67.webp?v=1714971150"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e7f35a15835944cec84a6b44e1bbf37e37566c9_eac56bf1-8f4b-47b1-a33e-a58762b0ab67.webp?v=1714971150","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41917092724835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB78","requires_shipping":true,"taxable":true,"featured_image":{"id":31491130818659,"product_id":7416067457123,"position":3,"created_at":"2024-05-06T12:52:13+08:00","updated_at":"2024-05-06T12:52:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/011d60a4302ffbb16369cd1a755beb31e3b80788_66275737-29aa-430e-b305-d6fcbe5ef863.webp?v=1714971133","variant_ids":[41917092724835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB78","featured_media":{"alt":null,"id":23896538316899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/011d60a4302ffbb16369cd1a755beb31e3b80788_66275737-29aa-430e-b305-d6fcbe5ef863.webp?v=1714971133"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917092724835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB78","requires_shipping":true,"taxable":true,"featured_image":{"id":31491130818659,"product_id":7416067457123,"position":3,"created_at":"2024-05-06T12:52:13+08:00","updated_at":"2024-05-06T12:52:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/011d60a4302ffbb16369cd1a755beb31e3b80788_66275737-29aa-430e-b305-d6fcbe5ef863.webp?v=1714971133","variant_ids":[41917092724835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB78","featured_media":{"alt":null,"id":23896538316899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/011d60a4302ffbb16369cd1a755beb31e3b80788_66275737-29aa-430e-b305-d6fcbe5ef863.webp?v=1714971133"}},"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: "停產" }