$product = {"id":7827217285219,"title":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux","handle":"iphone-13-mini-solidsuit-magsafe-bumper-back-crossover-design-tdf11","description":null,"published_at":"2025-07-14T11:32:26+08:00","created_at":"2025-06-26T15:13:21+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-tour-de-france","device-iPhone 13 Mini","merge","reseller-tour-de-france"],"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":43497184788579,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST012280E-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081679933539,"product_id":7827217285219,"position":3,"created_at":"2025-06-26T15:13:27+08:00","updated_at":"2025-06-26T15:13:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bf8c405b575ff59e3e82992e235d6189e8314cb.webp?v=1750922009","variant_ids":[43497184788579]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - 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":"MST012280E-TDF11","featured_media":{"alt":null,"id":25742626979939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bf8c405b575ff59e3e82992e235d6189e8314cb.webp?v=1750922009"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43497187115107,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081681899619,"product_id":7827217285219,"position":7,"created_at":"2025-06-26T15:13:29+08:00","updated_at":"2025-06-26T15:13:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d4fd008c6d77e33ec128dcd2dbf529689262.webp?v=1750922011","variant_ids":[43497187115107]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-TDF11","featured_media":{"alt":null,"id":25742627962979,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d4fd008c6d77e33ec128dcd2dbf529689262.webp?v=1750922011"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43497187147875,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081681244259,"product_id":7827217285219,"position":6,"created_at":"2025-06-26T15:13:29+08:00","updated_at":"2025-06-26T15:13:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45d96ae0d8cef58ba4b344feb3b565d9027e6588.webp?v=1750922011","variant_ids":[43497187147875]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-TDF11","featured_media":{"alt":null,"id":25742627668067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45d96ae0d8cef58ba4b344feb3b565d9027e6588.webp?v=1750922011"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43497187180643,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST012280B-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081680851043,"product_id":7827217285219,"position":5,"created_at":"2025-06-26T15:13:28+08:00","updated_at":"2025-06-26T15:13:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f33060e2ee873d01ec8b7ed7d956f08b302399e.webp?v=1750922010","variant_ids":[43497187180643]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - 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":"MST012280B-TDF11","featured_media":{"alt":null,"id":25742627373155,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f33060e2ee873d01ec8b7ed7d956f08b302399e.webp?v=1750922010"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43497187246179,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01228Z9-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081678590051,"product_id":7827217285219,"position":1,"created_at":"2025-06-26T15:13:26+08:00","updated_at":"2025-06-26T15:13:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb4d4b66685d71385fd1f36961c6a630b8ce6aaa.webp?v=1750922008","variant_ids":[43497187246179]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z9-TDF11","featured_media":{"alt":null,"id":25742626226275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb4d4b66685d71385fd1f36961c6a630b8ce6aaa.webp?v=1750922008"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb4d4b66685d71385fd1f36961c6a630b8ce6aaa.webp?v=1750922008","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b076d21bbc9efc8034b4e94bb2dfd61537bb2d4.webp?v=1750922009","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bf8c405b575ff59e3e82992e235d6189e8314cb.webp?v=1750922009","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b3209caf4c4fa7a3722fcd82dbe64800c14cb1a.webp?v=1750922010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f33060e2ee873d01ec8b7ed7d956f08b302399e.webp?v=1750922010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45d96ae0d8cef58ba4b344feb3b565d9027e6588.webp?v=1750922011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d4fd008c6d77e33ec128dcd2dbf529689262.webp?v=1750922011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353e8d0f3e44b6caa0503ead279a42b20f2b2106.webp?v=1750922012","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9fe9436f503600ca796492f4da88c2097ab434e.webp?v=1750922013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e327ed4afd663a1e2e73d52142f05d67f2b496ba.webp?v=1750922013"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb4d4b66685d71385fd1f36961c6a630b8ce6aaa.webp?v=1750922008","options":["color"],"media":[{"alt":null,"id":25742626226275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb4d4b66685d71385fd1f36961c6a630b8ce6aaa.webp?v=1750922008"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb4d4b66685d71385fd1f36961c6a630b8ce6aaa.webp?v=1750922008","width":2000},{"alt":null,"id":25742626685027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b076d21bbc9efc8034b4e94bb2dfd61537bb2d4.webp?v=1750922009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b076d21bbc9efc8034b4e94bb2dfd61537bb2d4.webp?v=1750922009","width":2000},{"alt":null,"id":25742626979939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bf8c405b575ff59e3e82992e235d6189e8314cb.webp?v=1750922009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bf8c405b575ff59e3e82992e235d6189e8314cb.webp?v=1750922009","width":2000},{"alt":null,"id":25742627078243,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b3209caf4c4fa7a3722fcd82dbe64800c14cb1a.webp?v=1750922010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b3209caf4c4fa7a3722fcd82dbe64800c14cb1a.webp?v=1750922010","width":2000},{"alt":null,"id":25742627373155,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f33060e2ee873d01ec8b7ed7d956f08b302399e.webp?v=1750922010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f33060e2ee873d01ec8b7ed7d956f08b302399e.webp?v=1750922010","width":2000},{"alt":null,"id":25742627668067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45d96ae0d8cef58ba4b344feb3b565d9027e6588.webp?v=1750922011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45d96ae0d8cef58ba4b344feb3b565d9027e6588.webp?v=1750922011","width":2000},{"alt":null,"id":25742627962979,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d4fd008c6d77e33ec128dcd2dbf529689262.webp?v=1750922011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d4fd008c6d77e33ec128dcd2dbf529689262.webp?v=1750922011","width":2000},{"alt":null,"id":25742628257891,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353e8d0f3e44b6caa0503ead279a42b20f2b2106.webp?v=1750922012"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353e8d0f3e44b6caa0503ead279a42b20f2b2106.webp?v=1750922012","width":2000},{"alt":null,"id":25742628487267,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9fe9436f503600ca796492f4da88c2097ab434e.webp?v=1750922013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9fe9436f503600ca796492f4da88c2097ab434e.webp?v=1750922013","width":2000},{"alt":null,"id":25742628814947,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e327ed4afd663a1e2e73d52142f05d67f2b496ba.webp?v=1750922013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e327ed4afd663a1e2e73d52142f05d67f2b496ba.webp?v=1750922013","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43497184788579,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST012280E-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081679933539,"product_id":7827217285219,"position":3,"created_at":"2025-06-26T15:13:27+08:00","updated_at":"2025-06-26T15:13:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bf8c405b575ff59e3e82992e235d6189e8314cb.webp?v=1750922009","variant_ids":[43497184788579]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - 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":"MST012280E-TDF11","featured_media":{"alt":null,"id":25742626979939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bf8c405b575ff59e3e82992e235d6189e8314cb.webp?v=1750922009"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43497187115107,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081681899619,"product_id":7827217285219,"position":7,"created_at":"2025-06-26T15:13:29+08:00","updated_at":"2025-06-26T15:13:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d4fd008c6d77e33ec128dcd2dbf529689262.webp?v=1750922011","variant_ids":[43497187115107]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-TDF11","featured_media":{"alt":null,"id":25742627962979,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d4fd008c6d77e33ec128dcd2dbf529689262.webp?v=1750922011"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43497187147875,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081681244259,"product_id":7827217285219,"position":6,"created_at":"2025-06-26T15:13:29+08:00","updated_at":"2025-06-26T15:13:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45d96ae0d8cef58ba4b344feb3b565d9027e6588.webp?v=1750922011","variant_ids":[43497187147875]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-TDF11","featured_media":{"alt":null,"id":25742627668067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45d96ae0d8cef58ba4b344feb3b565d9027e6588.webp?v=1750922011"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43497187180643,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST012280B-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081680851043,"product_id":7827217285219,"position":5,"created_at":"2025-06-26T15:13:28+08:00","updated_at":"2025-06-26T15:13:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f33060e2ee873d01ec8b7ed7d956f08b302399e.webp?v=1750922010","variant_ids":[43497187180643]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - 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":"MST012280B-TDF11","featured_media":{"alt":null,"id":25742627373155,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f33060e2ee873d01ec8b7ed7d956f08b302399e.webp?v=1750922010"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43497187246179,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01228Z9-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081678590051,"product_id":7827217285219,"position":1,"created_at":"2025-06-26T15:13:26+08:00","updated_at":"2025-06-26T15:13:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb4d4b66685d71385fd1f36961c6a630b8ce6aaa.webp?v=1750922008","variant_ids":[43497187246179]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z9-TDF11","featured_media":{"alt":null,"id":25742626226275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb4d4b66685d71385fd1f36961c6a630b8ce6aaa.webp?v=1750922008"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43497184788579,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST012280E-TDF11","requires_shipping":true,"taxable":true,"featured_image":{"id":34081679933539,"product_id":7827217285219,"position":3,"created_at":"2025-06-26T15:13:27+08:00","updated_at":"2025-06-26T15:13:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bf8c405b575ff59e3e82992e235d6189e8314cb.webp?v=1750922009","variant_ids":[43497184788579]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) Tour de France Mont Ventoux - 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":"MST012280E-TDF11","featured_media":{"alt":null,"id":25742626979939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bf8c405b575ff59e3e82992e235d6189e8314cb.webp?v=1750922009"}},"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: "停產" }