$product = {"id":7408383262819,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 貼紙系列-夏威夷紀念","handle":"iphone-12-mini-mod-nx-printable-yf05","description":null,"published_at":"2024-06-11T16:35:43+08:00","created_at":"2024-05-03T15:15:40+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-stitch","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41884871786595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472117416035,"product_id":7408383262819,"position":1,"created_at":"2024-05-03T15:15:43+08:00","updated_at":"2024-05-03T15:15:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/289c91d7a7be36ffe99e73fc8f8e3eeb0e7598d3_838c1c53-ab9f-4920-a90f-732658fcba7d.webp?v=1714720543","variant_ids":[41884871786595]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 貼紙系列-夏威夷紀念 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-YF05","featured_media":{"alt":null,"id":23877033001059,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/289c91d7a7be36ffe99e73fc8f8e3eeb0e7598d3_838c1c53-ab9f-4920-a90f-732658fcba7d.webp?v=1714720543"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/289c91d7a7be36ffe99e73fc8f8e3eeb0e7598d3_838c1c53-ab9f-4920-a90f-732658fcba7d.webp?v=1714720543","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/406f4c728cd31ef997ed7b9c484db720f0bdd570_9448c03d-249b-4203-9d43-e12a52b70266.webp?v=1714720545","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ba50da8b0739d9c647ba32c23dce3810940c405_f36f2a56-0abb-4325-b26c-522eb536215f.webp?v=1714720548","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df25ac7bea649fba43b643e6dbd4dec2a2643856_3130782c-e72d-4bcb-ac85-b123aac085f4.webp?v=1714720550","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92e5c41ce7bda0deaad90f1dc848ceb83c216e3a_fdc7a99a-dba5-4947-9c9f-b5756d71ab44.webp?v=1714720553","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5161647a263b4edc2a7f6ff37f0c4c35a476593f_ae5078d3-79a3-4cf3-9e2b-e7b6337b3bc3.webp?v=1714720555","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c82963b2f102fd0619f170a1ca14337d4f7808f_320cca85-ee51-4416-b1b3-fd41239e7cd9.webp?v=1714720558","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b069c657bdf28c8af4a13173852bbe3ca7cc13_1f759ff8-d2c8-4019-8b70-c42205aef28c.webp?v=1714720560","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c7756d13123cf6daf29eb553344dfbd02efa5f_a09b96b1-4053-4e8a-83eb-18ef618b5d88.webp?v=1714720563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9db1c80f0a93522db220c1e3d2a6099cb55fd1_9b313907-e8f9-487e-8f8e-28017aaf450c.webp?v=1714720565","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51952a9ab0ee0a2bcd00974e9b5231dc178efeca_5a38611d-fcb8-473d-994b-1d8eb3681aa9.webp?v=1714720568"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/289c91d7a7be36ffe99e73fc8f8e3eeb0e7598d3_838c1c53-ab9f-4920-a90f-732658fcba7d.webp?v=1714720543","options":["color"],"media":[{"alt":null,"id":23877033001059,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/289c91d7a7be36ffe99e73fc8f8e3eeb0e7598d3_838c1c53-ab9f-4920-a90f-732658fcba7d.webp?v=1714720543"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/289c91d7a7be36ffe99e73fc8f8e3eeb0e7598d3_838c1c53-ab9f-4920-a90f-732658fcba7d.webp?v=1714720543","width":2000},{"alt":null,"id":23877033951331,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/406f4c728cd31ef997ed7b9c484db720f0bdd570_9448c03d-249b-4203-9d43-e12a52b70266.webp?v=1714720545"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/406f4c728cd31ef997ed7b9c484db720f0bdd570_9448c03d-249b-4203-9d43-e12a52b70266.webp?v=1714720545","width":2000},{"alt":null,"id":23877034475619,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ba50da8b0739d9c647ba32c23dce3810940c405_f36f2a56-0abb-4325-b26c-522eb536215f.webp?v=1714720548"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ba50da8b0739d9c647ba32c23dce3810940c405_f36f2a56-0abb-4325-b26c-522eb536215f.webp?v=1714720548","width":2000},{"alt":null,"id":23877035065443,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df25ac7bea649fba43b643e6dbd4dec2a2643856_3130782c-e72d-4bcb-ac85-b123aac085f4.webp?v=1714720550"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df25ac7bea649fba43b643e6dbd4dec2a2643856_3130782c-e72d-4bcb-ac85-b123aac085f4.webp?v=1714720550","width":2000},{"alt":null,"id":23877035589731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92e5c41ce7bda0deaad90f1dc848ceb83c216e3a_fdc7a99a-dba5-4947-9c9f-b5756d71ab44.webp?v=1714720553"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92e5c41ce7bda0deaad90f1dc848ceb83c216e3a_fdc7a99a-dba5-4947-9c9f-b5756d71ab44.webp?v=1714720553","width":2000},{"alt":null,"id":23877036146787,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5161647a263b4edc2a7f6ff37f0c4c35a476593f_ae5078d3-79a3-4cf3-9e2b-e7b6337b3bc3.webp?v=1714720555"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5161647a263b4edc2a7f6ff37f0c4c35a476593f_ae5078d3-79a3-4cf3-9e2b-e7b6337b3bc3.webp?v=1714720555","width":2000},{"alt":null,"id":23877036605539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c82963b2f102fd0619f170a1ca14337d4f7808f_320cca85-ee51-4416-b1b3-fd41239e7cd9.webp?v=1714720558"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c82963b2f102fd0619f170a1ca14337d4f7808f_320cca85-ee51-4416-b1b3-fd41239e7cd9.webp?v=1714720558","width":2000},{"alt":null,"id":23877037359203,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b069c657bdf28c8af4a13173852bbe3ca7cc13_1f759ff8-d2c8-4019-8b70-c42205aef28c.webp?v=1714720560"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b069c657bdf28c8af4a13173852bbe3ca7cc13_1f759ff8-d2c8-4019-8b70-c42205aef28c.webp?v=1714720560","width":2000},{"alt":null,"id":23877037883491,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c7756d13123cf6daf29eb553344dfbd02efa5f_a09b96b1-4053-4e8a-83eb-18ef618b5d88.webp?v=1714720563"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c7756d13123cf6daf29eb553344dfbd02efa5f_a09b96b1-4053-4e8a-83eb-18ef618b5d88.webp?v=1714720563","width":2000},{"alt":null,"id":23877038669923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9db1c80f0a93522db220c1e3d2a6099cb55fd1_9b313907-e8f9-487e-8f8e-28017aaf450c.webp?v=1714720565"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e9db1c80f0a93522db220c1e3d2a6099cb55fd1_9b313907-e8f9-487e-8f8e-28017aaf450c.webp?v=1714720565","width":2000},{"alt":null,"id":23877039194211,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51952a9ab0ee0a2bcd00974e9b5231dc178efeca_5a38611d-fcb8-473d-994b-1d8eb3681aa9.webp?v=1714720568"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51952a9ab0ee0a2bcd00974e9b5231dc178efeca_5a38611d-fcb8-473d-994b-1d8eb3681aa9.webp?v=1714720568","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41884871786595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472117416035,"product_id":7408383262819,"position":1,"created_at":"2024-05-03T15:15:43+08:00","updated_at":"2024-05-03T15:15:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/289c91d7a7be36ffe99e73fc8f8e3eeb0e7598d3_838c1c53-ab9f-4920-a90f-732658fcba7d.webp?v=1714720543","variant_ids":[41884871786595]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 貼紙系列-夏威夷紀念 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-YF05","featured_media":{"alt":null,"id":23877033001059,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/289c91d7a7be36ffe99e73fc8f8e3eeb0e7598d3_838c1c53-ab9f-4920-a90f-732658fcba7d.webp?v=1714720543"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41884871786595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472117416035,"product_id":7408383262819,"position":1,"created_at":"2024-05-03T15:15:43+08:00","updated_at":"2024-05-03T15:15:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/289c91d7a7be36ffe99e73fc8f8e3eeb0e7598d3_838c1c53-ab9f-4920-a90f-732658fcba7d.webp?v=1714720543","variant_ids":[41884871786595]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 貼紙系列-夏威夷紀念 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-YF05","featured_media":{"alt":null,"id":23877033001059,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/289c91d7a7be36ffe99e73fc8f8e3eeb0e7598d3_838c1c53-ab9f-4920-a90f-732658fcba7d.webp?v=1714720543"}},"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: "停產" }