$product = {"id":7407939420259,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 原力咒語-光劍系列","handle":"iphone-14-plus-mod-nx-printable-pb72","description":null,"published_at":"2024-06-11T16:27:05+08:00","created_at":"2024-05-03T11:19:52+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 14 Plus","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":41880785879139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB72","requires_shipping":true,"taxable":true,"featured_image":{"id":31470755414115,"product_id":7407939420259,"position":9,"created_at":"2024-05-03T11:20:13+08:00","updated_at":"2024-05-03T11:20:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65541abb8e736f75b8ac9abe3197931e33fc53cb_41fbd155-a63d-437e-8eca-2cfc72462e35.webp?v=1714706413","variant_ids":[41880785879139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB72","featured_media":{"alt":null,"id":23875659563107,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65541abb8e736f75b8ac9abe3197931e33fc53cb_41fbd155-a63d-437e-8eca-2cfc72462e35.webp?v=1714706413"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00fb1a098a5675f413041efe4b1db207b1410d05_dc0b2309-fe2f-4732-b05f-f23c6f2b390e.webp?v=1714706394","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8777b0322cc3440a073bca551e29e4bfe677125a_1b84270f-faaa-4ec8-bb82-27b4700e63a6.webp?v=1714706397","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e19bce119aaae615c81b55c6a66a16731863c280_5dac2eb4-1735-4187-a370-09571b20b09b.webp?v=1714706399","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac17dfb09a5efb27067473d27b6452bb3454714c_d9acebc6-702a-41de-95fd-09326bc8cfdd.webp?v=1714706401","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1792b1358caf97714041558f2146ee56414a8b5f_8963c980-24c1-4984-90ef-1d0c106edf03.webp?v=1714706403","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b82d3ae1feac9b7da92da2f4530f393a1c07ec88_67c78ac6-6bf0-48cd-a5a5-32ebe034182b.webp?v=1714706406","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8c7f6f38f670db9b966cc68214f5db28418fd3d_1f5553ca-336b-498f-94d3-97e4f9e015e7.webp?v=1714706408","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/928286a7289c9d21695c480aea9243c2246078f3_ebdd8994-10d2-43f2-b8a1-5a44f23e5aea.webp?v=1714706411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65541abb8e736f75b8ac9abe3197931e33fc53cb_41fbd155-a63d-437e-8eca-2cfc72462e35.webp?v=1714706413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd388275f5bd06c54ae5064f33ece14d7a45466a_094d73d9-772f-4d70-ac43-2b2a74639ec1.webp?v=1714706415"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00fb1a098a5675f413041efe4b1db207b1410d05_dc0b2309-fe2f-4732-b05f-f23c6f2b390e.webp?v=1714706394","options":["color"],"media":[{"alt":null,"id":23875656188003,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00fb1a098a5675f413041efe4b1db207b1410d05_dc0b2309-fe2f-4732-b05f-f23c6f2b390e.webp?v=1714706394"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00fb1a098a5675f413041efe4b1db207b1410d05_dc0b2309-fe2f-4732-b05f-f23c6f2b390e.webp?v=1714706394","width":2000},{"alt":null,"id":23875656548451,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8777b0322cc3440a073bca551e29e4bfe677125a_1b84270f-faaa-4ec8-bb82-27b4700e63a6.webp?v=1714706397"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8777b0322cc3440a073bca551e29e4bfe677125a_1b84270f-faaa-4ec8-bb82-27b4700e63a6.webp?v=1714706397","width":2000},{"alt":null,"id":23875656974435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e19bce119aaae615c81b55c6a66a16731863c280_5dac2eb4-1735-4187-a370-09571b20b09b.webp?v=1714706399"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e19bce119aaae615c81b55c6a66a16731863c280_5dac2eb4-1735-4187-a370-09571b20b09b.webp?v=1714706399","width":2000},{"alt":null,"id":23875657531491,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac17dfb09a5efb27067473d27b6452bb3454714c_d9acebc6-702a-41de-95fd-09326bc8cfdd.webp?v=1714706401"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac17dfb09a5efb27067473d27b6452bb3454714c_d9acebc6-702a-41de-95fd-09326bc8cfdd.webp?v=1714706401","width":2000},{"alt":null,"id":23875657891939,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1792b1358caf97714041558f2146ee56414a8b5f_8963c980-24c1-4984-90ef-1d0c106edf03.webp?v=1714706403"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1792b1358caf97714041558f2146ee56414a8b5f_8963c980-24c1-4984-90ef-1d0c106edf03.webp?v=1714706403","width":2000},{"alt":null,"id":23875658219619,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b82d3ae1feac9b7da92da2f4530f393a1c07ec88_67c78ac6-6bf0-48cd-a5a5-32ebe034182b.webp?v=1714706406"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b82d3ae1feac9b7da92da2f4530f393a1c07ec88_67c78ac6-6bf0-48cd-a5a5-32ebe034182b.webp?v=1714706406","width":2000},{"alt":null,"id":23875658842211,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8c7f6f38f670db9b966cc68214f5db28418fd3d_1f5553ca-336b-498f-94d3-97e4f9e015e7.webp?v=1714706408"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8c7f6f38f670db9b966cc68214f5db28418fd3d_1f5553ca-336b-498f-94d3-97e4f9e015e7.webp?v=1714706408","width":2000},{"alt":null,"id":23875659202659,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/928286a7289c9d21695c480aea9243c2246078f3_ebdd8994-10d2-43f2-b8a1-5a44f23e5aea.webp?v=1714706411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/928286a7289c9d21695c480aea9243c2246078f3_ebdd8994-10d2-43f2-b8a1-5a44f23e5aea.webp?v=1714706411","width":2000},{"alt":null,"id":23875659563107,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65541abb8e736f75b8ac9abe3197931e33fc53cb_41fbd155-a63d-437e-8eca-2cfc72462e35.webp?v=1714706413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65541abb8e736f75b8ac9abe3197931e33fc53cb_41fbd155-a63d-437e-8eca-2cfc72462e35.webp?v=1714706413","width":2000},{"alt":null,"id":23875659890787,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd388275f5bd06c54ae5064f33ece14d7a45466a_094d73d9-772f-4d70-ac43-2b2a74639ec1.webp?v=1714706415"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd388275f5bd06c54ae5064f33ece14d7a45466a_094d73d9-772f-4d70-ac43-2b2a74639ec1.webp?v=1714706415","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41880785879139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB72","requires_shipping":true,"taxable":true,"featured_image":{"id":31470755414115,"product_id":7407939420259,"position":9,"created_at":"2024-05-03T11:20:13+08:00","updated_at":"2024-05-03T11:20:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65541abb8e736f75b8ac9abe3197931e33fc53cb_41fbd155-a63d-437e-8eca-2cfc72462e35.webp?v=1714706413","variant_ids":[41880785879139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB72","featured_media":{"alt":null,"id":23875659563107,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65541abb8e736f75b8ac9abe3197931e33fc53cb_41fbd155-a63d-437e-8eca-2cfc72462e35.webp?v=1714706413"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41880785879139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB72","requires_shipping":true,"taxable":true,"featured_image":{"id":31470755414115,"product_id":7407939420259,"position":9,"created_at":"2024-05-03T11:20:13+08:00","updated_at":"2024-05-03T11:20:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65541abb8e736f75b8ac9abe3197931e33fc53cb_41fbd155-a63d-437e-8eca-2cfc72462e35.webp?v=1714706413","variant_ids":[41880785879139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB72","featured_media":{"alt":null,"id":23875659563107,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65541abb8e736f75b8ac9abe3197931e33fc53cb_41fbd155-a63d-437e-8eca-2cfc72462e35.webp?v=1714706413"}},"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: "停產" }