$product = {"id":7414925820003,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb44","description":null,"published_at":"2024-06-11T17:53:15+08:00","created_at":"2024-05-05T19:50:11+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41910000582755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31487698698339,"product_id":7414925820003,"position":4,"created_at":"2024-05-05T19:50:20+08:00","updated_at":"2024-05-05T19:50:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692b74e0cbb5855a74619d059ff12255f287caeb_783120c4-c8be-4862-b4b8-f97daaf7b0bb.webp?v=1714909821","variant_ids":[41910000582755]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB44","featured_media":{"alt":null,"id":23893042561123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692b74e0cbb5855a74619d059ff12255f287caeb_783120c4-c8be-4862-b4b8-f97daaf7b0bb.webp?v=1714909821"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b650ae0dd88522154dd3804cc8c1d94c1b8e3c1a_8f694e9d-4991-47ae-a5a2-e84d6c597c2c.webp?v=1714909814","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18d8a0339c115d41363555c7e93344f8640ba948_1f07d323-11b2-4fa3-985d-5c7b681f00c8.webp?v=1714909816","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb21a373f00a079a364af74502ddc16d620d457b_6c11b6ea-ba11-41dd-b7ca-e9fe8ef9ac68.webp?v=1714909818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692b74e0cbb5855a74619d059ff12255f287caeb_783120c4-c8be-4862-b4b8-f97daaf7b0bb.webp?v=1714909821","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc03dbb5a21f689e46ff032ef6fa586fee4c8813_660001b3-f79a-4e25-8bb4-b09d9060833d.webp?v=1714909823","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/920b8c2a5e0f582e51d7b57102b10f983216a7a5_185090ad-f0b7-45f1-928e-b3e3b4b15b7a.webp?v=1714909825","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24e7b26b11b9be6616be0fc5af28251f059f25c9_fcb4ba93-1f52-4b9c-b7c7-d0794a3ddfd2.webp?v=1714909828","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62df39136da5fc4273266bdabaa5666d81b6f20c_8b63788c-36f3-4b79-a524-5a536526de8a.webp?v=1714909830","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c9ffc59961d4bf1d557ec48c108e492c772708c_f3fe6bfc-b311-4e63-9a0e-aac63d138940.webp?v=1714909833","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3ef58dda3995fdd877496c93015e5d36b9fcb5c_d326fbfd-2084-4409-a885-afd8bd1d6129.webp?v=1714909835","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55fd2dbb8e56db78a16cbd7252eb0e62e9d64d20_cc9ed060-f626-4991-ac9b-cd7dd7bd6a72.webp?v=1714909838"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b650ae0dd88522154dd3804cc8c1d94c1b8e3c1a_8f694e9d-4991-47ae-a5a2-e84d6c597c2c.webp?v=1714909814","options":["color"],"media":[{"alt":null,"id":23893041086563,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b650ae0dd88522154dd3804cc8c1d94c1b8e3c1a_8f694e9d-4991-47ae-a5a2-e84d6c597c2c.webp?v=1714909814"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b650ae0dd88522154dd3804cc8c1d94c1b8e3c1a_8f694e9d-4991-47ae-a5a2-e84d6c597c2c.webp?v=1714909814","width":2000},{"alt":null,"id":23893041676387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18d8a0339c115d41363555c7e93344f8640ba948_1f07d323-11b2-4fa3-985d-5c7b681f00c8.webp?v=1714909816"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18d8a0339c115d41363555c7e93344f8640ba948_1f07d323-11b2-4fa3-985d-5c7b681f00c8.webp?v=1714909816","width":2000},{"alt":null,"id":23893042004067,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb21a373f00a079a364af74502ddc16d620d457b_6c11b6ea-ba11-41dd-b7ca-e9fe8ef9ac68.webp?v=1714909818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb21a373f00a079a364af74502ddc16d620d457b_6c11b6ea-ba11-41dd-b7ca-e9fe8ef9ac68.webp?v=1714909818","width":2000},{"alt":null,"id":23893042561123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692b74e0cbb5855a74619d059ff12255f287caeb_783120c4-c8be-4862-b4b8-f97daaf7b0bb.webp?v=1714909821"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692b74e0cbb5855a74619d059ff12255f287caeb_783120c4-c8be-4862-b4b8-f97daaf7b0bb.webp?v=1714909821","width":2000},{"alt":null,"id":23893043183715,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc03dbb5a21f689e46ff032ef6fa586fee4c8813_660001b3-f79a-4e25-8bb4-b09d9060833d.webp?v=1714909823"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc03dbb5a21f689e46ff032ef6fa586fee4c8813_660001b3-f79a-4e25-8bb4-b09d9060833d.webp?v=1714909823","width":2000},{"alt":null,"id":23893043773539,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/920b8c2a5e0f582e51d7b57102b10f983216a7a5_185090ad-f0b7-45f1-928e-b3e3b4b15b7a.webp?v=1714909825"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/920b8c2a5e0f582e51d7b57102b10f983216a7a5_185090ad-f0b7-45f1-928e-b3e3b4b15b7a.webp?v=1714909825","width":2000},{"alt":null,"id":23893044559971,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24e7b26b11b9be6616be0fc5af28251f059f25c9_fcb4ba93-1f52-4b9c-b7c7-d0794a3ddfd2.webp?v=1714909828"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24e7b26b11b9be6616be0fc5af28251f059f25c9_fcb4ba93-1f52-4b9c-b7c7-d0794a3ddfd2.webp?v=1714909828","width":2000},{"alt":null,"id":23893045051491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62df39136da5fc4273266bdabaa5666d81b6f20c_8b63788c-36f3-4b79-a524-5a536526de8a.webp?v=1714909830"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62df39136da5fc4273266bdabaa5666d81b6f20c_8b63788c-36f3-4b79-a524-5a536526de8a.webp?v=1714909830","width":2000},{"alt":null,"id":23893045543011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c9ffc59961d4bf1d557ec48c108e492c772708c_f3fe6bfc-b311-4e63-9a0e-aac63d138940.webp?v=1714909833"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c9ffc59961d4bf1d557ec48c108e492c772708c_f3fe6bfc-b311-4e63-9a0e-aac63d138940.webp?v=1714909833","width":2000},{"alt":null,"id":23893046165603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3ef58dda3995fdd877496c93015e5d36b9fcb5c_d326fbfd-2084-4409-a885-afd8bd1d6129.webp?v=1714909835"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3ef58dda3995fdd877496c93015e5d36b9fcb5c_d326fbfd-2084-4409-a885-afd8bd1d6129.webp?v=1714909835","width":2000},{"alt":null,"id":23893046722659,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55fd2dbb8e56db78a16cbd7252eb0e62e9d64d20_cc9ed060-f626-4991-ac9b-cd7dd7bd6a72.webp?v=1714909838"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55fd2dbb8e56db78a16cbd7252eb0e62e9d64d20_cc9ed060-f626-4991-ac9b-cd7dd7bd6a72.webp?v=1714909838","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910000582755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31487698698339,"product_id":7414925820003,"position":4,"created_at":"2024-05-05T19:50:20+08:00","updated_at":"2024-05-05T19:50:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692b74e0cbb5855a74619d059ff12255f287caeb_783120c4-c8be-4862-b4b8-f97daaf7b0bb.webp?v=1714909821","variant_ids":[41910000582755]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB44","featured_media":{"alt":null,"id":23893042561123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692b74e0cbb5855a74619d059ff12255f287caeb_783120c4-c8be-4862-b4b8-f97daaf7b0bb.webp?v=1714909821"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910000582755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB44","requires_shipping":true,"taxable":true,"featured_image":{"id":31487698698339,"product_id":7414925820003,"position":4,"created_at":"2024-05-05T19:50:20+08:00","updated_at":"2024-05-05T19:50:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692b74e0cbb5855a74619d059ff12255f287caeb_783120c4-c8be-4862-b4b8-f97daaf7b0bb.webp?v=1714909821","variant_ids":[41910000582755]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵\u0026光劍-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB44","featured_media":{"alt":null,"id":23893042561123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692b74e0cbb5855a74619d059ff12255f287caeb_783120c4-c8be-4862-b4b8-f97daaf7b0bb.webp?v=1714909821"}},"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: "停產" }