$product = {"id":7186152030307,"title":"犀牛盾SolidSuit (MagSafe 兼容)手機殼 - Xiaomi 13T Pro - 【聯名設計款】 - 怪奇事物所 Incrediville - 豬事不宜密集恐懼症","handle":"xiaomi-13t-pro-solidsuit-android-magsafe-hd04","description":null,"published_at":"2024-03-15T09:35:51+08:00","created_at":"2024-02-21T16:28:10+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["20%","20240304-reseller-\u003ereplace_to-","25%","30%","35%","40%","45%","50%","b2b","brand-Xiaomi","designer","designer-incrediville","device-xiaomi-13t-pro","merge","reseller-solidsuit-magsafe-incrediville","reseller-solidsuit_magsafe-incrediville","solidsuit","Top50","type-Solidsuit MagSafe"],"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":41303414571107,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST1431252-HD04","requires_shipping":true,"taxable":true,"featured_image":{"id":30951543767139,"product_id":7186152030307,"position":2,"created_at":"2024-02-21T16:28:16+08:00","updated_at":"2024-02-21T16:28:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2876c6c9723214a4613c2a034b34dc8eca488702_f1c3072d-1099-4c2f-9de5-4dd57ad270c4.webp?v=1708504096","variant_ids":[41303414571107]},"available":true,"name":"犀牛盾SolidSuit (MagSafe 兼容)手機殼 - Xiaomi 13T Pro - 【聯名設計款】 - 怪奇事物所 Incrediville - 豬事不宜密集恐懼症 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST1431252-HD04","featured_media":{"alt":null,"id":23326946689123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2876c6c9723214a4613c2a034b34dc8eca488702_f1c3072d-1099-4c2f-9de5-4dd57ad270c4.webp?v=1708504096"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0283b3b61826f54eb8cfeca16833406e1248aad4_e9692a4c-6144-4403-9dc7-b1d80cd7e535.webp?v=1708504093","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2876c6c9723214a4613c2a034b34dc8eca488702_f1c3072d-1099-4c2f-9de5-4dd57ad270c4.webp?v=1708504096","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa2c8a8afaa91092f07e6f98ab14140333f30072_f34d3ba7-7995-48dd-8fd2-82aa6f3db88a.webp?v=1708504098"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0283b3b61826f54eb8cfeca16833406e1248aad4_e9692a4c-6144-4403-9dc7-b1d80cd7e535.webp?v=1708504093","options":["color"],"media":[{"alt":null,"id":23326946066531,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0283b3b61826f54eb8cfeca16833406e1248aad4_e9692a4c-6144-4403-9dc7-b1d80cd7e535.webp?v=1708504093"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0283b3b61826f54eb8cfeca16833406e1248aad4_e9692a4c-6144-4403-9dc7-b1d80cd7e535.webp?v=1708504093","width":2000},{"alt":null,"id":23326946689123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2876c6c9723214a4613c2a034b34dc8eca488702_f1c3072d-1099-4c2f-9de5-4dd57ad270c4.webp?v=1708504096"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2876c6c9723214a4613c2a034b34dc8eca488702_f1c3072d-1099-4c2f-9de5-4dd57ad270c4.webp?v=1708504096","width":2000},{"alt":null,"id":23326947508323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa2c8a8afaa91092f07e6f98ab14140333f30072_f34d3ba7-7995-48dd-8fd2-82aa6f3db88a.webp?v=1708504098"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa2c8a8afaa91092f07e6f98ab14140333f30072_f34d3ba7-7995-48dd-8fd2-82aa6f3db88a.webp?v=1708504098","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41303414571107,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST1431252-HD04","requires_shipping":true,"taxable":true,"featured_image":{"id":30951543767139,"product_id":7186152030307,"position":2,"created_at":"2024-02-21T16:28:16+08:00","updated_at":"2024-02-21T16:28:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2876c6c9723214a4613c2a034b34dc8eca488702_f1c3072d-1099-4c2f-9de5-4dd57ad270c4.webp?v=1708504096","variant_ids":[41303414571107]},"available":true,"name":"犀牛盾SolidSuit (MagSafe 兼容)手機殼 - Xiaomi 13T Pro - 【聯名設計款】 - 怪奇事物所 Incrediville - 豬事不宜密集恐懼症 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST1431252-HD04","featured_media":{"alt":null,"id":23326946689123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2876c6c9723214a4613c2a034b34dc8eca488702_f1c3072d-1099-4c2f-9de5-4dd57ad270c4.webp?v=1708504096"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41303414571107,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST1431252-HD04","requires_shipping":true,"taxable":true,"featured_image":{"id":30951543767139,"product_id":7186152030307,"position":2,"created_at":"2024-02-21T16:28:16+08:00","updated_at":"2024-02-21T16:28:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2876c6c9723214a4613c2a034b34dc8eca488702_f1c3072d-1099-4c2f-9de5-4dd57ad270c4.webp?v=1708504096","variant_ids":[41303414571107]},"available":true,"name":"犀牛盾SolidSuit (MagSafe 兼容)手機殼 - Xiaomi 13T Pro - 【聯名設計款】 - 怪奇事物所 Incrediville - 豬事不宜密集恐懼症 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST1431252-HD04","featured_media":{"alt":null,"id":23326946689123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2876c6c9723214a4613c2a034b34dc8eca488702_f1c3072d-1099-4c2f-9de5-4dd57ad270c4.webp?v=1708504096"}},"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: "停產" }