$product = {"id":7414982770787,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具2-黑","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb11","description":null,"published_at":"2024-06-11T17:54:48+08:00","created_at":"2024-05-05T20:00:31+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":41910607839331,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31487844548707,"product_id":7414982770787,"position":5,"created_at":"2024-05-05T20:00:44+08:00","updated_at":"2024-05-05T20:00:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503d2d6d2e550b14afa2507e2321a47079e8d573_c1890b85-63a7-4c75-8f0e-aebfb66537d5.webp?v=1714910444","variant_ids":[41910607839331]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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-PB11","featured_media":{"alt":null,"id":23893188575331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503d2d6d2e550b14afa2507e2321a47079e8d573_c1890b85-63a7-4c75-8f0e-aebfb66537d5.webp?v=1714910444"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701edc0abe79ad501e537db7026fb7162dcd9c64_7e63fd77-54c8-4ac2-85cd-e58197ba582e.webp?v=1714910434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa19db1ff93c1be419c2181b587e7f57d5357128_c31a6b49-249d-4f19-8a32-a752021f76ae.webp?v=1714910436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfdac9dacaa3777079af4f00571b374cb638ce49_6ef6b245-e44d-45e6-8c68-0898972bc048.webp?v=1714910439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcec51eac2dd34d14b31a1e27967d57d79371761_2f131961-ec70-4c78-9982-e2a848bf3199.webp?v=1714910441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503d2d6d2e550b14afa2507e2321a47079e8d573_c1890b85-63a7-4c75-8f0e-aebfb66537d5.webp?v=1714910444","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5432073c0e4ffb7fa43ea28d809ddec86836deab_efc2b798-6b00-4434-b669-667ddf695d52.webp?v=1714910446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ceb7e65891e67dfcbb82055ae1ae36e1b6aa47dd_98d2f8e8-28d3-47ad-b02e-7ba8a0b76294.webp?v=1714910449","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d24ad4c93113d7896390142870c6a58d4dca0f7b_69f98bf1-ecfc-4f53-85d4-7a57a872d9ef.webp?v=1714910451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f50ee686af7a19d29f555fd5e886ca7da53ab98c_7725da55-2d0e-4f59-ac1b-c2405d710155.webp?v=1714910453","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7b4317485c3b0225479dee196db382ebdd6a705_9cad7f73-fbe4-4502-9553-cadcb761f173.webp?v=1714910456","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fef9ce0acd9b4e7044c72f46a8506a1762e0b827_9fffb908-125e-4280-8001-1bc0ff7735bc.webp?v=1714910458"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701edc0abe79ad501e537db7026fb7162dcd9c64_7e63fd77-54c8-4ac2-85cd-e58197ba582e.webp?v=1714910434","options":["color"],"media":[{"alt":null,"id":23893186216035,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701edc0abe79ad501e537db7026fb7162dcd9c64_7e63fd77-54c8-4ac2-85cd-e58197ba582e.webp?v=1714910434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701edc0abe79ad501e537db7026fb7162dcd9c64_7e63fd77-54c8-4ac2-85cd-e58197ba582e.webp?v=1714910434","width":2000},{"alt":null,"id":23893186674787,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa19db1ff93c1be419c2181b587e7f57d5357128_c31a6b49-249d-4f19-8a32-a752021f76ae.webp?v=1714910436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa19db1ff93c1be419c2181b587e7f57d5357128_c31a6b49-249d-4f19-8a32-a752021f76ae.webp?v=1714910436","width":2000},{"alt":null,"id":23893187297379,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfdac9dacaa3777079af4f00571b374cb638ce49_6ef6b245-e44d-45e6-8c68-0898972bc048.webp?v=1714910439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfdac9dacaa3777079af4f00571b374cb638ce49_6ef6b245-e44d-45e6-8c68-0898972bc048.webp?v=1714910439","width":2000},{"alt":null,"id":23893188018275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcec51eac2dd34d14b31a1e27967d57d79371761_2f131961-ec70-4c78-9982-e2a848bf3199.webp?v=1714910441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcec51eac2dd34d14b31a1e27967d57d79371761_2f131961-ec70-4c78-9982-e2a848bf3199.webp?v=1714910441","width":2000},{"alt":null,"id":23893188575331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503d2d6d2e550b14afa2507e2321a47079e8d573_c1890b85-63a7-4c75-8f0e-aebfb66537d5.webp?v=1714910444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503d2d6d2e550b14afa2507e2321a47079e8d573_c1890b85-63a7-4c75-8f0e-aebfb66537d5.webp?v=1714910444","width":2000},{"alt":null,"id":23893189263459,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5432073c0e4ffb7fa43ea28d809ddec86836deab_efc2b798-6b00-4434-b669-667ddf695d52.webp?v=1714910446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5432073c0e4ffb7fa43ea28d809ddec86836deab_efc2b798-6b00-4434-b669-667ddf695d52.webp?v=1714910446","width":2000},{"alt":null,"id":23893189787747,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ceb7e65891e67dfcbb82055ae1ae36e1b6aa47dd_98d2f8e8-28d3-47ad-b02e-7ba8a0b76294.webp?v=1714910449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ceb7e65891e67dfcbb82055ae1ae36e1b6aa47dd_98d2f8e8-28d3-47ad-b02e-7ba8a0b76294.webp?v=1714910449","width":2000},{"alt":null,"id":23893190508643,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d24ad4c93113d7896390142870c6a58d4dca0f7b_69f98bf1-ecfc-4f53-85d4-7a57a872d9ef.webp?v=1714910451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d24ad4c93113d7896390142870c6a58d4dca0f7b_69f98bf1-ecfc-4f53-85d4-7a57a872d9ef.webp?v=1714910451","width":2000},{"alt":null,"id":23893191098467,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f50ee686af7a19d29f555fd5e886ca7da53ab98c_7725da55-2d0e-4f59-ac1b-c2405d710155.webp?v=1714910453"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f50ee686af7a19d29f555fd5e886ca7da53ab98c_7725da55-2d0e-4f59-ac1b-c2405d710155.webp?v=1714910453","width":2000},{"alt":null,"id":23893191786595,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7b4317485c3b0225479dee196db382ebdd6a705_9cad7f73-fbe4-4502-9553-cadcb761f173.webp?v=1714910456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7b4317485c3b0225479dee196db382ebdd6a705_9cad7f73-fbe4-4502-9553-cadcb761f173.webp?v=1714910456","width":2000},{"alt":null,"id":23893192179811,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fef9ce0acd9b4e7044c72f46a8506a1762e0b827_9fffb908-125e-4280-8001-1bc0ff7735bc.webp?v=1714910458"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fef9ce0acd9b4e7044c72f46a8506a1762e0b827_9fffb908-125e-4280-8001-1bc0ff7735bc.webp?v=1714910458","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910607839331,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31487844548707,"product_id":7414982770787,"position":5,"created_at":"2024-05-05T20:00:44+08:00","updated_at":"2024-05-05T20:00:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503d2d6d2e550b14afa2507e2321a47079e8d573_c1890b85-63a7-4c75-8f0e-aebfb66537d5.webp?v=1714910444","variant_ids":[41910607839331]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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-PB11","featured_media":{"alt":null,"id":23893188575331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503d2d6d2e550b14afa2507e2321a47079e8d573_c1890b85-63a7-4c75-8f0e-aebfb66537d5.webp?v=1714910444"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910607839331,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31487844548707,"product_id":7414982770787,"position":5,"created_at":"2024-05-05T20:00:44+08:00","updated_at":"2024-05-05T20:00:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503d2d6d2e550b14afa2507e2321a47079e8d573_c1890b85-63a7-4c75-8f0e-aebfb66537d5.webp?v=1714910444","variant_ids":[41910607839331]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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-PB11","featured_media":{"alt":null,"id":23893188575331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503d2d6d2e550b14afa2507e2321a47079e8d573_c1890b85-63a7-4c75-8f0e-aebfb66537d5.webp?v=1714910444"}},"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: "停產" }