$product = {"id":7998334468195,"title":"iPhone 12 mini SolidSuit 太空 Jupiter - Swirling Clouds","handle":"iphone-12-mini-solidsuit-classic-xk54","description":null,"published_at":"2026-04-20T12:11:03+08:00","created_at":"2026-04-20T09:44:30+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nasa","device-iPhone 12 Mini","merge","reseller-nasa"],"price":83000,"price_min":83000,"price_max":83000,"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":44126038261859,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-XK54","requires_shipping":true,"taxable":true,"featured_image":{"id":36254615830627,"product_id":7998334468195,"position":9,"created_at":"2026-07-14T09:48:50+08:00","updated_at":"2026-07-14T09:48:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1_27c04113-410d-4ea1-8032-ba71f1eb4dd0.webp?v=1783993732","variant_ids":[44126038261859]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 Jupiter - Swirling Clouds - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-XK54","featured_media":{"alt":null,"id":27758730772579,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1_27c04113-410d-4ea1-8032-ba71f1eb4dd0.webp?v=1783993732"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44126046781539,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-XK54","requires_shipping":true,"taxable":true,"featured_image":{"id":36254619467875,"product_id":7998334468195,"position":14,"created_at":"2026-07-14T09:49:10+08:00","updated_at":"2026-07-14T09:49:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d4ae2b846fdae07fbe0fea408cc1fbd926bc7d1_2e15fb3d-238f-4db9-954a-fdc92201d6d7.webp?v=1783993752","variant_ids":[44126046781539]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 Jupiter - Swirling Clouds - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-XK54","featured_media":{"alt":null,"id":27758734409827,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d4ae2b846fdae07fbe0fea408cc1fbd926bc7d1_2e15fb3d-238f-4db9-954a-fdc92201d6d7.webp?v=1783993752"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44126049042531,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-XK54","requires_shipping":true,"taxable":true,"featured_image":{"id":36254617796707,"product_id":7998334468195,"position":11,"created_at":"2026-07-14T09:48:54+08:00","updated_at":"2026-07-14T09:48:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7030a80e02603e74d3f38f2286384ca4cc6f2ca_395812a3-1dc0-4ae4-9bbe-22292bf4a5a6.webp?v=1783993736","variant_ids":[44126049042531]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 Jupiter - Swirling Clouds - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-XK54","featured_media":{"alt":null,"id":27758732738659,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7030a80e02603e74d3f38f2286384ca4cc6f2ca_395812a3-1dc0-4ae4-9bbe-22292bf4a5a6.webp?v=1783993736"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50cccb73710a93cef55846aad7c1ca854abf81fd.webp?v=1776649504","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd50b0166c88da5b546ecec26db2bd4f7c76fa05.webp?v=1776649504","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d4ae2b846fdae07fbe0fea408cc1fbd926bc7d1.webp?v=1776649505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca0bea4334a70c7bc38c0c2e87ed72ce34146770.webp?v=1776649505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2676b810919513c58dd722de595496cba1c86c4.webp?v=1776649506","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018d3fe36647bb9a855c3d616fa6689530281ed4.webp?v=1776649507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7030a80e02603e74d3f38f2286384ca4cc6f2ca.webp?v=1776649508","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1.webp?v=1776649509","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1_27c04113-410d-4ea1-8032-ba71f1eb4dd0.webp?v=1783993732","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2676b810919513c58dd722de595496cba1c86c4_2d37351d-ea6e-44f8-a56c-e6237803a59e.webp?v=1783993734","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7030a80e02603e74d3f38f2286384ca4cc6f2ca_395812a3-1dc0-4ae4-9bbe-22292bf4a5a6.webp?v=1783993736","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018d3fe36647bb9a855c3d616fa6689530281ed4_d9e1d8a5-a280-4123-ae21-8b8f6eecd6ba.webp?v=1783993738","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50cccb73710a93cef55846aad7c1ca854abf81fd_9566ced6-df52-4f5a-ad56-917cd2267f5b.webp?v=1783993740","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d4ae2b846fdae07fbe0fea408cc1fbd926bc7d1_2e15fb3d-238f-4db9-954a-fdc92201d6d7.webp?v=1783993752"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50cccb73710a93cef55846aad7c1ca854abf81fd.webp?v=1776649504","options":["color"],"media":[{"alt":null,"id":27200624623715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50cccb73710a93cef55846aad7c1ca854abf81fd.webp?v=1776649504"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50cccb73710a93cef55846aad7c1ca854abf81fd.webp?v=1776649504","width":2000},{"alt":null,"id":27200625115235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd50b0166c88da5b546ecec26db2bd4f7c76fa05.webp?v=1776649504"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd50b0166c88da5b546ecec26db2bd4f7c76fa05.webp?v=1776649504","width":2000},{"alt":null,"id":27200625639523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d4ae2b846fdae07fbe0fea408cc1fbd926bc7d1.webp?v=1776649505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d4ae2b846fdae07fbe0fea408cc1fbd926bc7d1.webp?v=1776649505","width":2000},{"alt":null,"id":27200626163811,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca0bea4334a70c7bc38c0c2e87ed72ce34146770.webp?v=1776649505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca0bea4334a70c7bc38c0c2e87ed72ce34146770.webp?v=1776649505","width":2000},{"alt":null,"id":27200626688099,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2676b810919513c58dd722de595496cba1c86c4.webp?v=1776649506"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2676b810919513c58dd722de595496cba1c86c4.webp?v=1776649506","width":2000},{"alt":null,"id":27200627245155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018d3fe36647bb9a855c3d616fa6689530281ed4.webp?v=1776649507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018d3fe36647bb9a855c3d616fa6689530281ed4.webp?v=1776649507","width":2000},{"alt":null,"id":27200627736675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7030a80e02603e74d3f38f2286384ca4cc6f2ca.webp?v=1776649508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7030a80e02603e74d3f38f2286384ca4cc6f2ca.webp?v=1776649508","width":2000},{"alt":null,"id":27200627998819,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1.webp?v=1776649509"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1.webp?v=1776649509","width":2000},{"alt":null,"id":27758730772579,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1_27c04113-410d-4ea1-8032-ba71f1eb4dd0.webp?v=1783993732"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1_27c04113-410d-4ea1-8032-ba71f1eb4dd0.webp?v=1783993732","width":2000},{"alt":null,"id":27758731690083,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2676b810919513c58dd722de595496cba1c86c4_2d37351d-ea6e-44f8-a56c-e6237803a59e.webp?v=1783993734"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2676b810919513c58dd722de595496cba1c86c4_2d37351d-ea6e-44f8-a56c-e6237803a59e.webp?v=1783993734","width":2000},{"alt":null,"id":27758732738659,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7030a80e02603e74d3f38f2286384ca4cc6f2ca_395812a3-1dc0-4ae4-9bbe-22292bf4a5a6.webp?v=1783993736"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7030a80e02603e74d3f38f2286384ca4cc6f2ca_395812a3-1dc0-4ae4-9bbe-22292bf4a5a6.webp?v=1783993736","width":2000},{"alt":null,"id":27758733230179,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018d3fe36647bb9a855c3d616fa6689530281ed4_d9e1d8a5-a280-4123-ae21-8b8f6eecd6ba.webp?v=1783993738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018d3fe36647bb9a855c3d616fa6689530281ed4_d9e1d8a5-a280-4123-ae21-8b8f6eecd6ba.webp?v=1783993738","width":2000},{"alt":null,"id":27758733820003,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50cccb73710a93cef55846aad7c1ca854abf81fd_9566ced6-df52-4f5a-ad56-917cd2267f5b.webp?v=1783993740"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50cccb73710a93cef55846aad7c1ca854abf81fd_9566ced6-df52-4f5a-ad56-917cd2267f5b.webp?v=1783993740","width":2000},{"alt":null,"id":27758734409827,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d4ae2b846fdae07fbe0fea408cc1fbd926bc7d1_2e15fb3d-238f-4db9-954a-fdc92201d6d7.webp?v=1783993752"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d4ae2b846fdae07fbe0fea408cc1fbd926bc7d1_2e15fb3d-238f-4db9-954a-fdc92201d6d7.webp?v=1783993752","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":44126038261859,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-XK54","requires_shipping":true,"taxable":true,"featured_image":{"id":36254615830627,"product_id":7998334468195,"position":9,"created_at":"2026-07-14T09:48:50+08:00","updated_at":"2026-07-14T09:48:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1_27c04113-410d-4ea1-8032-ba71f1eb4dd0.webp?v=1783993732","variant_ids":[44126038261859]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 Jupiter - Swirling Clouds - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-XK54","featured_media":{"alt":null,"id":27758730772579,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1_27c04113-410d-4ea1-8032-ba71f1eb4dd0.webp?v=1783993732"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44126046781539,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-XK54","requires_shipping":true,"taxable":true,"featured_image":{"id":36254619467875,"product_id":7998334468195,"position":14,"created_at":"2026-07-14T09:49:10+08:00","updated_at":"2026-07-14T09:49:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d4ae2b846fdae07fbe0fea408cc1fbd926bc7d1_2e15fb3d-238f-4db9-954a-fdc92201d6d7.webp?v=1783993752","variant_ids":[44126046781539]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 Jupiter - Swirling Clouds - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-XK54","featured_media":{"alt":null,"id":27758734409827,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d4ae2b846fdae07fbe0fea408cc1fbd926bc7d1_2e15fb3d-238f-4db9-954a-fdc92201d6d7.webp?v=1783993752"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44126049042531,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-XK54","requires_shipping":true,"taxable":true,"featured_image":{"id":36254617796707,"product_id":7998334468195,"position":11,"created_at":"2026-07-14T09:48:54+08:00","updated_at":"2026-07-14T09:48:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7030a80e02603e74d3f38f2286384ca4cc6f2ca_395812a3-1dc0-4ae4-9bbe-22292bf4a5a6.webp?v=1783993736","variant_ids":[44126049042531]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 Jupiter - Swirling Clouds - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-XK54","featured_media":{"alt":null,"id":27758732738659,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7030a80e02603e74d3f38f2286384ca4cc6f2ca_395812a3-1dc0-4ae4-9bbe-22292bf4a5a6.webp?v=1783993736"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":44126038261859,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-XK54","requires_shipping":true,"taxable":true,"featured_image":{"id":36254615830627,"product_id":7998334468195,"position":9,"created_at":"2026-07-14T09:48:50+08:00","updated_at":"2026-07-14T09:48:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1_27c04113-410d-4ea1-8032-ba71f1eb4dd0.webp?v=1783993732","variant_ids":[44126038261859]},"available":true,"name":"iPhone 12 mini SolidSuit 太空 Jupiter - Swirling Clouds - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-XK54","featured_media":{"alt":null,"id":27758730772579,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4db9c5d84f33ff1dc3d9d26e004059a81485d0b1_27c04113-410d-4ea1-8032-ba71f1eb4dd0.webp?v=1783993732"}},"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: "停產" }