Home
›
犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 讓世界再可愛一點
$product = {"id":7414566781027,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 讓世界再可愛一點","handle":"iphone-13-mini-mod-nx-magsafe-printable-eo02","description":null,"published_at":"2024-06-11T17:52:06+08:00","created_at":"2024-05-05T14:30:49+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Weiweiboy","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-weiweiboy","device-iPhone 13 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-weiweiboy","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41907420004451,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31485776887907,"product_id":7414566781027,"position":5,"created_at":"2024-05-05T14:31:00+08:00","updated_at":"2024-05-05T14:31:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54ba64b0f479d7f1329ad77cef9a6ad83ec7f03f_8b00ae67-5e43-4d42-8a51-7446464e05e9.webp?v=1714890660","variant_ids":[41907420004451]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-EO02","featured_media":{"alt":null,"id":23891107217507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54ba64b0f479d7f1329ad77cef9a6ad83ec7f03f_8b00ae67-5e43-4d42-8a51-7446464e05e9.webp?v=1714890660"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907420069987,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31485769023587,"product_id":7414566781027,"position":1,"created_at":"2024-05-05T14:30:51+08:00","updated_at":"2024-05-05T14:30:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7858074d45dbfa1e96df855648d36cb506b0e01a_fe94916f-ca27-4258-b414-ad2e8fec5585.webp?v=1714890651","variant_ids":[41907420069987]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 讓世界再可愛一點 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122804-EO02","featured_media":{"alt":null,"id":23891099025507,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7858074d45dbfa1e96df855648d36cb506b0e01a_fe94916f-ca27-4258-b414-ad2e8fec5585.webp?v=1714890651"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907420299363,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31485780099171,"product_id":7414566781027,"position":7,"created_at":"2024-05-05T14:31:05+08:00","updated_at":"2024-05-05T14:31:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa4e3a3ddf7cde66c34aa9fe2bad5c4e14a0a856_44657e2c-2658-4be1-9cd5-430a0e2fbc61.webp?v=1714890665","variant_ids":[41907420299363]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 讓世界再可愛一點 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01228J5-EO02","featured_media":{"alt":null,"id":23891110428771,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa4e3a3ddf7cde66c34aa9fe2bad5c4e14a0a856_44657e2c-2658-4be1-9cd5-430a0e2fbc61.webp?v=1714890665"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7858074d45dbfa1e96df855648d36cb506b0e01a_fe94916f-ca27-4258-b414-ad2e8fec5585.webp?v=1714890651","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab41737de74b79052532fed57eb474a387c3c45_0200d00c-a5b7-4e41-890b-2854db94c310.webp?v=1714890653","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68cae446ba8c7b099d6d3937de3ad2e59896aff8_c7bf1f12-57cf-430c-9f4a-9acd2e8fe895.webp?v=1714890656","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66f7b806a17e2ad510644d2f977a754938377e04_9527be97-98a5-4074-9994-a74d08cce678.webp?v=1714890658","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54ba64b0f479d7f1329ad77cef9a6ad83ec7f03f_8b00ae67-5e43-4d42-8a51-7446464e05e9.webp?v=1714890660","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36b1e3203781cc79c5b3115505a04911258664a1_12c9ac71-32a0-481c-ba24-ccdff17b819a.webp?v=1714890663","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa4e3a3ddf7cde66c34aa9fe2bad5c4e14a0a856_44657e2c-2658-4be1-9cd5-430a0e2fbc61.webp?v=1714890665","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10b7900b48b4469de601ec10d20cc67677fdf004_c6d4c4d9-e86b-465b-8ea0-f4891081a0fc.webp?v=1714890668","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efab3afd7a61f7e098cf31a845afbea6a694f031_3c2e89a4-17d2-42a9-9014-94c447d97454.webp?v=1714890670","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37d2bd3a6bbef72cab3b0e196baad876beaff65e_c73fa1b6-1931-4d9e-918b-104e5a77d2d5.webp?v=1714890672","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/953723845091efadc0ad7e175ac89d0ef6788b8e_875d7fc0-04fe-43cf-a71b-242e62896f85.webp?v=1714890675"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7858074d45dbfa1e96df855648d36cb506b0e01a_fe94916f-ca27-4258-b414-ad2e8fec5585.webp?v=1714890651","options":["color"],"media":[{"alt":null,"id":23891099025507,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7858074d45dbfa1e96df855648d36cb506b0e01a_fe94916f-ca27-4258-b414-ad2e8fec5585.webp?v=1714890651"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7858074d45dbfa1e96df855648d36cb506b0e01a_fe94916f-ca27-4258-b414-ad2e8fec5585.webp?v=1714890651","width":2000},{"alt":null,"id":23891101188195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab41737de74b79052532fed57eb474a387c3c45_0200d00c-a5b7-4e41-890b-2854db94c310.webp?v=1714890653"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab41737de74b79052532fed57eb474a387c3c45_0200d00c-a5b7-4e41-890b-2854db94c310.webp?v=1714890653","width":2000},{"alt":null,"id":23891103449187,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68cae446ba8c7b099d6d3937de3ad2e59896aff8_c7bf1f12-57cf-430c-9f4a-9acd2e8fe895.webp?v=1714890656"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68cae446ba8c7b099d6d3937de3ad2e59896aff8_c7bf1f12-57cf-430c-9f4a-9acd2e8fe895.webp?v=1714890656","width":2000},{"alt":null,"id":23891105513571,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66f7b806a17e2ad510644d2f977a754938377e04_9527be97-98a5-4074-9994-a74d08cce678.webp?v=1714890658"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66f7b806a17e2ad510644d2f977a754938377e04_9527be97-98a5-4074-9994-a74d08cce678.webp?v=1714890658","width":2000},{"alt":null,"id":23891107217507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54ba64b0f479d7f1329ad77cef9a6ad83ec7f03f_8b00ae67-5e43-4d42-8a51-7446464e05e9.webp?v=1714890660"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54ba64b0f479d7f1329ad77cef9a6ad83ec7f03f_8b00ae67-5e43-4d42-8a51-7446464e05e9.webp?v=1714890660","width":2000},{"alt":null,"id":23891108790371,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36b1e3203781cc79c5b3115505a04911258664a1_12c9ac71-32a0-481c-ba24-ccdff17b819a.webp?v=1714890663"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36b1e3203781cc79c5b3115505a04911258664a1_12c9ac71-32a0-481c-ba24-ccdff17b819a.webp?v=1714890663","width":2000},{"alt":null,"id":23891110428771,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa4e3a3ddf7cde66c34aa9fe2bad5c4e14a0a856_44657e2c-2658-4be1-9cd5-430a0e2fbc61.webp?v=1714890665"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa4e3a3ddf7cde66c34aa9fe2bad5c4e14a0a856_44657e2c-2658-4be1-9cd5-430a0e2fbc61.webp?v=1714890665","width":2000},{"alt":null,"id":23891112001635,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10b7900b48b4469de601ec10d20cc67677fdf004_c6d4c4d9-e86b-465b-8ea0-f4891081a0fc.webp?v=1714890668"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10b7900b48b4469de601ec10d20cc67677fdf004_c6d4c4d9-e86b-465b-8ea0-f4891081a0fc.webp?v=1714890668","width":2000},{"alt":null,"id":23891113476195,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efab3afd7a61f7e098cf31a845afbea6a694f031_3c2e89a4-17d2-42a9-9014-94c447d97454.webp?v=1714890670"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efab3afd7a61f7e098cf31a845afbea6a694f031_3c2e89a4-17d2-42a9-9014-94c447d97454.webp?v=1714890670","width":2000},{"alt":null,"id":23891114819683,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37d2bd3a6bbef72cab3b0e196baad876beaff65e_c73fa1b6-1931-4d9e-918b-104e5a77d2d5.webp?v=1714890672"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37d2bd3a6bbef72cab3b0e196baad876beaff65e_c73fa1b6-1931-4d9e-918b-104e5a77d2d5.webp?v=1714890672","width":2000},{"alt":null,"id":23891116097635,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/953723845091efadc0ad7e175ac89d0ef6788b8e_875d7fc0-04fe-43cf-a71b-242e62896f85.webp?v=1714890675"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/953723845091efadc0ad7e175ac89d0ef6788b8e_875d7fc0-04fe-43cf-a71b-242e62896f85.webp?v=1714890675","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41907420004451,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31485776887907,"product_id":7414566781027,"position":5,"created_at":"2024-05-05T14:31:00+08:00","updated_at":"2024-05-05T14:31:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54ba64b0f479d7f1329ad77cef9a6ad83ec7f03f_8b00ae67-5e43-4d42-8a51-7446464e05e9.webp?v=1714890660","variant_ids":[41907420004451]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-EO02","featured_media":{"alt":null,"id":23891107217507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54ba64b0f479d7f1329ad77cef9a6ad83ec7f03f_8b00ae67-5e43-4d42-8a51-7446464e05e9.webp?v=1714890660"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907420069987,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31485769023587,"product_id":7414566781027,"position":1,"created_at":"2024-05-05T14:30:51+08:00","updated_at":"2024-05-05T14:30:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7858074d45dbfa1e96df855648d36cb506b0e01a_fe94916f-ca27-4258-b414-ad2e8fec5585.webp?v=1714890651","variant_ids":[41907420069987]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 讓世界再可愛一點 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122804-EO02","featured_media":{"alt":null,"id":23891099025507,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7858074d45dbfa1e96df855648d36cb506b0e01a_fe94916f-ca27-4258-b414-ad2e8fec5585.webp?v=1714890651"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907420299363,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31485780099171,"product_id":7414566781027,"position":7,"created_at":"2024-05-05T14:31:05+08:00","updated_at":"2024-05-05T14:31:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa4e3a3ddf7cde66c34aa9fe2bad5c4e14a0a856_44657e2c-2658-4be1-9cd5-430a0e2fbc61.webp?v=1714890665","variant_ids":[41907420299363]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 讓世界再可愛一點 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01228J5-EO02","featured_media":{"alt":null,"id":23891110428771,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa4e3a3ddf7cde66c34aa9fe2bad5c4e14a0a856_44657e2c-2658-4be1-9cd5-430a0e2fbc61.webp?v=1714890665"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41907420004451,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31485776887907,"product_id":7414566781027,"position":5,"created_at":"2024-05-05T14:31:00+08:00","updated_at":"2024-05-05T14:31:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54ba64b0f479d7f1329ad77cef9a6ad83ec7f03f_8b00ae67-5e43-4d42-8a51-7446464e05e9.webp?v=1714890660","variant_ids":[41907420004451]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-EO02","featured_media":{"alt":null,"id":23891107217507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54ba64b0f479d7f1329ad77cef9a6ad83ec7f03f_8b00ae67-5e43-4d42-8a51-7446464e05e9.webp?v=1714890660"}},"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: "停產"
}