$product = {"id":7407906127971,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-潮流系列","handle":"iphone-14-plus-mod-nx-printable-pb49","description":null,"published_at":"2024-06-11T16:26:10+08:00","created_at":"2024-05-03T11:13:23+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":41880356749411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB49","requires_shipping":true,"taxable":true,"featured_image":{"id":31470667497571,"product_id":7407906127971,"position":1,"created_at":"2024-05-03T11:13:26+08:00","updated_at":"2024-05-03T11:13:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68fb69f1ef91c932740beb3e9bd3cbe14d0dce0b_66855b11-20a9-4e60-90b5-fb568546a71e.webp?v=1714706006","variant_ids":[41880356749411]},"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-PB49","featured_media":{"alt":null,"id":23875571482723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68fb69f1ef91c932740beb3e9bd3cbe14d0dce0b_66855b11-20a9-4e60-90b5-fb568546a71e.webp?v=1714706006"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68fb69f1ef91c932740beb3e9bd3cbe14d0dce0b_66855b11-20a9-4e60-90b5-fb568546a71e.webp?v=1714706006","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407791bfbc1874ede475c8a55b951ce197886ff_d617b0bf-4213-4702-bee6-87dd32437dfc.webp?v=1714706008","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29d174d632e3995ce3a4bdc9c0d4e1beb955e1f9_70a82359-b390-4f5d-972b-c7dc0e54cfdd.webp?v=1714706011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4fffbf48166011a6a108f0ff1be72e689f7e33_f1317648-e060-4be2-915c-cb2724d87ed2.webp?v=1714706013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/920786b561cfa2e2e208354d895e048bae8b20e1_ba19d6c0-4841-4c30-9764-4b2aad8ec1ac.webp?v=1714706016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/762554cc4ea9a7889fa434992d818447ccb8a18e_3fbbe31e-2947-4a81-8c73-e65df797abf7.webp?v=1714706018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6d8955faebdf145190ebe4e7c1b8902eeda78e8_886b48aa-8450-4ab0-bd94-eb73e8620a01.webp?v=1714706021","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/288b20cb4af7548e3eb5d158263e47336388f89c_f822e823-2d7b-4a09-8a04-ddddce999c54.webp?v=1714706023","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f15a2dd86b7e65bdcd5189e714bdd09f55bdffca_ce8a8442-f739-432e-ab1b-4f0796f78a38.webp?v=1714706026","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e93bad8de840c2376701c3a9e6a8419878142ca6_55abf69e-0edd-4938-a8c9-36fbe8e74343.webp?v=1714706028"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68fb69f1ef91c932740beb3e9bd3cbe14d0dce0b_66855b11-20a9-4e60-90b5-fb568546a71e.webp?v=1714706006","options":["color"],"media":[{"alt":null,"id":23875571482723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68fb69f1ef91c932740beb3e9bd3cbe14d0dce0b_66855b11-20a9-4e60-90b5-fb568546a71e.webp?v=1714706006"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68fb69f1ef91c932740beb3e9bd3cbe14d0dce0b_66855b11-20a9-4e60-90b5-fb568546a71e.webp?v=1714706006","width":2000},{"alt":null,"id":23875572007011,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407791bfbc1874ede475c8a55b951ce197886ff_d617b0bf-4213-4702-bee6-87dd32437dfc.webp?v=1714706008"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407791bfbc1874ede475c8a55b951ce197886ff_d617b0bf-4213-4702-bee6-87dd32437dfc.webp?v=1714706008","width":2000},{"alt":null,"id":23875572367459,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29d174d632e3995ce3a4bdc9c0d4e1beb955e1f9_70a82359-b390-4f5d-972b-c7dc0e54cfdd.webp?v=1714706011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29d174d632e3995ce3a4bdc9c0d4e1beb955e1f9_70a82359-b390-4f5d-972b-c7dc0e54cfdd.webp?v=1714706011","width":2000},{"alt":null,"id":23875572858979,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4fffbf48166011a6a108f0ff1be72e689f7e33_f1317648-e060-4be2-915c-cb2724d87ed2.webp?v=1714706013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4fffbf48166011a6a108f0ff1be72e689f7e33_f1317648-e060-4be2-915c-cb2724d87ed2.webp?v=1714706013","width":2000},{"alt":null,"id":23875573317731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/920786b561cfa2e2e208354d895e048bae8b20e1_ba19d6c0-4841-4c30-9764-4b2aad8ec1ac.webp?v=1714706016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/920786b561cfa2e2e208354d895e048bae8b20e1_ba19d6c0-4841-4c30-9764-4b2aad8ec1ac.webp?v=1714706016","width":2000},{"alt":null,"id":23875573743715,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/762554cc4ea9a7889fa434992d818447ccb8a18e_3fbbe31e-2947-4a81-8c73-e65df797abf7.webp?v=1714706018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/762554cc4ea9a7889fa434992d818447ccb8a18e_3fbbe31e-2947-4a81-8c73-e65df797abf7.webp?v=1714706018","width":2000},{"alt":null,"id":23875574202467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6d8955faebdf145190ebe4e7c1b8902eeda78e8_886b48aa-8450-4ab0-bd94-eb73e8620a01.webp?v=1714706021"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6d8955faebdf145190ebe4e7c1b8902eeda78e8_886b48aa-8450-4ab0-bd94-eb73e8620a01.webp?v=1714706021","width":2000},{"alt":null,"id":23875574628451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/288b20cb4af7548e3eb5d158263e47336388f89c_f822e823-2d7b-4a09-8a04-ddddce999c54.webp?v=1714706023"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/288b20cb4af7548e3eb5d158263e47336388f89c_f822e823-2d7b-4a09-8a04-ddddce999c54.webp?v=1714706023","width":2000},{"alt":null,"id":23875575087203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f15a2dd86b7e65bdcd5189e714bdd09f55bdffca_ce8a8442-f739-432e-ab1b-4f0796f78a38.webp?v=1714706026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f15a2dd86b7e65bdcd5189e714bdd09f55bdffca_ce8a8442-f739-432e-ab1b-4f0796f78a38.webp?v=1714706026","width":2000},{"alt":null,"id":23875575545955,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e93bad8de840c2376701c3a9e6a8419878142ca6_55abf69e-0edd-4938-a8c9-36fbe8e74343.webp?v=1714706028"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e93bad8de840c2376701c3a9e6a8419878142ca6_55abf69e-0edd-4938-a8c9-36fbe8e74343.webp?v=1714706028","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41880356749411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB49","requires_shipping":true,"taxable":true,"featured_image":{"id":31470667497571,"product_id":7407906127971,"position":1,"created_at":"2024-05-03T11:13:26+08:00","updated_at":"2024-05-03T11:13:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68fb69f1ef91c932740beb3e9bd3cbe14d0dce0b_66855b11-20a9-4e60-90b5-fb568546a71e.webp?v=1714706006","variant_ids":[41880356749411]},"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-PB49","featured_media":{"alt":null,"id":23875571482723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68fb69f1ef91c932740beb3e9bd3cbe14d0dce0b_66855b11-20a9-4e60-90b5-fb568546a71e.webp?v=1714706006"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41880356749411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB49","requires_shipping":true,"taxable":true,"featured_image":{"id":31470667497571,"product_id":7407906127971,"position":1,"created_at":"2024-05-03T11:13:26+08:00","updated_at":"2024-05-03T11:13:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68fb69f1ef91c932740beb3e9bd3cbe14d0dce0b_66855b11-20a9-4e60-90b5-fb568546a71e.webp?v=1714706006","variant_ids":[41880356749411]},"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-PB49","featured_media":{"alt":null,"id":23875571482723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68fb69f1ef91c932740beb3e9bd3cbe14d0dce0b_66855b11-20a9-4e60-90b5-fb568546a71e.webp?v=1714706006"}},"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: "停產" }