$product = {"id":7884299829347,"title":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON","handle":"iphone-12-pro-max-solidsuit-classic-magsafe-ifc20","description":null,"published_at":"2025-09-19T09:36:01+08:00","created_at":"2025-09-16T12:40:12+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-sakamoto-days","device-iPhone 12 Pro Max","merge","reseller-sakamoto-days"],"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":43697662787683,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0118752-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475354062947,"product_id":7884299829347,"position":2,"created_at":"2025-09-16T12:40:16+08:00","updated_at":"2025-09-16T12:40:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac654afb113012a4a6e12ea4f659e3fd58d4e495.webp?v=1757997618","variant_ids":[43697662787683]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046959648867,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac654afb113012a4a6e12ea4f659e3fd58d4e495.webp?v=1757997618"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43697662853219,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST011870C-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475355242595,"product_id":7884299829347,"position":8,"created_at":"2025-09-16T12:40:19+08:00","updated_at":"2025-09-16T12:40:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8314b2874fb2002ae7d33177da0b4fe258c2fc6a.webp?v=1757997621","variant_ids":[43697662853219]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046960828515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8314b2874fb2002ae7d33177da0b4fe258c2fc6a.webp?v=1757997621"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43697662918755,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST011870E-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475354357859,"product_id":7884299829347,"position":3,"created_at":"2025-09-16T12:40:16+08:00","updated_at":"2025-09-16T12:40:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c917302fd1da6226d367298816d50a5327193a.webp?v=1757997618","variant_ids":[43697662918755]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046959779939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c917302fd1da6226d367298816d50a5327193a.webp?v=1757997618"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43697662951523,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST011870B-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475354816611,"product_id":7884299829347,"position":6,"created_at":"2025-09-16T12:40:18+08:00","updated_at":"2025-09-16T12:40:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0de829b2172ca46977e4a3355fc67fbe794b2c9.webp?v=1757997620","variant_ids":[43697662951523]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046960402531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0de829b2172ca46977e4a3355fc67fbe794b2c9.webp?v=1757997620"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43697662984291,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"MST01187O9-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475355406435,"product_id":7884299829347,"position":9,"created_at":"2025-09-16T12:40:20+08:00","updated_at":"2025-09-16T12:40:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b0978466786ed6acc29d37e8653a92c2eee6b5.webp?v=1757997621","variant_ids":[43697662984291]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046960992355,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b0978466786ed6acc29d37e8653a92c2eee6b5.webp?v=1757997621"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1594c4a99d7d35d2004f0d6731d7566371d21d9.webp?v=1757997617","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac654afb113012a4a6e12ea4f659e3fd58d4e495.webp?v=1757997618","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c917302fd1da6226d367298816d50a5327193a.webp?v=1757997618","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/123cbf9cc8a96d5554314acde441474bd77857bc.webp?v=1757997619","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f393f4525f320fbc30de3c393fcd6dba5a953446.webp?v=1757997619","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0de829b2172ca46977e4a3355fc67fbe794b2c9.webp?v=1757997620","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3874243d9dc9c017c03b657fdd7a8f96c729fa1c.webp?v=1757997620","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8314b2874fb2002ae7d33177da0b4fe258c2fc6a.webp?v=1757997621","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b0978466786ed6acc29d37e8653a92c2eee6b5.webp?v=1757997621"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1594c4a99d7d35d2004f0d6731d7566371d21d9.webp?v=1757997617","options":["color"],"media":[{"alt":null,"id":26046959485027,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1594c4a99d7d35d2004f0d6731d7566371d21d9.webp?v=1757997617"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1594c4a99d7d35d2004f0d6731d7566371d21d9.webp?v=1757997617","width":2000},{"alt":null,"id":26046959648867,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac654afb113012a4a6e12ea4f659e3fd58d4e495.webp?v=1757997618"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac654afb113012a4a6e12ea4f659e3fd58d4e495.webp?v=1757997618","width":2000},{"alt":null,"id":26046959779939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c917302fd1da6226d367298816d50a5327193a.webp?v=1757997618"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c917302fd1da6226d367298816d50a5327193a.webp?v=1757997618","width":2000},{"alt":null,"id":26046960042083,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/123cbf9cc8a96d5554314acde441474bd77857bc.webp?v=1757997619"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/123cbf9cc8a96d5554314acde441474bd77857bc.webp?v=1757997619","width":2000},{"alt":null,"id":26046960238691,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f393f4525f320fbc30de3c393fcd6dba5a953446.webp?v=1757997619"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f393f4525f320fbc30de3c393fcd6dba5a953446.webp?v=1757997619","width":2000},{"alt":null,"id":26046960402531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0de829b2172ca46977e4a3355fc67fbe794b2c9.webp?v=1757997620"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0de829b2172ca46977e4a3355fc67fbe794b2c9.webp?v=1757997620","width":2000},{"alt":null,"id":26046960631907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3874243d9dc9c017c03b657fdd7a8f96c729fa1c.webp?v=1757997620"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3874243d9dc9c017c03b657fdd7a8f96c729fa1c.webp?v=1757997620","width":2000},{"alt":null,"id":26046960828515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8314b2874fb2002ae7d33177da0b4fe258c2fc6a.webp?v=1757997621"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8314b2874fb2002ae7d33177da0b4fe258c2fc6a.webp?v=1757997621","width":2000},{"alt":null,"id":26046960992355,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b0978466786ed6acc29d37e8653a92c2eee6b5.webp?v=1757997621"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b0978466786ed6acc29d37e8653a92c2eee6b5.webp?v=1757997621","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43697662787683,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0118752-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475354062947,"product_id":7884299829347,"position":2,"created_at":"2025-09-16T12:40:16+08:00","updated_at":"2025-09-16T12:40:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac654afb113012a4a6e12ea4f659e3fd58d4e495.webp?v=1757997618","variant_ids":[43697662787683]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046959648867,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac654afb113012a4a6e12ea4f659e3fd58d4e495.webp?v=1757997618"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43697662853219,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST011870C-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475355242595,"product_id":7884299829347,"position":8,"created_at":"2025-09-16T12:40:19+08:00","updated_at":"2025-09-16T12:40:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8314b2874fb2002ae7d33177da0b4fe258c2fc6a.webp?v=1757997621","variant_ids":[43697662853219]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046960828515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8314b2874fb2002ae7d33177da0b4fe258c2fc6a.webp?v=1757997621"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43697662918755,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST011870E-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475354357859,"product_id":7884299829347,"position":3,"created_at":"2025-09-16T12:40:16+08:00","updated_at":"2025-09-16T12:40:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c917302fd1da6226d367298816d50a5327193a.webp?v=1757997618","variant_ids":[43697662918755]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046959779939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0c917302fd1da6226d367298816d50a5327193a.webp?v=1757997618"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43697662951523,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"MST011870B-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475354816611,"product_id":7884299829347,"position":6,"created_at":"2025-09-16T12:40:18+08:00","updated_at":"2025-09-16T12:40:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0de829b2172ca46977e4a3355fc67fbe794b2c9.webp?v=1757997620","variant_ids":[43697662951523]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046960402531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0de829b2172ca46977e4a3355fc67fbe794b2c9.webp?v=1757997620"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43697662984291,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"MST01187O9-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475355406435,"product_id":7884299829347,"position":9,"created_at":"2025-09-16T12:40:20+08:00","updated_at":"2025-09-16T12:40:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b0978466786ed6acc29d37e8653a92c2eee6b5.webp?v=1757997621","variant_ids":[43697662984291]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046960992355,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0b0978466786ed6acc29d37e8653a92c2eee6b5.webp?v=1757997621"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43697662787683,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0118752-IFC20","requires_shipping":true,"taxable":true,"featured_image":{"id":34475354062947,"product_id":7884299829347,"position":2,"created_at":"2025-09-16T12:40:16+08:00","updated_at":"2025-09-16T12:40:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac654afb113012a4a6e12ea4f659e3fd58d4e495.webp?v=1757997618","variant_ids":[43697662787683]},"available":true,"name":"iPhone 12 Pro Max SolidSuit (MagSafe 兼容) 坂本日常 坂本日常 ICON - 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-IFC20","featured_media":{"alt":null,"id":26046959648867,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac654afb113012a4a6e12ea4f659e3fd58d4e495.webp?v=1757997618"}},"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: "停產"
}