$product = {"id":7415057121379,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-園丁-幽默系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pc12","description":null,"published_at":"2024-06-11T17:56:49+08:00","created_at":"2024-05-05T20:14:34+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":41911411277923,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC12","requires_shipping":true,"taxable":true,"featured_image":{"id":31488041844835,"product_id":7415057121379,"position":8,"created_at":"2024-05-05T20:14:54+08:00","updated_at":"2024-05-05T20:14:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa486cfed8d50b34a6a43c7d692155d0aa3cb105_a80bdc6a-9af3-4f8b-b4e5-7eca6f572a37.webp?v=1714911294","variant_ids":[41911411277923]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-園丁-幽默系列 - 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-PC12","featured_media":{"alt":null,"id":23893386264675,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa486cfed8d50b34a6a43c7d692155d0aa3cb105_a80bdc6a-9af3-4f8b-b4e5-7eca6f572a37.webp?v=1714911294"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fb688a53bb748f5a0f2143c5bfd1dcf03c4281c_fe279608-7824-4b3a-b750-4641cabd4e9d.webp?v=1714911277","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad929cb61bf88814f261f9d56be3c6b5f9abbbb6_73c88d39-d1a1-4d01-b799-bda6904244c9.webp?v=1714911279","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/447ece0bc8f142f70eb65fce0ac09175f63e8d26_81771a37-dad3-4845-9351-5c47e500b924.webp?v=1714911281","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7781af1176a831f7493146dc04a7f31c69b1f400_ba432be0-c85f-41cd-8a9c-698455e099fc.webp?v=1714911284","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed6eba8ba0289f3c78e04155a39046ad31cebda9_989f721d-31cf-4352-9917-4b0f8c154465.webp?v=1714911287","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c48c387a543031cc4d500fcf1f4409c15e8540_b2f9bbc2-b158-424e-b80e-6127f669bf60.webp?v=1714911289","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eae46ca6522b619ede2744f709c95dc1cdf3f247_4de76059-a75d-4abc-900f-36fa78c69a75.webp?v=1714911292","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa486cfed8d50b34a6a43c7d692155d0aa3cb105_a80bdc6a-9af3-4f8b-b4e5-7eca6f572a37.webp?v=1714911294","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c74b0b873caa4ee847623c54c683c883ae5410c0_2877907d-2f85-4604-b69a-9d250c0f324b.webp?v=1714911297","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/612e0e6d7cd92c04c79becbcdfc09af304cddb1a_fd07267e-1eb3-4826-a9b8-4a3933e75e7b.webp?v=1714911299","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1adb6a46b548b2c6fd4215c5a5de8eafe5a82441_5bb0ca75-b1d4-459a-a66d-ae6d9e91bcd9.webp?v=1714911302"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fb688a53bb748f5a0f2143c5bfd1dcf03c4281c_fe279608-7824-4b3a-b750-4641cabd4e9d.webp?v=1714911277","options":["color"],"media":[{"alt":null,"id":23893382201443,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fb688a53bb748f5a0f2143c5bfd1dcf03c4281c_fe279608-7824-4b3a-b750-4641cabd4e9d.webp?v=1714911277"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fb688a53bb748f5a0f2143c5bfd1dcf03c4281c_fe279608-7824-4b3a-b750-4641cabd4e9d.webp?v=1714911277","width":2000},{"alt":null,"id":23893382692963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad929cb61bf88814f261f9d56be3c6b5f9abbbb6_73c88d39-d1a1-4d01-b799-bda6904244c9.webp?v=1714911279"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad929cb61bf88814f261f9d56be3c6b5f9abbbb6_73c88d39-d1a1-4d01-b799-bda6904244c9.webp?v=1714911279","width":2000},{"alt":null,"id":23893383053411,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/447ece0bc8f142f70eb65fce0ac09175f63e8d26_81771a37-dad3-4845-9351-5c47e500b924.webp?v=1714911281"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/447ece0bc8f142f70eb65fce0ac09175f63e8d26_81771a37-dad3-4845-9351-5c47e500b924.webp?v=1714911281","width":2000},{"alt":null,"id":23893383676003,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7781af1176a831f7493146dc04a7f31c69b1f400_ba432be0-c85f-41cd-8a9c-698455e099fc.webp?v=1714911284"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7781af1176a831f7493146dc04a7f31c69b1f400_ba432be0-c85f-41cd-8a9c-698455e099fc.webp?v=1714911284","width":2000},{"alt":null,"id":23893384560739,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed6eba8ba0289f3c78e04155a39046ad31cebda9_989f721d-31cf-4352-9917-4b0f8c154465.webp?v=1714911287"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed6eba8ba0289f3c78e04155a39046ad31cebda9_989f721d-31cf-4352-9917-4b0f8c154465.webp?v=1714911287","width":2000},{"alt":null,"id":23893385085027,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c48c387a543031cc4d500fcf1f4409c15e8540_b2f9bbc2-b158-424e-b80e-6127f669bf60.webp?v=1714911289"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c48c387a543031cc4d500fcf1f4409c15e8540_b2f9bbc2-b158-424e-b80e-6127f669bf60.webp?v=1714911289","width":2000},{"alt":null,"id":23893385576547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eae46ca6522b619ede2744f709c95dc1cdf3f247_4de76059-a75d-4abc-900f-36fa78c69a75.webp?v=1714911292"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eae46ca6522b619ede2744f709c95dc1cdf3f247_4de76059-a75d-4abc-900f-36fa78c69a75.webp?v=1714911292","width":2000},{"alt":null,"id":23893386264675,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa486cfed8d50b34a6a43c7d692155d0aa3cb105_a80bdc6a-9af3-4f8b-b4e5-7eca6f572a37.webp?v=1714911294"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa486cfed8d50b34a6a43c7d692155d0aa3cb105_a80bdc6a-9af3-4f8b-b4e5-7eca6f572a37.webp?v=1714911294","width":2000},{"alt":null,"id":23893387051107,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c74b0b873caa4ee847623c54c683c883ae5410c0_2877907d-2f85-4604-b69a-9d250c0f324b.webp?v=1714911297"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c74b0b873caa4ee847623c54c683c883ae5410c0_2877907d-2f85-4604-b69a-9d250c0f324b.webp?v=1714911297","width":2000},{"alt":null,"id":23893387542627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/612e0e6d7cd92c04c79becbcdfc09af304cddb1a_fd07267e-1eb3-4826-a9b8-4a3933e75e7b.webp?v=1714911299"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/612e0e6d7cd92c04c79becbcdfc09af304cddb1a_fd07267e-1eb3-4826-a9b8-4a3933e75e7b.webp?v=1714911299","width":2000},{"alt":null,"id":23893388066915,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1adb6a46b548b2c6fd4215c5a5de8eafe5a82441_5bb0ca75-b1d4-459a-a66d-ae6d9e91bcd9.webp?v=1714911302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1adb6a46b548b2c6fd4215c5a5de8eafe5a82441_5bb0ca75-b1d4-459a-a66d-ae6d9e91bcd9.webp?v=1714911302","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911411277923,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC12","requires_shipping":true,"taxable":true,"featured_image":{"id":31488041844835,"product_id":7415057121379,"position":8,"created_at":"2024-05-05T20:14:54+08:00","updated_at":"2024-05-05T20:14:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa486cfed8d50b34a6a43c7d692155d0aa3cb105_a80bdc6a-9af3-4f8b-b4e5-7eca6f572a37.webp?v=1714911294","variant_ids":[41911411277923]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-園丁-幽默系列 - 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-PC12","featured_media":{"alt":null,"id":23893386264675,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa486cfed8d50b34a6a43c7d692155d0aa3cb105_a80bdc6a-9af3-4f8b-b4e5-7eca6f572a37.webp?v=1714911294"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911411277923,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC12","requires_shipping":true,"taxable":true,"featured_image":{"id":31488041844835,"product_id":7415057121379,"position":8,"created_at":"2024-05-05T20:14:54+08:00","updated_at":"2024-05-05T20:14:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa486cfed8d50b34a6a43c7d692155d0aa3cb105_a80bdc6a-9af3-4f8b-b4e5-7eca6f572a37.webp?v=1714911294","variant_ids":[41911411277923]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-園丁-幽默系列 - 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-PC12","featured_media":{"alt":null,"id":23893386264675,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa486cfed8d50b34a6a43c7d692155d0aa3cb105_a80bdc6a-9af3-4f8b-b4e5-7eca6f572a37.webp?v=1714911294"}},"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: "停產" }