$product = {"id":7937649442915,"title":"iPhone 12 mini Mod NX Jin Young Choi 一起伸展","handle":"iphone-12-mini-mod-nx-cjy07","description":null,"published_at":"2025-12-12T09:33:41+08:00","created_at":"2025-12-11T10:10:56+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jychoioioi","device-iPhone 12 Mini","merge","reseller-jychoioioi"],"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":43883326734435,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CJY07","requires_shipping":true,"taxable":true,"featured_image":{"id":34931290832995,"product_id":7937649442915,"position":8,"created_at":"2025-12-11T10:11:04+08:00","updated_at":"2025-12-11T10:11:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c17899d4cc18439bcaf72354bfff7a12df8132a2.webp?v=1765419066","variant_ids":[43883326734435]},"available":true,"name":"iPhone 12 mini Mod NX Jin Young Choi 一起伸展 - 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-CJY07","featured_media":{"alt":null,"id":26493664985187,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c17899d4cc18439bcaf72354bfff7a12df8132a2.webp?v=1765419066"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e4b31fe1a2b9043b97a6fa97b913316bcb5bbc1.webp?v=1765419062","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ae99bf9bcc8f5f3be4cc446864782b8be2da5d.webp?v=1765419063","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18ab687766ecd85b9bc2914d76608e0716e45580.webp?v=1765419063","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbbef68bf3bec4e993840f492c13dd5c279753e9.webp?v=1765419063","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a09f42de8a6b8e651fd3a9584f4ca7411908244f.webp?v=1765419064","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e6a5089ff6243bd3b54a08db8a59b355919a04.webp?v=1765419065","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b9cd1f38639276df006bcfd33c4e55648134c35.webp?v=1765419065","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c17899d4cc18439bcaf72354bfff7a12df8132a2.webp?v=1765419066","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d955b46cdf8528963be8a9b24c843b1f451139ac.webp?v=1765419066","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df6845fafc140971a2de3049a43bbb16269c9884.webp?v=1765419067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f712491e2d06233bd3b43ab943084afca8c463b.webp?v=1765419067"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e4b31fe1a2b9043b97a6fa97b913316bcb5bbc1.webp?v=1765419062","options":["color"],"media":[{"alt":null,"id":26493663969379,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e4b31fe1a2b9043b97a6fa97b913316bcb5bbc1.webp?v=1765419062"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e4b31fe1a2b9043b97a6fa97b913316bcb5bbc1.webp?v=1765419062","width":2000},{"alt":null,"id":26493664067683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ae99bf9bcc8f5f3be4cc446864782b8be2da5d.webp?v=1765419063"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ae99bf9bcc8f5f3be4cc446864782b8be2da5d.webp?v=1765419063","width":2000},{"alt":null,"id":26493664231523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18ab687766ecd85b9bc2914d76608e0716e45580.webp?v=1765419063"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18ab687766ecd85b9bc2914d76608e0716e45580.webp?v=1765419063","width":2000},{"alt":null,"id":26493664329827,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbbef68bf3bec4e993840f492c13dd5c279753e9.webp?v=1765419063"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbbef68bf3bec4e993840f492c13dd5c279753e9.webp?v=1765419063","width":2000},{"alt":null,"id":26493664460899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a09f42de8a6b8e651fd3a9584f4ca7411908244f.webp?v=1765419064"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a09f42de8a6b8e651fd3a9584f4ca7411908244f.webp?v=1765419064","width":2000},{"alt":null,"id":26493664624739,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e6a5089ff6243bd3b54a08db8a59b355919a04.webp?v=1765419065"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e6a5089ff6243bd3b54a08db8a59b355919a04.webp?v=1765419065","width":2000},{"alt":null,"id":26493664886883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b9cd1f38639276df006bcfd33c4e55648134c35.webp?v=1765419065"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b9cd1f38639276df006bcfd33c4e55648134c35.webp?v=1765419065","width":2000},{"alt":null,"id":26493664985187,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c17899d4cc18439bcaf72354bfff7a12df8132a2.webp?v=1765419066"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c17899d4cc18439bcaf72354bfff7a12df8132a2.webp?v=1765419066","width":2000},{"alt":null,"id":26493665116259,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d955b46cdf8528963be8a9b24c843b1f451139ac.webp?v=1765419066"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d955b46cdf8528963be8a9b24c843b1f451139ac.webp?v=1765419066","width":2000},{"alt":null,"id":26493665214563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df6845fafc140971a2de3049a43bbb16269c9884.webp?v=1765419067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df6845fafc140971a2de3049a43bbb16269c9884.webp?v=1765419067","width":2000},{"alt":null,"id":26493665411171,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f712491e2d06233bd3b43ab943084afca8c463b.webp?v=1765419067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f712491e2d06233bd3b43ab943084afca8c463b.webp?v=1765419067","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43883326734435,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CJY07","requires_shipping":true,"taxable":true,"featured_image":{"id":34931290832995,"product_id":7937649442915,"position":8,"created_at":"2025-12-11T10:11:04+08:00","updated_at":"2025-12-11T10:11:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c17899d4cc18439bcaf72354bfff7a12df8132a2.webp?v=1765419066","variant_ids":[43883326734435]},"available":true,"name":"iPhone 12 mini Mod NX Jin Young Choi 一起伸展 - 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-CJY07","featured_media":{"alt":null,"id":26493664985187,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c17899d4cc18439bcaf72354bfff7a12df8132a2.webp?v=1765419066"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43883326734435,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CJY07","requires_shipping":true,"taxable":true,"featured_image":{"id":34931290832995,"product_id":7937649442915,"position":8,"created_at":"2025-12-11T10:11:04+08:00","updated_at":"2025-12-11T10:11:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c17899d4cc18439bcaf72354bfff7a12df8132a2.webp?v=1765419066","variant_ids":[43883326734435]},"available":true,"name":"iPhone 12 mini Mod NX Jin Young Choi 一起伸展 - 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-CJY07","featured_media":{"alt":null,"id":26493664985187,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c17899d4cc18439bcaf72354bfff7a12df8132a2.webp?v=1765419066"}},"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: "停產" }