$product = {"id":7922029756515,"title":"iPhone 12 mini Mod NX TOCOROCOMUGI 麵包出爐貓","handle":"iphone-12-mini-mod-nx-toc02","description":null,"published_at":"2025-11-14T08:10:16+08:00","created_at":"2025-11-13T10:34:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-tocorocomugi","device-iPhone 12 Mini","merge","reseller-tocorocomugi"],"price":90000,"price_min":90000,"price_max":90000,"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":43834969325667,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-TOC02","requires_shipping":true,"taxable":true,"featured_image":{"id":34794397401187,"product_id":7922029756515,"position":6,"created_at":"2025-11-13T10:35:02+08:00","updated_at":"2025-11-13T10:35:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b883d9be7f7f27eb47f9c506c06df26df8b6d09a.webp?v=1763001304","variant_ids":[43834969325667]},"available":true,"name":"iPhone 12 mini Mod NX TOCOROCOMUGI 麵包出爐貓 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-TOC02","featured_media":{"alt":null,"id":26359816421475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b883d9be7f7f27eb47f9c506c06df26df8b6d09a.webp?v=1763001304"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dad62fed298ab9493664e4a3e7f0641c3320fffb.webp?v=1763001301","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a796ec79fa7e138a73bd4a77e590fec2d2f32387.webp?v=1763001302","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08f3c72d9e953d339390b6ff1c25144c1be746ed.webp?v=1763001302","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc9f8cd9c610cdb644aabf605aa68f681fb0dad.webp?v=1763001303","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85fa85bbfed420b1afacc0aa4cd095642ec65737.webp?v=1763001303","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b883d9be7f7f27eb47f9c506c06df26df8b6d09a.webp?v=1763001304","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3008727340a3895bd859d8a915a5a8a1bb8a1ae9.webp?v=1763001305","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd945305391f7d3e0df70593c1ed228ed4ba0156.webp?v=1763001305","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd68dd68b22315154e2d55c2b905a7879f39f65a.webp?v=1763001306","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/080539081ef752cdd93d3fc58c42ef3fa9b271df.webp?v=1763001307","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f697a02582028103b69753a4ae2fee32f18eb66.webp?v=1763001307"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dad62fed298ab9493664e4a3e7f0641c3320fffb.webp?v=1763001301","options":["color"],"media":[{"alt":null,"id":26359814684771,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dad62fed298ab9493664e4a3e7f0641c3320fffb.webp?v=1763001301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dad62fed298ab9493664e4a3e7f0641c3320fffb.webp?v=1763001301","width":2000},{"alt":null,"id":26359814946915,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a796ec79fa7e138a73bd4a77e590fec2d2f32387.webp?v=1763001302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a796ec79fa7e138a73bd4a77e590fec2d2f32387.webp?v=1763001302","width":2000},{"alt":null,"id":26359815340131,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08f3c72d9e953d339390b6ff1c25144c1be746ed.webp?v=1763001302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08f3c72d9e953d339390b6ff1c25144c1be746ed.webp?v=1763001302","width":2000},{"alt":null,"id":26359815700579,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc9f8cd9c610cdb644aabf605aa68f681fb0dad.webp?v=1763001303"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc9f8cd9c610cdb644aabf605aa68f681fb0dad.webp?v=1763001303","width":2000},{"alt":null,"id":26359816093795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85fa85bbfed420b1afacc0aa4cd095642ec65737.webp?v=1763001303"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85fa85bbfed420b1afacc0aa4cd095642ec65737.webp?v=1763001303","width":2000},{"alt":null,"id":26359816421475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b883d9be7f7f27eb47f9c506c06df26df8b6d09a.webp?v=1763001304"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b883d9be7f7f27eb47f9c506c06df26df8b6d09a.webp?v=1763001304","width":2000},{"alt":null,"id":26359816716387,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3008727340a3895bd859d8a915a5a8a1bb8a1ae9.webp?v=1763001305"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3008727340a3895bd859d8a915a5a8a1bb8a1ae9.webp?v=1763001305","width":2000},{"alt":null,"id":26359817011299,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd945305391f7d3e0df70593c1ed228ed4ba0156.webp?v=1763001305"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd945305391f7d3e0df70593c1ed228ed4ba0156.webp?v=1763001305","width":2000},{"alt":null,"id":26359817404515,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd68dd68b22315154e2d55c2b905a7879f39f65a.webp?v=1763001306"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd68dd68b22315154e2d55c2b905a7879f39f65a.webp?v=1763001306","width":2000},{"alt":null,"id":26359817764963,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/080539081ef752cdd93d3fc58c42ef3fa9b271df.webp?v=1763001307"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/080539081ef752cdd93d3fc58c42ef3fa9b271df.webp?v=1763001307","width":2000},{"alt":null,"id":26359818059875,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f697a02582028103b69753a4ae2fee32f18eb66.webp?v=1763001307"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f697a02582028103b69753a4ae2fee32f18eb66.webp?v=1763001307","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43834969325667,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-TOC02","requires_shipping":true,"taxable":true,"featured_image":{"id":34794397401187,"product_id":7922029756515,"position":6,"created_at":"2025-11-13T10:35:02+08:00","updated_at":"2025-11-13T10:35:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b883d9be7f7f27eb47f9c506c06df26df8b6d09a.webp?v=1763001304","variant_ids":[43834969325667]},"available":true,"name":"iPhone 12 mini Mod NX TOCOROCOMUGI 麵包出爐貓 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-TOC02","featured_media":{"alt":null,"id":26359816421475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b883d9be7f7f27eb47f9c506c06df26df8b6d09a.webp?v=1763001304"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43834969325667,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-TOC02","requires_shipping":true,"taxable":true,"featured_image":{"id":34794397401187,"product_id":7922029756515,"position":6,"created_at":"2025-11-13T10:35:02+08:00","updated_at":"2025-11-13T10:35:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b883d9be7f7f27eb47f9c506c06df26df8b6d09a.webp?v=1763001304","variant_ids":[43834969325667]},"available":true,"name":"iPhone 12 mini Mod NX TOCOROCOMUGI 麵包出爐貓 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-TOC02","featured_media":{"alt":null,"id":26359816421475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b883d9be7f7f27eb47f9c506c06df26df8b6d09a.webp?v=1763001304"}},"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: "停產" }