Home
›
iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Snoopy 史努比 - 夏日活動
$product = {"id":7163993423971,"title":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Snoopy 史努比 - 夏日活動","handle":"iphone-13-mini-solidsuit-classic-magsafe-pl61","description":null,"published_at":"2024-01-30T11:51:32+08:00","created_at":"2024-01-30T10:06:45+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit MagSafe專區-Snoopy 史努比","tags":["20%","20240304-reseller-\u003ereplace_to-","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 13 mini","merge","reseller-solidsuit-magsafe-snoopy","Top50","type-Solidsuit MagSafe"],"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":41235250708579,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":30865731649635,"product_id":7163993423971,"position":11,"created_at":"2024-01-30T10:07:16+08:00","updated_at":"2024-01-30T10:07:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c6ede705b3c3925e88e2e4019c7d52e1271e0a_f58cdfb8-fa6e-4c3c-979e-4cb2644e2374.webp?v=1706580436","variant_ids":[41235250708579]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Snoopy 史努比 - 夏日活動 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-PL61","featured_media":{"alt":null,"id":23237085364323,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c6ede705b3c3925e88e2e4019c7d52e1271e0a_f58cdfb8-fa6e-4c3c-979e-4cb2644e2374.webp?v=1706580436"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41235250970723,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":30865724080227,"product_id":7163993423971,"position":4,"created_at":"2024-01-30T10:06:58+08:00","updated_at":"2024-01-30T10:06:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828a424b69e9d40dc699c2969a9395ed108f2bf9_12fd027d-4f5e-4237-af24-164b39b6f868.webp?v=1706580418","variant_ids":[41235250970723]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Snoopy 史努比 - 夏日活動 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-PL61","featured_media":{"alt":null,"id":23237077794915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828a424b69e9d40dc699c2969a9395ed108f2bf9_12fd027d-4f5e-4237-af24-164b39b6f868.webp?v=1706580418"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/141d8fe58496042178e40cbd483b226a4c01f33f_ed007ed6-cb75-4696-8a32-1eae34a9e74b.webp?v=1706580408","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c953728d398564ce90a9165530184e4c059df28d_d80e3e4c-4551-4ed6-a021-07753ae7c4a4.webp?v=1706580413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab546a4a82478f19f89688f2adf191e6c67354e_c803d54c-eefd-4ece-bce4-04fbcd20f60a.webp?v=1706580416","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828a424b69e9d40dc699c2969a9395ed108f2bf9_12fd027d-4f5e-4237-af24-164b39b6f868.webp?v=1706580418","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cba9f702cf64530fdafa6e301917c2e7b6f872_91b95030-5add-40be-bb55-b1a7fb94432b.webp?v=1706580421","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dab63024137a77e5e9328fedbcd4f266b0ee8fb_199a7ed1-5791-472b-8a81-eeacc9d590cb.webp?v=1706580423","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d97f86eb29901a5942b0a03765930d21a47018f7_06919515-0d25-4dbb-adf4-48a3bbd374d8.webp?v=1706580426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2d8ee4ee70ac38a7caf6b2566dd59f4df65e7d7_3b016d79-c431-4f33-9c50-ddc31bae94c8.webp?v=1706580429","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77c1c9685b073bb2bdf058a56d7b0693fa81d78e_325831c2-ec47-4453-b576-11092c07f2e4.webp?v=1706580431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9f1080511dfdc49eae0041162c8794fcdb0c27_fd481289-edf1-4f2a-9155-40a3b0b96892.webp?v=1706580434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c6ede705b3c3925e88e2e4019c7d52e1271e0a_f58cdfb8-fa6e-4c3c-979e-4cb2644e2374.webp?v=1706580436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b4bd19f8af81a1af4840ba6a9413f7dd00c6726_034baf87-41ba-4022-9f49-1b3f93c7218c.webp?v=1706580438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d250aca85f554174fa3301f26a6530d0ffdf32d_202605cc-6e14-4e94-ad3b-9c5fce9cd084.webp?v=1706580441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eae370ff504930e69e6c94583d189a619f63efe4_fcdaa0f6-cb26-4f28-912a-201dfea78211.webp?v=1706580444","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8079015a6ac1c49b698a9c0dda26580c1aeac350_ca18b955-ac84-4104-b16f-e29d0b700bf9.webp?v=1706580446"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/141d8fe58496042178e40cbd483b226a4c01f33f_ed007ed6-cb75-4696-8a32-1eae34a9e74b.webp?v=1706580408","options":["color"],"media":[{"alt":null,"id":23237073633379,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/141d8fe58496042178e40cbd483b226a4c01f33f_ed007ed6-cb75-4696-8a32-1eae34a9e74b.webp?v=1706580408"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/141d8fe58496042178e40cbd483b226a4c01f33f_ed007ed6-cb75-4696-8a32-1eae34a9e74b.webp?v=1706580408","width":2000},{"alt":null,"id":23237075763299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c953728d398564ce90a9165530184e4c059df28d_d80e3e4c-4551-4ed6-a021-07753ae7c4a4.webp?v=1706580413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c953728d398564ce90a9165530184e4c059df28d_d80e3e4c-4551-4ed6-a021-07753ae7c4a4.webp?v=1706580413","width":2000},{"alt":null,"id":23237076746339,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab546a4a82478f19f89688f2adf191e6c67354e_c803d54c-eefd-4ece-bce4-04fbcd20f60a.webp?v=1706580416"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab546a4a82478f19f89688f2adf191e6c67354e_c803d54c-eefd-4ece-bce4-04fbcd20f60a.webp?v=1706580416","width":2000},{"alt":null,"id":23237077794915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828a424b69e9d40dc699c2969a9395ed108f2bf9_12fd027d-4f5e-4237-af24-164b39b6f868.webp?v=1706580418"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828a424b69e9d40dc699c2969a9395ed108f2bf9_12fd027d-4f5e-4237-af24-164b39b6f868.webp?v=1706580418","width":2000},{"alt":null,"id":23237078909027,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cba9f702cf64530fdafa6e301917c2e7b6f872_91b95030-5add-40be-bb55-b1a7fb94432b.webp?v=1706580421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cba9f702cf64530fdafa6e301917c2e7b6f872_91b95030-5add-40be-bb55-b1a7fb94432b.webp?v=1706580421","width":2000},{"alt":null,"id":23237080219747,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dab63024137a77e5e9328fedbcd4f266b0ee8fb_199a7ed1-5791-472b-8a81-eeacc9d590cb.webp?v=1706580423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dab63024137a77e5e9328fedbcd4f266b0ee8fb_199a7ed1-5791-472b-8a81-eeacc9d590cb.webp?v=1706580423","width":2000},{"alt":null,"id":23237081661539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d97f86eb29901a5942b0a03765930d21a47018f7_06919515-0d25-4dbb-adf4-48a3bbd374d8.webp?v=1706580426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d97f86eb29901a5942b0a03765930d21a47018f7_06919515-0d25-4dbb-adf4-48a3bbd374d8.webp?v=1706580426","width":2000},{"alt":null,"id":23237082677347,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2d8ee4ee70ac38a7caf6b2566dd59f4df65e7d7_3b016d79-c431-4f33-9c50-ddc31bae94c8.webp?v=1706580429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2d8ee4ee70ac38a7caf6b2566dd59f4df65e7d7_3b016d79-c431-4f33-9c50-ddc31bae94c8.webp?v=1706580429","width":2000},{"alt":null,"id":23237083496547,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77c1c9685b073bb2bdf058a56d7b0693fa81d78e_325831c2-ec47-4453-b576-11092c07f2e4.webp?v=1706580431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77c1c9685b073bb2bdf058a56d7b0693fa81d78e_325831c2-ec47-4453-b576-11092c07f2e4.webp?v=1706580431","width":2000},{"alt":null,"id":23237084610659,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9f1080511dfdc49eae0041162c8794fcdb0c27_fd481289-edf1-4f2a-9155-40a3b0b96892.webp?v=1706580434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9f1080511dfdc49eae0041162c8794fcdb0c27_fd481289-edf1-4f2a-9155-40a3b0b96892.webp?v=1706580434","width":2000},{"alt":null,"id":23237085364323,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c6ede705b3c3925e88e2e4019c7d52e1271e0a_f58cdfb8-fa6e-4c3c-979e-4cb2644e2374.webp?v=1706580436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c6ede705b3c3925e88e2e4019c7d52e1271e0a_f58cdfb8-fa6e-4c3c-979e-4cb2644e2374.webp?v=1706580436","width":2000},{"alt":null,"id":23237086150755,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b4bd19f8af81a1af4840ba6a9413f7dd00c6726_034baf87-41ba-4022-9f49-1b3f93c7218c.webp?v=1706580438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b4bd19f8af81a1af4840ba6a9413f7dd00c6726_034baf87-41ba-4022-9f49-1b3f93c7218c.webp?v=1706580438","width":2000},{"alt":null,"id":23237087166563,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d250aca85f554174fa3301f26a6530d0ffdf32d_202605cc-6e14-4e94-ad3b-9c5fce9cd084.webp?v=1706580441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d250aca85f554174fa3301f26a6530d0ffdf32d_202605cc-6e14-4e94-ad3b-9c5fce9cd084.webp?v=1706580441","width":2000},{"alt":null,"id":23237088084067,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eae370ff504930e69e6c94583d189a619f63efe4_fcdaa0f6-cb26-4f28-912a-201dfea78211.webp?v=1706580444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eae370ff504930e69e6c94583d189a619f63efe4_fcdaa0f6-cb26-4f28-912a-201dfea78211.webp?v=1706580444","width":2000},{"alt":null,"id":23237088968803,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8079015a6ac1c49b698a9c0dda26580c1aeac350_ca18b955-ac84-4104-b16f-e29d0b700bf9.webp?v=1706580446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8079015a6ac1c49b698a9c0dda26580c1aeac350_ca18b955-ac84-4104-b16f-e29d0b700bf9.webp?v=1706580446","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41235250708579,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":30865731649635,"product_id":7163993423971,"position":11,"created_at":"2024-01-30T10:07:16+08:00","updated_at":"2024-01-30T10:07:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c6ede705b3c3925e88e2e4019c7d52e1271e0a_f58cdfb8-fa6e-4c3c-979e-4cb2644e2374.webp?v=1706580436","variant_ids":[41235250708579]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Snoopy 史努比 - 夏日活動 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-PL61","featured_media":{"alt":null,"id":23237085364323,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c6ede705b3c3925e88e2e4019c7d52e1271e0a_f58cdfb8-fa6e-4c3c-979e-4cb2644e2374.webp?v=1706580436"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41235250970723,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":30865724080227,"product_id":7163993423971,"position":4,"created_at":"2024-01-30T10:06:58+08:00","updated_at":"2024-01-30T10:06:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828a424b69e9d40dc699c2969a9395ed108f2bf9_12fd027d-4f5e-4237-af24-164b39b6f868.webp?v=1706580418","variant_ids":[41235250970723]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Snoopy 史努比 - 夏日活動 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-PL61","featured_media":{"alt":null,"id":23237077794915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828a424b69e9d40dc699c2969a9395ed108f2bf9_12fd027d-4f5e-4237-af24-164b39b6f868.webp?v=1706580418"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41235250708579,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":30865731649635,"product_id":7163993423971,"position":11,"created_at":"2024-01-30T10:07:16+08:00","updated_at":"2024-01-30T10:07:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c6ede705b3c3925e88e2e4019c7d52e1271e0a_f58cdfb8-fa6e-4c3c-979e-4cb2644e2374.webp?v=1706580436","variant_ids":[41235250708579]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Snoopy 史努比 - 夏日活動 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-PL61","featured_media":{"alt":null,"id":23237085364323,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c6ede705b3c3925e88e2e4019c7d52e1271e0a_f58cdfb8-fa6e-4c3c-979e-4cb2644e2374.webp?v=1706580436"}},"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: "停產"
}