$product = {"id":7416069292131,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-白","handle":"iphone-xs-mod-nx-printable-pb10","description":null,"published_at":"2024-06-11T16:51:55+08:00","created_at":"2024-05-06T12:52:28+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 XS","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":41917114581091,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-PB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31491139436643,"product_id":7416069292131,"position":7,"created_at":"2024-05-06T12:52:44+08:00","updated_at":"2024-05-06T12:52:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94572f86c8e4f16405d9257086c4717d4d3c9a13_170d05fb-5522-47d6-a117-1694a76631b0.webp?v=1714971164","variant_ids":[41917114581091]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-白 - 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":"NPB0108424-PB10","featured_media":{"alt":null,"id":23896546934883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94572f86c8e4f16405d9257086c4717d4d3c9a13_170d05fb-5522-47d6-a117-1694a76631b0.webp?v=1714971164"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbd3d687c41dc749cebc61c2402b5791a660bcab_f4a29c94-dcbc-4776-8585-276835354e55.webp?v=1714971150","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa4d9511856d714cae02b9a8488b496c27b77b8e_6c0a4b36-def8-40e3-89a7-733fe2941d8c.webp?v=1714971152","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3879993b5d898f7e9b219e0a2004cc6d91959bf0_afb8f557-02dd-42bf-bd5e-8a00b5d6e3a5.webp?v=1714971155","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/861a122d579187f6a07149c1dc469737d9c6f066_e54ebcdb-2332-4a33-8d20-5bb33d18e4e0.webp?v=1714971157","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d197dc7145961dacbd57fe9b9b80ea786b33bc5_d0e1fed9-775f-4077-84e2-10ee051d6c04.webp?v=1714971160","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b9c05b0c7d18db446f02568862b777acadf49f_8029f9ba-abdb-4b8d-99e3-42e29ad307b8.webp?v=1714971162","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94572f86c8e4f16405d9257086c4717d4d3c9a13_170d05fb-5522-47d6-a117-1694a76631b0.webp?v=1714971164","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5836130d9cf89fec39984c8ae123980b12f01eda_1018eeb3-9a6e-4d0c-8514-523940c1a70c.webp?v=1714971167","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4919ec84ea32ef37e07c558ce9823c3dd3af5fb7_99768005-0d3b-447c-a67c-4c7f56599a27.webp?v=1714971169","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84e201ccb3341d32cc1e861ba44e442d0b5fc538_75fbcbe3-9f47-4e18-96cc-352cd45407bb.webp?v=1714971171"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbd3d687c41dc749cebc61c2402b5791a660bcab_f4a29c94-dcbc-4776-8585-276835354e55.webp?v=1714971150","options":["color"],"media":[{"alt":null,"id":23896543002723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbd3d687c41dc749cebc61c2402b5791a660bcab_f4a29c94-dcbc-4776-8585-276835354e55.webp?v=1714971150"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbd3d687c41dc749cebc61c2402b5791a660bcab_f4a29c94-dcbc-4776-8585-276835354e55.webp?v=1714971150","width":2000},{"alt":null,"id":23896543428707,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa4d9511856d714cae02b9a8488b496c27b77b8e_6c0a4b36-def8-40e3-89a7-733fe2941d8c.webp?v=1714971152"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa4d9511856d714cae02b9a8488b496c27b77b8e_6c0a4b36-def8-40e3-89a7-733fe2941d8c.webp?v=1714971152","width":2000},{"alt":null,"id":23896544444515,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3879993b5d898f7e9b219e0a2004cc6d91959bf0_afb8f557-02dd-42bf-bd5e-8a00b5d6e3a5.webp?v=1714971155"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3879993b5d898f7e9b219e0a2004cc6d91959bf0_afb8f557-02dd-42bf-bd5e-8a00b5d6e3a5.webp?v=1714971155","width":2000},{"alt":null,"id":23896544903267,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/861a122d579187f6a07149c1dc469737d9c6f066_e54ebcdb-2332-4a33-8d20-5bb33d18e4e0.webp?v=1714971157"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/861a122d579187f6a07149c1dc469737d9c6f066_e54ebcdb-2332-4a33-8d20-5bb33d18e4e0.webp?v=1714971157","width":2000},{"alt":null,"id":23896545460323,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d197dc7145961dacbd57fe9b9b80ea786b33bc5_d0e1fed9-775f-4077-84e2-10ee051d6c04.webp?v=1714971160"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d197dc7145961dacbd57fe9b9b80ea786b33bc5_d0e1fed9-775f-4077-84e2-10ee051d6c04.webp?v=1714971160","width":2000},{"alt":null,"id":23896545919075,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b9c05b0c7d18db446f02568862b777acadf49f_8029f9ba-abdb-4b8d-99e3-42e29ad307b8.webp?v=1714971162"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b9c05b0c7d18db446f02568862b777acadf49f_8029f9ba-abdb-4b8d-99e3-42e29ad307b8.webp?v=1714971162","width":2000},{"alt":null,"id":23896546934883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94572f86c8e4f16405d9257086c4717d4d3c9a13_170d05fb-5522-47d6-a117-1694a76631b0.webp?v=1714971164"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94572f86c8e4f16405d9257086c4717d4d3c9a13_170d05fb-5522-47d6-a117-1694a76631b0.webp?v=1714971164","width":2000},{"alt":null,"id":23896547557475,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5836130d9cf89fec39984c8ae123980b12f01eda_1018eeb3-9a6e-4d0c-8514-523940c1a70c.webp?v=1714971167"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5836130d9cf89fec39984c8ae123980b12f01eda_1018eeb3-9a6e-4d0c-8514-523940c1a70c.webp?v=1714971167","width":2000},{"alt":null,"id":23896547983459,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4919ec84ea32ef37e07c558ce9823c3dd3af5fb7_99768005-0d3b-447c-a67c-4c7f56599a27.webp?v=1714971169"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4919ec84ea32ef37e07c558ce9823c3dd3af5fb7_99768005-0d3b-447c-a67c-4c7f56599a27.webp?v=1714971169","width":2000},{"alt":null,"id":23896548638819,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84e201ccb3341d32cc1e861ba44e442d0b5fc538_75fbcbe3-9f47-4e18-96cc-352cd45407bb.webp?v=1714971171"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84e201ccb3341d32cc1e861ba44e442d0b5fc538_75fbcbe3-9f47-4e18-96cc-352cd45407bb.webp?v=1714971171","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41917114581091,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-PB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31491139436643,"product_id":7416069292131,"position":7,"created_at":"2024-05-06T12:52:44+08:00","updated_at":"2024-05-06T12:52:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94572f86c8e4f16405d9257086c4717d4d3c9a13_170d05fb-5522-47d6-a117-1694a76631b0.webp?v=1714971164","variant_ids":[41917114581091]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-白 - 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":"NPB0108424-PB10","featured_media":{"alt":null,"id":23896546934883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94572f86c8e4f16405d9257086c4717d4d3c9a13_170d05fb-5522-47d6-a117-1694a76631b0.webp?v=1714971164"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917114581091,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-PB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31491139436643,"product_id":7416069292131,"position":7,"created_at":"2024-05-06T12:52:44+08:00","updated_at":"2024-05-06T12:52:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94572f86c8e4f16405d9257086c4717d4d3c9a13_170d05fb-5522-47d6-a117-1694a76631b0.webp?v=1714971164","variant_ids":[41917114581091]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-白 - 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":"NPB0108424-PB10","featured_media":{"alt":null,"id":23896546934883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94572f86c8e4f16405d9257086c4717d4d3c9a13_170d05fb-5522-47d6-a117-1694a76631b0.webp?v=1714971164"}},"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: "停產" }