$product = {"id":7415882612835,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 丘巴卡-中鋒-幽默系列","handle":"iphone-xs-max-mod-nx-printable-pc09","description":null,"published_at":"2024-06-11T16:46:58+08:00","created_at":"2024-05-06T12:17:35+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":41915160264803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490649981027,"product_id":7415882612835,"position":10,"created_at":"2024-05-06T12:17:59+08:00","updated_at":"2024-05-06T12:17:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d14f92f612210a1cf8b61bd22c60f189397e94_d028aeb2-5d33-4169-83d9-e95e1caeb950.webp?v=1714969079","variant_ids":[41915160264803]},"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-PC09","featured_media":{"alt":null,"id":23896056496227,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d14f92f612210a1cf8b61bd22c60f189397e94_d028aeb2-5d33-4169-83d9-e95e1caeb950.webp?v=1714969079"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea8101f7dedd2c35af32d88ab3c13757198a753_0d78ef56-39d0-4273-a579-c757fa17ee4c.webp?v=1714969058","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d3fad3fa41e273b4bedd2d3c4b92d806adc8815_2e782928-bb17-4765-ab1d-d33c578464e8.webp?v=1714969060","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8638bb4c612c02198b899526660b7ce07a27f18_ee53cd19-827d-41e4-a550-7314f1dad46d.webp?v=1714969062","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ee47066a975327dbffbe7afa61e9bcdc7001906_1430c31f-8c7c-4979-98e5-d7a1a531b8c7.webp?v=1714969065","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d55265c999ae925907d7595ee872f68a2544c209_37f74460-0f82-42fb-8b53-0bfdde6af7cb.webp?v=1714969067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/456299aa8dd378f52c1d81bfdc62c6ef5dcf8af6_75e156c6-61ac-4f70-8c6d-ae6c66f8ca03.webp?v=1714969070","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1969f8e8d7b0b4ada434bdbeda7527138cb53af_9bb9ebd5-c274-43c1-9fed-e2fc82ac2878.webp?v=1714969072","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd067551689edacf83328810bcd5ee95aca9625e_a9f94779-8bb6-436c-b16d-b1db58736efb.webp?v=1714969074","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/827f537150eb6809891876890d55e2cbf3722601_2b4653ad-5418-4a0d-aaa6-562f5bae0acd.webp?v=1714969077","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d14f92f612210a1cf8b61bd22c60f189397e94_d028aeb2-5d33-4169-83d9-e95e1caeb950.webp?v=1714969079"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea8101f7dedd2c35af32d88ab3c13757198a753_0d78ef56-39d0-4273-a579-c757fa17ee4c.webp?v=1714969058","options":["color"],"media":[{"alt":null,"id":23896052039779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea8101f7dedd2c35af32d88ab3c13757198a753_0d78ef56-39d0-4273-a579-c757fa17ee4c.webp?v=1714969058"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea8101f7dedd2c35af32d88ab3c13757198a753_0d78ef56-39d0-4273-a579-c757fa17ee4c.webp?v=1714969058","width":2000},{"alt":null,"id":23896052498531,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d3fad3fa41e273b4bedd2d3c4b92d806adc8815_2e782928-bb17-4765-ab1d-d33c578464e8.webp?v=1714969060"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d3fad3fa41e273b4bedd2d3c4b92d806adc8815_2e782928-bb17-4765-ab1d-d33c578464e8.webp?v=1714969060","width":2000},{"alt":null,"id":23896052990051,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8638bb4c612c02198b899526660b7ce07a27f18_ee53cd19-827d-41e4-a550-7314f1dad46d.webp?v=1714969062"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8638bb4c612c02198b899526660b7ce07a27f18_ee53cd19-827d-41e4-a550-7314f1dad46d.webp?v=1714969062","width":2000},{"alt":null,"id":23896053383267,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ee47066a975327dbffbe7afa61e9bcdc7001906_1430c31f-8c7c-4979-98e5-d7a1a531b8c7.webp?v=1714969065"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ee47066a975327dbffbe7afa61e9bcdc7001906_1430c31f-8c7c-4979-98e5-d7a1a531b8c7.webp?v=1714969065","width":2000},{"alt":null,"id":23896053809251,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d55265c999ae925907d7595ee872f68a2544c209_37f74460-0f82-42fb-8b53-0bfdde6af7cb.webp?v=1714969067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d55265c999ae925907d7595ee872f68a2544c209_37f74460-0f82-42fb-8b53-0bfdde6af7cb.webp?v=1714969067","width":2000},{"alt":null,"id":23896054366307,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/456299aa8dd378f52c1d81bfdc62c6ef5dcf8af6_75e156c6-61ac-4f70-8c6d-ae6c66f8ca03.webp?v=1714969070"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/456299aa8dd378f52c1d81bfdc62c6ef5dcf8af6_75e156c6-61ac-4f70-8c6d-ae6c66f8ca03.webp?v=1714969070","width":2000},{"alt":null,"id":23896054759523,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1969f8e8d7b0b4ada434bdbeda7527138cb53af_9bb9ebd5-c274-43c1-9fed-e2fc82ac2878.webp?v=1714969072"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1969f8e8d7b0b4ada434bdbeda7527138cb53af_9bb9ebd5-c274-43c1-9fed-e2fc82ac2878.webp?v=1714969072","width":2000},{"alt":null,"id":23896055218275,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd067551689edacf83328810bcd5ee95aca9625e_a9f94779-8bb6-436c-b16d-b1db58736efb.webp?v=1714969074"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd067551689edacf83328810bcd5ee95aca9625e_a9f94779-8bb6-436c-b16d-b1db58736efb.webp?v=1714969074","width":2000},{"alt":null,"id":23896055840867,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/827f537150eb6809891876890d55e2cbf3722601_2b4653ad-5418-4a0d-aaa6-562f5bae0acd.webp?v=1714969077"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/827f537150eb6809891876890d55e2cbf3722601_2b4653ad-5418-4a0d-aaa6-562f5bae0acd.webp?v=1714969077","width":2000},{"alt":null,"id":23896056496227,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d14f92f612210a1cf8b61bd22c60f189397e94_d028aeb2-5d33-4169-83d9-e95e1caeb950.webp?v=1714969079"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d14f92f612210a1cf8b61bd22c60f189397e94_d028aeb2-5d33-4169-83d9-e95e1caeb950.webp?v=1714969079","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915160264803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490649981027,"product_id":7415882612835,"position":10,"created_at":"2024-05-06T12:17:59+08:00","updated_at":"2024-05-06T12:17:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d14f92f612210a1cf8b61bd22c60f189397e94_d028aeb2-5d33-4169-83d9-e95e1caeb950.webp?v=1714969079","variant_ids":[41915160264803]},"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-PC09","featured_media":{"alt":null,"id":23896056496227,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d14f92f612210a1cf8b61bd22c60f189397e94_d028aeb2-5d33-4169-83d9-e95e1caeb950.webp?v=1714969079"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915160264803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490649981027,"product_id":7415882612835,"position":10,"created_at":"2024-05-06T12:17:59+08:00","updated_at":"2024-05-06T12:17:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d14f92f612210a1cf8b61bd22c60f189397e94_d028aeb2-5d33-4169-83d9-e95e1caeb950.webp?v=1714969079","variant_ids":[41915160264803]},"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-PC09","featured_media":{"alt":null,"id":23896056496227,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d14f92f612210a1cf8b61bd22c60f189397e94_d028aeb2-5d33-4169-83d9-e95e1caeb950.webp?v=1714969079"}},"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: "停產" }