$product = {"id":7408543268963,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max The Powerpuff Girls - 花花","handle":"iphone-12-pro-max-mod-nx-printable-sr05","description":null,"published_at":"2024-06-11T16:40:13+08:00","created_at":"2024-05-03T15:47:18+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-The Powerpuff Girls","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-the-power-puff-girls","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-the-power-puff-girls","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":41886683463779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SR05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472547758179,"product_id":7408543268963,"position":4,"created_at":"2024-05-03T15:47:27+08:00","updated_at":"2024-05-03T15:47:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc1dc08c72bf8776cb34a270fbf8a7d448ee2ea_97bbab7f-e250-4c00-a2e3-5acd20b2c737.webp?v=1714722447","variant_ids":[41886683463779]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max The Powerpuff Girls - 花花 - 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-SR05","featured_media":{"alt":null,"id":23877465047139,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc1dc08c72bf8776cb34a270fbf8a7d448ee2ea_97bbab7f-e250-4c00-a2e3-5acd20b2c737.webp?v=1714722447"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b49fa0ed5d148bc3d447b2ee94a9445e9e6d7a6_b6f32273-7d2d-4f90-91f6-dbb1991a9eb3.webp?v=1714722440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3051f4ff6a7dbf846972311871ca841a14508f5c_7f38db4d-fc66-44d8-a30b-143704dde6c3.webp?v=1714722442","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1eb8ef3014a85f9e564aac9915730b461163e5_0946de6c-5791-4b50-a58d-96d4e3756d5c.webp?v=1714722445","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc1dc08c72bf8776cb34a270fbf8a7d448ee2ea_97bbab7f-e250-4c00-a2e3-5acd20b2c737.webp?v=1714722447","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c13d533422373a3c187b80eeb22f94e0b35997_a1b18ed0-6ba8-4629-ad3d-bf8675ec62fc.webp?v=1714722449","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fa42b46c71ce9a7af8f93efb44393d33d652e76_31dfd0e3-6966-4809-a4ab-2ad03ccf1ef6.webp?v=1714722452","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c5c693f0e1e031ae0c1d1c07a058d8aaabeea99_fa1ee043-8894-489a-b0ed-b49eea031959.webp?v=1714722454","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7682a9497a740a7927ab5148fc1f4bc3ef00b1d8_19c2b31f-8118-4ce1-817d-979d52efa979.webp?v=1714722456","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5004b108fb0fe98a05346c249f077f828d3caa04_5714babb-ba80-47ad-bb7b-ecf0b1636566.webp?v=1714722459","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72fdc9e05abc9ff0a1972c01ceba98b1457691b0_1f8af30f-3c58-4e0b-a7b9-36a3bee594b3.webp?v=1714722461"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b49fa0ed5d148bc3d447b2ee94a9445e9e6d7a6_b6f32273-7d2d-4f90-91f6-dbb1991a9eb3.webp?v=1714722440","options":["color"],"media":[{"alt":null,"id":23877463408739,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b49fa0ed5d148bc3d447b2ee94a9445e9e6d7a6_b6f32273-7d2d-4f90-91f6-dbb1991a9eb3.webp?v=1714722440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b49fa0ed5d148bc3d447b2ee94a9445e9e6d7a6_b6f32273-7d2d-4f90-91f6-dbb1991a9eb3.webp?v=1714722440","width":2000},{"alt":null,"id":23877463867491,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3051f4ff6a7dbf846972311871ca841a14508f5c_7f38db4d-fc66-44d8-a30b-143704dde6c3.webp?v=1714722442"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3051f4ff6a7dbf846972311871ca841a14508f5c_7f38db4d-fc66-44d8-a30b-143704dde6c3.webp?v=1714722442","width":2000},{"alt":null,"id":23877464424547,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1eb8ef3014a85f9e564aac9915730b461163e5_0946de6c-5791-4b50-a58d-96d4e3756d5c.webp?v=1714722445"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1eb8ef3014a85f9e564aac9915730b461163e5_0946de6c-5791-4b50-a58d-96d4e3756d5c.webp?v=1714722445","width":2000},{"alt":null,"id":23877465047139,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc1dc08c72bf8776cb34a270fbf8a7d448ee2ea_97bbab7f-e250-4c00-a2e3-5acd20b2c737.webp?v=1714722447"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc1dc08c72bf8776cb34a270fbf8a7d448ee2ea_97bbab7f-e250-4c00-a2e3-5acd20b2c737.webp?v=1714722447","width":2000},{"alt":null,"id":23877465505891,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c13d533422373a3c187b80eeb22f94e0b35997_a1b18ed0-6ba8-4629-ad3d-bf8675ec62fc.webp?v=1714722449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c13d533422373a3c187b80eeb22f94e0b35997_a1b18ed0-6ba8-4629-ad3d-bf8675ec62fc.webp?v=1714722449","width":2000},{"alt":null,"id":23877465997411,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fa42b46c71ce9a7af8f93efb44393d33d652e76_31dfd0e3-6966-4809-a4ab-2ad03ccf1ef6.webp?v=1714722452"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fa42b46c71ce9a7af8f93efb44393d33d652e76_31dfd0e3-6966-4809-a4ab-2ad03ccf1ef6.webp?v=1714722452","width":2000},{"alt":null,"id":23877466456163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c5c693f0e1e031ae0c1d1c07a058d8aaabeea99_fa1ee043-8894-489a-b0ed-b49eea031959.webp?v=1714722454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c5c693f0e1e031ae0c1d1c07a058d8aaabeea99_fa1ee043-8894-489a-b0ed-b49eea031959.webp?v=1714722454","width":2000},{"alt":null,"id":23877466751075,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7682a9497a740a7927ab5148fc1f4bc3ef00b1d8_19c2b31f-8118-4ce1-817d-979d52efa979.webp?v=1714722456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7682a9497a740a7927ab5148fc1f4bc3ef00b1d8_19c2b31f-8118-4ce1-817d-979d52efa979.webp?v=1714722456","width":2000},{"alt":null,"id":23877467242595,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5004b108fb0fe98a05346c249f077f828d3caa04_5714babb-ba80-47ad-bb7b-ecf0b1636566.webp?v=1714722459"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5004b108fb0fe98a05346c249f077f828d3caa04_5714babb-ba80-47ad-bb7b-ecf0b1636566.webp?v=1714722459","width":2000},{"alt":null,"id":23877467635811,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72fdc9e05abc9ff0a1972c01ceba98b1457691b0_1f8af30f-3c58-4e0b-a7b9-36a3bee594b3.webp?v=1714722461"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72fdc9e05abc9ff0a1972c01ceba98b1457691b0_1f8af30f-3c58-4e0b-a7b9-36a3bee594b3.webp?v=1714722461","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41886683463779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SR05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472547758179,"product_id":7408543268963,"position":4,"created_at":"2024-05-03T15:47:27+08:00","updated_at":"2024-05-03T15:47:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc1dc08c72bf8776cb34a270fbf8a7d448ee2ea_97bbab7f-e250-4c00-a2e3-5acd20b2c737.webp?v=1714722447","variant_ids":[41886683463779]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max The Powerpuff Girls - 花花 - 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-SR05","featured_media":{"alt":null,"id":23877465047139,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc1dc08c72bf8776cb34a270fbf8a7d448ee2ea_97bbab7f-e250-4c00-a2e3-5acd20b2c737.webp?v=1714722447"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886683463779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SR05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472547758179,"product_id":7408543268963,"position":4,"created_at":"2024-05-03T15:47:27+08:00","updated_at":"2024-05-03T15:47:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc1dc08c72bf8776cb34a270fbf8a7d448ee2ea_97bbab7f-e250-4c00-a2e3-5acd20b2c737.webp?v=1714722447","variant_ids":[41886683463779]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max The Powerpuff Girls - 花花 - 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-SR05","featured_media":{"alt":null,"id":23877465047139,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc1dc08c72bf8776cb34a270fbf8a7d448ee2ea_97bbab7f-e250-4c00-a2e3-5acd20b2c737.webp?v=1714722447"}},"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: "停產" }