$product = {"id":7415017734243,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 願傷疤 有天開出花(澳洲叢林大火)","handle":"iphone-12-mini-mod-nx-magsafe-printable-af02","description":null,"published_at":"2024-06-11T17:55:45+08:00","created_at":"2024-05-05T20:07:12+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41910985326691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487937740899,"product_id":7415017734243,"position":8,"created_at":"2024-05-05T20:07:32+08:00","updated_at":"2024-05-05T20:07:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98f2830178f1a8663ead7bb78986a3261fa9167_cf27f0c1-7712-49b3-8af2-63d2c181ed1b.webp?v=1714910852","variant_ids":[41910985326691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 願傷疤 有天開出花(澳洲叢林大火) - 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-AF02","featured_media":{"alt":null,"id":23893281833059,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98f2830178f1a8663ead7bb78986a3261fa9167_cf27f0c1-7712-49b3-8af2-63d2c181ed1b.webp?v=1714910852"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4c1d016557904d7dab948bf7243947eb2a16294_d84b3ef6-2958-4033-9d70-a5312b36af18.webp?v=1714910835","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23ec73d9d3d418f2085a23571ab32b24d858fe9f_864ff0d5-16e7-4121-8e13-8c35b6f51e65.webp?v=1714910837","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/768d53ff23ed619b95a4f38dd954e07426a0358a_783197f4-c713-4211-b1c8-ffb46e77c1c8.webp?v=1714910840","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e088de3c63d61fcef798a38d9c048cc7c41324ee_1442cbef-8b76-4b55-b87c-18b7edfba429.webp?v=1714910842","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e737847d5638c53ce5a8f2fb694174a4663124_b7d7a14a-010c-4bd0-9dc2-9d6b3cd37c3e.webp?v=1714910845","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b87cfeb77a3efd301f62903e5f630a198d68228_bef2b8ed-6444-42ce-af4d-489f6d91c37a.webp?v=1714910847","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6f00c45db4cce5d6463893228225bd103a6f8ca_efcee4bc-2cc9-42a4-8c0f-b811b9c46514.webp?v=1714910849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98f2830178f1a8663ead7bb78986a3261fa9167_cf27f0c1-7712-49b3-8af2-63d2c181ed1b.webp?v=1714910852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a5dd8e40f02b2f6855adca3d4e6216225c037e_1b126b85-8c9d-4eae-aa06-56666e73441c.webp?v=1714910854","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/645bb9fb4803c17f544635d36408d78d7cbd88c8_da1df27e-eb3b-41c4-89ee-83f45c17dea3.webp?v=1714910857","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1506918ac9dc87a9defcfa93a42f38720dac346_4e40a894-469d-402f-a133-ceda185ebc0b.webp?v=1714910859"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4c1d016557904d7dab948bf7243947eb2a16294_d84b3ef6-2958-4033-9d70-a5312b36af18.webp?v=1714910835","options":["color"],"media":[{"alt":null,"id":23893277999203,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4c1d016557904d7dab948bf7243947eb2a16294_d84b3ef6-2958-4033-9d70-a5312b36af18.webp?v=1714910835"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4c1d016557904d7dab948bf7243947eb2a16294_d84b3ef6-2958-4033-9d70-a5312b36af18.webp?v=1714910835","width":2000},{"alt":null,"id":23893278490723,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23ec73d9d3d418f2085a23571ab32b24d858fe9f_864ff0d5-16e7-4121-8e13-8c35b6f51e65.webp?v=1714910837"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23ec73d9d3d418f2085a23571ab32b24d858fe9f_864ff0d5-16e7-4121-8e13-8c35b6f51e65.webp?v=1714910837","width":2000},{"alt":null,"id":23893279015011,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/768d53ff23ed619b95a4f38dd954e07426a0358a_783197f4-c713-4211-b1c8-ffb46e77c1c8.webp?v=1714910840"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/768d53ff23ed619b95a4f38dd954e07426a0358a_783197f4-c713-4211-b1c8-ffb46e77c1c8.webp?v=1714910840","width":2000},{"alt":null,"id":23893279670371,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e088de3c63d61fcef798a38d9c048cc7c41324ee_1442cbef-8b76-4b55-b87c-18b7edfba429.webp?v=1714910842"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e088de3c63d61fcef798a38d9c048cc7c41324ee_1442cbef-8b76-4b55-b87c-18b7edfba429.webp?v=1714910842","width":2000},{"alt":null,"id":23893280391267,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e737847d5638c53ce5a8f2fb694174a4663124_b7d7a14a-010c-4bd0-9dc2-9d6b3cd37c3e.webp?v=1714910845"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e737847d5638c53ce5a8f2fb694174a4663124_b7d7a14a-010c-4bd0-9dc2-9d6b3cd37c3e.webp?v=1714910845","width":2000},{"alt":null,"id":23893280850019,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b87cfeb77a3efd301f62903e5f630a198d68228_bef2b8ed-6444-42ce-af4d-489f6d91c37a.webp?v=1714910847"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b87cfeb77a3efd301f62903e5f630a198d68228_bef2b8ed-6444-42ce-af4d-489f6d91c37a.webp?v=1714910847","width":2000},{"alt":null,"id":23893281243235,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6f00c45db4cce5d6463893228225bd103a6f8ca_efcee4bc-2cc9-42a4-8c0f-b811b9c46514.webp?v=1714910849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6f00c45db4cce5d6463893228225bd103a6f8ca_efcee4bc-2cc9-42a4-8c0f-b811b9c46514.webp?v=1714910849","width":2000},{"alt":null,"id":23893281833059,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98f2830178f1a8663ead7bb78986a3261fa9167_cf27f0c1-7712-49b3-8af2-63d2c181ed1b.webp?v=1714910852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98f2830178f1a8663ead7bb78986a3261fa9167_cf27f0c1-7712-49b3-8af2-63d2c181ed1b.webp?v=1714910852","width":2000},{"alt":null,"id":23893282422883,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a5dd8e40f02b2f6855adca3d4e6216225c037e_1b126b85-8c9d-4eae-aa06-56666e73441c.webp?v=1714910854"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a5dd8e40f02b2f6855adca3d4e6216225c037e_1b126b85-8c9d-4eae-aa06-56666e73441c.webp?v=1714910854","width":2000},{"alt":null,"id":23893283405923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/645bb9fb4803c17f544635d36408d78d7cbd88c8_da1df27e-eb3b-41c4-89ee-83f45c17dea3.webp?v=1714910857"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/645bb9fb4803c17f544635d36408d78d7cbd88c8_da1df27e-eb3b-41c4-89ee-83f45c17dea3.webp?v=1714910857","width":2000},{"alt":null,"id":23893284192355,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1506918ac9dc87a9defcfa93a42f38720dac346_4e40a894-469d-402f-a133-ceda185ebc0b.webp?v=1714910859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1506918ac9dc87a9defcfa93a42f38720dac346_4e40a894-469d-402f-a133-ceda185ebc0b.webp?v=1714910859","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910985326691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487937740899,"product_id":7415017734243,"position":8,"created_at":"2024-05-05T20:07:32+08:00","updated_at":"2024-05-05T20:07:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98f2830178f1a8663ead7bb78986a3261fa9167_cf27f0c1-7712-49b3-8af2-63d2c181ed1b.webp?v=1714910852","variant_ids":[41910985326691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 願傷疤 有天開出花(澳洲叢林大火) - 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-AF02","featured_media":{"alt":null,"id":23893281833059,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98f2830178f1a8663ead7bb78986a3261fa9167_cf27f0c1-7712-49b3-8af2-63d2c181ed1b.webp?v=1714910852"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910985326691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487937740899,"product_id":7415017734243,"position":8,"created_at":"2024-05-05T20:07:32+08:00","updated_at":"2024-05-05T20:07:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98f2830178f1a8663ead7bb78986a3261fa9167_cf27f0c1-7712-49b3-8af2-63d2c181ed1b.webp?v=1714910852","variant_ids":[41910985326691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 願傷疤 有天開出花(澳洲叢林大火) - 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-AF02","featured_media":{"alt":null,"id":23893281833059,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98f2830178f1a8663ead7bb78986a3261fa9167_cf27f0c1-7712-49b3-8af2-63d2c181ed1b.webp?v=1714910852"}},"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: "停產" }