$product = {"id":7408423075939,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列","handle":"iphone-12-pro-max-mod-nx-printable-pb85","description":null,"published_at":"2024-06-11T16:36:49+08:00","created_at":"2024-05-03T15:23:47+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 12 pro 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":41885309206627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB85","requires_shipping":true,"taxable":true,"featured_image":{"id":31472238624867,"product_id":7408423075939,"position":9,"created_at":"2024-05-03T15:24:08+08:00","updated_at":"2024-05-03T15:24:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955193113bd9108473c45c0dffc307a4fb4e2524_e2e8112c-3076-49b2-b1e2-38df75c3cc5f.webp?v=1714721048","variant_ids":[41885309206627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列 - 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":"NPB0118724-PB85","featured_media":{"alt":null,"id":23877154766947,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955193113bd9108473c45c0dffc307a4fb4e2524_e2e8112c-3076-49b2-b1e2-38df75c3cc5f.webp?v=1714721048"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78536bb86e102f5886a73d2b882bbe4c77d39a88_e59cd238-1c93-4a44-b57f-9dc2e592ea0e.webp?v=1714721029","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/967a357353caa24696800d04ddcd3828a87c600f_9ecec5a6-f370-43c0-a4c3-fd8d8ab32c4a.webp?v=1714721032","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/131a2b6b519e668d791fdd724000c9288c9ec7c2_5023767d-e965-452e-800f-4915e4bb9518.webp?v=1714721034","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a237190976019b51ea62167d5323a1df038c59d_1a065bbe-4716-4120-a5ed-c3639af6a71d.webp?v=1714721036","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c15e9778a4c77d71e5bcef587aa4bfdd8b99386e_251689d6-d04a-4e63-8023-f18115586d3e.webp?v=1714721039","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68c4d83e1cffa1c4bf220f696f32c6fac382dde_767159bf-4573-4e58-bef5-0c11632bd640.webp?v=1714721041","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d80aafb956798ad4400b437022547e114390a978_93361ac6-d7b2-4d18-b832-554a5904ad73.webp?v=1714721043","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3099006bd672b7bf8c46e3ee34c75eb7cc75fd76_e7fd2a5a-0f2b-4f49-98ea-f3e2e249d972.webp?v=1714721046","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955193113bd9108473c45c0dffc307a4fb4e2524_e2e8112c-3076-49b2-b1e2-38df75c3cc5f.webp?v=1714721048","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4f238e4cb9d8547fdb0d4e9b58f782562edb9b_f24001e3-17a7-4a22-a7d6-a70ba9ba6253.webp?v=1714721050"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78536bb86e102f5886a73d2b882bbe4c77d39a88_e59cd238-1c93-4a44-b57f-9dc2e592ea0e.webp?v=1714721029","options":["color"],"media":[{"alt":null,"id":23877150867555,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78536bb86e102f5886a73d2b882bbe4c77d39a88_e59cd238-1c93-4a44-b57f-9dc2e592ea0e.webp?v=1714721029"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78536bb86e102f5886a73d2b882bbe4c77d39a88_e59cd238-1c93-4a44-b57f-9dc2e592ea0e.webp?v=1714721029","width":2000},{"alt":null,"id":23877151359075,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/967a357353caa24696800d04ddcd3828a87c600f_9ecec5a6-f370-43c0-a4c3-fd8d8ab32c4a.webp?v=1714721032"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/967a357353caa24696800d04ddcd3828a87c600f_9ecec5a6-f370-43c0-a4c3-fd8d8ab32c4a.webp?v=1714721032","width":2000},{"alt":null,"id":23877151785059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/131a2b6b519e668d791fdd724000c9288c9ec7c2_5023767d-e965-452e-800f-4915e4bb9518.webp?v=1714721034"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/131a2b6b519e668d791fdd724000c9288c9ec7c2_5023767d-e965-452e-800f-4915e4bb9518.webp?v=1714721034","width":2000},{"alt":null,"id":23877152211043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a237190976019b51ea62167d5323a1df038c59d_1a065bbe-4716-4120-a5ed-c3639af6a71d.webp?v=1714721036"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a237190976019b51ea62167d5323a1df038c59d_1a065bbe-4716-4120-a5ed-c3639af6a71d.webp?v=1714721036","width":2000},{"alt":null,"id":23877152735331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c15e9778a4c77d71e5bcef587aa4bfdd8b99386e_251689d6-d04a-4e63-8023-f18115586d3e.webp?v=1714721039"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c15e9778a4c77d71e5bcef587aa4bfdd8b99386e_251689d6-d04a-4e63-8023-f18115586d3e.webp?v=1714721039","width":2000},{"alt":null,"id":23877153226851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68c4d83e1cffa1c4bf220f696f32c6fac382dde_767159bf-4573-4e58-bef5-0c11632bd640.webp?v=1714721041"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68c4d83e1cffa1c4bf220f696f32c6fac382dde_767159bf-4573-4e58-bef5-0c11632bd640.webp?v=1714721041","width":2000},{"alt":null,"id":23877153783907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d80aafb956798ad4400b437022547e114390a978_93361ac6-d7b2-4d18-b832-554a5904ad73.webp?v=1714721043"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d80aafb956798ad4400b437022547e114390a978_93361ac6-d7b2-4d18-b832-554a5904ad73.webp?v=1714721043","width":2000},{"alt":null,"id":23877154275427,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3099006bd672b7bf8c46e3ee34c75eb7cc75fd76_e7fd2a5a-0f2b-4f49-98ea-f3e2e249d972.webp?v=1714721046"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3099006bd672b7bf8c46e3ee34c75eb7cc75fd76_e7fd2a5a-0f2b-4f49-98ea-f3e2e249d972.webp?v=1714721046","width":2000},{"alt":null,"id":23877154766947,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955193113bd9108473c45c0dffc307a4fb4e2524_e2e8112c-3076-49b2-b1e2-38df75c3cc5f.webp?v=1714721048"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955193113bd9108473c45c0dffc307a4fb4e2524_e2e8112c-3076-49b2-b1e2-38df75c3cc5f.webp?v=1714721048","width":2000},{"alt":null,"id":23877155324003,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4f238e4cb9d8547fdb0d4e9b58f782562edb9b_f24001e3-17a7-4a22-a7d6-a70ba9ba6253.webp?v=1714721050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4f238e4cb9d8547fdb0d4e9b58f782562edb9b_f24001e3-17a7-4a22-a7d6-a70ba9ba6253.webp?v=1714721050","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41885309206627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB85","requires_shipping":true,"taxable":true,"featured_image":{"id":31472238624867,"product_id":7408423075939,"position":9,"created_at":"2024-05-03T15:24:08+08:00","updated_at":"2024-05-03T15:24:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955193113bd9108473c45c0dffc307a4fb4e2524_e2e8112c-3076-49b2-b1e2-38df75c3cc5f.webp?v=1714721048","variant_ids":[41885309206627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列 - 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":"NPB0118724-PB85","featured_media":{"alt":null,"id":23877154766947,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955193113bd9108473c45c0dffc307a4fb4e2524_e2e8112c-3076-49b2-b1e2-38df75c3cc5f.webp?v=1714721048"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885309206627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB85","requires_shipping":true,"taxable":true,"featured_image":{"id":31472238624867,"product_id":7408423075939,"position":9,"created_at":"2024-05-03T15:24:08+08:00","updated_at":"2024-05-03T15:24:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955193113bd9108473c45c0dffc307a4fb4e2524_e2e8112c-3076-49b2-b1e2-38df75c3cc5f.webp?v=1714721048","variant_ids":[41885309206627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列 - 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":"NPB0118724-PB85","featured_media":{"alt":null,"id":23877154766947,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955193113bd9108473c45c0dffc307a4fb4e2524_e2e8112c-3076-49b2-b1e2-38df75c3cc5f.webp?v=1714721048"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }