$product = {"id":8035593846883,"title":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti","handle":"iphone-12-pro-max-solidsuit-classic-magsafe-gm25","description":null,"published_at":"2026-06-17T12:28:38+08:00","created_at":"2026-06-17T10:44:07+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-dfb","device-iPhone 12 Pro Max","merge","reseller-dfb"],"price":125000,"price_min":125000,"price_max":125000,"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":44263567261795,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST011870E-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009813147747,"product_id":8035593846883,"position":5,"created_at":"2026-06-17T10:44:38+08:00","updated_at":"2026-06-17T10:44:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef13d0d5c3b9a492f65746aea97992dfc12d67c.webp?v=1781664280","variant_ids":[44263567261795]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Parakeet Green","public_title":"Parakeet Green","options":["Parakeet Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011870E-GM25","featured_media":{"alt":null,"id":27528620245091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef13d0d5c3b9a492f65746aea97992dfc12d67c.webp?v=1781664280"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44263573651555,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST011870D-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009812328547,"product_id":8035593846883,"position":3,"created_at":"2026-06-17T10:44:36+08:00","updated_at":"2026-06-17T10:44:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/850419865b6c830e0053b9fb83bc5dc060063b52.webp?v=1781664278","variant_ids":[44263573651555]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Bordeaux Red","public_title":"Bordeaux Red","options":["Bordeaux Red"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011870D-GM25","featured_media":{"alt":null,"id":27528619393123,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/850419865b6c830e0053b9fb83bc5dc060063b52.webp?v=1781664278"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44263573782627,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST011870C-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009811771491,"product_id":8035593846883,"position":1,"created_at":"2026-06-17T10:44:35+08:00","updated_at":"2026-06-17T10:44:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe17014b9acdacfd95a77c5f502d34d9d24867b.webp?v=1781664277","variant_ids":[44263573782627]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Classic Blue","public_title":"Classic Blue","options":["Classic Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011870C-GM25","featured_media":{"alt":null,"id":27528618868835,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe17014b9acdacfd95a77c5f502d34d9d24867b.webp?v=1781664277"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44263574110307,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST011870B-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009814032483,"product_id":8035593846883,"position":6,"created_at":"2026-06-17T10:44:39+08:00","updated_at":"2026-06-17T10:44:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67b1717118b87f46e963408299c3a50fc6b23ace.webp?v=1781664281","variant_ids":[44263574110307]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011870B-GM25","featured_media":{"alt":null,"id":27528621129827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67b1717118b87f46e963408299c3a50fc6b23ace.webp?v=1781664281"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44263574372451,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"MST01187O9-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009812099171,"product_id":8035593846883,"position":2,"created_at":"2026-06-17T10:44:35+08:00","updated_at":"2026-06-17T10:44:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7650dd0f4d1e1d41046064d99cc7b92b5c9091.webp?v=1781664277","variant_ids":[44263574372451]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01187O9-GM25","featured_media":{"alt":null,"id":27528619196515,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7650dd0f4d1e1d41046064d99cc7b92b5c9091.webp?v=1781664277"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44263574601827,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0118752-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009812754531,"product_id":8035593846883,"position":4,"created_at":"2026-06-17T10:44:37+08:00","updated_at":"2026-06-17T10:44:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8253941c6f82bc631fbdd4caa60f97d93280d27.webp?v=1781664279","variant_ids":[44263574601827]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0118752-GM25","featured_media":{"alt":null,"id":27528619851875,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8253941c6f82bc631fbdd4caa60f97d93280d27.webp?v=1781664279"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe17014b9acdacfd95a77c5f502d34d9d24867b.webp?v=1781664277","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7650dd0f4d1e1d41046064d99cc7b92b5c9091.webp?v=1781664277","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/850419865b6c830e0053b9fb83bc5dc060063b52.webp?v=1781664278","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8253941c6f82bc631fbdd4caa60f97d93280d27.webp?v=1781664279","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef13d0d5c3b9a492f65746aea97992dfc12d67c.webp?v=1781664280","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67b1717118b87f46e963408299c3a50fc6b23ace.webp?v=1781664281"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe17014b9acdacfd95a77c5f502d34d9d24867b.webp?v=1781664277","options":["color"],"media":[{"alt":null,"id":27528618868835,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe17014b9acdacfd95a77c5f502d34d9d24867b.webp?v=1781664277"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe17014b9acdacfd95a77c5f502d34d9d24867b.webp?v=1781664277","width":2000},{"alt":null,"id":27528619196515,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7650dd0f4d1e1d41046064d99cc7b92b5c9091.webp?v=1781664277"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7650dd0f4d1e1d41046064d99cc7b92b5c9091.webp?v=1781664277","width":2000},{"alt":null,"id":27528619393123,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/850419865b6c830e0053b9fb83bc5dc060063b52.webp?v=1781664278"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/850419865b6c830e0053b9fb83bc5dc060063b52.webp?v=1781664278","width":2000},{"alt":null,"id":27528619851875,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8253941c6f82bc631fbdd4caa60f97d93280d27.webp?v=1781664279"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8253941c6f82bc631fbdd4caa60f97d93280d27.webp?v=1781664279","width":2000},{"alt":null,"id":27528620245091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef13d0d5c3b9a492f65746aea97992dfc12d67c.webp?v=1781664280"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef13d0d5c3b9a492f65746aea97992dfc12d67c.webp?v=1781664280","width":2000},{"alt":null,"id":27528621129827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67b1717118b87f46e963408299c3a50fc6b23ace.webp?v=1781664281"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67b1717118b87f46e963408299c3a50fc6b23ace.webp?v=1781664281","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":44263567261795,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST011870E-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009813147747,"product_id":8035593846883,"position":5,"created_at":"2026-06-17T10:44:38+08:00","updated_at":"2026-06-17T10:44:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef13d0d5c3b9a492f65746aea97992dfc12d67c.webp?v=1781664280","variant_ids":[44263567261795]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Parakeet Green","public_title":"Parakeet Green","options":["Parakeet Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011870E-GM25","featured_media":{"alt":null,"id":27528620245091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef13d0d5c3b9a492f65746aea97992dfc12d67c.webp?v=1781664280"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44263573651555,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST011870D-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009812328547,"product_id":8035593846883,"position":3,"created_at":"2026-06-17T10:44:36+08:00","updated_at":"2026-06-17T10:44:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/850419865b6c830e0053b9fb83bc5dc060063b52.webp?v=1781664278","variant_ids":[44263573651555]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Bordeaux Red","public_title":"Bordeaux Red","options":["Bordeaux Red"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011870D-GM25","featured_media":{"alt":null,"id":27528619393123,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/850419865b6c830e0053b9fb83bc5dc060063b52.webp?v=1781664278"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44263573782627,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST011870C-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009811771491,"product_id":8035593846883,"position":1,"created_at":"2026-06-17T10:44:35+08:00","updated_at":"2026-06-17T10:44:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe17014b9acdacfd95a77c5f502d34d9d24867b.webp?v=1781664277","variant_ids":[44263573782627]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Classic Blue","public_title":"Classic Blue","options":["Classic Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011870C-GM25","featured_media":{"alt":null,"id":27528618868835,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe17014b9acdacfd95a77c5f502d34d9d24867b.webp?v=1781664277"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44263574110307,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST011870B-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009814032483,"product_id":8035593846883,"position":6,"created_at":"2026-06-17T10:44:39+08:00","updated_at":"2026-06-17T10:44:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67b1717118b87f46e963408299c3a50fc6b23ace.webp?v=1781664281","variant_ids":[44263574110307]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011870B-GM25","featured_media":{"alt":null,"id":27528621129827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67b1717118b87f46e963408299c3a50fc6b23ace.webp?v=1781664281"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44263574372451,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"MST01187O9-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009812099171,"product_id":8035593846883,"position":2,"created_at":"2026-06-17T10:44:35+08:00","updated_at":"2026-06-17T10:44:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7650dd0f4d1e1d41046064d99cc7b92b5c9091.webp?v=1781664277","variant_ids":[44263574372451]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01187O9-GM25","featured_media":{"alt":null,"id":27528619196515,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7650dd0f4d1e1d41046064d99cc7b92b5c9091.webp?v=1781664277"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44263574601827,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0118752-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009812754531,"product_id":8035593846883,"position":4,"created_at":"2026-06-17T10:44:37+08:00","updated_at":"2026-06-17T10:44:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8253941c6f82bc631fbdd4caa60f97d93280d27.webp?v=1781664279","variant_ids":[44263574601827]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0118752-GM25","featured_media":{"alt":null,"id":27528619851875,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8253941c6f82bc631fbdd4caa60f97d93280d27.webp?v=1781664279"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":44263567261795,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST011870E-GM25","requires_shipping":true,"taxable":true,"featured_image":{"id":36009813147747,"product_id":8035593846883,"position":5,"created_at":"2026-06-17T10:44:38+08:00","updated_at":"2026-06-17T10:44:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef13d0d5c3b9a492f65746aea97992dfc12d67c.webp?v=1781664280","variant_ids":[44263567261795]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) German Football Association Graffiti - Parakeet Green","public_title":"Parakeet Green","options":["Parakeet Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011870E-GM25","featured_media":{"alt":null,"id":27528620245091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef13d0d5c3b9a492f65746aea97992dfc12d67c.webp?v=1781664280"}},"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: "停產" }