$product = {"id":7911348764771,"title":"iPhone 15 Pro Max SolidX PosterLad Arial","handle":"iphone-15-pro-max-solidx-pos01","description":null,"published_at":"2025-11-05T10:25:13+08:00","created_at":"2025-11-04T11:01:32+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-posterlad","device-iPhone 15 Pro Max","merge","reseller-posterlad"],"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":43812390436963,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729487728739,"product_id":7911348764771,"position":2,"created_at":"2025-11-04T11:01:34+08:00","updated_at":"2025-11-04T11:01:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067f2098c3a8ac647e0daad6c13894bb0944ad4.webp?v=1762225296","variant_ids":[43812390436963]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129852-POS01","featured_media":{"alt":null,"id":26297355305059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067f2098c3a8ac647e0daad6c13894bb0944ad4.webp?v=1762225296"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43812390535267,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129853-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729487990883,"product_id":7911348764771,"position":3,"created_at":"2025-11-04T11:01:35+08:00","updated_at":"2025-11-04T11:01:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f02e663844e0ce58f13e0f5b3c4f8761e089025.webp?v=1762225297","variant_ids":[43812390535267]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129853-POS01","featured_media":{"alt":null,"id":26297355534435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f02e663844e0ce58f13e0f5b3c4f8761e089025.webp?v=1762225297"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43812390568035,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NST0129857-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729489039459,"product_id":7911348764771,"position":6,"created_at":"2025-11-04T11:01:37+08:00","updated_at":"2025-11-04T11:01:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1f7572093e88f87d6d3d6cd56f76ed39c9e0468.webp?v=1762225299","variant_ids":[43812390568035]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129857-POS01","featured_media":{"alt":null,"id":26297356615779,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1f7572093e88f87d6d3d6cd56f76ed39c9e0468.webp?v=1762225299"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43812390633571,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729488220259,"product_id":7911348764771,"position":4,"created_at":"2025-11-04T11:01:36+08:00","updated_at":"2025-11-04T11:01:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dbc955dab1d3313cc2b85afde15561896d288dc.webp?v=1762225297","variant_ids":[43812390633571]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298Z7-POS01","featured_media":{"alt":null,"id":26297355796579,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dbc955dab1d3313cc2b85afde15561896d288dc.webp?v=1762225297"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43812390666339,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"NST01298O8-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729489399907,"product_id":7911348764771,"position":7,"created_at":"2025-11-04T11:01:38+08:00","updated_at":"2025-11-04T11:01:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f7d94d2189f6938d343bb9fe8e7b58a98df9a34.webp?v=1762225300","variant_ids":[43812390666339]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298O8-POS01","featured_media":{"alt":null,"id":26297356976227,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f7d94d2189f6938d343bb9fe8e7b58a98df9a34.webp?v=1762225300"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf61340306ca18d4680e82a7ef3d9fb38b36a0.webp?v=1762225295","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067f2098c3a8ac647e0daad6c13894bb0944ad4.webp?v=1762225296","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f02e663844e0ce58f13e0f5b3c4f8761e089025.webp?v=1762225297","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dbc955dab1d3313cc2b85afde15561896d288dc.webp?v=1762225297","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec5818183ecd73d7e3ba247be1ecaf0ab5ba3c7.webp?v=1762225298","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1f7572093e88f87d6d3d6cd56f76ed39c9e0468.webp?v=1762225299","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f7d94d2189f6938d343bb9fe8e7b58a98df9a34.webp?v=1762225300","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/782545d7ef8542de93761a0d87d3d47da3e23079.webp?v=1762225301","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d0e0fadf6ce28d0ef846919e0a3ca9cfa595f6f.webp?v=1762225302","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/110c30b300e761903c0c7ff4569f5ea41c886021.webp?v=1762225303"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf61340306ca18d4680e82a7ef3d9fb38b36a0.webp?v=1762225295","options":["color"],"media":[{"alt":null,"id":26297355010147,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf61340306ca18d4680e82a7ef3d9fb38b36a0.webp?v=1762225295"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf61340306ca18d4680e82a7ef3d9fb38b36a0.webp?v=1762225295","width":2000},{"alt":null,"id":26297355305059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067f2098c3a8ac647e0daad6c13894bb0944ad4.webp?v=1762225296"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067f2098c3a8ac647e0daad6c13894bb0944ad4.webp?v=1762225296","width":2000},{"alt":null,"id":26297355534435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f02e663844e0ce58f13e0f5b3c4f8761e089025.webp?v=1762225297"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f02e663844e0ce58f13e0f5b3c4f8761e089025.webp?v=1762225297","width":2000},{"alt":null,"id":26297355796579,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dbc955dab1d3313cc2b85afde15561896d288dc.webp?v=1762225297"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dbc955dab1d3313cc2b85afde15561896d288dc.webp?v=1762225297","width":2000},{"alt":null,"id":26297356222563,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec5818183ecd73d7e3ba247be1ecaf0ab5ba3c7.webp?v=1762225298"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec5818183ecd73d7e3ba247be1ecaf0ab5ba3c7.webp?v=1762225298","width":2000},{"alt":null,"id":26297356615779,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1f7572093e88f87d6d3d6cd56f76ed39c9e0468.webp?v=1762225299"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1f7572093e88f87d6d3d6cd56f76ed39c9e0468.webp?v=1762225299","width":2000},{"alt":null,"id":26297356976227,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f7d94d2189f6938d343bb9fe8e7b58a98df9a34.webp?v=1762225300"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f7d94d2189f6938d343bb9fe8e7b58a98df9a34.webp?v=1762225300","width":2000},{"alt":null,"id":26297357303907,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/782545d7ef8542de93761a0d87d3d47da3e23079.webp?v=1762225301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/782545d7ef8542de93761a0d87d3d47da3e23079.webp?v=1762225301","width":2000},{"alt":null,"id":26297357664355,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d0e0fadf6ce28d0ef846919e0a3ca9cfa595f6f.webp?v=1762225302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d0e0fadf6ce28d0ef846919e0a3ca9cfa595f6f.webp?v=1762225302","width":2000},{"alt":null,"id":26297357992035,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/110c30b300e761903c0c7ff4569f5ea41c886021.webp?v=1762225303"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/110c30b300e761903c0c7ff4569f5ea41c886021.webp?v=1762225303","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43812390436963,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729487728739,"product_id":7911348764771,"position":2,"created_at":"2025-11-04T11:01:34+08:00","updated_at":"2025-11-04T11:01:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067f2098c3a8ac647e0daad6c13894bb0944ad4.webp?v=1762225296","variant_ids":[43812390436963]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129852-POS01","featured_media":{"alt":null,"id":26297355305059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067f2098c3a8ac647e0daad6c13894bb0944ad4.webp?v=1762225296"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43812390535267,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129853-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729487990883,"product_id":7911348764771,"position":3,"created_at":"2025-11-04T11:01:35+08:00","updated_at":"2025-11-04T11:01:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f02e663844e0ce58f13e0f5b3c4f8761e089025.webp?v=1762225297","variant_ids":[43812390535267]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129853-POS01","featured_media":{"alt":null,"id":26297355534435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f02e663844e0ce58f13e0f5b3c4f8761e089025.webp?v=1762225297"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43812390568035,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NST0129857-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729489039459,"product_id":7911348764771,"position":6,"created_at":"2025-11-04T11:01:37+08:00","updated_at":"2025-11-04T11:01:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1f7572093e88f87d6d3d6cd56f76ed39c9e0468.webp?v=1762225299","variant_ids":[43812390568035]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129857-POS01","featured_media":{"alt":null,"id":26297356615779,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1f7572093e88f87d6d3d6cd56f76ed39c9e0468.webp?v=1762225299"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43812390633571,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"NST01298Z7-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729488220259,"product_id":7911348764771,"position":4,"created_at":"2025-11-04T11:01:36+08:00","updated_at":"2025-11-04T11:01:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dbc955dab1d3313cc2b85afde15561896d288dc.webp?v=1762225297","variant_ids":[43812390633571]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298Z7-POS01","featured_media":{"alt":null,"id":26297355796579,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dbc955dab1d3313cc2b85afde15561896d288dc.webp?v=1762225297"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43812390666339,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"NST01298O8-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729489399907,"product_id":7911348764771,"position":7,"created_at":"2025-11-04T11:01:38+08:00","updated_at":"2025-11-04T11:01:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f7d94d2189f6938d343bb9fe8e7b58a98df9a34.webp?v=1762225300","variant_ids":[43812390666339]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01298O8-POS01","featured_media":{"alt":null,"id":26297356976227,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f7d94d2189f6938d343bb9fe8e7b58a98df9a34.webp?v=1762225300"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43812390436963,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129852-POS01","requires_shipping":true,"taxable":true,"featured_image":{"id":34729487728739,"product_id":7911348764771,"position":2,"created_at":"2025-11-04T11:01:34+08:00","updated_at":"2025-11-04T11:01:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067f2098c3a8ac647e0daad6c13894bb0944ad4.webp?v=1762225296","variant_ids":[43812390436963]},"available":true,"name":"iPhone 15 Pro Max SolidX PosterLad Arial - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129852-POS01","featured_media":{"alt":null,"id":26297355305059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7067f2098c3a8ac647e0daad6c13894bb0944ad4.webp?v=1762225296"}},"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: "停產" }