$product = {"id":7408504340579,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆白","handle":"iphone-12-pro-max-mod-nx-printable-pb08","description":null,"published_at":"2024-06-11T16:39:06+08:00","created_at":"2024-05-03T15:39:39+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":41886231461987,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472448831587,"product_id":7408504340579,"position":7,"created_at":"2024-05-03T15:39:55+08:00","updated_at":"2024-05-03T15:39:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eaaaa47f99f6e199ceac993cb9c7ab8909d91f0_9af7595b-ebe4-457f-907d-2ef1cdc120dd.webp?v=1714721995","variant_ids":[41886231461987]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆白 - 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-PB08","featured_media":{"alt":null,"id":23877365858403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eaaaa47f99f6e199ceac993cb9c7ab8909d91f0_9af7595b-ebe4-457f-907d-2ef1cdc120dd.webp?v=1714721995"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46d2ea4d9ae510ffee0b4214469db057776db8a5_29ededeb-7e8b-4df0-89a0-84586fd3128f.webp?v=1714721981","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/369d3b10a84b1cf8443f3f8afac8f58fa98758a4_24cb6ae2-ee39-4a73-aba7-a161dad3554e.webp?v=1714721983","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57e55f5e5250ec1033545e8b3ad4eebbdcdf2223_db4f411f-da45-436b-bc35-0736d502fa76.webp?v=1714721986","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/032cca7b287e45fa10cb412830899ad57bab3075_b80a7fce-b5a5-4350-8490-542b6a3fe62e.webp?v=1714721988","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f46908e942cf5e8b5d0e986ed247ceed439459b_e620d3ad-1094-4756-9b3d-effc68125b63.webp?v=1714721990","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51f9af0df0f5d475b416cd6757dd55243edfc3fd_6dad7a58-3bcc-4282-bf14-f2a5b1830cbb.webp?v=1714721992","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eaaaa47f99f6e199ceac993cb9c7ab8909d91f0_9af7595b-ebe4-457f-907d-2ef1cdc120dd.webp?v=1714721995","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/970a68d55982d5e35ce01935fa930a201948992e_137b2d93-a481-4cc5-b2ef-14822683b0e5.webp?v=1714721997","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa98b2245b3efd1e6950ee67a7526940a9408dc2_cffd7a42-e282-4e65-8db5-20498e5d5912.webp?v=1714721999","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49c0011f87a0f5b335c4ad8cdfad8aff4c7875fb_5b51ded6-0b18-4149-88bc-8fc0e5f53934.webp?v=1714722002"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46d2ea4d9ae510ffee0b4214469db057776db8a5_29ededeb-7e8b-4df0-89a0-84586fd3128f.webp?v=1714721981","options":["color"],"media":[{"alt":null,"id":23877362679907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46d2ea4d9ae510ffee0b4214469db057776db8a5_29ededeb-7e8b-4df0-89a0-84586fd3128f.webp?v=1714721981"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46d2ea4d9ae510ffee0b4214469db057776db8a5_29ededeb-7e8b-4df0-89a0-84586fd3128f.webp?v=1714721981","width":2000},{"alt":null,"id":23877363236963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/369d3b10a84b1cf8443f3f8afac8f58fa98758a4_24cb6ae2-ee39-4a73-aba7-a161dad3554e.webp?v=1714721983"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/369d3b10a84b1cf8443f3f8afac8f58fa98758a4_24cb6ae2-ee39-4a73-aba7-a161dad3554e.webp?v=1714721983","width":2000},{"alt":null,"id":23877363826787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57e55f5e5250ec1033545e8b3ad4eebbdcdf2223_db4f411f-da45-436b-bc35-0736d502fa76.webp?v=1714721986"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57e55f5e5250ec1033545e8b3ad4eebbdcdf2223_db4f411f-da45-436b-bc35-0736d502fa76.webp?v=1714721986","width":2000},{"alt":null,"id":23877364285539,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/032cca7b287e45fa10cb412830899ad57bab3075_b80a7fce-b5a5-4350-8490-542b6a3fe62e.webp?v=1714721988"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/032cca7b287e45fa10cb412830899ad57bab3075_b80a7fce-b5a5-4350-8490-542b6a3fe62e.webp?v=1714721988","width":2000},{"alt":null,"id":23877364875363,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f46908e942cf5e8b5d0e986ed247ceed439459b_e620d3ad-1094-4756-9b3d-effc68125b63.webp?v=1714721990"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f46908e942cf5e8b5d0e986ed247ceed439459b_e620d3ad-1094-4756-9b3d-effc68125b63.webp?v=1714721990","width":2000},{"alt":null,"id":23877365334115,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51f9af0df0f5d475b416cd6757dd55243edfc3fd_6dad7a58-3bcc-4282-bf14-f2a5b1830cbb.webp?v=1714721992"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51f9af0df0f5d475b416cd6757dd55243edfc3fd_6dad7a58-3bcc-4282-bf14-f2a5b1830cbb.webp?v=1714721992","width":2000},{"alt":null,"id":23877365858403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eaaaa47f99f6e199ceac993cb9c7ab8909d91f0_9af7595b-ebe4-457f-907d-2ef1cdc120dd.webp?v=1714721995"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eaaaa47f99f6e199ceac993cb9c7ab8909d91f0_9af7595b-ebe4-457f-907d-2ef1cdc120dd.webp?v=1714721995","width":2000},{"alt":null,"id":23877366382691,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/970a68d55982d5e35ce01935fa930a201948992e_137b2d93-a481-4cc5-b2ef-14822683b0e5.webp?v=1714721997"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/970a68d55982d5e35ce01935fa930a201948992e_137b2d93-a481-4cc5-b2ef-14822683b0e5.webp?v=1714721997","width":2000},{"alt":null,"id":23877366972515,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa98b2245b3efd1e6950ee67a7526940a9408dc2_cffd7a42-e282-4e65-8db5-20498e5d5912.webp?v=1714721999"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa98b2245b3efd1e6950ee67a7526940a9408dc2_cffd7a42-e282-4e65-8db5-20498e5d5912.webp?v=1714721999","width":2000},{"alt":null,"id":23877367365731,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49c0011f87a0f5b335c4ad8cdfad8aff4c7875fb_5b51ded6-0b18-4149-88bc-8fc0e5f53934.webp?v=1714722002"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49c0011f87a0f5b335c4ad8cdfad8aff4c7875fb_5b51ded6-0b18-4149-88bc-8fc0e5f53934.webp?v=1714722002","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41886231461987,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472448831587,"product_id":7408504340579,"position":7,"created_at":"2024-05-03T15:39:55+08:00","updated_at":"2024-05-03T15:39:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eaaaa47f99f6e199ceac993cb9c7ab8909d91f0_9af7595b-ebe4-457f-907d-2ef1cdc120dd.webp?v=1714721995","variant_ids":[41886231461987]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆白 - 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-PB08","featured_media":{"alt":null,"id":23877365858403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eaaaa47f99f6e199ceac993cb9c7ab8909d91f0_9af7595b-ebe4-457f-907d-2ef1cdc120dd.webp?v=1714721995"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886231461987,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472448831587,"product_id":7408504340579,"position":7,"created_at":"2024-05-03T15:39:55+08:00","updated_at":"2024-05-03T15:39:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eaaaa47f99f6e199ceac993cb9c7ab8909d91f0_9af7595b-ebe4-457f-907d-2ef1cdc120dd.webp?v=1714721995","variant_ids":[41886231461987]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆白 - 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-PB08","featured_media":{"alt":null,"id":23877365858403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eaaaa47f99f6e199ceac993cb9c7ab8909d91f0_9af7595b-ebe4-457f-907d-2ef1cdc120dd.webp?v=1714721995"}},"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: "停產" }