$product = {"id":7415013474403,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Weiweiboy - 可愛大龍王","handle":"iphone-12-mini-mod-nx-magsafe-printable-eo06","description":null,"published_at":"2024-06-11T17:55:38+08:00","created_at":"2024-05-05T20:06:18+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Weiweiboy","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-weiweiboy","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-weiweiboy","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":41910948233315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-EO06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487923748963,"product_id":7415013474403,"position":4,"created_at":"2024-05-05T20:06:28+08:00","updated_at":"2024-05-05T20:06:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77cc0517849163ee108343faca7a8dc6efe78e04_947e79bd-3049-42cc-bc66-46b8f90f3479.webp?v=1714910788","variant_ids":[41910948233315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Weiweiboy - 可愛大龍王 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-EO06","featured_media":{"alt":null,"id":23893267841123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77cc0517849163ee108343faca7a8dc6efe78e04_947e79bd-3049-42cc-bc66-46b8f90f3479.webp?v=1714910788"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9f59b339091a3789f7f77e74df46a1fe995f9c8_2b4faa5a-bb21-4f0f-8052-585f17ab71c0.webp?v=1714910781","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ea79388a1d0f9342f9518c9b897b427ab2e52c8_2c5a1e7c-3c58-44ac-b0b4-dcee5e7a5a79.webp?v=1714910783","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94859362c1008e02f6920b498603a0fe0614077b_f5214816-6544-45cb-af4d-4c8a4dc0d835.webp?v=1714910785","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77cc0517849163ee108343faca7a8dc6efe78e04_947e79bd-3049-42cc-bc66-46b8f90f3479.webp?v=1714910788","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9ac3b4d7c2f101d30f94cd72fbc6bd1c23f3c9_2e893600-cf18-4036-833b-f0523c332230.webp?v=1714910790","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/240170ee9a1c369dfff1713071d51474485eb871_50bcddfb-ab82-43c1-b254-0f9f98451751.webp?v=1714910801","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48ea570b0164d54c0759829aba1ea08c50bcb364_baa70c72-2c13-4692-a211-bc5ecb4d0e95.webp?v=1714910803","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56a65dabbd007e6e254dce799df8544978508fe3_6b5db1e8-ff68-4813-933c-8470a3d3be9c.webp?v=1714910806","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/400b2ea260607463665ce27d4067655f90d61f6a_9538d33d-caa0-4164-90c9-dc74965742ba.webp?v=1714910808","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/faf4339f849e3b034f9c99ea6acb2dd0772c047b_b257527d-ee0a-4585-a2e9-28efe541c938.webp?v=1714910811","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88682a90336ad16f2e15920b094e8dd8db1ba21b_bed77f67-3dfb-4a34-8b6a-7005193e4c68.webp?v=1714910813"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9f59b339091a3789f7f77e74df46a1fe995f9c8_2b4faa5a-bb21-4f0f-8052-585f17ab71c0.webp?v=1714910781","options":["color"],"media":[{"alt":null,"id":23893266399331,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9f59b339091a3789f7f77e74df46a1fe995f9c8_2b4faa5a-bb21-4f0f-8052-585f17ab71c0.webp?v=1714910781"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9f59b339091a3789f7f77e74df46a1fe995f9c8_2b4faa5a-bb21-4f0f-8052-585f17ab71c0.webp?v=1714910781","width":2000},{"alt":null,"id":23893267087459,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ea79388a1d0f9342f9518c9b897b427ab2e52c8_2c5a1e7c-3c58-44ac-b0b4-dcee5e7a5a79.webp?v=1714910783"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ea79388a1d0f9342f9518c9b897b427ab2e52c8_2c5a1e7c-3c58-44ac-b0b4-dcee5e7a5a79.webp?v=1714910783","width":2000},{"alt":null,"id":23893267316835,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94859362c1008e02f6920b498603a0fe0614077b_f5214816-6544-45cb-af4d-4c8a4dc0d835.webp?v=1714910785"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94859362c1008e02f6920b498603a0fe0614077b_f5214816-6544-45cb-af4d-4c8a4dc0d835.webp?v=1714910785","width":2000},{"alt":null,"id":23893267841123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77cc0517849163ee108343faca7a8dc6efe78e04_947e79bd-3049-42cc-bc66-46b8f90f3479.webp?v=1714910788"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77cc0517849163ee108343faca7a8dc6efe78e04_947e79bd-3049-42cc-bc66-46b8f90f3479.webp?v=1714910788","width":2000},{"alt":null,"id":23893268529251,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9ac3b4d7c2f101d30f94cd72fbc6bd1c23f3c9_2e893600-cf18-4036-833b-f0523c332230.webp?v=1714910790"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9ac3b4d7c2f101d30f94cd72fbc6bd1c23f3c9_2e893600-cf18-4036-833b-f0523c332230.webp?v=1714910790","width":2000},{"alt":null,"id":23893269807203,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/240170ee9a1c369dfff1713071d51474485eb871_50bcddfb-ab82-43c1-b254-0f9f98451751.webp?v=1714910801"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/240170ee9a1c369dfff1713071d51474485eb871_50bcddfb-ab82-43c1-b254-0f9f98451751.webp?v=1714910801","width":2000},{"alt":null,"id":23893270560867,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48ea570b0164d54c0759829aba1ea08c50bcb364_baa70c72-2c13-4692-a211-bc5ecb4d0e95.webp?v=1714910803"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48ea570b0164d54c0759829aba1ea08c50bcb364_baa70c72-2c13-4692-a211-bc5ecb4d0e95.webp?v=1714910803","width":2000},{"alt":null,"id":23893271150691,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56a65dabbd007e6e254dce799df8544978508fe3_6b5db1e8-ff68-4813-933c-8470a3d3be9c.webp?v=1714910806"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56a65dabbd007e6e254dce799df8544978508fe3_6b5db1e8-ff68-4813-933c-8470a3d3be9c.webp?v=1714910806","width":2000},{"alt":null,"id":23893271576675,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/400b2ea260607463665ce27d4067655f90d61f6a_9538d33d-caa0-4164-90c9-dc74965742ba.webp?v=1714910808"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/400b2ea260607463665ce27d4067655f90d61f6a_9538d33d-caa0-4164-90c9-dc74965742ba.webp?v=1714910808","width":2000},{"alt":null,"id":23893272100963,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/faf4339f849e3b034f9c99ea6acb2dd0772c047b_b257527d-ee0a-4585-a2e9-28efe541c938.webp?v=1714910811"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/faf4339f849e3b034f9c99ea6acb2dd0772c047b_b257527d-ee0a-4585-a2e9-28efe541c938.webp?v=1714910811","width":2000},{"alt":null,"id":23893272461411,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88682a90336ad16f2e15920b094e8dd8db1ba21b_bed77f67-3dfb-4a34-8b6a-7005193e4c68.webp?v=1714910813"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88682a90336ad16f2e15920b094e8dd8db1ba21b_bed77f67-3dfb-4a34-8b6a-7005193e4c68.webp?v=1714910813","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910948233315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-EO06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487923748963,"product_id":7415013474403,"position":4,"created_at":"2024-05-05T20:06:28+08:00","updated_at":"2024-05-05T20:06:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77cc0517849163ee108343faca7a8dc6efe78e04_947e79bd-3049-42cc-bc66-46b8f90f3479.webp?v=1714910788","variant_ids":[41910948233315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Weiweiboy - 可愛大龍王 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-EO06","featured_media":{"alt":null,"id":23893267841123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77cc0517849163ee108343faca7a8dc6efe78e04_947e79bd-3049-42cc-bc66-46b8f90f3479.webp?v=1714910788"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910948233315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-EO06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487923748963,"product_id":7415013474403,"position":4,"created_at":"2024-05-05T20:06:28+08:00","updated_at":"2024-05-05T20:06:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77cc0517849163ee108343faca7a8dc6efe78e04_947e79bd-3049-42cc-bc66-46b8f90f3479.webp?v=1714910788","variant_ids":[41910948233315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Weiweiboy - 可愛大龍王 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-EO06","featured_media":{"alt":null,"id":23893267841123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77cc0517849163ee108343faca7a8dc6efe78e04_947e79bd-3049-42cc-bc66-46b8f90f3479.webp?v=1714910788"}},"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: "停產" }