$product = {"id":7414993944675,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb55","description":null,"published_at":"2024-06-11T17:55:06+08:00","created_at":"2024-05-05T20:02:38+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":41910727835747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31487872106595,"product_id":7414993944675,"position":1,"created_at":"2024-05-05T20:02:40+08:00","updated_at":"2024-05-05T20:02:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1b8c123f1a0f45292d524d97a6b26ce2eb12d8_6ab25a4d-b9c3-48a0-917e-a230d68497ff.webp?v=1714910560","variant_ids":[41910727835747]},"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-PB55","featured_media":{"alt":null,"id":23893216165987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1b8c123f1a0f45292d524d97a6b26ce2eb12d8_6ab25a4d-b9c3-48a0-917e-a230d68497ff.webp?v=1714910560"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1b8c123f1a0f45292d524d97a6b26ce2eb12d8_6ab25a4d-b9c3-48a0-917e-a230d68497ff.webp?v=1714910560","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f155a238f1a332156fc22f3bd5580c945c1bec7_4ebad679-dd87-4800-9b4e-c858604dd5a6.webp?v=1714910563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3480e88c9fccf242387f61d1ac2c2d80eb881875_163122ca-cf03-4a50-8f49-4ae6ac922a4f.webp?v=1714910565","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b08c90fded72404a9e77247592095250de06a6f_ec867b5a-3c2c-443d-94ad-e5ef6c071044.webp?v=1714910567","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d69dde3ed948a3bcdcc4443a7288d0aa21d78dd_5297fec9-6d1f-4c59-ab69-1d886565e08a.webp?v=1714910569","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/121d122abd5bb71630a07aa5e8049ddc04efa411_ddedb4d8-de55-484e-b0eb-613065660e32.webp?v=1714910572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f05ae3f9d9877e13133a56c28dfd492d8cbdf24_03e2bdd9-1f11-4959-824a-2d118f2da4fd.webp?v=1714910574","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ccce72141e7fd225ecb4fb576548b68f166ef47_9546e9cc-7b4f-48c0-85bc-58fea82c4a71.webp?v=1714910576","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ad54b2cb8c7eadf0ec87fad1ffea7c4c02edb62_0679063b-5370-4557-913d-f352de4748c9.webp?v=1714910579","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3dd2f7256ac84beb4a2b27d37d0a638198684036_6e52e25c-226c-4b93-97bf-88bcc4eaf28e.webp?v=1714910581","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e17a0ff465dbb1359cefd046d48999147f362a5_60585c6c-2ef0-4234-b747-020ef1e7d69d.webp?v=1714910584"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1b8c123f1a0f45292d524d97a6b26ce2eb12d8_6ab25a4d-b9c3-48a0-917e-a230d68497ff.webp?v=1714910560","options":["color"],"media":[{"alt":null,"id":23893216165987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1b8c123f1a0f45292d524d97a6b26ce2eb12d8_6ab25a4d-b9c3-48a0-917e-a230d68497ff.webp?v=1714910560"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1b8c123f1a0f45292d524d97a6b26ce2eb12d8_6ab25a4d-b9c3-48a0-917e-a230d68497ff.webp?v=1714910560","width":2000},{"alt":null,"id":23893216591971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f155a238f1a332156fc22f3bd5580c945c1bec7_4ebad679-dd87-4800-9b4e-c858604dd5a6.webp?v=1714910563"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f155a238f1a332156fc22f3bd5580c945c1bec7_4ebad679-dd87-4800-9b4e-c858604dd5a6.webp?v=1714910563","width":2000},{"alt":null,"id":23893217443939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3480e88c9fccf242387f61d1ac2c2d80eb881875_163122ca-cf03-4a50-8f49-4ae6ac922a4f.webp?v=1714910565"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3480e88c9fccf242387f61d1ac2c2d80eb881875_163122ca-cf03-4a50-8f49-4ae6ac922a4f.webp?v=1714910565","width":2000},{"alt":null,"id":23893217869923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b08c90fded72404a9e77247592095250de06a6f_ec867b5a-3c2c-443d-94ad-e5ef6c071044.webp?v=1714910567"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b08c90fded72404a9e77247592095250de06a6f_ec867b5a-3c2c-443d-94ad-e5ef6c071044.webp?v=1714910567","width":2000},{"alt":null,"id":23893218361443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d69dde3ed948a3bcdcc4443a7288d0aa21d78dd_5297fec9-6d1f-4c59-ab69-1d886565e08a.webp?v=1714910569"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d69dde3ed948a3bcdcc4443a7288d0aa21d78dd_5297fec9-6d1f-4c59-ab69-1d886565e08a.webp?v=1714910569","width":2000},{"alt":null,"id":23893218885731,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/121d122abd5bb71630a07aa5e8049ddc04efa411_ddedb4d8-de55-484e-b0eb-613065660e32.webp?v=1714910572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/121d122abd5bb71630a07aa5e8049ddc04efa411_ddedb4d8-de55-484e-b0eb-613065660e32.webp?v=1714910572","width":2000},{"alt":null,"id":23893219704931,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f05ae3f9d9877e13133a56c28dfd492d8cbdf24_03e2bdd9-1f11-4959-824a-2d118f2da4fd.webp?v=1714910574"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f05ae3f9d9877e13133a56c28dfd492d8cbdf24_03e2bdd9-1f11-4959-824a-2d118f2da4fd.webp?v=1714910574","width":2000},{"alt":null,"id":23893220130915,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ccce72141e7fd225ecb4fb576548b68f166ef47_9546e9cc-7b4f-48c0-85bc-58fea82c4a71.webp?v=1714910576"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ccce72141e7fd225ecb4fb576548b68f166ef47_9546e9cc-7b4f-48c0-85bc-58fea82c4a71.webp?v=1714910576","width":2000},{"alt":null,"id":23893220917347,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ad54b2cb8c7eadf0ec87fad1ffea7c4c02edb62_0679063b-5370-4557-913d-f352de4748c9.webp?v=1714910579"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ad54b2cb8c7eadf0ec87fad1ffea7c4c02edb62_0679063b-5370-4557-913d-f352de4748c9.webp?v=1714910579","width":2000},{"alt":null,"id":23893221441635,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3dd2f7256ac84beb4a2b27d37d0a638198684036_6e52e25c-226c-4b93-97bf-88bcc4eaf28e.webp?v=1714910581"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3dd2f7256ac84beb4a2b27d37d0a638198684036_6e52e25c-226c-4b93-97bf-88bcc4eaf28e.webp?v=1714910581","width":2000},{"alt":null,"id":23893221900387,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e17a0ff465dbb1359cefd046d48999147f362a5_60585c6c-2ef0-4234-b747-020ef1e7d69d.webp?v=1714910584"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e17a0ff465dbb1359cefd046d48999147f362a5_60585c6c-2ef0-4234-b747-020ef1e7d69d.webp?v=1714910584","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910727835747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31487872106595,"product_id":7414993944675,"position":1,"created_at":"2024-05-05T20:02:40+08:00","updated_at":"2024-05-05T20:02:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1b8c123f1a0f45292d524d97a6b26ce2eb12d8_6ab25a4d-b9c3-48a0-917e-a230d68497ff.webp?v=1714910560","variant_ids":[41910727835747]},"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-PB55","featured_media":{"alt":null,"id":23893216165987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1b8c123f1a0f45292d524d97a6b26ce2eb12d8_6ab25a4d-b9c3-48a0-917e-a230d68497ff.webp?v=1714910560"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910727835747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31487872106595,"product_id":7414993944675,"position":1,"created_at":"2024-05-05T20:02:40+08:00","updated_at":"2024-05-05T20:02:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1b8c123f1a0f45292d524d97a6b26ce2eb12d8_6ab25a4d-b9c3-48a0-917e-a230d68497ff.webp?v=1714910560","variant_ids":[41910727835747]},"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-PB55","featured_media":{"alt":null,"id":23893216165987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1b8c123f1a0f45292d524d97a6b26ce2eb12d8_6ab25a4d-b9c3-48a0-917e-a230d68497ff.webp?v=1714910560"}},"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: "停產" }