$product = {"id":7414936764515,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 大自然的傑作(黃石國家公園)","handle":"iphone-12-mini-mod-nx-magsafe-printable-af12","description":null,"published_at":"2024-06-11T17:53:33+08:00","created_at":"2024-05-05T19:52:06+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":41910121496675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF12","requires_shipping":true,"taxable":true,"featured_image":{"id":31487727501411,"product_id":7414936764515,"position":8,"created_at":"2024-05-05T19:52:25+08:00","updated_at":"2024-05-05T19:52:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6d692c39d6a003c4e1268d11b40c82289bec42_732dd8b3-06ee-48b0-97a6-55669924ea16.webp?v=1714909945","variant_ids":[41910121496675]},"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-AF12","featured_media":{"alt":null,"id":23893071396963,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6d692c39d6a003c4e1268d11b40c82289bec42_732dd8b3-06ee-48b0-97a6-55669924ea16.webp?v=1714909945"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ead3a5fc660f3072746cb5f2625f9cd5fa3fd0ed_060056fc-8b2c-4b6c-8f35-20212b07997e.webp?v=1714909928","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5db50ff76c5ffb949581c1c4ab8e33052180097_bab5ee57-86c8-442a-8a08-12a02f04b098.webp?v=1714909931","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/340366fa74a42ef7a0e16e949163cbb9c3db9a6c_6df3c4cc-a3af-4a8a-a440-c23a80122727.webp?v=1714909933","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94bf2fabdfc2458235be68b1b6898d89adf903a3_27cb4a1d-8561-4a52-8f7f-0ee7db16358c.webp?v=1714909936","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e17b4a1b69c8d30f2989b6425a89c4894e24e48_5b1267de-5311-45db-bbb0-57816eda5e96.webp?v=1714909938","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3dff7cdb1603bf8fdda7aa07fa7483e298e9dfd_9dabadfe-25a1-4503-9488-0c238ddb99c4.webp?v=1714909940","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86e76dddfaac20d4e3a8adc57de71c8951ee6270_dbff013f-3ca6-4dd4-808d-564595b2e749.webp?v=1714909943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6d692c39d6a003c4e1268d11b40c82289bec42_732dd8b3-06ee-48b0-97a6-55669924ea16.webp?v=1714909945","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb47ad8cf91d70d019ee60c4cae98fc25fb9b3a3_18197d5b-875a-43b5-a4b1-f10ebed0c01e.webp?v=1714909948","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1fd0d495f08da9907dcaaf0238b239953da698_c8e27d57-581d-4c72-b7f5-2be37d1c0034.webp?v=1714909950","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f583864abf5080c115a880b038983e303e81c00b_d7e1323a-5d91-4796-ae12-a1a3dbd02d83.webp?v=1714909952"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ead3a5fc660f3072746cb5f2625f9cd5fa3fd0ed_060056fc-8b2c-4b6c-8f35-20212b07997e.webp?v=1714909928","options":["color"],"media":[{"alt":null,"id":23893067464803,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ead3a5fc660f3072746cb5f2625f9cd5fa3fd0ed_060056fc-8b2c-4b6c-8f35-20212b07997e.webp?v=1714909928"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ead3a5fc660f3072746cb5f2625f9cd5fa3fd0ed_060056fc-8b2c-4b6c-8f35-20212b07997e.webp?v=1714909928","width":2000},{"alt":null,"id":23893067956323,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5db50ff76c5ffb949581c1c4ab8e33052180097_bab5ee57-86c8-442a-8a08-12a02f04b098.webp?v=1714909931"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5db50ff76c5ffb949581c1c4ab8e33052180097_bab5ee57-86c8-442a-8a08-12a02f04b098.webp?v=1714909931","width":2000},{"alt":null,"id":23893068644451,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/340366fa74a42ef7a0e16e949163cbb9c3db9a6c_6df3c4cc-a3af-4a8a-a440-c23a80122727.webp?v=1714909933"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/340366fa74a42ef7a0e16e949163cbb9c3db9a6c_6df3c4cc-a3af-4a8a-a440-c23a80122727.webp?v=1714909933","width":2000},{"alt":null,"id":23893069430883,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94bf2fabdfc2458235be68b1b6898d89adf903a3_27cb4a1d-8561-4a52-8f7f-0ee7db16358c.webp?v=1714909936"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94bf2fabdfc2458235be68b1b6898d89adf903a3_27cb4a1d-8561-4a52-8f7f-0ee7db16358c.webp?v=1714909936","width":2000},{"alt":null,"id":23893069693027,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e17b4a1b69c8d30f2989b6425a89c4894e24e48_5b1267de-5311-45db-bbb0-57816eda5e96.webp?v=1714909938"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e17b4a1b69c8d30f2989b6425a89c4894e24e48_5b1267de-5311-45db-bbb0-57816eda5e96.webp?v=1714909938","width":2000},{"alt":null,"id":23893070413923,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3dff7cdb1603bf8fdda7aa07fa7483e298e9dfd_9dabadfe-25a1-4503-9488-0c238ddb99c4.webp?v=1714909940"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3dff7cdb1603bf8fdda7aa07fa7483e298e9dfd_9dabadfe-25a1-4503-9488-0c238ddb99c4.webp?v=1714909940","width":2000},{"alt":null,"id":23893070839907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86e76dddfaac20d4e3a8adc57de71c8951ee6270_dbff013f-3ca6-4dd4-808d-564595b2e749.webp?v=1714909943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86e76dddfaac20d4e3a8adc57de71c8951ee6270_dbff013f-3ca6-4dd4-808d-564595b2e749.webp?v=1714909943","width":2000},{"alt":null,"id":23893071396963,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6d692c39d6a003c4e1268d11b40c82289bec42_732dd8b3-06ee-48b0-97a6-55669924ea16.webp?v=1714909945"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6d692c39d6a003c4e1268d11b40c82289bec42_732dd8b3-06ee-48b0-97a6-55669924ea16.webp?v=1714909945","width":2000},{"alt":null,"id":23893071888483,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb47ad8cf91d70d019ee60c4cae98fc25fb9b3a3_18197d5b-875a-43b5-a4b1-f10ebed0c01e.webp?v=1714909948"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb47ad8cf91d70d019ee60c4cae98fc25fb9b3a3_18197d5b-875a-43b5-a4b1-f10ebed0c01e.webp?v=1714909948","width":2000},{"alt":null,"id":23893072609379,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1fd0d495f08da9907dcaaf0238b239953da698_c8e27d57-581d-4c72-b7f5-2be37d1c0034.webp?v=1714909950"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1fd0d495f08da9907dcaaf0238b239953da698_c8e27d57-581d-4c72-b7f5-2be37d1c0034.webp?v=1714909950","width":2000},{"alt":null,"id":23893073133667,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f583864abf5080c115a880b038983e303e81c00b_d7e1323a-5d91-4796-ae12-a1a3dbd02d83.webp?v=1714909952"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f583864abf5080c115a880b038983e303e81c00b_d7e1323a-5d91-4796-ae12-a1a3dbd02d83.webp?v=1714909952","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910121496675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF12","requires_shipping":true,"taxable":true,"featured_image":{"id":31487727501411,"product_id":7414936764515,"position":8,"created_at":"2024-05-05T19:52:25+08:00","updated_at":"2024-05-05T19:52:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6d692c39d6a003c4e1268d11b40c82289bec42_732dd8b3-06ee-48b0-97a6-55669924ea16.webp?v=1714909945","variant_ids":[41910121496675]},"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-AF12","featured_media":{"alt":null,"id":23893071396963,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6d692c39d6a003c4e1268d11b40c82289bec42_732dd8b3-06ee-48b0-97a6-55669924ea16.webp?v=1714909945"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910121496675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF12","requires_shipping":true,"taxable":true,"featured_image":{"id":31487727501411,"product_id":7414936764515,"position":8,"created_at":"2024-05-05T19:52:25+08:00","updated_at":"2024-05-05T19:52:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6d692c39d6a003c4e1268d11b40c82289bec42_732dd8b3-06ee-48b0-97a6-55669924ea16.webp?v=1714909945","variant_ids":[41910121496675]},"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-AF12","featured_media":{"alt":null,"id":23893071396963,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6d692c39d6a003c4e1268d11b40c82289bec42_732dd8b3-06ee-48b0-97a6-55669924ea16.webp?v=1714909945"}},"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: "停產" }