$product = {"id":6988515377251,"title":"iPhone 13 mini SolidSuit (MagSafe 兼容) Zzifan_z 黑貓","handle":"iphone-13-mini-solidsuit-classic-magsafe-gi04","description":null,"published_at":"2023-08-03T02:39:46+08:00","created_at":"2023-07-31T13:59:51+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit專區哈利波特 Harry Potter","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-zzifanz","device-iPhone 13 Mini","merge","reseller-zzifanz"],"price":125000,"price_min":125000,"price_max":125000,"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":43102650138723,"title":"Black \/ Classic","option1":"Black","option2":"Classic","option3":null,"sku":"MST0122852-GI04","requires_shipping":true,"taxable":true,"featured_image":{"id":30289291444323,"product_id":6988515377251,"position":1,"created_at":"2023-07-31T14:03:50+08:00","updated_at":"2023-07-31T14:03:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GI04_60b07bce-01ba-473a-b1c4-47b6956aa74b.png?v=1690783430","variant_ids":[43102650138723]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Zzifan_z 黑貓 - Black \/ Classic","public_title":"Black \/ Classic","options":["Black","Classic"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-GI04","featured_media":{"alt":null,"id":22648010211427,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GI04_60b07bce-01ba-473a-b1c4-47b6956aa74b.png?v=1690783430"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GI04_60b07bce-01ba-473a-b1c4-47b6956aa74b.png?v=1690783430","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80.webp?v=1782880449","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6.webp?v=1782880450","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_7b0d67f2-d3f3-4770-ae8b-1bb6698b6074.webp?v=1782889552","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_80d89fa7-f7bc-4d9b-ad31-ed718e4fbcbe.webp?v=1782889553","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_dddb1a2b-f91c-49b4-9555-e6872450ffc2.webp?v=1782889754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_db62a012-c9ec-4342-a7e8-ed1b282b5462.webp?v=1782889754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_84e88dac-bf9f-4eb4-9973-4ece791e00bd.webp?v=1782889907","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_7317ca50-f87a-413e-bddb-1dc794b47f65.webp?v=1782889908","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_ca6a2d0b-7c99-42b4-92fa-b04836c511e8.webp?v=1784541784","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_62617f2d-188c-4029-8bca-ec15228adff1.webp?v=1784541785","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_382b28f0-244b-4831-967b-ade4de10a918.webp?v=1784547905","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_5ef24fc1-dcc9-4aec-8e7e-f5f7f23a0ae7.webp?v=1784547906","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_fcb31e35-0420-466e-926d-06951b51aa25.webp?v=1784548026","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_71608ba7-f317-433f-aff9-74cda80436e0.webp?v=1784548027","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_f247828b-18af-4849-8ee9-7193eb101c94.webp?v=1784548169","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_20b9a83c-4438-40aa-90b8-d60df8ff84cb.webp?v=1784548169"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GI04_60b07bce-01ba-473a-b1c4-47b6956aa74b.png?v=1690783430","options":["color","Types"],"media":[{"alt":null,"id":22648010211427,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GI04_60b07bce-01ba-473a-b1c4-47b6956aa74b.png?v=1690783430"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GI04_60b07bce-01ba-473a-b1c4-47b6956aa74b.png?v=1690783430","width":2000},{"alt":null,"id":27646834835555,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80.webp?v=1782880449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80.webp?v=1782880449","width":2000},{"alt":null,"id":27646835130467,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6.webp?v=1782880450"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6.webp?v=1782880450","width":2000},{"alt":null,"id":27650313551971,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_7b0d67f2-d3f3-4770-ae8b-1bb6698b6074.webp?v=1782889552"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_7b0d67f2-d3f3-4770-ae8b-1bb6698b6074.webp?v=1782889552","width":2000},{"alt":null,"id":27650313977955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_80d89fa7-f7bc-4d9b-ad31-ed718e4fbcbe.webp?v=1782889553"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_80d89fa7-f7bc-4d9b-ad31-ed718e4fbcbe.webp?v=1782889553","width":2000},{"alt":null,"id":27650389409891,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_dddb1a2b-f91c-49b4-9555-e6872450ffc2.webp?v=1782889754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_dddb1a2b-f91c-49b4-9555-e6872450ffc2.webp?v=1782889754","width":2000},{"alt":null,"id":27650389639267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_db62a012-c9ec-4342-a7e8-ed1b282b5462.webp?v=1782889754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_db62a012-c9ec-4342-a7e8-ed1b282b5462.webp?v=1782889754","width":2000},{"alt":null,"id":27650451243107,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_84e88dac-bf9f-4eb4-9973-4ece791e00bd.webp?v=1782889907"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_84e88dac-bf9f-4eb4-9973-4ece791e00bd.webp?v=1782889907","width":2000},{"alt":null,"id":27650451734627,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_7317ca50-f87a-413e-bddb-1dc794b47f65.webp?v=1782889908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_7317ca50-f87a-413e-bddb-1dc794b47f65.webp?v=1782889908","width":2000},{"alt":null,"id":27826462425187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_ca6a2d0b-7c99-42b4-92fa-b04836c511e8.webp?v=1784541784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_ca6a2d0b-7c99-42b4-92fa-b04836c511e8.webp?v=1784541784","width":2000},{"alt":null,"id":27826462851171,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_62617f2d-188c-4029-8bca-ec15228adff1.webp?v=1784541785"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_62617f2d-188c-4029-8bca-ec15228adff1.webp?v=1784541785","width":2000},{"alt":null,"id":27828047937635,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_382b28f0-244b-4831-967b-ade4de10a918.webp?v=1784547905"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_382b28f0-244b-4831-967b-ade4de10a918.webp?v=1784547905","width":2000},{"alt":null,"id":27828048429155,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_5ef24fc1-dcc9-4aec-8e7e-f5f7f23a0ae7.webp?v=1784547906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_5ef24fc1-dcc9-4aec-8e7e-f5f7f23a0ae7.webp?v=1784547906","width":2000},{"alt":null,"id":27828088340579,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_fcb31e35-0420-466e-926d-06951b51aa25.webp?v=1784548026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_fcb31e35-0420-466e-926d-06951b51aa25.webp?v=1784548026","width":2000},{"alt":null,"id":27828088963171,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_71608ba7-f317-433f-aff9-74cda80436e0.webp?v=1784548027"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_71608ba7-f317-433f-aff9-74cda80436e0.webp?v=1784548027","width":2000},{"alt":null,"id":27828119273571,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_f247828b-18af-4849-8ee9-7193eb101c94.webp?v=1784548169"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a439461f0292762867bf63c444b001e176c76c6_f247828b-18af-4849-8ee9-7193eb101c94.webp?v=1784548169","width":2000},{"alt":null,"id":27828119666787,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_20b9a83c-4438-40aa-90b8-d60df8ff84cb.webp?v=1784548169"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99e16e22c10a6fafbaef0898ffd8ff3fb2c45b80_20b9a83c-4438-40aa-90b8-d60df8ff84cb.webp?v=1784548169","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43102650138723,"title":"Black \/ Classic","option1":"Black","option2":"Classic","option3":null,"sku":"MST0122852-GI04","requires_shipping":true,"taxable":true,"featured_image":{"id":30289291444323,"product_id":6988515377251,"position":1,"created_at":"2023-07-31T14:03:50+08:00","updated_at":"2023-07-31T14:03:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GI04_60b07bce-01ba-473a-b1c4-47b6956aa74b.png?v=1690783430","variant_ids":[43102650138723]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Zzifan_z 黑貓 - Black \/ Classic","public_title":"Black \/ Classic","options":["Black","Classic"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-GI04","featured_media":{"alt":null,"id":22648010211427,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GI04_60b07bce-01ba-473a-b1c4-47b6956aa74b.png?v=1690783430"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43102650138723,"title":"Black \/ Classic","option1":"Black","option2":"Classic","option3":null,"sku":"MST0122852-GI04","requires_shipping":true,"taxable":true,"featured_image":{"id":30289291444323,"product_id":6988515377251,"position":1,"created_at":"2023-07-31T14:03:50+08:00","updated_at":"2023-07-31T14:03:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GI04_60b07bce-01ba-473a-b1c4-47b6956aa74b.png?v=1690783430","variant_ids":[43102650138723]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Zzifan_z 黑貓 - Black \/ Classic","public_title":"Black \/ Classic","options":["Black","Classic"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-GI04","featured_media":{"alt":null,"id":22648010211427,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GI04_60b07bce-01ba-473a-b1c4-47b6956aa74b.png?v=1690783430"}},"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: "停產" }