Home
›
iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Look - 願傷疤 有天開出花(澳洲叢林大火)
$product = {"id":7158889283683,"title":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Look - 願傷疤 有天開出花(澳洲叢林大火)","handle":"iphone-13-mini-solidsuit-classic-magsafe-af02","description":null,"published_at":"2024-01-31T11:19:37+08:00","created_at":"2024-01-26T16:33:32+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit MagSafe專區-Look","tags":["20%","20240304-reseller-\u003ereplace_to-","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 13 mini","merge","reseller-solidsuit-magsafe-look","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":41212154445923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":30847741427811,"product_id":7158889283683,"position":1,"created_at":"2024-01-26T16:33:35+08:00","updated_at":"2024-01-26T16:33:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a2bd12156ce2d71cb0ac30f040056fc0a463b0_191baaa1-f09e-46f3-a599-f6b57596f5e6.webp?v=1706258015","variant_ids":[41212154445923]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Look - 願傷疤 有天開出花(澳洲叢林大火) - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-AF02","featured_media":{"alt":null,"id":23218821464163,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a2bd12156ce2d71cb0ac30f040056fc0a463b0_191baaa1-f09e-46f3-a599-f6b57596f5e6.webp?v=1706258015"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41212154708067,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":30847751159907,"product_id":7158889283683,"position":15,"created_at":"2024-01-26T16:34:17+08:00","updated_at":"2024-01-26T16:34:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90f52ad877dcb8eac461247bffd0e64ba6a5e93c_f8c9a227-7a55-4036-a243-38f600660db9.webp?v=1706258057","variant_ids":[41212154708067]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Look - 願傷疤 有天開出花(澳洲叢林大火) - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-AF02","featured_media":{"alt":null,"id":23218831196259,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90f52ad877dcb8eac461247bffd0e64ba6a5e93c_f8c9a227-7a55-4036-a243-38f600660db9.webp?v=1706258057"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a2bd12156ce2d71cb0ac30f040056fc0a463b0_191baaa1-f09e-46f3-a599-f6b57596f5e6.webp?v=1706258015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0b0effcbc9abb9220e06dd4e2dfe70481d3ebbc_e501dbec-dbed-4fdc-be97-ab7e5f739b79.webp?v=1706258018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a352a8e8cd48106a47569f66842ba7107a329b_7c1fe699-2884-4679-bca3-a35825c147d2.webp?v=1706258020","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d680a0244f81b6a324bda545f6494412a10dba0_15dbfd10-e527-48cc-a8ce-a9c816384173.webp?v=1706258023","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d4043638dc34f1eedea6abc46d83ff95bf797fa_0e494f1e-ba62-417d-896c-f9c3ef204b14.webp?v=1706258026","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b80bbadbbef979fc5650fee2de101c91bb02afa5_ae9d0999-3981-4fd8-902b-ebad60dcf7b2.webp?v=1706258029","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64396c827c2a0885a635aa1eec7708cc3cde11ff_6a75e726-8334-42ad-9502-075bb1c284b2.webp?v=1706258031","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d08e6013d737d1f002665b155c3ee738ed589ce_4c19bfa6-e308-4cf9-abfe-0143965afb13.webp?v=1706258034","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e62c14d66dba1e7496e1c155d9e71fd9f6a8787_6f033b1c-9320-4f79-882e-f0da87701e4a.webp?v=1706258037","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a750a9d6e7303daf52a86ba56a66e1eefd03683_4d23d5bc-aad6-47a0-9dda-40510fc0fdaa.webp?v=1706258039","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76a75fe44bd5bfbfb6a6476043d689e2e5e49a39_743475a3-defc-4a0f-a9f2-34276dbf5939.webp?v=1706258042","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0442c11c336920d9c3afca6c0bd25264bdac315_87f1ce9b-e8a0-4385-8515-52717d683717.webp?v=1706258044","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d685807f274bbf558bc16ff1c55abdff9316380f_7279b62b-02c8-407a-9411-f9a128aad8bc.webp?v=1706258049","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5b20afe4ed4688015abe9f2a623da867fd69722_def4ee1d-f072-4355-9e76-f96a3e7967fd.webp?v=1706258053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90f52ad877dcb8eac461247bffd0e64ba6a5e93c_f8c9a227-7a55-4036-a243-38f600660db9.webp?v=1706258057"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a2bd12156ce2d71cb0ac30f040056fc0a463b0_191baaa1-f09e-46f3-a599-f6b57596f5e6.webp?v=1706258015","options":["color"],"media":[{"alt":null,"id":23218821464163,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a2bd12156ce2d71cb0ac30f040056fc0a463b0_191baaa1-f09e-46f3-a599-f6b57596f5e6.webp?v=1706258015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a2bd12156ce2d71cb0ac30f040056fc0a463b0_191baaa1-f09e-46f3-a599-f6b57596f5e6.webp?v=1706258015","width":2000},{"alt":null,"id":23218821857379,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0b0effcbc9abb9220e06dd4e2dfe70481d3ebbc_e501dbec-dbed-4fdc-be97-ab7e5f739b79.webp?v=1706258018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0b0effcbc9abb9220e06dd4e2dfe70481d3ebbc_e501dbec-dbed-4fdc-be97-ab7e5f739b79.webp?v=1706258018","width":2000},{"alt":null,"id":23218822381667,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a352a8e8cd48106a47569f66842ba7107a329b_7c1fe699-2884-4679-bca3-a35825c147d2.webp?v=1706258020"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20a352a8e8cd48106a47569f66842ba7107a329b_7c1fe699-2884-4679-bca3-a35825c147d2.webp?v=1706258020","width":2000},{"alt":null,"id":23218823037027,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d680a0244f81b6a324bda545f6494412a10dba0_15dbfd10-e527-48cc-a8ce-a9c816384173.webp?v=1706258023"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d680a0244f81b6a324bda545f6494412a10dba0_15dbfd10-e527-48cc-a8ce-a9c816384173.webp?v=1706258023","width":2000},{"alt":null,"id":23218823921763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d4043638dc34f1eedea6abc46d83ff95bf797fa_0e494f1e-ba62-417d-896c-f9c3ef204b14.webp?v=1706258026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d4043638dc34f1eedea6abc46d83ff95bf797fa_0e494f1e-ba62-417d-896c-f9c3ef204b14.webp?v=1706258026","width":2000},{"alt":null,"id":23218824511587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b80bbadbbef979fc5650fee2de101c91bb02afa5_ae9d0999-3981-4fd8-902b-ebad60dcf7b2.webp?v=1706258029"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b80bbadbbef979fc5650fee2de101c91bb02afa5_ae9d0999-3981-4fd8-902b-ebad60dcf7b2.webp?v=1706258029","width":2000},{"alt":null,"id":23218825035875,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64396c827c2a0885a635aa1eec7708cc3cde11ff_6a75e726-8334-42ad-9502-075bb1c284b2.webp?v=1706258031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64396c827c2a0885a635aa1eec7708cc3cde11ff_6a75e726-8334-42ad-9502-075bb1c284b2.webp?v=1706258031","width":2000},{"alt":null,"id":23218825625699,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d08e6013d737d1f002665b155c3ee738ed589ce_4c19bfa6-e308-4cf9-abfe-0143965afb13.webp?v=1706258034"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d08e6013d737d1f002665b155c3ee738ed589ce_4c19bfa6-e308-4cf9-abfe-0143965afb13.webp?v=1706258034","width":2000},{"alt":null,"id":23218826313827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e62c14d66dba1e7496e1c155d9e71fd9f6a8787_6f033b1c-9320-4f79-882e-f0da87701e4a.webp?v=1706258037"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e62c14d66dba1e7496e1c155d9e71fd9f6a8787_6f033b1c-9320-4f79-882e-f0da87701e4a.webp?v=1706258037","width":2000},{"alt":null,"id":23218827231331,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a750a9d6e7303daf52a86ba56a66e1eefd03683_4d23d5bc-aad6-47a0-9dda-40510fc0fdaa.webp?v=1706258039"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a750a9d6e7303daf52a86ba56a66e1eefd03683_4d23d5bc-aad6-47a0-9dda-40510fc0fdaa.webp?v=1706258039","width":2000},{"alt":null,"id":23218827853923,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76a75fe44bd5bfbfb6a6476043d689e2e5e49a39_743475a3-defc-4a0f-a9f2-34276dbf5939.webp?v=1706258042"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76a75fe44bd5bfbfb6a6476043d689e2e5e49a39_743475a3-defc-4a0f-a9f2-34276dbf5939.webp?v=1706258042","width":2000},{"alt":null,"id":23218828443747,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0442c11c336920d9c3afca6c0bd25264bdac315_87f1ce9b-e8a0-4385-8515-52717d683717.webp?v=1706258044"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0442c11c336920d9c3afca6c0bd25264bdac315_87f1ce9b-e8a0-4385-8515-52717d683717.webp?v=1706258044","width":2000},{"alt":null,"id":23218829885539,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d685807f274bbf558bc16ff1c55abdff9316380f_7279b62b-02c8-407a-9411-f9a128aad8bc.webp?v=1706258049"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d685807f274bbf558bc16ff1c55abdff9316380f_7279b62b-02c8-407a-9411-f9a128aad8bc.webp?v=1706258049","width":2000},{"alt":null,"id":23218830671971,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5b20afe4ed4688015abe9f2a623da867fd69722_def4ee1d-f072-4355-9e76-f96a3e7967fd.webp?v=1706258053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5b20afe4ed4688015abe9f2a623da867fd69722_def4ee1d-f072-4355-9e76-f96a3e7967fd.webp?v=1706258053","width":2000},{"alt":null,"id":23218831196259,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90f52ad877dcb8eac461247bffd0e64ba6a5e93c_f8c9a227-7a55-4036-a243-38f600660db9.webp?v=1706258057"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90f52ad877dcb8eac461247bffd0e64ba6a5e93c_f8c9a227-7a55-4036-a243-38f600660db9.webp?v=1706258057","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41212154445923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":30847741427811,"product_id":7158889283683,"position":1,"created_at":"2024-01-26T16:33:35+08:00","updated_at":"2024-01-26T16:33:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a2bd12156ce2d71cb0ac30f040056fc0a463b0_191baaa1-f09e-46f3-a599-f6b57596f5e6.webp?v=1706258015","variant_ids":[41212154445923]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Look - 願傷疤 有天開出花(澳洲叢林大火) - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-AF02","featured_media":{"alt":null,"id":23218821464163,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a2bd12156ce2d71cb0ac30f040056fc0a463b0_191baaa1-f09e-46f3-a599-f6b57596f5e6.webp?v=1706258015"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41212154708067,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":30847751159907,"product_id":7158889283683,"position":15,"created_at":"2024-01-26T16:34:17+08:00","updated_at":"2024-01-26T16:34:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90f52ad877dcb8eac461247bffd0e64ba6a5e93c_f8c9a227-7a55-4036-a243-38f600660db9.webp?v=1706258057","variant_ids":[41212154708067]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Look - 願傷疤 有天開出花(澳洲叢林大火) - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-AF02","featured_media":{"alt":null,"id":23218831196259,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90f52ad877dcb8eac461247bffd0e64ba6a5e93c_f8c9a227-7a55-4036-a243-38f600660db9.webp?v=1706258057"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41212154445923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":30847741427811,"product_id":7158889283683,"position":1,"created_at":"2024-01-26T16:33:35+08:00","updated_at":"2024-01-26T16:33:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a2bd12156ce2d71cb0ac30f040056fc0a463b0_191baaa1-f09e-46f3-a599-f6b57596f5e6.webp?v=1706258015","variant_ids":[41212154445923]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Look - 願傷疤 有天開出花(澳洲叢林大火) - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-AF02","featured_media":{"alt":null,"id":23218821464163,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a2bd12156ce2d71cb0ac30f040056fc0a463b0_191baaa1-f09e-46f3-a599-f6b57596f5e6.webp?v=1706258015"}},"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: "停產"
}