$product = {"id":7893804154979,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) Chubbynida 魚眼少女","handle":"iphone-12-mini-mod-nx-magsafe-printable-chu02","description":null,"published_at":"2025-10-09T09:34:33+08:00","created_at":"2025-10-07T10:15:09+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":110000,"price_min":110000,"price_max":110000,"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":43763331367011,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-CHU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34553061572707,"product_id":7893804154979,"position":9,"created_at":"2025-10-07T10:15:19+08:00","updated_at":"2025-10-07T10:15:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77d7a5e6eabb9006868e12330a940453a53b1ec9.webp?v=1759803321","variant_ids":[43763331367011]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) Chubbynida 魚眼少女 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-CHU02","featured_media":{"alt":null,"id":26122709237859,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77d7a5e6eabb9006868e12330a940453a53b1ec9.webp?v=1759803321"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10feeb588d219fed6c4bd83a23130ad459496894.webp?v=1759803316","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b51625b8bc4d6d8c27d3f1c57a3a0aa76ea551.webp?v=1759803316","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2ecd4a691afd5bb353a4cbb159334422358bf7.webp?v=1759803317","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2909d2391f053181816907c883849c4eab9dd6cd.webp?v=1759803318","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d851514900dcd862e459444c4a6e4f13a13c68c5.webp?v=1759803318","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/529e4eba63d066970cd4645dbceaae946ba1e67e.webp?v=1759803319","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1757d783af6f6dd89184ada0b1d2274334cd4496.webp?v=1759803320","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dbbceac74e74e1a2b3764a95be36cfde3136922.webp?v=1759803321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77d7a5e6eabb9006868e12330a940453a53b1ec9.webp?v=1759803321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/901fb70b8293c1ac65d035182c8cd2ccd429c4f9.webp?v=1759803322","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a844165caf22e3e25b4c6d66c0bef2bdf724cba0.webp?v=1759803323"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10feeb588d219fed6c4bd83a23130ad459496894.webp?v=1759803316","options":["color"],"media":[{"alt":null,"id":26122707337315,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10feeb588d219fed6c4bd83a23130ad459496894.webp?v=1759803316"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10feeb588d219fed6c4bd83a23130ad459496894.webp?v=1759803316","width":2000},{"alt":null,"id":26122707566691,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b51625b8bc4d6d8c27d3f1c57a3a0aa76ea551.webp?v=1759803316"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b51625b8bc4d6d8c27d3f1c57a3a0aa76ea551.webp?v=1759803316","width":2000},{"alt":null,"id":26122707796067,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2ecd4a691afd5bb353a4cbb159334422358bf7.webp?v=1759803317"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2ecd4a691afd5bb353a4cbb159334422358bf7.webp?v=1759803317","width":2000},{"alt":null,"id":26122708025443,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2909d2391f053181816907c883849c4eab9dd6cd.webp?v=1759803318"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2909d2391f053181816907c883849c4eab9dd6cd.webp?v=1759803318","width":2000},{"alt":null,"id":26122708287587,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d851514900dcd862e459444c4a6e4f13a13c68c5.webp?v=1759803318"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d851514900dcd862e459444c4a6e4f13a13c68c5.webp?v=1759803318","width":2000},{"alt":null,"id":26122708516963,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/529e4eba63d066970cd4645dbceaae946ba1e67e.webp?v=1759803319"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/529e4eba63d066970cd4645dbceaae946ba1e67e.webp?v=1759803319","width":2000},{"alt":null,"id":26122708779107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1757d783af6f6dd89184ada0b1d2274334cd4496.webp?v=1759803320"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1757d783af6f6dd89184ada0b1d2274334cd4496.webp?v=1759803320","width":2000},{"alt":null,"id":26122709106787,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dbbceac74e74e1a2b3764a95be36cfde3136922.webp?v=1759803321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dbbceac74e74e1a2b3764a95be36cfde3136922.webp?v=1759803321","width":2000},{"alt":null,"id":26122709237859,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77d7a5e6eabb9006868e12330a940453a53b1ec9.webp?v=1759803321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77d7a5e6eabb9006868e12330a940453a53b1ec9.webp?v=1759803321","width":2000},{"alt":null,"id":26122709368931,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/901fb70b8293c1ac65d035182c8cd2ccd429c4f9.webp?v=1759803322"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/901fb70b8293c1ac65d035182c8cd2ccd429c4f9.webp?v=1759803322","width":2000},{"alt":null,"id":26122709631075,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a844165caf22e3e25b4c6d66c0bef2bdf724cba0.webp?v=1759803323"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a844165caf22e3e25b4c6d66c0bef2bdf724cba0.webp?v=1759803323","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43763331367011,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-CHU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34553061572707,"product_id":7893804154979,"position":9,"created_at":"2025-10-07T10:15:19+08:00","updated_at":"2025-10-07T10:15:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77d7a5e6eabb9006868e12330a940453a53b1ec9.webp?v=1759803321","variant_ids":[43763331367011]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) Chubbynida 魚眼少女 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-CHU02","featured_media":{"alt":null,"id":26122709237859,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77d7a5e6eabb9006868e12330a940453a53b1ec9.webp?v=1759803321"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43763331367011,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-CHU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34553061572707,"product_id":7893804154979,"position":9,"created_at":"2025-10-07T10:15:19+08:00","updated_at":"2025-10-07T10:15:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77d7a5e6eabb9006868e12330a940453a53b1ec9.webp?v=1759803321","variant_ids":[43763331367011]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) Chubbynida 魚眼少女 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-CHU02","featured_media":{"alt":null,"id":26122709237859,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77d7a5e6eabb9006868e12330a940453a53b1ec9.webp?v=1759803321"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }