$product = {"id":7415883300963,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-紅","handle":"iphone-xs-max-mod-nx-printable-pb33","description":null,"published_at":"2024-06-11T16:46:59+08:00","created_at":"2024-05-06T12:17:44+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 Max","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":41915171438691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB33","requires_shipping":true,"taxable":true,"featured_image":{"id":31490647392355,"product_id":7415883300963,"position":1,"created_at":"2024-05-06T12:17:47+08:00","updated_at":"2024-05-06T12:17:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0d44ce560edf5c68b4de2beed044f73e2b6fe7_d1fbc46e-2b3d-4e2c-bed6-bcbf75034781.webp?v=1714969067","variant_ids":[41915171438691]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-紅 - 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-PB33","featured_media":{"alt":null,"id":23896053842019,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0d44ce560edf5c68b4de2beed044f73e2b6fe7_d1fbc46e-2b3d-4e2c-bed6-bcbf75034781.webp?v=1714969067"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0d44ce560edf5c68b4de2beed044f73e2b6fe7_d1fbc46e-2b3d-4e2c-bed6-bcbf75034781.webp?v=1714969067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cdba1017c8ac4e0515a9f80a24ceef2a0360371_dadc0d3b-6c22-4713-99b5-0e87746837c1.webp?v=1714969070","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/900c29fc5de7ff08cee8da9036b80e62c0461bad_b4e252e3-19bc-423a-aaa2-8d6c41ca307c.webp?v=1714969072","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5caf01459e5e6164fc440f22cb4d8d39642ef23_e49a481a-91e3-4d87-bb0f-2265dad5be6b.webp?v=1714969075","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf76add39018bd5b405ace1e048f4b93598bbb28_1d0bd471-e751-42a9-b34c-b28fc7d7bb04.webp?v=1714969078","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48e109fc5be042f8fc8cf6897b0473c1a3f434d3_fb982487-4861-4c85-976a-5d3c1c43ef77.webp?v=1714969081","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d350486dfc101351d14a8611df1463b2c8b13f_28b00e79-7c0a-43fa-aa90-cdf9037c10f8.webp?v=1714969083","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65cf79cd85dc1f0a22f625f2c44a6a19239f1e95_8f7397a6-e606-4f36-85fc-8112a10ca052.webp?v=1714969086","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dca6bff00e01f034ff00a3d811b52327b93e094f_18f1f1ab-a0ce-47c9-8162-9955f550bb93.webp?v=1714969090","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8f6bb4658f72bfdd513227b3eb7188ece525a52_2a877c2a-89e1-45b1-bd9c-779bae2c3e96.webp?v=1714969093"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0d44ce560edf5c68b4de2beed044f73e2b6fe7_d1fbc46e-2b3d-4e2c-bed6-bcbf75034781.webp?v=1714969067","options":["color"],"media":[{"alt":null,"id":23896053842019,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0d44ce560edf5c68b4de2beed044f73e2b6fe7_d1fbc46e-2b3d-4e2c-bed6-bcbf75034781.webp?v=1714969067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0d44ce560edf5c68b4de2beed044f73e2b6fe7_d1fbc46e-2b3d-4e2c-bed6-bcbf75034781.webp?v=1714969067","width":2000},{"alt":null,"id":23896054399075,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cdba1017c8ac4e0515a9f80a24ceef2a0360371_dadc0d3b-6c22-4713-99b5-0e87746837c1.webp?v=1714969070"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cdba1017c8ac4e0515a9f80a24ceef2a0360371_dadc0d3b-6c22-4713-99b5-0e87746837c1.webp?v=1714969070","width":2000},{"alt":null,"id":23896054923363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/900c29fc5de7ff08cee8da9036b80e62c0461bad_b4e252e3-19bc-423a-aaa2-8d6c41ca307c.webp?v=1714969072"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/900c29fc5de7ff08cee8da9036b80e62c0461bad_b4e252e3-19bc-423a-aaa2-8d6c41ca307c.webp?v=1714969072","width":2000},{"alt":null,"id":23896055480419,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5caf01459e5e6164fc440f22cb4d8d39642ef23_e49a481a-91e3-4d87-bb0f-2265dad5be6b.webp?v=1714969075"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5caf01459e5e6164fc440f22cb4d8d39642ef23_e49a481a-91e3-4d87-bb0f-2265dad5be6b.webp?v=1714969075","width":2000},{"alt":null,"id":23896056103011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf76add39018bd5b405ace1e048f4b93598bbb28_1d0bd471-e751-42a9-b34c-b28fc7d7bb04.webp?v=1714969078"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf76add39018bd5b405ace1e048f4b93598bbb28_1d0bd471-e751-42a9-b34c-b28fc7d7bb04.webp?v=1714969078","width":2000},{"alt":null,"id":23896056725603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48e109fc5be042f8fc8cf6897b0473c1a3f434d3_fb982487-4861-4c85-976a-5d3c1c43ef77.webp?v=1714969081"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48e109fc5be042f8fc8cf6897b0473c1a3f434d3_fb982487-4861-4c85-976a-5d3c1c43ef77.webp?v=1714969081","width":2000},{"alt":null,"id":23896057217123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d350486dfc101351d14a8611df1463b2c8b13f_28b00e79-7c0a-43fa-aa90-cdf9037c10f8.webp?v=1714969083"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d350486dfc101351d14a8611df1463b2c8b13f_28b00e79-7c0a-43fa-aa90-cdf9037c10f8.webp?v=1714969083","width":2000},{"alt":null,"id":23896057708643,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65cf79cd85dc1f0a22f625f2c44a6a19239f1e95_8f7397a6-e606-4f36-85fc-8112a10ca052.webp?v=1714969086"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65cf79cd85dc1f0a22f625f2c44a6a19239f1e95_8f7397a6-e606-4f36-85fc-8112a10ca052.webp?v=1714969086","width":2000},{"alt":null,"id":23896058298467,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dca6bff00e01f034ff00a3d811b52327b93e094f_18f1f1ab-a0ce-47c9-8162-9955f550bb93.webp?v=1714969090"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dca6bff00e01f034ff00a3d811b52327b93e094f_18f1f1ab-a0ce-47c9-8162-9955f550bb93.webp?v=1714969090","width":2000},{"alt":null,"id":23896058855523,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8f6bb4658f72bfdd513227b3eb7188ece525a52_2a877c2a-89e1-45b1-bd9c-779bae2c3e96.webp?v=1714969093"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8f6bb4658f72bfdd513227b3eb7188ece525a52_2a877c2a-89e1-45b1-bd9c-779bae2c3e96.webp?v=1714969093","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915171438691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB33","requires_shipping":true,"taxable":true,"featured_image":{"id":31490647392355,"product_id":7415883300963,"position":1,"created_at":"2024-05-06T12:17:47+08:00","updated_at":"2024-05-06T12:17:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0d44ce560edf5c68b4de2beed044f73e2b6fe7_d1fbc46e-2b3d-4e2c-bed6-bcbf75034781.webp?v=1714969067","variant_ids":[41915171438691]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-紅 - 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-PB33","featured_media":{"alt":null,"id":23896053842019,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0d44ce560edf5c68b4de2beed044f73e2b6fe7_d1fbc46e-2b3d-4e2c-bed6-bcbf75034781.webp?v=1714969067"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915171438691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB33","requires_shipping":true,"taxable":true,"featured_image":{"id":31490647392355,"product_id":7415883300963,"position":1,"created_at":"2024-05-06T12:17:47+08:00","updated_at":"2024-05-06T12:17:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0d44ce560edf5c68b4de2beed044f73e2b6fe7_d1fbc46e-2b3d-4e2c-bed6-bcbf75034781.webp?v=1714969067","variant_ids":[41915171438691]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-紅 - 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-PB33","featured_media":{"alt":null,"id":23896053842019,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0d44ce560edf5c68b4de2beed044f73e2b6fe7_d1fbc46e-2b3d-4e2c-bed6-bcbf75034781.webp?v=1714969067"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (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: "停產" }