$product = {"id":7414979854435,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星際大戰四部曲:曙光乍現-電影海報","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb101","description":null,"published_at":"2024-06-11T17:54:43+08:00","created_at":"2024-05-05T19:59:57+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":41910579691619,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31487833243747,"product_id":7414979854435,"position":1,"created_at":"2024-05-05T19:59:59+08:00","updated_at":"2024-05-05T19:59:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab4dca7e7928ea2409d4933160584365cb21207c_a88affbc-a231-4ec8-aa0d-cda02e713565.webp?v=1714910399","variant_ids":[41910579691619]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星際大戰四部曲:曙光乍現-電影海報 - 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-PB101","featured_media":{"alt":null,"id":23893177270371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab4dca7e7928ea2409d4933160584365cb21207c_a88affbc-a231-4ec8-aa0d-cda02e713565.webp?v=1714910399"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab4dca7e7928ea2409d4933160584365cb21207c_a88affbc-a231-4ec8-aa0d-cda02e713565.webp?v=1714910399","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0a07f74b8e0985d1d2dc77db3cc99ba1f4f77_b6ef19ce-f3e9-44a5-a8ea-dde0de91a34c.webp?v=1714910401","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/446966bb2e9418151988fc6abb113967f2c7e785_4ec88122-b801-484a-95b7-3dbb7d95a6d7.webp?v=1714910404","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5f08e535579dbee14a8a82ecf9c4865a31e54ef_80310ad1-4295-4d9a-a8b9-70f5ec79bed8.webp?v=1714910406","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8a47927efbaf286136291684a4e6484233b1b77_91c3b960-5e00-4ded-bd41-56a338236521.webp?v=1714910409","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/265c853675d627a80f975ac1df03d2f0fae747de_98f705c3-586a-45cb-8955-eff0155aea7d.webp?v=1714910411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94f830520ff0f98a29280f83a395792b427d74eb_ed1411aa-7c25-4d80-885d-4a02c229ed03.webp?v=1714910413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efeaeceb23641ecfdf73a638c69a88084550332f_9e7f5d03-23a4-4be5-8c03-fd107486b70a.webp?v=1714910416","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1e472af168a69f675a189b535de6b57c60ef0b4_04fc9518-65e4-4b47-875a-b5500c6ca021.webp?v=1714910418","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e09134ec68f9eace81f67c1e3230f9b1c1c3f1c_b883da92-6856-44d6-a5b3-7b56f551fad4.webp?v=1714910421","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b48c463f4158fd2b85163b27c286c9b7ab9eef7_f275ccef-707c-42b5-a373-2b5a6e1ce51d.webp?v=1714910423"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab4dca7e7928ea2409d4933160584365cb21207c_a88affbc-a231-4ec8-aa0d-cda02e713565.webp?v=1714910399","options":["color"],"media":[{"alt":null,"id":23893177270371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab4dca7e7928ea2409d4933160584365cb21207c_a88affbc-a231-4ec8-aa0d-cda02e713565.webp?v=1714910399"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab4dca7e7928ea2409d4933160584365cb21207c_a88affbc-a231-4ec8-aa0d-cda02e713565.webp?v=1714910399","width":2000},{"alt":null,"id":23893177794659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0a07f74b8e0985d1d2dc77db3cc99ba1f4f77_b6ef19ce-f3e9-44a5-a8ea-dde0de91a34c.webp?v=1714910401"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0a07f74b8e0985d1d2dc77db3cc99ba1f4f77_b6ef19ce-f3e9-44a5-a8ea-dde0de91a34c.webp?v=1714910401","width":2000},{"alt":null,"id":23893178351715,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/446966bb2e9418151988fc6abb113967f2c7e785_4ec88122-b801-484a-95b7-3dbb7d95a6d7.webp?v=1714910404"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/446966bb2e9418151988fc6abb113967f2c7e785_4ec88122-b801-484a-95b7-3dbb7d95a6d7.webp?v=1714910404","width":2000},{"alt":null,"id":23893178941539,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5f08e535579dbee14a8a82ecf9c4865a31e54ef_80310ad1-4295-4d9a-a8b9-70f5ec79bed8.webp?v=1714910406"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5f08e535579dbee14a8a82ecf9c4865a31e54ef_80310ad1-4295-4d9a-a8b9-70f5ec79bed8.webp?v=1714910406","width":2000},{"alt":null,"id":23893179367523,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8a47927efbaf286136291684a4e6484233b1b77_91c3b960-5e00-4ded-bd41-56a338236521.webp?v=1714910409"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8a47927efbaf286136291684a4e6484233b1b77_91c3b960-5e00-4ded-bd41-56a338236521.webp?v=1714910409","width":2000},{"alt":null,"id":23893180219491,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/265c853675d627a80f975ac1df03d2f0fae747de_98f705c3-586a-45cb-8955-eff0155aea7d.webp?v=1714910411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/265c853675d627a80f975ac1df03d2f0fae747de_98f705c3-586a-45cb-8955-eff0155aea7d.webp?v=1714910411","width":2000},{"alt":null,"id":23893181038691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94f830520ff0f98a29280f83a395792b427d74eb_ed1411aa-7c25-4d80-885d-4a02c229ed03.webp?v=1714910413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94f830520ff0f98a29280f83a395792b427d74eb_ed1411aa-7c25-4d80-885d-4a02c229ed03.webp?v=1714910413","width":2000},{"alt":null,"id":23893181694051,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efeaeceb23641ecfdf73a638c69a88084550332f_9e7f5d03-23a4-4be5-8c03-fd107486b70a.webp?v=1714910416"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efeaeceb23641ecfdf73a638c69a88084550332f_9e7f5d03-23a4-4be5-8c03-fd107486b70a.webp?v=1714910416","width":2000},{"alt":null,"id":23893182120035,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1e472af168a69f675a189b535de6b57c60ef0b4_04fc9518-65e4-4b47-875a-b5500c6ca021.webp?v=1714910418"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1e472af168a69f675a189b535de6b57c60ef0b4_04fc9518-65e4-4b47-875a-b5500c6ca021.webp?v=1714910418","width":2000},{"alt":null,"id":23893182677091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e09134ec68f9eace81f67c1e3230f9b1c1c3f1c_b883da92-6856-44d6-a5b3-7b56f551fad4.webp?v=1714910421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e09134ec68f9eace81f67c1e3230f9b1c1c3f1c_b883da92-6856-44d6-a5b3-7b56f551fad4.webp?v=1714910421","width":2000},{"alt":null,"id":23893183430755,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b48c463f4158fd2b85163b27c286c9b7ab9eef7_f275ccef-707c-42b5-a373-2b5a6e1ce51d.webp?v=1714910423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b48c463f4158fd2b85163b27c286c9b7ab9eef7_f275ccef-707c-42b5-a373-2b5a6e1ce51d.webp?v=1714910423","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910579691619,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31487833243747,"product_id":7414979854435,"position":1,"created_at":"2024-05-05T19:59:59+08:00","updated_at":"2024-05-05T19:59:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab4dca7e7928ea2409d4933160584365cb21207c_a88affbc-a231-4ec8-aa0d-cda02e713565.webp?v=1714910399","variant_ids":[41910579691619]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星際大戰四部曲:曙光乍現-電影海報 - 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-PB101","featured_media":{"alt":null,"id":23893177270371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab4dca7e7928ea2409d4933160584365cb21207c_a88affbc-a231-4ec8-aa0d-cda02e713565.webp?v=1714910399"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910579691619,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31487833243747,"product_id":7414979854435,"position":1,"created_at":"2024-05-05T19:59:59+08:00","updated_at":"2024-05-05T19:59:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab4dca7e7928ea2409d4933160584365cb21207c_a88affbc-a231-4ec8-aa0d-cda02e713565.webp?v=1714910399","variant_ids":[41910579691619]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星際大戰四部曲:曙光乍現-電影海報 - 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-PB101","featured_media":{"alt":null,"id":23893177270371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab4dca7e7928ea2409d4933160584365cb21207c_a88affbc-a231-4ec8-aa0d-cda02e713565.webp?v=1714910399"}},"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: "停產" }