$product = {"id":7893901312099,"title":"iPhone 12 mini Mod NX Chubbynida 魚眼少女","handle":"iphone-12-mini-mod-nx-printable-chu02","description":null,"published_at":"2025-10-09T09:16:34+08:00","created_at":"2025-10-07T10:40:19+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-chubbynida","device-iPhone 12 Mini","merge","reseller-chubbynida"],"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":43763714588771,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CHU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34553445843043,"product_id":7893901312099,"position":2,"created_at":"2025-10-07T10:40:21+08:00","updated_at":"2025-10-07T10:40:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f064fa4ffb40e4d69ad8e07cf2376e35cc670c50.webp?v=1759804823","variant_ids":[43763714588771]},"available":true,"name":"iPhone 12 mini Mod NX Chubbynida 魚眼少女 - 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-CHU02","featured_media":{"alt":null,"id":26123093475427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f064fa4ffb40e4d69ad8e07cf2376e35cc670c50.webp?v=1759804823"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/450ae874571b573e4f7b21bfef45c8f3af5e3f9e.webp?v=1759804822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f064fa4ffb40e4d69ad8e07cf2376e35cc670c50.webp?v=1759804823","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b71e2f085c92e3123ca78f09473bd43d7aa5b8.webp?v=1759804823","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bcfa758a091f4f1e24c8c3a3d99a5965cfac2ee.webp?v=1759804824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e299627cb11b21662894ab92c3f2bbe089237f4.webp?v=1759804825","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/861dfe839be79151e2154586bb341852fd1b5714.webp?v=1759804826","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b011c5fed2d3a261f424257ec7696e64d38fdcc.webp?v=1759804826","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652878ed1d0e075b16f64ff09a5959736218e63c.webp?v=1759804827","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb0a0b67c0623d55e0864611fad0b0e82106f8e8.webp?v=1759804827","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0449d4128cf7b1c7b8d0364e4c2223c7c65f009e.webp?v=1759804828","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d678fe172aa2a48ec2b030db5a669613b52ea54.webp?v=1759804829"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/450ae874571b573e4f7b21bfef45c8f3af5e3f9e.webp?v=1759804822","options":["color"],"media":[{"alt":null,"id":26123093278819,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/450ae874571b573e4f7b21bfef45c8f3af5e3f9e.webp?v=1759804822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/450ae874571b573e4f7b21bfef45c8f3af5e3f9e.webp?v=1759804822","width":2000},{"alt":null,"id":26123093475427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f064fa4ffb40e4d69ad8e07cf2376e35cc670c50.webp?v=1759804823"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f064fa4ffb40e4d69ad8e07cf2376e35cc670c50.webp?v=1759804823","width":2000},{"alt":null,"id":26123093770339,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b71e2f085c92e3123ca78f09473bd43d7aa5b8.webp?v=1759804823"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b71e2f085c92e3123ca78f09473bd43d7aa5b8.webp?v=1759804823","width":2000},{"alt":null,"id":26123093966947,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bcfa758a091f4f1e24c8c3a3d99a5965cfac2ee.webp?v=1759804824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bcfa758a091f4f1e24c8c3a3d99a5965cfac2ee.webp?v=1759804824","width":2000},{"alt":null,"id":26123094196323,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e299627cb11b21662894ab92c3f2bbe089237f4.webp?v=1759804825"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e299627cb11b21662894ab92c3f2bbe089237f4.webp?v=1759804825","width":2000},{"alt":null,"id":26123094556771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/861dfe839be79151e2154586bb341852fd1b5714.webp?v=1759804826"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/861dfe839be79151e2154586bb341852fd1b5714.webp?v=1759804826","width":2000},{"alt":null,"id":26123094818915,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b011c5fed2d3a261f424257ec7696e64d38fdcc.webp?v=1759804826"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b011c5fed2d3a261f424257ec7696e64d38fdcc.webp?v=1759804826","width":2000},{"alt":null,"id":26123095081059,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652878ed1d0e075b16f64ff09a5959736218e63c.webp?v=1759804827"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652878ed1d0e075b16f64ff09a5959736218e63c.webp?v=1759804827","width":2000},{"alt":null,"id":26123095310435,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb0a0b67c0623d55e0864611fad0b0e82106f8e8.webp?v=1759804827"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb0a0b67c0623d55e0864611fad0b0e82106f8e8.webp?v=1759804827","width":2000},{"alt":null,"id":26123095539811,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0449d4128cf7b1c7b8d0364e4c2223c7c65f009e.webp?v=1759804828"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0449d4128cf7b1c7b8d0364e4c2223c7c65f009e.webp?v=1759804828","width":2000},{"alt":null,"id":26123095801955,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d678fe172aa2a48ec2b030db5a669613b52ea54.webp?v=1759804829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d678fe172aa2a48ec2b030db5a669613b52ea54.webp?v=1759804829","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43763714588771,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CHU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34553445843043,"product_id":7893901312099,"position":2,"created_at":"2025-10-07T10:40:21+08:00","updated_at":"2025-10-07T10:40:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f064fa4ffb40e4d69ad8e07cf2376e35cc670c50.webp?v=1759804823","variant_ids":[43763714588771]},"available":true,"name":"iPhone 12 mini Mod NX Chubbynida 魚眼少女 - 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-CHU02","featured_media":{"alt":null,"id":26123093475427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f064fa4ffb40e4d69ad8e07cf2376e35cc670c50.webp?v=1759804823"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43763714588771,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CHU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34553445843043,"product_id":7893901312099,"position":2,"created_at":"2025-10-07T10:40:21+08:00","updated_at":"2025-10-07T10:40:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f064fa4ffb40e4d69ad8e07cf2376e35cc670c50.webp?v=1759804823","variant_ids":[43763714588771]},"available":true,"name":"iPhone 12 mini Mod NX Chubbynida 魚眼少女 - 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-CHU02","featured_media":{"alt":null,"id":26123093475427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f064fa4ffb40e4d69ad8e07cf2376e35cc670c50.webp?v=1759804823"}},"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: "停產" }