$product = {"id":7903357468771,"title":"iPhone 12 mini Mod NX 變種吉娃娃 Godgwawa 普遍吉","handle":"iphone-12-mini-mod-nx-printable-it32","description":null,"published_at":"2025-10-20T09:55:16+08:00","created_at":"2025-10-20T09:09:57+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-godgwawa","device-iPhone 12 Mini","merge","reseller-godgwawa"],"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":43786370613347,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-IT32","requires_shipping":true,"taxable":true,"featured_image":{"id":34672467509347,"product_id":7903357468771,"position":4,"created_at":"2025-10-20T09:10:06+08:00","updated_at":"2025-10-20T09:10:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f5cbe18db08264e9cc10b87b28c0537c3a413.webp?v=1760922608","variant_ids":[43786370613347]},"available":true,"name":"iPhone 12 mini Mod NX 變種吉娃娃 Godgwawa 普遍吉 - 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-IT32","featured_media":{"alt":null,"id":26241726447715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f5cbe18db08264e9cc10b87b28c0537c3a413.webp?v=1760922608"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fca07571e2ade5f432f830ae031991961c6c39a.webp?v=1760922607","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e248f4be579ec6f295c8cb8ce1d2fd138fe7e90.webp?v=1760922607","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089f5f8a4f6cb1e0dcbe9f302539d3c5956dd549.webp?v=1760922608","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f5cbe18db08264e9cc10b87b28c0537c3a413.webp?v=1760922608","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b997c0f337a234513597d5c689b5fc6c9ff4bbb.webp?v=1760922609","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3be2ab69847cf27bafd58031443f1f788096ecd0.webp?v=1760922610","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/178301443da8f935ac47106bf00c41936366ae18.webp?v=1760922611","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b87aa4e32c7264d8a2dfbe5cf0c47d4301e3eca.webp?v=1760922611","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef6bf7e0883aeb0c8b1f473c6c6f5437379b506f.webp?v=1760922612","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9c3443887d33666785b2d1b964acfc3086312f1.webp?v=1760922612","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0459ed34fe31f32e91139251a131a0a884026c0e.webp?v=1760922613"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fca07571e2ade5f432f830ae031991961c6c39a.webp?v=1760922607","options":["color"],"media":[{"alt":null,"id":26241725530211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fca07571e2ade5f432f830ae031991961c6c39a.webp?v=1760922607"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fca07571e2ade5f432f830ae031991961c6c39a.webp?v=1760922607","width":2000},{"alt":null,"id":26241725857891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e248f4be579ec6f295c8cb8ce1d2fd138fe7e90.webp?v=1760922607"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e248f4be579ec6f295c8cb8ce1d2fd138fe7e90.webp?v=1760922607","width":2000},{"alt":null,"id":26241726152803,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089f5f8a4f6cb1e0dcbe9f302539d3c5956dd549.webp?v=1760922608"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089f5f8a4f6cb1e0dcbe9f302539d3c5956dd549.webp?v=1760922608","width":2000},{"alt":null,"id":26241726447715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f5cbe18db08264e9cc10b87b28c0537c3a413.webp?v=1760922608"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f5cbe18db08264e9cc10b87b28c0537c3a413.webp?v=1760922608","width":2000},{"alt":null,"id":26241726644323,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b997c0f337a234513597d5c689b5fc6c9ff4bbb.webp?v=1760922609"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b997c0f337a234513597d5c689b5fc6c9ff4bbb.webp?v=1760922609","width":2000},{"alt":null,"id":26241726808163,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3be2ab69847cf27bafd58031443f1f788096ecd0.webp?v=1760922610"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3be2ab69847cf27bafd58031443f1f788096ecd0.webp?v=1760922610","width":2000},{"alt":null,"id":26241727266915,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/178301443da8f935ac47106bf00c41936366ae18.webp?v=1760922611"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/178301443da8f935ac47106bf00c41936366ae18.webp?v=1760922611","width":2000},{"alt":null,"id":26241727430755,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b87aa4e32c7264d8a2dfbe5cf0c47d4301e3eca.webp?v=1760922611"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b87aa4e32c7264d8a2dfbe5cf0c47d4301e3eca.webp?v=1760922611","width":2000},{"alt":null,"id":26241727955043,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef6bf7e0883aeb0c8b1f473c6c6f5437379b506f.webp?v=1760922612"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef6bf7e0883aeb0c8b1f473c6c6f5437379b506f.webp?v=1760922612","width":2000},{"alt":null,"id":26241728053347,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9c3443887d33666785b2d1b964acfc3086312f1.webp?v=1760922612"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9c3443887d33666785b2d1b964acfc3086312f1.webp?v=1760922612","width":2000},{"alt":null,"id":26241728249955,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0459ed34fe31f32e91139251a131a0a884026c0e.webp?v=1760922613"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0459ed34fe31f32e91139251a131a0a884026c0e.webp?v=1760922613","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43786370613347,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-IT32","requires_shipping":true,"taxable":true,"featured_image":{"id":34672467509347,"product_id":7903357468771,"position":4,"created_at":"2025-10-20T09:10:06+08:00","updated_at":"2025-10-20T09:10:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f5cbe18db08264e9cc10b87b28c0537c3a413.webp?v=1760922608","variant_ids":[43786370613347]},"available":true,"name":"iPhone 12 mini Mod NX 變種吉娃娃 Godgwawa 普遍吉 - 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-IT32","featured_media":{"alt":null,"id":26241726447715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f5cbe18db08264e9cc10b87b28c0537c3a413.webp?v=1760922608"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43786370613347,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-IT32","requires_shipping":true,"taxable":true,"featured_image":{"id":34672467509347,"product_id":7903357468771,"position":4,"created_at":"2025-10-20T09:10:06+08:00","updated_at":"2025-10-20T09:10:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f5cbe18db08264e9cc10b87b28c0537c3a413.webp?v=1760922608","variant_ids":[43786370613347]},"available":true,"name":"iPhone 12 mini Mod NX 變種吉娃娃 Godgwawa 普遍吉 - 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-IT32","featured_media":{"alt":null,"id":26241726447715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740f5cbe18db08264e9cc10b87b28c0537c3a413.webp?v=1760922608"}},"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: "停產" }