$product = {"id":7369179725923,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒","handle":"iphone-xs-max-mod-nx-printable-pl59","description":null,"published_at":"2024-06-11T16:13:56+08:00","created_at":"2024-04-23T15:39:08+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-snoopy","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":41793340309603,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386993492067,"product_id":7369179725923,"position":1,"created_at":"2024-04-23T15:39:11+08:00","updated_at":"2024-04-23T15:39:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbcf26a08ea270a443a76a2cc43e0fb7c1ab3556_54d3f869-a267-484a-abeb-5aa2965e0d3c.webp?v=1713857951","variant_ids":[41793340309603]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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":"NPB0108624-PL59","featured_media":{"alt":null,"id":23789231800419,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbcf26a08ea270a443a76a2cc43e0fb7c1ab3556_54d3f869-a267-484a-abeb-5aa2965e0d3c.webp?v=1713857951"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbcf26a08ea270a443a76a2cc43e0fb7c1ab3556_54d3f869-a267-484a-abeb-5aa2965e0d3c.webp?v=1713857951","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7607a4e8a1d7b8591385f4505334f69e2817bc5a_a456f27b-cc0a-487e-ae4f-31347d09dd18.webp?v=1713857954","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7cc969c173efc7bdb943b749c6de4fcab93f950_c5abb74e-5506-4b74-9707-c94a13e4e15c.webp?v=1713857956","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41fbb1178b8983769066b4c10dfb1d631c7dff57_c2c55f9e-1753-4629-b967-fa8e9671cdc3.webp?v=1713857958","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2870799c2f709c8960b4f3bc85e0e43bea143fe3_04de32a7-4e6f-402b-b8c8-24a5f55e4e4f.webp?v=1713857960","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/438feb0e465a976bb68de74e22884fe990e43cdc_e4c2a86c-00aa-467e-a881-9ea3fc3521f7.webp?v=1713857963","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f107405de6ed1e157756e7eb50c3213886232dd7_503f511c-34e8-41bb-85b4-46e70ce10319.webp?v=1713857966","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11260f485aa37b2bb29c16727ba40972484f4d60_a5e2a979-8b34-4873-bb6c-73124d2641dd.webp?v=1713857973","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09c3500480b9123d11beba1963f2e1d1977bfc54_79f8fad8-7655-4531-b154-8849691380ba.webp?v=1713857975","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60dd01f55d07b7b015e1269511d5bf71ae7a0e5a_42a5b501-c510-4536-ae36-5cd02a8f6fb2.webp?v=1713857978"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbcf26a08ea270a443a76a2cc43e0fb7c1ab3556_54d3f869-a267-484a-abeb-5aa2965e0d3c.webp?v=1713857951","options":["color"],"media":[{"alt":null,"id":23789231800419,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbcf26a08ea270a443a76a2cc43e0fb7c1ab3556_54d3f869-a267-484a-abeb-5aa2965e0d3c.webp?v=1713857951"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbcf26a08ea270a443a76a2cc43e0fb7c1ab3556_54d3f869-a267-484a-abeb-5aa2965e0d3c.webp?v=1713857951","width":2000},{"alt":null,"id":23789232521315,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7607a4e8a1d7b8591385f4505334f69e2817bc5a_a456f27b-cc0a-487e-ae4f-31347d09dd18.webp?v=1713857954"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7607a4e8a1d7b8591385f4505334f69e2817bc5a_a456f27b-cc0a-487e-ae4f-31347d09dd18.webp?v=1713857954","width":2000},{"alt":null,"id":23789233045603,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7cc969c173efc7bdb943b749c6de4fcab93f950_c5abb74e-5506-4b74-9707-c94a13e4e15c.webp?v=1713857956"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7cc969c173efc7bdb943b749c6de4fcab93f950_c5abb74e-5506-4b74-9707-c94a13e4e15c.webp?v=1713857956","width":2000},{"alt":null,"id":23789233733731,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41fbb1178b8983769066b4c10dfb1d631c7dff57_c2c55f9e-1753-4629-b967-fa8e9671cdc3.webp?v=1713857958"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41fbb1178b8983769066b4c10dfb1d631c7dff57_c2c55f9e-1753-4629-b967-fa8e9671cdc3.webp?v=1713857958","width":2000},{"alt":null,"id":23789234192483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2870799c2f709c8960b4f3bc85e0e43bea143fe3_04de32a7-4e6f-402b-b8c8-24a5f55e4e4f.webp?v=1713857960"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2870799c2f709c8960b4f3bc85e0e43bea143fe3_04de32a7-4e6f-402b-b8c8-24a5f55e4e4f.webp?v=1713857960","width":2000},{"alt":null,"id":23789234946147,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/438feb0e465a976bb68de74e22884fe990e43cdc_e4c2a86c-00aa-467e-a881-9ea3fc3521f7.webp?v=1713857963"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/438feb0e465a976bb68de74e22884fe990e43cdc_e4c2a86c-00aa-467e-a881-9ea3fc3521f7.webp?v=1713857963","width":2000},{"alt":null,"id":23789235634275,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f107405de6ed1e157756e7eb50c3213886232dd7_503f511c-34e8-41bb-85b4-46e70ce10319.webp?v=1713857966"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f107405de6ed1e157756e7eb50c3213886232dd7_503f511c-34e8-41bb-85b4-46e70ce10319.webp?v=1713857966","width":2000},{"alt":null,"id":23789237502051,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11260f485aa37b2bb29c16727ba40972484f4d60_a5e2a979-8b34-4873-bb6c-73124d2641dd.webp?v=1713857973"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11260f485aa37b2bb29c16727ba40972484f4d60_a5e2a979-8b34-4873-bb6c-73124d2641dd.webp?v=1713857973","width":2000},{"alt":null,"id":23789238255715,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09c3500480b9123d11beba1963f2e1d1977bfc54_79f8fad8-7655-4531-b154-8849691380ba.webp?v=1713857975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09c3500480b9123d11beba1963f2e1d1977bfc54_79f8fad8-7655-4531-b154-8849691380ba.webp?v=1713857975","width":2000},{"alt":null,"id":23789238911075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60dd01f55d07b7b015e1269511d5bf71ae7a0e5a_42a5b501-c510-4536-ae36-5cd02a8f6fb2.webp?v=1713857978"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60dd01f55d07b7b015e1269511d5bf71ae7a0e5a_42a5b501-c510-4536-ae36-5cd02a8f6fb2.webp?v=1713857978","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41793340309603,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386993492067,"product_id":7369179725923,"position":1,"created_at":"2024-04-23T15:39:11+08:00","updated_at":"2024-04-23T15:39:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbcf26a08ea270a443a76a2cc43e0fb7c1ab3556_54d3f869-a267-484a-abeb-5aa2965e0d3c.webp?v=1713857951","variant_ids":[41793340309603]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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":"NPB0108624-PL59","featured_media":{"alt":null,"id":23789231800419,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbcf26a08ea270a443a76a2cc43e0fb7c1ab3556_54d3f869-a267-484a-abeb-5aa2965e0d3c.webp?v=1713857951"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793340309603,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386993492067,"product_id":7369179725923,"position":1,"created_at":"2024-04-23T15:39:11+08:00","updated_at":"2024-04-23T15:39:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbcf26a08ea270a443a76a2cc43e0fb7c1ab3556_54d3f869-a267-484a-abeb-5aa2965e0d3c.webp?v=1713857951","variant_ids":[41793340309603]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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":"NPB0108624-PL59","featured_media":{"alt":null,"id":23789231800419,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbcf26a08ea270a443a76a2cc43e0fb7c1ab3556_54d3f869-a267-484a-abeb-5aa2965e0d3c.webp?v=1713857951"}},"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: "停產" }