$product = {"id":7369220030563,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 夏日活動","handle":"iphone-12-mini-mod-nx-magsafe-printable-pl61","description":null,"published_at":"2024-06-11T17:31:43+08:00","created_at":"2024-04-23T15:46:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-snoopy","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":41793742012515,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31387098841187,"product_id":7369220030563,"position":2,"created_at":"2024-04-23T15:46:59+08:00","updated_at":"2024-04-23T15:46:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772f5b85bbb8af403a1f94312f02e07e4a1652f2_1aefec2b-f13e-43ba-b3c9-d2292d298036.webp?v=1713858419","variant_ids":[41793742012515]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 夏日活動 - 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-PL61","featured_media":{"alt":null,"id":23789337641059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772f5b85bbb8af403a1f94312f02e07e4a1652f2_1aefec2b-f13e-43ba-b3c9-d2292d298036.webp?v=1713858419"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6023b94b2a4418eafc388158cfb7b3ad957dbee7_ac243e8c-d6dc-42c0-8c8f-35801846cab9.webp?v=1713858417","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772f5b85bbb8af403a1f94312f02e07e4a1652f2_1aefec2b-f13e-43ba-b3c9-d2292d298036.webp?v=1713858419","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7693ccbd63813e1c450663e0fc83cff0c014d0a_a49510b7-5fd6-4f4f-85cc-bea29e89991e.webp?v=1713858421","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e3c6df2d629ec56c691017e2513fe6cc039eccf_a6c2273d-16de-4e10-877d-6c37bd9c89cf.webp?v=1713858424","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3afee2d4a529ea9a3be4dd164a118573d36b066_1d637b29-c8c0-45fb-90b6-b6aab0e3e5ba.webp?v=1713858426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c6d85b10bd2a96830b63c80d7e7f323a81c5257_d07059a1-d619-4c5f-970c-ac48fb5aab9d.webp?v=1713858429","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d7c876abf685d8d865254d072aed92eb0aaf97_94ed3787-1b98-44b0-8fc3-7f8e9fed1b56.webp?v=1713858431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66644b0b97c215d057ef43c563437344fdec9e7b_e1ef61aa-21c6-46de-9157-6be9782f294b.webp?v=1713858434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7aa14cdae7d0125b0e1332f605ff250e36a426c6_082571ca-5bae-4b7a-a8b6-5585ac63f779.webp?v=1713858437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b5ed2fde77b880222b0e1b58d456a4b321ede1_f594b6c9-1ea1-4716-831c-f24cf3f25104.webp?v=1713858440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1b44ec6cb34f989c7d2bdf41225e9af5c89ac5_e59ec72c-fcfe-456d-bd16-617b35734062.webp?v=1713858443"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6023b94b2a4418eafc388158cfb7b3ad957dbee7_ac243e8c-d6dc-42c0-8c8f-35801846cab9.webp?v=1713858417","options":["color"],"media":[{"alt":null,"id":23789336985699,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6023b94b2a4418eafc388158cfb7b3ad957dbee7_ac243e8c-d6dc-42c0-8c8f-35801846cab9.webp?v=1713858417"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6023b94b2a4418eafc388158cfb7b3ad957dbee7_ac243e8c-d6dc-42c0-8c8f-35801846cab9.webp?v=1713858417","width":2000},{"alt":null,"id":23789337641059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772f5b85bbb8af403a1f94312f02e07e4a1652f2_1aefec2b-f13e-43ba-b3c9-d2292d298036.webp?v=1713858419"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772f5b85bbb8af403a1f94312f02e07e4a1652f2_1aefec2b-f13e-43ba-b3c9-d2292d298036.webp?v=1713858419","width":2000},{"alt":null,"id":23789338329187,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7693ccbd63813e1c450663e0fc83cff0c014d0a_a49510b7-5fd6-4f4f-85cc-bea29e89991e.webp?v=1713858421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7693ccbd63813e1c450663e0fc83cff0c014d0a_a49510b7-5fd6-4f4f-85cc-bea29e89991e.webp?v=1713858421","width":2000},{"alt":null,"id":23789338853475,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e3c6df2d629ec56c691017e2513fe6cc039eccf_a6c2273d-16de-4e10-877d-6c37bd9c89cf.webp?v=1713858424"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e3c6df2d629ec56c691017e2513fe6cc039eccf_a6c2273d-16de-4e10-877d-6c37bd9c89cf.webp?v=1713858424","width":2000},{"alt":null,"id":23789339574371,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3afee2d4a529ea9a3be4dd164a118573d36b066_1d637b29-c8c0-45fb-90b6-b6aab0e3e5ba.webp?v=1713858426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3afee2d4a529ea9a3be4dd164a118573d36b066_1d637b29-c8c0-45fb-90b6-b6aab0e3e5ba.webp?v=1713858426","width":2000},{"alt":null,"id":23789340033123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c6d85b10bd2a96830b63c80d7e7f323a81c5257_d07059a1-d619-4c5f-970c-ac48fb5aab9d.webp?v=1713858429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c6d85b10bd2a96830b63c80d7e7f323a81c5257_d07059a1-d619-4c5f-970c-ac48fb5aab9d.webp?v=1713858429","width":2000},{"alt":null,"id":23789340622947,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d7c876abf685d8d865254d072aed92eb0aaf97_94ed3787-1b98-44b0-8fc3-7f8e9fed1b56.webp?v=1713858431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d7c876abf685d8d865254d072aed92eb0aaf97_94ed3787-1b98-44b0-8fc3-7f8e9fed1b56.webp?v=1713858431","width":2000},{"alt":null,"id":23789341278307,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66644b0b97c215d057ef43c563437344fdec9e7b_e1ef61aa-21c6-46de-9157-6be9782f294b.webp?v=1713858434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66644b0b97c215d057ef43c563437344fdec9e7b_e1ef61aa-21c6-46de-9157-6be9782f294b.webp?v=1713858434","width":2000},{"alt":null,"id":23789342163043,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7aa14cdae7d0125b0e1332f605ff250e36a426c6_082571ca-5bae-4b7a-a8b6-5585ac63f779.webp?v=1713858437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7aa14cdae7d0125b0e1332f605ff250e36a426c6_082571ca-5bae-4b7a-a8b6-5585ac63f779.webp?v=1713858437","width":2000},{"alt":null,"id":23789342883939,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b5ed2fde77b880222b0e1b58d456a4b321ede1_f594b6c9-1ea1-4716-831c-f24cf3f25104.webp?v=1713858440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b5ed2fde77b880222b0e1b58d456a4b321ede1_f594b6c9-1ea1-4716-831c-f24cf3f25104.webp?v=1713858440","width":2000},{"alt":null,"id":23789343572067,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1b44ec6cb34f989c7d2bdf41225e9af5c89ac5_e59ec72c-fcfe-456d-bd16-617b35734062.webp?v=1713858443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1b44ec6cb34f989c7d2bdf41225e9af5c89ac5_e59ec72c-fcfe-456d-bd16-617b35734062.webp?v=1713858443","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793742012515,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31387098841187,"product_id":7369220030563,"position":2,"created_at":"2024-04-23T15:46:59+08:00","updated_at":"2024-04-23T15:46:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772f5b85bbb8af403a1f94312f02e07e4a1652f2_1aefec2b-f13e-43ba-b3c9-d2292d298036.webp?v=1713858419","variant_ids":[41793742012515]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 夏日活動 - 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-PL61","featured_media":{"alt":null,"id":23789337641059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772f5b85bbb8af403a1f94312f02e07e4a1652f2_1aefec2b-f13e-43ba-b3c9-d2292d298036.webp?v=1713858419"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793742012515,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31387098841187,"product_id":7369220030563,"position":2,"created_at":"2024-04-23T15:46:59+08:00","updated_at":"2024-04-23T15:46:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772f5b85bbb8af403a1f94312f02e07e4a1652f2_1aefec2b-f13e-43ba-b3c9-d2292d298036.webp?v=1713858419","variant_ids":[41793742012515]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 夏日活動 - 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-PL61","featured_media":{"alt":null,"id":23789337641059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772f5b85bbb8af403a1f94312f02e07e4a1652f2_1aefec2b-f13e-43ba-b3c9-d2292d298036.webp?v=1713858419"}},"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: "停產" }