$product = {"id":7876114284643,"title":"iPhone 12 mini Mod NX 爽爽貓 by SECOND 好運發生","handle":"iphone-12-mini-mod-nx-printable-ea109","description":null,"published_at":"2025-09-04T09:42:25+08:00","created_at":"2025-09-03T12:04:49+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-songsongmeow","device-iPhone 12 Mini","merge","reseller-songsongmeow"],"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":43675467186275,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-EA109","requires_shipping":true,"taxable":true,"featured_image":{"id":34416428449891,"product_id":7876114284643,"position":9,"created_at":"2025-09-03T12:04:58+08:00","updated_at":"2025-09-03T12:05:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5c6fd487393c0f67a10877cf7a5cbc0cf2b0bd6.webp?v=1756872300","variant_ids":[43675467186275]},"available":true,"name":"iPhone 12 mini Mod NX 爽爽貓 by SECOND 好運發生 - 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-EA109","featured_media":{"alt":null,"id":25988702928995,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5c6fd487393c0f67a10877cf7a5cbc0cf2b0bd6.webp?v=1756872300"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea863ec9b676b5188b6dfbc81c47f3632b5c90d6.webp?v=1756872294","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0957acf1cbb29d6c696724a4030f5b762d87f962.webp?v=1756872295","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfcf93af408305a05f17570aea5d76aaf15a2518.webp?v=1756872296","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82c07a1a09ae24ec7c61e832d59915c2ba417722.webp?v=1756872296","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a985133d5c58d497fd87f49b68609f24d6299243.webp?v=1756872297","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4b9a5c72cb834856393edc329833e28f0f830de.webp?v=1756872298","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fafe1eb5a7609333a33f789d432c0d2ee698219b.webp?v=1756872299","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e90303c7bb0a85554798e4d81f85e2d351cf164.webp?v=1756872299","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5c6fd487393c0f67a10877cf7a5cbc0cf2b0bd6.webp?v=1756872300","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b4dcca5f630562b0bfd12ab068de09db22d8b55.webp?v=1756872301","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5dacc6b0918aa30d765450b7d38c6a74edcddda7.webp?v=1756872302"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea863ec9b676b5188b6dfbc81c47f3632b5c90d6.webp?v=1756872294","options":["color"],"media":[{"alt":null,"id":25988701683811,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea863ec9b676b5188b6dfbc81c47f3632b5c90d6.webp?v=1756872294"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea863ec9b676b5188b6dfbc81c47f3632b5c90d6.webp?v=1756872294","width":2000},{"alt":null,"id":25988701782115,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0957acf1cbb29d6c696724a4030f5b762d87f962.webp?v=1756872295"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0957acf1cbb29d6c696724a4030f5b762d87f962.webp?v=1756872295","width":2000},{"alt":null,"id":25988701847651,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfcf93af408305a05f17570aea5d76aaf15a2518.webp?v=1756872296"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfcf93af408305a05f17570aea5d76aaf15a2518.webp?v=1756872296","width":2000},{"alt":null,"id":25988701945955,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82c07a1a09ae24ec7c61e832d59915c2ba417722.webp?v=1756872296"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82c07a1a09ae24ec7c61e832d59915c2ba417722.webp?v=1756872296","width":2000},{"alt":null,"id":25988702077027,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a985133d5c58d497fd87f49b68609f24d6299243.webp?v=1756872297"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a985133d5c58d497fd87f49b68609f24d6299243.webp?v=1756872297","width":2000},{"alt":null,"id":25988702208099,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4b9a5c72cb834856393edc329833e28f0f830de.webp?v=1756872298"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4b9a5c72cb834856393edc329833e28f0f830de.webp?v=1756872298","width":2000},{"alt":null,"id":25988702339171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fafe1eb5a7609333a33f789d432c0d2ee698219b.webp?v=1756872299"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fafe1eb5a7609333a33f789d432c0d2ee698219b.webp?v=1756872299","width":2000},{"alt":null,"id":25988702601315,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e90303c7bb0a85554798e4d81f85e2d351cf164.webp?v=1756872299"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e90303c7bb0a85554798e4d81f85e2d351cf164.webp?v=1756872299","width":2000},{"alt":null,"id":25988702928995,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5c6fd487393c0f67a10877cf7a5cbc0cf2b0bd6.webp?v=1756872300"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5c6fd487393c0f67a10877cf7a5cbc0cf2b0bd6.webp?v=1756872300","width":2000},{"alt":null,"id":25988703092835,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b4dcca5f630562b0bfd12ab068de09db22d8b55.webp?v=1756872301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b4dcca5f630562b0bfd12ab068de09db22d8b55.webp?v=1756872301","width":2000},{"alt":null,"id":25988703322211,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5dacc6b0918aa30d765450b7d38c6a74edcddda7.webp?v=1756872302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5dacc6b0918aa30d765450b7d38c6a74edcddda7.webp?v=1756872302","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43675467186275,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-EA109","requires_shipping":true,"taxable":true,"featured_image":{"id":34416428449891,"product_id":7876114284643,"position":9,"created_at":"2025-09-03T12:04:58+08:00","updated_at":"2025-09-03T12:05:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5c6fd487393c0f67a10877cf7a5cbc0cf2b0bd6.webp?v=1756872300","variant_ids":[43675467186275]},"available":true,"name":"iPhone 12 mini Mod NX 爽爽貓 by SECOND 好運發生 - 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-EA109","featured_media":{"alt":null,"id":25988702928995,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5c6fd487393c0f67a10877cf7a5cbc0cf2b0bd6.webp?v=1756872300"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43675467186275,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-EA109","requires_shipping":true,"taxable":true,"featured_image":{"id":34416428449891,"product_id":7876114284643,"position":9,"created_at":"2025-09-03T12:04:58+08:00","updated_at":"2025-09-03T12:05:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5c6fd487393c0f67a10877cf7a5cbc0cf2b0bd6.webp?v=1756872300","variant_ids":[43675467186275]},"available":true,"name":"iPhone 12 mini Mod NX 爽爽貓 by SECOND 好運發生 - 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-EA109","featured_media":{"alt":null,"id":25988702928995,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5c6fd487393c0f67a10877cf7a5cbc0cf2b0bd6.webp?v=1756872300"}},"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: "停產" }