$product = {"id":7415076585571,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 黑白畫風-蝙蝠俠","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb12","description":null,"published_at":"2024-06-11T17:57:20+08:00","created_at":"2024-05-05T20:18:15+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","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":41911616831587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31488098009187,"product_id":7415076585571,"position":10,"created_at":"2024-05-05T20:18:39+08:00","updated_at":"2024-05-05T20:18:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f46323da676d3837d6a6668f11eefabee8f2d26_9e864e12-6e44-4da1-bf08-a901cc97d0ee.webp?v=1714911519","variant_ids":[41911616831587]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 黑白畫風-蝙蝠俠 - 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-SB12","featured_media":{"alt":null,"id":23893442494563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f46323da676d3837d6a6668f11eefabee8f2d26_9e864e12-6e44-4da1-bf08-a901cc97d0ee.webp?v=1714911519"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9ea00f665e06d54076d4ae646babee02de5783_4296bbdc-7e3e-4d2c-8208-4c2ba58428eb.webp?v=1714911497","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd4a986d83cc7af7eabae13c5e67a166ad1cef3b_981af30b-709d-43b8-9d09-2fa5e887011b.webp?v=1714911499","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8d871391378d787a081f106dcc081bace312926_bd9dacda-a574-4ece-b78d-41af8453a0ad.webp?v=1714911502","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbcf25388f6dab13104af60a481d8b2b07e2ef9e_b51ada89-95c5-4354-90b8-3a1c6d0053d8.webp?v=1714911505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c9d2d62f6205f7cebbee47ab35cdd3f2cc1b8b6_def884e4-27fc-4e48-902d-58b4a2d4758f.webp?v=1714911507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbbea44f126982188273304317b65344d7e2c7a3_03133e56-101b-4052-bd56-b45cb705bcec.webp?v=1714911509","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8052db787e19fe4fadae17c44e430bb8385c6964_c978aa41-2fe0-4e9f-bbba-1f87ab4748b6.webp?v=1714911511","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2b54c6a2efaa0bb4c53be3f9c0e41bfef65665_15f01da1-09ef-4a86-a824-3f730e389a1f.webp?v=1714911514","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f76d7d056fc8542f455f8a5e85cd0da1e98023d_be599408-45d5-4a65-b488-93438881f2e2.webp?v=1714911516","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f46323da676d3837d6a6668f11eefabee8f2d26_9e864e12-6e44-4da1-bf08-a901cc97d0ee.webp?v=1714911519","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e1a8b50c594c2598f798cfc31a27cb97483fb3f_fff70ef2-a981-43ab-b029-b8605387a034.webp?v=1714911521"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9ea00f665e06d54076d4ae646babee02de5783_4296bbdc-7e3e-4d2c-8208-4c2ba58428eb.webp?v=1714911497","options":["color"],"media":[{"alt":null,"id":23893437186147,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9ea00f665e06d54076d4ae646babee02de5783_4296bbdc-7e3e-4d2c-8208-4c2ba58428eb.webp?v=1714911497"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9ea00f665e06d54076d4ae646babee02de5783_4296bbdc-7e3e-4d2c-8208-4c2ba58428eb.webp?v=1714911497","width":2000},{"alt":null,"id":23893437644899,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd4a986d83cc7af7eabae13c5e67a166ad1cef3b_981af30b-709d-43b8-9d09-2fa5e887011b.webp?v=1714911499"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd4a986d83cc7af7eabae13c5e67a166ad1cef3b_981af30b-709d-43b8-9d09-2fa5e887011b.webp?v=1714911499","width":2000},{"alt":null,"id":23893438365795,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8d871391378d787a081f106dcc081bace312926_bd9dacda-a574-4ece-b78d-41af8453a0ad.webp?v=1714911502"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8d871391378d787a081f106dcc081bace312926_bd9dacda-a574-4ece-b78d-41af8453a0ad.webp?v=1714911502","width":2000},{"alt":null,"id":23893439086691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbcf25388f6dab13104af60a481d8b2b07e2ef9e_b51ada89-95c5-4354-90b8-3a1c6d0053d8.webp?v=1714911505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbcf25388f6dab13104af60a481d8b2b07e2ef9e_b51ada89-95c5-4354-90b8-3a1c6d0053d8.webp?v=1714911505","width":2000},{"alt":null,"id":23893439545443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c9d2d62f6205f7cebbee47ab35cdd3f2cc1b8b6_def884e4-27fc-4e48-902d-58b4a2d4758f.webp?v=1714911507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c9d2d62f6205f7cebbee47ab35cdd3f2cc1b8b6_def884e4-27fc-4e48-902d-58b4a2d4758f.webp?v=1714911507","width":2000},{"alt":null,"id":23893440299107,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbbea44f126982188273304317b65344d7e2c7a3_03133e56-101b-4052-bd56-b45cb705bcec.webp?v=1714911509"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbbea44f126982188273304317b65344d7e2c7a3_03133e56-101b-4052-bd56-b45cb705bcec.webp?v=1714911509","width":2000},{"alt":null,"id":23893441052771,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8052db787e19fe4fadae17c44e430bb8385c6964_c978aa41-2fe0-4e9f-bbba-1f87ab4748b6.webp?v=1714911511"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8052db787e19fe4fadae17c44e430bb8385c6964_c978aa41-2fe0-4e9f-bbba-1f87ab4748b6.webp?v=1714911511","width":2000},{"alt":null,"id":23893441511523,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2b54c6a2efaa0bb4c53be3f9c0e41bfef65665_15f01da1-09ef-4a86-a824-3f730e389a1f.webp?v=1714911514"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2b54c6a2efaa0bb4c53be3f9c0e41bfef65665_15f01da1-09ef-4a86-a824-3f730e389a1f.webp?v=1714911514","width":2000},{"alt":null,"id":23893442035811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f76d7d056fc8542f455f8a5e85cd0da1e98023d_be599408-45d5-4a65-b488-93438881f2e2.webp?v=1714911516"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f76d7d056fc8542f455f8a5e85cd0da1e98023d_be599408-45d5-4a65-b488-93438881f2e2.webp?v=1714911516","width":2000},{"alt":null,"id":23893442494563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f46323da676d3837d6a6668f11eefabee8f2d26_9e864e12-6e44-4da1-bf08-a901cc97d0ee.webp?v=1714911519"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f46323da676d3837d6a6668f11eefabee8f2d26_9e864e12-6e44-4da1-bf08-a901cc97d0ee.webp?v=1714911519","width":2000},{"alt":null,"id":23893443215459,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e1a8b50c594c2598f798cfc31a27cb97483fb3f_fff70ef2-a981-43ab-b029-b8605387a034.webp?v=1714911521"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e1a8b50c594c2598f798cfc31a27cb97483fb3f_fff70ef2-a981-43ab-b029-b8605387a034.webp?v=1714911521","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911616831587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31488098009187,"product_id":7415076585571,"position":10,"created_at":"2024-05-05T20:18:39+08:00","updated_at":"2024-05-05T20:18:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f46323da676d3837d6a6668f11eefabee8f2d26_9e864e12-6e44-4da1-bf08-a901cc97d0ee.webp?v=1714911519","variant_ids":[41911616831587]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 黑白畫風-蝙蝠俠 - 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-SB12","featured_media":{"alt":null,"id":23893442494563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f46323da676d3837d6a6668f11eefabee8f2d26_9e864e12-6e44-4da1-bf08-a901cc97d0ee.webp?v=1714911519"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911616831587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31488098009187,"product_id":7415076585571,"position":10,"created_at":"2024-05-05T20:18:39+08:00","updated_at":"2024-05-05T20:18:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f46323da676d3837d6a6668f11eefabee8f2d26_9e864e12-6e44-4da1-bf08-a901cc97d0ee.webp?v=1714911519","variant_ids":[41911616831587]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 黑白畫風-蝙蝠俠 - 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-SB12","featured_media":{"alt":null,"id":23893442494563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f46323da676d3837d6a6668f11eefabee8f2d26_9e864e12-6e44-4da1-bf08-a901cc97d0ee.webp?v=1714911519"}},"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: "停產" }