$product = {"id":7415965253731,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-BB8","handle":"iphone-xs-max-mod-nx-printable-pc04","description":null,"published_at":"2024-06-11T16:49:07+08:00","created_at":"2024-05-06T12:33:20+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":41916004171875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC04","requires_shipping":true,"taxable":true,"featured_image":{"id":31490856616035,"product_id":7415965253731,"position":9,"created_at":"2024-05-06T12:33:41+08:00","updated_at":"2024-05-06T12:33:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d5773a0163187b75a18a89efc4b58637d4772c_4c0f3534-b810-4d94-a0f2-24ccf39e9593.webp?v=1714970021","variant_ids":[41916004171875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-BB8 - 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-PC04","featured_media":{"alt":null,"id":23896263557219,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d5773a0163187b75a18a89efc4b58637d4772c_4c0f3534-b810-4d94-a0f2-24ccf39e9593.webp?v=1714970021"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/829e2a5b15545445d4d1173693ffc8cb30a971fc_f29b8a7b-bcc9-41f7-907e-975d8ea0ec72.webp?v=1714970002","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef8ac91a2e6bddbdd38465750aef51632049992e_456f6fa7-5b11-4c92-bffd-d69e3ec73420.webp?v=1714970004","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4136ad57efe46ce4386f8f49b1039ab9f7a8994_72c9950a-6b5b-41e0-960a-d8fdf7d705de.webp?v=1714970006","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd9a3985b0a8517b1c274e93b6909f74bc2d3b83_bdfadcea-29b7-45c3-bded-96dad8d59bb4.webp?v=1714970009","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d2e234d4f6febc24617e81499287f8727bc52b0_cc06b1f4-a34d-4e08-a44e-a640b8120fb9.webp?v=1714970011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0217e7cec1e51a6db94da7f5af270c6636e2d7e4_e8c552fa-598c-4dc3-a606-56b49a94e74b.webp?v=1714970013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8079c9e131f68b5258ceb812f617a5458b27b00_2dd9af4a-3d5e-4c26-bc42-3f5fa2417622.webp?v=1714970016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b34e3552c89246f5cb53174d28e8975d526d19aa_2f1307ba-703b-438c-8841-82e972353ed1.webp?v=1714970018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d5773a0163187b75a18a89efc4b58637d4772c_4c0f3534-b810-4d94-a0f2-24ccf39e9593.webp?v=1714970021","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f52fac8721729a27eee00e7a15d950556f37db3_f3dacb6b-6983-47cb-8579-96039b6c7bf4.webp?v=1714970023"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/829e2a5b15545445d4d1173693ffc8cb30a971fc_f29b8a7b-bcc9-41f7-907e-975d8ea0ec72.webp?v=1714970002","options":["color"],"media":[{"alt":null,"id":23896258936931,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/829e2a5b15545445d4d1173693ffc8cb30a971fc_f29b8a7b-bcc9-41f7-907e-975d8ea0ec72.webp?v=1714970002"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/829e2a5b15545445d4d1173693ffc8cb30a971fc_f29b8a7b-bcc9-41f7-907e-975d8ea0ec72.webp?v=1714970002","width":2000},{"alt":null,"id":23896259559523,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef8ac91a2e6bddbdd38465750aef51632049992e_456f6fa7-5b11-4c92-bffd-d69e3ec73420.webp?v=1714970004"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef8ac91a2e6bddbdd38465750aef51632049992e_456f6fa7-5b11-4c92-bffd-d69e3ec73420.webp?v=1714970004","width":2000},{"alt":null,"id":23896259952739,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4136ad57efe46ce4386f8f49b1039ab9f7a8994_72c9950a-6b5b-41e0-960a-d8fdf7d705de.webp?v=1714970006"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4136ad57efe46ce4386f8f49b1039ab9f7a8994_72c9950a-6b5b-41e0-960a-d8fdf7d705de.webp?v=1714970006","width":2000},{"alt":null,"id":23896260542563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd9a3985b0a8517b1c274e93b6909f74bc2d3b83_bdfadcea-29b7-45c3-bded-96dad8d59bb4.webp?v=1714970009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd9a3985b0a8517b1c274e93b6909f74bc2d3b83_bdfadcea-29b7-45c3-bded-96dad8d59bb4.webp?v=1714970009","width":2000},{"alt":null,"id":23896260903011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d2e234d4f6febc24617e81499287f8727bc52b0_cc06b1f4-a34d-4e08-a44e-a640b8120fb9.webp?v=1714970011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d2e234d4f6febc24617e81499287f8727bc52b0_cc06b1f4-a34d-4e08-a44e-a640b8120fb9.webp?v=1714970011","width":2000},{"alt":null,"id":23896261787747,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0217e7cec1e51a6db94da7f5af270c6636e2d7e4_e8c552fa-598c-4dc3-a606-56b49a94e74b.webp?v=1714970013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0217e7cec1e51a6db94da7f5af270c6636e2d7e4_e8c552fa-598c-4dc3-a606-56b49a94e74b.webp?v=1714970013","width":2000},{"alt":null,"id":23896262312035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8079c9e131f68b5258ceb812f617a5458b27b00_2dd9af4a-3d5e-4c26-bc42-3f5fa2417622.webp?v=1714970016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8079c9e131f68b5258ceb812f617a5458b27b00_2dd9af4a-3d5e-4c26-bc42-3f5fa2417622.webp?v=1714970016","width":2000},{"alt":null,"id":23896262803555,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b34e3552c89246f5cb53174d28e8975d526d19aa_2f1307ba-703b-438c-8841-82e972353ed1.webp?v=1714970018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b34e3552c89246f5cb53174d28e8975d526d19aa_2f1307ba-703b-438c-8841-82e972353ed1.webp?v=1714970018","width":2000},{"alt":null,"id":23896263557219,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d5773a0163187b75a18a89efc4b58637d4772c_4c0f3534-b810-4d94-a0f2-24ccf39e9593.webp?v=1714970021"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d5773a0163187b75a18a89efc4b58637d4772c_4c0f3534-b810-4d94-a0f2-24ccf39e9593.webp?v=1714970021","width":2000},{"alt":null,"id":23896264179811,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f52fac8721729a27eee00e7a15d950556f37db3_f3dacb6b-6983-47cb-8579-96039b6c7bf4.webp?v=1714970023"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f52fac8721729a27eee00e7a15d950556f37db3_f3dacb6b-6983-47cb-8579-96039b6c7bf4.webp?v=1714970023","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916004171875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC04","requires_shipping":true,"taxable":true,"featured_image":{"id":31490856616035,"product_id":7415965253731,"position":9,"created_at":"2024-05-06T12:33:41+08:00","updated_at":"2024-05-06T12:33:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d5773a0163187b75a18a89efc4b58637d4772c_4c0f3534-b810-4d94-a0f2-24ccf39e9593.webp?v=1714970021","variant_ids":[41916004171875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-BB8 - 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-PC04","featured_media":{"alt":null,"id":23896263557219,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d5773a0163187b75a18a89efc4b58637d4772c_4c0f3534-b810-4d94-a0f2-24ccf39e9593.webp?v=1714970021"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916004171875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC04","requires_shipping":true,"taxable":true,"featured_image":{"id":31490856616035,"product_id":7415965253731,"position":9,"created_at":"2024-05-06T12:33:41+08:00","updated_at":"2024-05-06T12:33:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d5773a0163187b75a18a89efc4b58637d4772c_4c0f3534-b810-4d94-a0f2-24ccf39e9593.webp?v=1714970021","variant_ids":[41916004171875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-BB8 - 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-PC04","featured_media":{"alt":null,"id":23896263557219,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93d5773a0163187b75a18a89efc4b58637d4772c_4c0f3534-b810-4d94-a0f2-24ccf39e9593.webp?v=1714970021"}},"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: "停產" }