$product = {"id":7414983917667,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 蝙蝠俠出任務","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb06","description":null,"published_at":"2024-06-11T17:54:50+08:00","created_at":"2024-05-05T20:00:48+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","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":41910626156643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487851823203,"product_id":7414983917667,"position":9,"created_at":"2024-05-05T20:01:11+08:00","updated_at":"2024-05-05T20:01:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba3e062b673a226c562c2a9d5587190c9c67b9e5_134d0360-8816-4eff-9232-d7d1fac0f36a.webp?v=1714910471","variant_ids":[41910626156643]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 蝙蝠俠出任務 - 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-SB06","featured_media":{"alt":null,"id":23893195849827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba3e062b673a226c562c2a9d5587190c9c67b9e5_134d0360-8816-4eff-9232-d7d1fac0f36a.webp?v=1714910471"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a0e777b4d45490eaf1c014c9ad6fa16e2aa483a_034f7d82-1d58-469b-bc24-cc114058b9ea.webp?v=1714910450","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a38ff08679f7cbca2d040d854efb02c4a6f33eb_a94f890a-74ab-46f3-843d-6a65357e80c6.webp?v=1714910453","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b70208f07cbbfb9dd3073357be644256241effd_8bb4eef7-1c12-49f1-904b-b2ae7ee6e1ae.webp?v=1714910456","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/843245bdaac641daa29371f36ea9f96a5dc40c33_607b3640-92ff-4f9a-b189-c70cc18675c3.webp?v=1714910458","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1b6be75e24bbb38bf6c56180a3edfbe9471a8f_c34f110a-d7d4-498e-8de9-01824618407f.webp?v=1714910461","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad0661b9aa372870567aabb0dac6a5a1ac1b74bc_dd48163e-21a7-44f4-a812-2ec6eaff7d8c.webp?v=1714910463","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a598e1321e1cb6ff76db2c4290af43b42f0eaf1b_cf20f1d2-e610-4f79-9c6e-14baddebde35.webp?v=1714910466","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f5c686475ed0ad7ab366f7d7e42aa33424b9ca_2c1b371e-32f8-4213-9e89-79805d4c4ea0.webp?v=1714910468","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba3e062b673a226c562c2a9d5587190c9c67b9e5_134d0360-8816-4eff-9232-d7d1fac0f36a.webp?v=1714910471","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6030e565f0333e701d17ebc565816173f5bbe6b1_f26adae3-8e54-4ef1-b0fb-d23e34cb8c71.webp?v=1714910474","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d84d2681ca727951829570bf2719eef77f6e5f_af13e05a-db2d-4f8e-8242-e8cfd9ac04a1.webp?v=1714910476"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a0e777b4d45490eaf1c014c9ad6fa16e2aa483a_034f7d82-1d58-469b-bc24-cc114058b9ea.webp?v=1714910450","options":["color"],"media":[{"alt":null,"id":23893190344803,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a0e777b4d45490eaf1c014c9ad6fa16e2aa483a_034f7d82-1d58-469b-bc24-cc114058b9ea.webp?v=1714910450"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a0e777b4d45490eaf1c014c9ad6fa16e2aa483a_034f7d82-1d58-469b-bc24-cc114058b9ea.webp?v=1714910450","width":2000},{"alt":null,"id":23893191065699,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a38ff08679f7cbca2d040d854efb02c4a6f33eb_a94f890a-74ab-46f3-843d-6a65357e80c6.webp?v=1714910453"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a38ff08679f7cbca2d040d854efb02c4a6f33eb_a94f890a-74ab-46f3-843d-6a65357e80c6.webp?v=1714910453","width":2000},{"alt":null,"id":23893191721059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b70208f07cbbfb9dd3073357be644256241effd_8bb4eef7-1c12-49f1-904b-b2ae7ee6e1ae.webp?v=1714910456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b70208f07cbbfb9dd3073357be644256241effd_8bb4eef7-1c12-49f1-904b-b2ae7ee6e1ae.webp?v=1714910456","width":2000},{"alt":null,"id":23893192474723,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/843245bdaac641daa29371f36ea9f96a5dc40c33_607b3640-92ff-4f9a-b189-c70cc18675c3.webp?v=1714910458"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/843245bdaac641daa29371f36ea9f96a5dc40c33_607b3640-92ff-4f9a-b189-c70cc18675c3.webp?v=1714910458","width":2000},{"alt":null,"id":23893193392227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1b6be75e24bbb38bf6c56180a3edfbe9471a8f_c34f110a-d7d4-498e-8de9-01824618407f.webp?v=1714910461"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1b6be75e24bbb38bf6c56180a3edfbe9471a8f_c34f110a-d7d4-498e-8de9-01824618407f.webp?v=1714910461","width":2000},{"alt":null,"id":23893193850979,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad0661b9aa372870567aabb0dac6a5a1ac1b74bc_dd48163e-21a7-44f4-a812-2ec6eaff7d8c.webp?v=1714910463"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad0661b9aa372870567aabb0dac6a5a1ac1b74bc_dd48163e-21a7-44f4-a812-2ec6eaff7d8c.webp?v=1714910463","width":2000},{"alt":null,"id":23893194571875,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a598e1321e1cb6ff76db2c4290af43b42f0eaf1b_cf20f1d2-e610-4f79-9c6e-14baddebde35.webp?v=1714910466"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a598e1321e1cb6ff76db2c4290af43b42f0eaf1b_cf20f1d2-e610-4f79-9c6e-14baddebde35.webp?v=1714910466","width":2000},{"alt":null,"id":23893195030627,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f5c686475ed0ad7ab366f7d7e42aa33424b9ca_2c1b371e-32f8-4213-9e89-79805d4c4ea0.webp?v=1714910468"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f5c686475ed0ad7ab366f7d7e42aa33424b9ca_2c1b371e-32f8-4213-9e89-79805d4c4ea0.webp?v=1714910468","width":2000},{"alt":null,"id":23893195849827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba3e062b673a226c562c2a9d5587190c9c67b9e5_134d0360-8816-4eff-9232-d7d1fac0f36a.webp?v=1714910471"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba3e062b673a226c562c2a9d5587190c9c67b9e5_134d0360-8816-4eff-9232-d7d1fac0f36a.webp?v=1714910471","width":2000},{"alt":null,"id":23893196308579,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6030e565f0333e701d17ebc565816173f5bbe6b1_f26adae3-8e54-4ef1-b0fb-d23e34cb8c71.webp?v=1714910474"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6030e565f0333e701d17ebc565816173f5bbe6b1_f26adae3-8e54-4ef1-b0fb-d23e34cb8c71.webp?v=1714910474","width":2000},{"alt":null,"id":23893197127779,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d84d2681ca727951829570bf2719eef77f6e5f_af13e05a-db2d-4f8e-8242-e8cfd9ac04a1.webp?v=1714910476"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d84d2681ca727951829570bf2719eef77f6e5f_af13e05a-db2d-4f8e-8242-e8cfd9ac04a1.webp?v=1714910476","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910626156643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487851823203,"product_id":7414983917667,"position":9,"created_at":"2024-05-05T20:01:11+08:00","updated_at":"2024-05-05T20:01:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba3e062b673a226c562c2a9d5587190c9c67b9e5_134d0360-8816-4eff-9232-d7d1fac0f36a.webp?v=1714910471","variant_ids":[41910626156643]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 蝙蝠俠出任務 - 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-SB06","featured_media":{"alt":null,"id":23893195849827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba3e062b673a226c562c2a9d5587190c9c67b9e5_134d0360-8816-4eff-9232-d7d1fac0f36a.webp?v=1714910471"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910626156643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487851823203,"product_id":7414983917667,"position":9,"created_at":"2024-05-05T20:01:11+08:00","updated_at":"2024-05-05T20:01:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba3e062b673a226c562c2a9d5587190c9c67b9e5_134d0360-8816-4eff-9232-d7d1fac0f36a.webp?v=1714910471","variant_ids":[41910626156643]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 蝙蝠俠出任務 - 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-SB06","featured_media":{"alt":null,"id":23893195849827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba3e062b673a226c562c2a9d5587190c9c67b9e5_134d0360-8816-4eff-9232-d7d1fac0f36a.webp?v=1714910471"}},"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: "停產" }