$product = {"id":7415109288035,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 搞怪系列-怪可愛","handle":"iphone-12-mini-mod-nx-magsafe-printable-yf02","description":null,"published_at":"2024-06-11T17:58:12+08:00","created_at":"2024-05-05T20:24:37+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-stitch","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":41911972003939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31488187695203,"product_id":7415109288035,"position":8,"created_at":"2024-05-05T20:24:56+08:00","updated_at":"2024-05-05T20:24:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8e7f9eee0d40f2b49fe0c45548dcabcb601a1d_ff37281b-5d63-4698-a771-93c24744b7e9.webp?v=1714911896","variant_ids":[41911972003939]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 搞怪系列-怪可愛 - 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-YF02","featured_media":{"alt":null,"id":23893532311651,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8e7f9eee0d40f2b49fe0c45548dcabcb601a1d_ff37281b-5d63-4698-a771-93c24744b7e9.webp?v=1714911896"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f90e8ee2dbeddecdd08b7a5994d9fb9967546f9_29943d11-5dac-4e5d-ac71-e1c7bd22265d.webp?v=1714911879","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/356dfa20be7c185e63ad6513387ed0b43a50ba61_334a64ff-3fd1-48f9-b2ef-022b5b0a951e.webp?v=1714911882","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26ee2b53bdcd54610b34c362e570c12307b8e1b3_ee55e6ba-f4aa-48be-a123-7c1b7bc84d9e.webp?v=1714911884","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfd5f2eea4edb8383f3d7adc71f96c7951247cda_156cb182-7906-448e-8cc3-e5e84ef3a628.webp?v=1714911886","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7140d0cd9cbd73e1bc34810cd1013bbcbe249944_708b1e1e-29ee-4d32-870a-c86233c53d63.webp?v=1714911889","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82cd743a83e8f3cd0ccd6d1558547ee212406196_88d64cc3-9b48-465c-881f-b54feb9da6e7.webp?v=1714911891","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270e227344b6d8e89c1b7ed5f819e8a4e3d70bfe_2dcdbbd5-7919-4c76-a719-120040d7798a.webp?v=1714911894","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8e7f9eee0d40f2b49fe0c45548dcabcb601a1d_ff37281b-5d63-4698-a771-93c24744b7e9.webp?v=1714911896","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/874c9a5f8d98b354349bf462c3268861d68baea4_ee6f69f9-9397-48de-95e7-2efc3f265407.webp?v=1714911899","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c08e65e97059d05655861d163d7e6ef8a2c4558a_dbcd19b4-684c-4779-9110-8b1e122f2e83.webp?v=1714911901","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c40c7e40c8e8cd552c28865492cd6abc2c9edd65_402349ef-39b3-4518-a54d-93e4ed9057db.webp?v=1714911903"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f90e8ee2dbeddecdd08b7a5994d9fb9967546f9_29943d11-5dac-4e5d-ac71-e1c7bd22265d.webp?v=1714911879","options":["color"],"media":[{"alt":null,"id":23893528543331,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f90e8ee2dbeddecdd08b7a5994d9fb9967546f9_29943d11-5dac-4e5d-ac71-e1c7bd22265d.webp?v=1714911879"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f90e8ee2dbeddecdd08b7a5994d9fb9967546f9_29943d11-5dac-4e5d-ac71-e1c7bd22265d.webp?v=1714911879","width":2000},{"alt":null,"id":23893529100387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/356dfa20be7c185e63ad6513387ed0b43a50ba61_334a64ff-3fd1-48f9-b2ef-022b5b0a951e.webp?v=1714911882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/356dfa20be7c185e63ad6513387ed0b43a50ba61_334a64ff-3fd1-48f9-b2ef-022b5b0a951e.webp?v=1714911882","width":2000},{"alt":null,"id":23893529591907,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26ee2b53bdcd54610b34c362e570c12307b8e1b3_ee55e6ba-f4aa-48be-a123-7c1b7bc84d9e.webp?v=1714911884"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26ee2b53bdcd54610b34c362e570c12307b8e1b3_ee55e6ba-f4aa-48be-a123-7c1b7bc84d9e.webp?v=1714911884","width":2000},{"alt":null,"id":23893530116195,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfd5f2eea4edb8383f3d7adc71f96c7951247cda_156cb182-7906-448e-8cc3-e5e84ef3a628.webp?v=1714911886"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfd5f2eea4edb8383f3d7adc71f96c7951247cda_156cb182-7906-448e-8cc3-e5e84ef3a628.webp?v=1714911886","width":2000},{"alt":null,"id":23893530673251,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7140d0cd9cbd73e1bc34810cd1013bbcbe249944_708b1e1e-29ee-4d32-870a-c86233c53d63.webp?v=1714911889"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7140d0cd9cbd73e1bc34810cd1013bbcbe249944_708b1e1e-29ee-4d32-870a-c86233c53d63.webp?v=1714911889","width":2000},{"alt":null,"id":23893531132003,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82cd743a83e8f3cd0ccd6d1558547ee212406196_88d64cc3-9b48-465c-881f-b54feb9da6e7.webp?v=1714911891"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82cd743a83e8f3cd0ccd6d1558547ee212406196_88d64cc3-9b48-465c-881f-b54feb9da6e7.webp?v=1714911891","width":2000},{"alt":null,"id":23893531590755,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270e227344b6d8e89c1b7ed5f819e8a4e3d70bfe_2dcdbbd5-7919-4c76-a719-120040d7798a.webp?v=1714911894"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270e227344b6d8e89c1b7ed5f819e8a4e3d70bfe_2dcdbbd5-7919-4c76-a719-120040d7798a.webp?v=1714911894","width":2000},{"alt":null,"id":23893532311651,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8e7f9eee0d40f2b49fe0c45548dcabcb601a1d_ff37281b-5d63-4698-a771-93c24744b7e9.webp?v=1714911896"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8e7f9eee0d40f2b49fe0c45548dcabcb601a1d_ff37281b-5d63-4698-a771-93c24744b7e9.webp?v=1714911896","width":2000},{"alt":null,"id":23893533032547,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/874c9a5f8d98b354349bf462c3268861d68baea4_ee6f69f9-9397-48de-95e7-2efc3f265407.webp?v=1714911899"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/874c9a5f8d98b354349bf462c3268861d68baea4_ee6f69f9-9397-48de-95e7-2efc3f265407.webp?v=1714911899","width":2000},{"alt":null,"id":23893533491299,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c08e65e97059d05655861d163d7e6ef8a2c4558a_dbcd19b4-684c-4779-9110-8b1e122f2e83.webp?v=1714911901"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c08e65e97059d05655861d163d7e6ef8a2c4558a_dbcd19b4-684c-4779-9110-8b1e122f2e83.webp?v=1714911901","width":2000},{"alt":null,"id":23893534310499,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c40c7e40c8e8cd552c28865492cd6abc2c9edd65_402349ef-39b3-4518-a54d-93e4ed9057db.webp?v=1714911903"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c40c7e40c8e8cd552c28865492cd6abc2c9edd65_402349ef-39b3-4518-a54d-93e4ed9057db.webp?v=1714911903","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911972003939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31488187695203,"product_id":7415109288035,"position":8,"created_at":"2024-05-05T20:24:56+08:00","updated_at":"2024-05-05T20:24:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8e7f9eee0d40f2b49fe0c45548dcabcb601a1d_ff37281b-5d63-4698-a771-93c24744b7e9.webp?v=1714911896","variant_ids":[41911972003939]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 搞怪系列-怪可愛 - 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-YF02","featured_media":{"alt":null,"id":23893532311651,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8e7f9eee0d40f2b49fe0c45548dcabcb601a1d_ff37281b-5d63-4698-a771-93c24744b7e9.webp?v=1714911896"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911972003939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31488187695203,"product_id":7415109288035,"position":8,"created_at":"2024-05-05T20:24:56+08:00","updated_at":"2024-05-05T20:24:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8e7f9eee0d40f2b49fe0c45548dcabcb601a1d_ff37281b-5d63-4698-a771-93c24744b7e9.webp?v=1714911896","variant_ids":[41911972003939]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 搞怪系列-怪可愛 - 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-YF02","featured_media":{"alt":null,"id":23893532311651,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8e7f9eee0d40f2b49fe0c45548dcabcb601a1d_ff37281b-5d63-4698-a771-93c24744b7e9.webp?v=1714911896"}},"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: "停產" }