$product = {"id":7415882219619,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列","handle":"iphone-xs-max-mod-nx-printable-pb98","description":null,"published_at":"2024-06-11T16:46:57+08:00","created_at":"2024-05-06T12:17:30+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":41915157807203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31490647588963,"product_id":7415882219619,"position":7,"created_at":"2024-05-06T12:17:49+08:00","updated_at":"2024-05-06T12:17:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681f1047dc9a202c7df54a230ddeae22f9250006_e2987b0c-2902-4f5c-80fa-e2ad8512a6f3.webp?v=1714969069","variant_ids":[41915157807203]},"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-PB98","featured_media":{"alt":null,"id":23896054136931,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681f1047dc9a202c7df54a230ddeae22f9250006_e2987b0c-2902-4f5c-80fa-e2ad8512a6f3.webp?v=1714969069"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49b82d351aeac3e21cc7d71c1fb20c8f9623943e_ccdef7cf-6cd8-4593-a56d-e75dc1034d85.webp?v=1714969053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79205f5adc6a962113b6f00d94788bb8ff68deb5_63c7f9eb-2284-4bb6-b913-f9858ee8d2df.webp?v=1714969055","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0288730df6c7a4bb8a6c945a1f3f097e374b79d_d6321d4f-a27e-45da-9a6b-993c019d455c.webp?v=1714969058","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76b7faf30fdc5df86d1f9627393b11ecd0bc424e_79ff979e-50e9-43fc-8dca-00f0a4f0d0c9.webp?v=1714969060","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c6b788d5c1d40a6fe1b287d1b0277a6f4097b8e_d8d4ad4e-9759-435e-a62a-0efb88bf7d6a.webp?v=1714969063","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3ce9f3248589db37807a308ff8a6fa7f1d05c50_8eb0738e-6e06-480c-b7ce-efa74632b78c.webp?v=1714969065","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681f1047dc9a202c7df54a230ddeae22f9250006_e2987b0c-2902-4f5c-80fa-e2ad8512a6f3.webp?v=1714969069","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701ca76c9b8d0d89ad866ce3091e8cb7e212fe7e_d43db1b4-2d73-4dfd-9f86-fc96df228884.webp?v=1714969072","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a77bf202d317a38c5574744639570d174740861_100c011f-9767-4197-bf7d-e0998606a555.webp?v=1714969077"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49b82d351aeac3e21cc7d71c1fb20c8f9623943e_ccdef7cf-6cd8-4593-a56d-e75dc1034d85.webp?v=1714969053","options":["color"],"media":[{"alt":null,"id":23896050860131,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49b82d351aeac3e21cc7d71c1fb20c8f9623943e_ccdef7cf-6cd8-4593-a56d-e75dc1034d85.webp?v=1714969053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49b82d351aeac3e21cc7d71c1fb20c8f9623943e_ccdef7cf-6cd8-4593-a56d-e75dc1034d85.webp?v=1714969053","width":2000},{"alt":null,"id":23896051449955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79205f5adc6a962113b6f00d94788bb8ff68deb5_63c7f9eb-2284-4bb6-b913-f9858ee8d2df.webp?v=1714969055"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79205f5adc6a962113b6f00d94788bb8ff68deb5_63c7f9eb-2284-4bb6-b913-f9858ee8d2df.webp?v=1714969055","width":2000},{"alt":null,"id":23896052105315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0288730df6c7a4bb8a6c945a1f3f097e374b79d_d6321d4f-a27e-45da-9a6b-993c019d455c.webp?v=1714969058"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0288730df6c7a4bb8a6c945a1f3f097e374b79d_d6321d4f-a27e-45da-9a6b-993c019d455c.webp?v=1714969058","width":2000},{"alt":null,"id":23896052629603,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76b7faf30fdc5df86d1f9627393b11ecd0bc424e_79ff979e-50e9-43fc-8dca-00f0a4f0d0c9.webp?v=1714969060"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76b7faf30fdc5df86d1f9627393b11ecd0bc424e_79ff979e-50e9-43fc-8dca-00f0a4f0d0c9.webp?v=1714969060","width":2000},{"alt":null,"id":23896053088355,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c6b788d5c1d40a6fe1b287d1b0277a6f4097b8e_d8d4ad4e-9759-435e-a62a-0efb88bf7d6a.webp?v=1714969063"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c6b788d5c1d40a6fe1b287d1b0277a6f4097b8e_d8d4ad4e-9759-435e-a62a-0efb88bf7d6a.webp?v=1714969063","width":2000},{"alt":null,"id":23896053579875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3ce9f3248589db37807a308ff8a6fa7f1d05c50_8eb0738e-6e06-480c-b7ce-efa74632b78c.webp?v=1714969065"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3ce9f3248589db37807a308ff8a6fa7f1d05c50_8eb0738e-6e06-480c-b7ce-efa74632b78c.webp?v=1714969065","width":2000},{"alt":null,"id":23896054136931,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681f1047dc9a202c7df54a230ddeae22f9250006_e2987b0c-2902-4f5c-80fa-e2ad8512a6f3.webp?v=1714969069"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681f1047dc9a202c7df54a230ddeae22f9250006_e2987b0c-2902-4f5c-80fa-e2ad8512a6f3.webp?v=1714969069","width":2000},{"alt":null,"id":23896054628451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701ca76c9b8d0d89ad866ce3091e8cb7e212fe7e_d43db1b4-2d73-4dfd-9f86-fc96df228884.webp?v=1714969072"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701ca76c9b8d0d89ad866ce3091e8cb7e212fe7e_d43db1b4-2d73-4dfd-9f86-fc96df228884.webp?v=1714969072","width":2000},{"alt":null,"id":23896055873635,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a77bf202d317a38c5574744639570d174740861_100c011f-9767-4197-bf7d-e0998606a555.webp?v=1714969077"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a77bf202d317a38c5574744639570d174740861_100c011f-9767-4197-bf7d-e0998606a555.webp?v=1714969077","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915157807203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31490647588963,"product_id":7415882219619,"position":7,"created_at":"2024-05-06T12:17:49+08:00","updated_at":"2024-05-06T12:17:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681f1047dc9a202c7df54a230ddeae22f9250006_e2987b0c-2902-4f5c-80fa-e2ad8512a6f3.webp?v=1714969069","variant_ids":[41915157807203]},"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-PB98","featured_media":{"alt":null,"id":23896054136931,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681f1047dc9a202c7df54a230ddeae22f9250006_e2987b0c-2902-4f5c-80fa-e2ad8512a6f3.webp?v=1714969069"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915157807203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31490647588963,"product_id":7415882219619,"position":7,"created_at":"2024-05-06T12:17:49+08:00","updated_at":"2024-05-06T12:17:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681f1047dc9a202c7df54a230ddeae22f9250006_e2987b0c-2902-4f5c-80fa-e2ad8512a6f3.webp?v=1714969069","variant_ids":[41915157807203]},"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-PB98","featured_media":{"alt":null,"id":23896054136931,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681f1047dc9a202c7df54a230ddeae22f9250006_e2987b0c-2902-4f5c-80fa-e2ad8512a6f3.webp?v=1714969069"}},"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: "停產" }