$product = {"id":7369206857827,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 溜滑梯","handle":"iphone-12-mini-mod-nx-magsafe-printable-pl62","description":null,"published_at":"2024-06-11T17:31:27+08:00","created_at":"2024-04-23T15:44:40+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-snoopy","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":41793606025315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL62","requires_shipping":true,"taxable":true,"featured_image":{"id":31387070169187,"product_id":7369206857827,"position":9,"created_at":"2024-04-23T15:45:01+08:00","updated_at":"2024-04-23T15:45:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc0072919d4cb7944ade024f988402c8d64e17_914734af-99ea-4dc8-a2f1-f88c0393d191.webp?v=1713858301","variant_ids":[41793606025315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 溜滑梯 - 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-PL62","featured_media":{"alt":null,"id":23789308870755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc0072919d4cb7944ade024f988402c8d64e17_914734af-99ea-4dc8-a2f1-f88c0393d191.webp?v=1713858301"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/693e2fdcceede63bf68c3f2809a1c86bbcead83b_7adba0f5-d32d-4bb7-ae8f-f681578f9407.webp?v=1713858282","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b6278231bf9d0b6628858a5499b68d488e56a98_444b252b-e99d-437e-b1cc-d512b8e32b12.webp?v=1713858284","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36e8da3f2e515dde0758d903a7f816c26df9ec14_f390b381-1d78-45d2-8dd6-904424a7339d.webp?v=1713858287","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb3f212798cd722007116901865d8929445c862f_5b58684e-6ff8-4306-ad6e-605b727537d1.webp?v=1713858289","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f0136cf28ba84ff97f522375d49b669a50b3f_89d1c7d1-f374-4eee-ab17-6e104124932b.webp?v=1713858292","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b00adfb36e76ec7e9b0907776f8b0b91e98a03d_dd14a9c5-f2a5-498a-95ba-4a802e3011ac.webp?v=1713858294","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bbd7180cd5720c75871d38122a1f012900b963a_46b69d39-d907-4d93-9646-246475466ffb.webp?v=1713858296","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d24067d16a9b05859cad2b23ccba26b6f939293_2305f95b-9fe9-4908-b4f5-015c7976ed19.webp?v=1713858299","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc0072919d4cb7944ade024f988402c8d64e17_914734af-99ea-4dc8-a2f1-f88c0393d191.webp?v=1713858301","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/513ed3eefcbfce7bb46827bd173acd45a6f8f2fb_e1bdc91a-efe5-4e5e-9b26-e0bffb16128d.webp?v=1713858303","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5b686de6c5f80f48b400de9c82c7671a2cab591_d35d95e4-dd3f-4a3f-a325-4de7b7e3e068.webp?v=1713858306"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/693e2fdcceede63bf68c3f2809a1c86bbcead83b_7adba0f5-d32d-4bb7-ae8f-f681578f9407.webp?v=1713858282","options":["color"],"media":[{"alt":null,"id":23789303824483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/693e2fdcceede63bf68c3f2809a1c86bbcead83b_7adba0f5-d32d-4bb7-ae8f-f681578f9407.webp?v=1713858282"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/693e2fdcceede63bf68c3f2809a1c86bbcead83b_7adba0f5-d32d-4bb7-ae8f-f681578f9407.webp?v=1713858282","width":2000},{"alt":null,"id":23789304512611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b6278231bf9d0b6628858a5499b68d488e56a98_444b252b-e99d-437e-b1cc-d512b8e32b12.webp?v=1713858284"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b6278231bf9d0b6628858a5499b68d488e56a98_444b252b-e99d-437e-b1cc-d512b8e32b12.webp?v=1713858284","width":2000},{"alt":null,"id":23789305135203,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36e8da3f2e515dde0758d903a7f816c26df9ec14_f390b381-1d78-45d2-8dd6-904424a7339d.webp?v=1713858287"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36e8da3f2e515dde0758d903a7f816c26df9ec14_f390b381-1d78-45d2-8dd6-904424a7339d.webp?v=1713858287","width":2000},{"alt":null,"id":23789305692259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb3f212798cd722007116901865d8929445c862f_5b58684e-6ff8-4306-ad6e-605b727537d1.webp?v=1713858289"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb3f212798cd722007116901865d8929445c862f_5b58684e-6ff8-4306-ad6e-605b727537d1.webp?v=1713858289","width":2000},{"alt":null,"id":23789306576995,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f0136cf28ba84ff97f522375d49b669a50b3f_89d1c7d1-f374-4eee-ab17-6e104124932b.webp?v=1713858292"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f0136cf28ba84ff97f522375d49b669a50b3f_89d1c7d1-f374-4eee-ab17-6e104124932b.webp?v=1713858292","width":2000},{"alt":null,"id":23789307035747,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b00adfb36e76ec7e9b0907776f8b0b91e98a03d_dd14a9c5-f2a5-498a-95ba-4a802e3011ac.webp?v=1713858294"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b00adfb36e76ec7e9b0907776f8b0b91e98a03d_dd14a9c5-f2a5-498a-95ba-4a802e3011ac.webp?v=1713858294","width":2000},{"alt":null,"id":23789307658339,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bbd7180cd5720c75871d38122a1f012900b963a_46b69d39-d907-4d93-9646-246475466ffb.webp?v=1713858296"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bbd7180cd5720c75871d38122a1f012900b963a_46b69d39-d907-4d93-9646-246475466ffb.webp?v=1713858296","width":2000},{"alt":null,"id":23789308182627,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d24067d16a9b05859cad2b23ccba26b6f939293_2305f95b-9fe9-4908-b4f5-015c7976ed19.webp?v=1713858299"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d24067d16a9b05859cad2b23ccba26b6f939293_2305f95b-9fe9-4908-b4f5-015c7976ed19.webp?v=1713858299","width":2000},{"alt":null,"id":23789308870755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc0072919d4cb7944ade024f988402c8d64e17_914734af-99ea-4dc8-a2f1-f88c0393d191.webp?v=1713858301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc0072919d4cb7944ade024f988402c8d64e17_914734af-99ea-4dc8-a2f1-f88c0393d191.webp?v=1713858301","width":2000},{"alt":null,"id":23789309591651,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/513ed3eefcbfce7bb46827bd173acd45a6f8f2fb_e1bdc91a-efe5-4e5e-9b26-e0bffb16128d.webp?v=1713858303"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/513ed3eefcbfce7bb46827bd173acd45a6f8f2fb_e1bdc91a-efe5-4e5e-9b26-e0bffb16128d.webp?v=1713858303","width":2000},{"alt":null,"id":23789310083171,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5b686de6c5f80f48b400de9c82c7671a2cab591_d35d95e4-dd3f-4a3f-a325-4de7b7e3e068.webp?v=1713858306"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5b686de6c5f80f48b400de9c82c7671a2cab591_d35d95e4-dd3f-4a3f-a325-4de7b7e3e068.webp?v=1713858306","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793606025315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL62","requires_shipping":true,"taxable":true,"featured_image":{"id":31387070169187,"product_id":7369206857827,"position":9,"created_at":"2024-04-23T15:45:01+08:00","updated_at":"2024-04-23T15:45:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc0072919d4cb7944ade024f988402c8d64e17_914734af-99ea-4dc8-a2f1-f88c0393d191.webp?v=1713858301","variant_ids":[41793606025315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 溜滑梯 - 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-PL62","featured_media":{"alt":null,"id":23789308870755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc0072919d4cb7944ade024f988402c8d64e17_914734af-99ea-4dc8-a2f1-f88c0393d191.webp?v=1713858301"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793606025315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL62","requires_shipping":true,"taxable":true,"featured_image":{"id":31387070169187,"product_id":7369206857827,"position":9,"created_at":"2024-04-23T15:45:01+08:00","updated_at":"2024-04-23T15:45:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc0072919d4cb7944ade024f988402c8d64e17_914734af-99ea-4dc8-a2f1-f88c0393d191.webp?v=1713858301","variant_ids":[41793606025315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 溜滑梯 - 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-PL62","featured_media":{"alt":null,"id":23789308870755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bacc0072919d4cb7944ade024f988402c8d64e17_914734af-99ea-4dc8-a2f1-f88c0393d191.webp?v=1713858301"}},"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: "停產" }