$product = {"id":7416017518691,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-日文字系列","handle":"iphone-xs-max-mod-nx-printable-pb62","description":null,"published_at":"2024-06-11T16:50:31+08:00","created_at":"2024-05-06T12:43:03+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":41916552904803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB62","requires_shipping":true,"taxable":true,"featured_image":{"id":31491001024611,"product_id":7416017518691,"position":9,"created_at":"2024-05-06T12:43:26+08:00","updated_at":"2024-05-06T12:43:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/775367095689777dc948f0cac8dd42e3fcf7c5cd_1e209c2f-5fa8-4df9-9740-3fe5385a1fe5.webp?v=1714970606","variant_ids":[41916552904803]},"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-PB62","featured_media":{"alt":null,"id":23896408293475,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/775367095689777dc948f0cac8dd42e3fcf7c5cd_1e209c2f-5fa8-4df9-9740-3fe5385a1fe5.webp?v=1714970606"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9acf9ea37189da212d8156c170399e127c28193_1925be73-37df-4318-8879-8b69c8b1391c.webp?v=1714970585","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f5345871a27991f87007fde2e9a829c6912b6ab_49717a40-caa9-4142-a366-03b0d53b4477.webp?v=1714970588","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/307cf92bcce821a1abf50f22231227fff98e8f4f_b4697395-89f9-47d7-bc46-12bbcfbe06fc.webp?v=1714970592","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4f36fe977f1bfd5d0d6333fe4209cbc4305e28_566d6b6d-35d3-40c5-8f73-e7f0fe54413b.webp?v=1714970594","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdc7b46717846fa308b9cef2143d9651ad635d7e_e3e90f09-6c59-4253-95cc-2b15a42e19a2.webp?v=1714970597","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d285815f89a0f8e0c649ea3f87143a5e8d7d526_62c9ffc7-c2f1-4328-bfd8-268aa8aad0a1.webp?v=1714970599","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/225f813189f75b8ed97ef1a7b74dac7d1991f9fb_9ab7ab3f-9c7d-40c2-bb46-6d290f03cc46.webp?v=1714970602","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f918d28d87722bffc479b30866795bba44ce6_3301796c-bacd-4074-a0b5-d17db39c0636.webp?v=1714970604","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/775367095689777dc948f0cac8dd42e3fcf7c5cd_1e209c2f-5fa8-4df9-9740-3fe5385a1fe5.webp?v=1714970606"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9acf9ea37189da212d8156c170399e127c28193_1925be73-37df-4318-8879-8b69c8b1391c.webp?v=1714970585","options":["color"],"media":[{"alt":null,"id":23896403771491,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9acf9ea37189da212d8156c170399e127c28193_1925be73-37df-4318-8879-8b69c8b1391c.webp?v=1714970585"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9acf9ea37189da212d8156c170399e127c28193_1925be73-37df-4318-8879-8b69c8b1391c.webp?v=1714970585","width":2000},{"alt":null,"id":23896404394083,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f5345871a27991f87007fde2e9a829c6912b6ab_49717a40-caa9-4142-a366-03b0d53b4477.webp?v=1714970588"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f5345871a27991f87007fde2e9a829c6912b6ab_49717a40-caa9-4142-a366-03b0d53b4477.webp?v=1714970588","width":2000},{"alt":null,"id":23896405180515,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/307cf92bcce821a1abf50f22231227fff98e8f4f_b4697395-89f9-47d7-bc46-12bbcfbe06fc.webp?v=1714970592"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/307cf92bcce821a1abf50f22231227fff98e8f4f_b4697395-89f9-47d7-bc46-12bbcfbe06fc.webp?v=1714970592","width":2000},{"alt":null,"id":23896406032483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4f36fe977f1bfd5d0d6333fe4209cbc4305e28_566d6b6d-35d3-40c5-8f73-e7f0fe54413b.webp?v=1714970594"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4f36fe977f1bfd5d0d6333fe4209cbc4305e28_566d6b6d-35d3-40c5-8f73-e7f0fe54413b.webp?v=1714970594","width":2000},{"alt":null,"id":23896406392931,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdc7b46717846fa308b9cef2143d9651ad635d7e_e3e90f09-6c59-4253-95cc-2b15a42e19a2.webp?v=1714970597"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdc7b46717846fa308b9cef2143d9651ad635d7e_e3e90f09-6c59-4253-95cc-2b15a42e19a2.webp?v=1714970597","width":2000},{"alt":null,"id":23896406917219,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d285815f89a0f8e0c649ea3f87143a5e8d7d526_62c9ffc7-c2f1-4328-bfd8-268aa8aad0a1.webp?v=1714970599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d285815f89a0f8e0c649ea3f87143a5e8d7d526_62c9ffc7-c2f1-4328-bfd8-268aa8aad0a1.webp?v=1714970599","width":2000},{"alt":null,"id":23896407375971,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/225f813189f75b8ed97ef1a7b74dac7d1991f9fb_9ab7ab3f-9c7d-40c2-bb46-6d290f03cc46.webp?v=1714970602"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/225f813189f75b8ed97ef1a7b74dac7d1991f9fb_9ab7ab3f-9c7d-40c2-bb46-6d290f03cc46.webp?v=1714970602","width":2000},{"alt":null,"id":23896407801955,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f918d28d87722bffc479b30866795bba44ce6_3301796c-bacd-4074-a0b5-d17db39c0636.webp?v=1714970604"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f918d28d87722bffc479b30866795bba44ce6_3301796c-bacd-4074-a0b5-d17db39c0636.webp?v=1714970604","width":2000},{"alt":null,"id":23896408293475,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/775367095689777dc948f0cac8dd42e3fcf7c5cd_1e209c2f-5fa8-4df9-9740-3fe5385a1fe5.webp?v=1714970606"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/775367095689777dc948f0cac8dd42e3fcf7c5cd_1e209c2f-5fa8-4df9-9740-3fe5385a1fe5.webp?v=1714970606","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916552904803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB62","requires_shipping":true,"taxable":true,"featured_image":{"id":31491001024611,"product_id":7416017518691,"position":9,"created_at":"2024-05-06T12:43:26+08:00","updated_at":"2024-05-06T12:43:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/775367095689777dc948f0cac8dd42e3fcf7c5cd_1e209c2f-5fa8-4df9-9740-3fe5385a1fe5.webp?v=1714970606","variant_ids":[41916552904803]},"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-PB62","featured_media":{"alt":null,"id":23896408293475,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/775367095689777dc948f0cac8dd42e3fcf7c5cd_1e209c2f-5fa8-4df9-9740-3fe5385a1fe5.webp?v=1714970606"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916552904803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB62","requires_shipping":true,"taxable":true,"featured_image":{"id":31491001024611,"product_id":7416017518691,"position":9,"created_at":"2024-05-06T12:43:26+08:00","updated_at":"2024-05-06T12:43:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/775367095689777dc948f0cac8dd42e3fcf7c5cd_1e209c2f-5fa8-4df9-9740-3fe5385a1fe5.webp?v=1714970606","variant_ids":[41916552904803]},"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-PB62","featured_media":{"alt":null,"id":23896408293475,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/775367095689777dc948f0cac8dd42e3fcf7c5cd_1e209c2f-5fa8-4df9-9740-3fe5385a1fe5.webp?v=1714970606"}},"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: "停產" }