$product = {"id":7415099654243,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub!","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb81","description":null,"published_at":"2024-06-11T17:57:57+08:00","created_at":"2024-05-05T20:22:44+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","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":41911870652515,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB81","requires_shipping":true,"taxable":true,"featured_image":{"id":31488163283043,"product_id":7415099654243,"position":11,"created_at":"2024-05-05T20:23:12+08:00","updated_at":"2024-05-05T20:23:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc543c35836b082c8293decf382a728b587d7f69_c3ac835d-380f-4f5d-9c8d-e9f2b654d8dc.webp?v=1714911792","variant_ids":[41911870652515]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub! - 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-PB81","featured_media":{"alt":null,"id":23893507866723,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc543c35836b082c8293decf382a728b587d7f69_c3ac835d-380f-4f5d-9c8d-e9f2b654d8dc.webp?v=1714911792"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c51220e6fec29f8005e117d83b62af16250f52ef_490812d7-4512-4d81-85c3-882b3d3074bc.webp?v=1714911767","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3de1da45bcc24d81eee2050e77230a224c379719_eb9c2367-3c7d-4beb-a9b2-1187ff1f1e0c.webp?v=1714911770","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36b3001d6d24905099ba464934d9cad5ed850821_611a922f-e086-4a8a-b5b2-5699c17fca24.webp?v=1714911772","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758b9223f0058b8e69dd3a793124745d56d465b8_b2d56b3d-90bf-4a56-8001-bf4c9d12f11d.webp?v=1714911774","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6f8d6877c0dfd708fea99f51d2d8e127385d32d_5819740d-d59d-49ff-8f48-4a040076be51.webp?v=1714911777","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/beea34fb53eed78a0ff3771c7a8382b64f1abdb7_d24722c8-1390-449d-a0ad-6975370add9f.webp?v=1714911779","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9d0119adf88e74e7b89efe39ca999e71d624a12_66c353e5-b6e3-4ac3-a4f6-df63d74303a9.webp?v=1714911782","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fecca8430d83f7e97ab5cd57f8b78a6e1aba780e_f508178f-d1b6-4b3e-9335-240758b69a8d.webp?v=1714911784","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55279bc124a722534e868c28f2cb4900c23e8e2b_93ef140e-f219-4221-88c0-aef523f24888.webp?v=1714911787","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af7329614fb993634dfe999146ab47b005a911ab_d5e9525e-a211-4447-86e0-cdcb38468c14.webp?v=1714911789","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc543c35836b082c8293decf382a728b587d7f69_c3ac835d-380f-4f5d-9c8d-e9f2b654d8dc.webp?v=1714911792"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c51220e6fec29f8005e117d83b62af16250f52ef_490812d7-4512-4d81-85c3-882b3d3074bc.webp?v=1714911767","options":["color"],"media":[{"alt":null,"id":23893502656611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c51220e6fec29f8005e117d83b62af16250f52ef_490812d7-4512-4d81-85c3-882b3d3074bc.webp?v=1714911767"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c51220e6fec29f8005e117d83b62af16250f52ef_490812d7-4512-4d81-85c3-882b3d3074bc.webp?v=1714911767","width":2000},{"alt":null,"id":23893503082595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3de1da45bcc24d81eee2050e77230a224c379719_eb9c2367-3c7d-4beb-a9b2-1187ff1f1e0c.webp?v=1714911770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3de1da45bcc24d81eee2050e77230a224c379719_eb9c2367-3c7d-4beb-a9b2-1187ff1f1e0c.webp?v=1714911770","width":2000},{"alt":null,"id":23893503672419,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36b3001d6d24905099ba464934d9cad5ed850821_611a922f-e086-4a8a-b5b2-5699c17fca24.webp?v=1714911772"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36b3001d6d24905099ba464934d9cad5ed850821_611a922f-e086-4a8a-b5b2-5699c17fca24.webp?v=1714911772","width":2000},{"alt":null,"id":23893504458851,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758b9223f0058b8e69dd3a793124745d56d465b8_b2d56b3d-90bf-4a56-8001-bf4c9d12f11d.webp?v=1714911774"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758b9223f0058b8e69dd3a793124745d56d465b8_b2d56b3d-90bf-4a56-8001-bf4c9d12f11d.webp?v=1714911774","width":2000},{"alt":null,"id":23893504753763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6f8d6877c0dfd708fea99f51d2d8e127385d32d_5819740d-d59d-49ff-8f48-4a040076be51.webp?v=1714911777"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6f8d6877c0dfd708fea99f51d2d8e127385d32d_5819740d-d59d-49ff-8f48-4a040076be51.webp?v=1714911777","width":2000},{"alt":null,"id":23893505245283,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/beea34fb53eed78a0ff3771c7a8382b64f1abdb7_d24722c8-1390-449d-a0ad-6975370add9f.webp?v=1714911779"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/beea34fb53eed78a0ff3771c7a8382b64f1abdb7_d24722c8-1390-449d-a0ad-6975370add9f.webp?v=1714911779","width":2000},{"alt":null,"id":23893505769571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9d0119adf88e74e7b89efe39ca999e71d624a12_66c353e5-b6e3-4ac3-a4f6-df63d74303a9.webp?v=1714911782"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9d0119adf88e74e7b89efe39ca999e71d624a12_66c353e5-b6e3-4ac3-a4f6-df63d74303a9.webp?v=1714911782","width":2000},{"alt":null,"id":23893506293859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fecca8430d83f7e97ab5cd57f8b78a6e1aba780e_f508178f-d1b6-4b3e-9335-240758b69a8d.webp?v=1714911784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fecca8430d83f7e97ab5cd57f8b78a6e1aba780e_f508178f-d1b6-4b3e-9335-240758b69a8d.webp?v=1714911784","width":2000},{"alt":null,"id":23893506588771,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55279bc124a722534e868c28f2cb4900c23e8e2b_93ef140e-f219-4221-88c0-aef523f24888.webp?v=1714911787"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55279bc124a722534e868c28f2cb4900c23e8e2b_93ef140e-f219-4221-88c0-aef523f24888.webp?v=1714911787","width":2000},{"alt":null,"id":23893507539043,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af7329614fb993634dfe999146ab47b005a911ab_d5e9525e-a211-4447-86e0-cdcb38468c14.webp?v=1714911789"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af7329614fb993634dfe999146ab47b005a911ab_d5e9525e-a211-4447-86e0-cdcb38468c14.webp?v=1714911789","width":2000},{"alt":null,"id":23893507866723,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc543c35836b082c8293decf382a728b587d7f69_c3ac835d-380f-4f5d-9c8d-e9f2b654d8dc.webp?v=1714911792"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc543c35836b082c8293decf382a728b587d7f69_c3ac835d-380f-4f5d-9c8d-e9f2b654d8dc.webp?v=1714911792","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911870652515,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB81","requires_shipping":true,"taxable":true,"featured_image":{"id":31488163283043,"product_id":7415099654243,"position":11,"created_at":"2024-05-05T20:23:12+08:00","updated_at":"2024-05-05T20:23:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc543c35836b082c8293decf382a728b587d7f69_c3ac835d-380f-4f5d-9c8d-e9f2b654d8dc.webp?v=1714911792","variant_ids":[41911870652515]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub! - 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-PB81","featured_media":{"alt":null,"id":23893507866723,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc543c35836b082c8293decf382a728b587d7f69_c3ac835d-380f-4f5d-9c8d-e9f2b654d8dc.webp?v=1714911792"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911870652515,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB81","requires_shipping":true,"taxable":true,"featured_image":{"id":31488163283043,"product_id":7415099654243,"position":11,"created_at":"2024-05-05T20:23:12+08:00","updated_at":"2024-05-05T20:23:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc543c35836b082c8293decf382a728b587d7f69_c3ac835d-380f-4f5d-9c8d-e9f2b654d8dc.webp?v=1714911792","variant_ids":[41911870652515]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub! - 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-PB81","featured_media":{"alt":null,"id":23893507866723,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc543c35836b082c8293decf382a728b587d7f69_c3ac835d-380f-4f5d-9c8d-e9f2b654d8dc.webp?v=1714911792"}},"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: "停產" }