Home
›
犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王喜樂無常
$product = {"id":7414192078947,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王喜樂無常","handle":"iphone-13-mini-mod-nx-magsafe-printable-eo03","description":null,"published_at":"2024-06-11T17:49:45+08:00","created_at":"2024-05-05T14:15:08+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":41904736370787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO03","requires_shipping":true,"taxable":true,"featured_image":{"id":31484877996131,"product_id":7414192078947,"position":3,"created_at":"2024-05-05T14:15:15+08:00","updated_at":"2024-05-05T14:15:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e5d543cdbe64f1dfb3188a5a7e3b04c36928565_e970a9be-492b-43c7-896b-f4b9f2fd73bf.webp?v=1714889715","variant_ids":[41904736370787]},"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-EO03","featured_media":{"alt":null,"id":23890179424355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e5d543cdbe64f1dfb3188a5a7e3b04c36928565_e970a9be-492b-43c7-896b-f4b9f2fd73bf.webp?v=1714889715"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41904736436323,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-EO03","requires_shipping":true,"taxable":true,"featured_image":{"id":31484890218595,"product_id":7414192078947,"position":10,"created_at":"2024-05-05T14:15:32+08:00","updated_at":"2024-05-05T14:15:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/894e25442317c477894cf8a2f647e6a5937d716b_af624add-72c2-4470-8f08-a281ac130bc9.webp?v=1714889732","variant_ids":[41904736436323]},"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-EO03","featured_media":{"alt":null,"id":23890192990307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/894e25442317c477894cf8a2f647e6a5937d716b_af624add-72c2-4470-8f08-a281ac130bc9.webp?v=1714889732"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41904736796771,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-EO03","requires_shipping":true,"taxable":true,"featured_image":{"id":31484873736291,"product_id":7414192078947,"position":1,"created_at":"2024-05-05T14:15:10+08:00","updated_at":"2024-05-05T14:15:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557cbffa8c7492cf61620320acde783d8cb8aa8b_d1c4ba50-aef7-44f1-959b-afa80bb7be0e.webp?v=1714889710","variant_ids":[41904736796771]},"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-EO03","featured_media":{"alt":null,"id":23890175000675,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557cbffa8c7492cf61620320acde783d8cb8aa8b_d1c4ba50-aef7-44f1-959b-afa80bb7be0e.webp?v=1714889710"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557cbffa8c7492cf61620320acde783d8cb8aa8b_d1c4ba50-aef7-44f1-959b-afa80bb7be0e.webp?v=1714889710","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b2483d27aacd05e674d4baa18903063ee6b6263_0491b973-5f00-4d2b-b551-798cd51203f4.webp?v=1714889713","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e5d543cdbe64f1dfb3188a5a7e3b04c36928565_e970a9be-492b-43c7-896b-f4b9f2fd73bf.webp?v=1714889715","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4cbe6ca46e9d0f5eaf8771216e101b67b573929_a99953a8-d709-4b30-926a-6c362cb11fc7.webp?v=1714889717","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b3d1abde21e8384f533e557f7bd10e51fd20b43_aa7e505d-4b77-49e1-888a-b5839cbe1050.webp?v=1714889720","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce56a5ca4a2138aaf4636bd333e5ec49764d211_33d46fb7-9c46-47f0-b048-facf25a8e092.webp?v=1714889722","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba7a04d65f5d55bc573e431725fc59e80252847_36b477fb-1669-4465-a36f-70e9750f1970.webp?v=1714889724","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4632b2d28c3cef76fa9ccb5c5b14d8aa16fdd08_209cef84-8e3d-4290-9b9d-273914e02e59.webp?v=1714889727","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7aee474a8c45649d0bc06e67030dc8f9e2e56d61_6ee10307-2590-4aae-85ba-f671274d7fda.webp?v=1714889729","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/894e25442317c477894cf8a2f647e6a5937d716b_af624add-72c2-4470-8f08-a281ac130bc9.webp?v=1714889732","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/511abb5d08c1070c28d4baff8d6dbfe695a2165d_aebd174a-2fe0-44e6-b8f1-d1480e61d0c4.webp?v=1714889734"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557cbffa8c7492cf61620320acde783d8cb8aa8b_d1c4ba50-aef7-44f1-959b-afa80bb7be0e.webp?v=1714889710","options":["color"],"media":[{"alt":null,"id":23890175000675,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557cbffa8c7492cf61620320acde783d8cb8aa8b_d1c4ba50-aef7-44f1-959b-afa80bb7be0e.webp?v=1714889710"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557cbffa8c7492cf61620320acde783d8cb8aa8b_d1c4ba50-aef7-44f1-959b-afa80bb7be0e.webp?v=1714889710","width":2000},{"alt":null,"id":23890177130595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b2483d27aacd05e674d4baa18903063ee6b6263_0491b973-5f00-4d2b-b551-798cd51203f4.webp?v=1714889713"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b2483d27aacd05e674d4baa18903063ee6b6263_0491b973-5f00-4d2b-b551-798cd51203f4.webp?v=1714889713","width":2000},{"alt":null,"id":23890179424355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e5d543cdbe64f1dfb3188a5a7e3b04c36928565_e970a9be-492b-43c7-896b-f4b9f2fd73bf.webp?v=1714889715"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e5d543cdbe64f1dfb3188a5a7e3b04c36928565_e970a9be-492b-43c7-896b-f4b9f2fd73bf.webp?v=1714889715","width":2000},{"alt":null,"id":23890181455971,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4cbe6ca46e9d0f5eaf8771216e101b67b573929_a99953a8-d709-4b30-926a-6c362cb11fc7.webp?v=1714889717"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4cbe6ca46e9d0f5eaf8771216e101b67b573929_a99953a8-d709-4b30-926a-6c362cb11fc7.webp?v=1714889717","width":2000},{"alt":null,"id":23890183258211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b3d1abde21e8384f533e557f7bd10e51fd20b43_aa7e505d-4b77-49e1-888a-b5839cbe1050.webp?v=1714889720"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b3d1abde21e8384f533e557f7bd10e51fd20b43_aa7e505d-4b77-49e1-888a-b5839cbe1050.webp?v=1714889720","width":2000},{"alt":null,"id":23890185027683,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce56a5ca4a2138aaf4636bd333e5ec49764d211_33d46fb7-9c46-47f0-b048-facf25a8e092.webp?v=1714889722"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce56a5ca4a2138aaf4636bd333e5ec49764d211_33d46fb7-9c46-47f0-b048-facf25a8e092.webp?v=1714889722","width":2000},{"alt":null,"id":23890186731619,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba7a04d65f5d55bc573e431725fc59e80252847_36b477fb-1669-4465-a36f-70e9750f1970.webp?v=1714889724"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba7a04d65f5d55bc573e431725fc59e80252847_36b477fb-1669-4465-a36f-70e9750f1970.webp?v=1714889724","width":2000},{"alt":null,"id":23890188599395,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4632b2d28c3cef76fa9ccb5c5b14d8aa16fdd08_209cef84-8e3d-4290-9b9d-273914e02e59.webp?v=1714889727"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4632b2d28c3cef76fa9ccb5c5b14d8aa16fdd08_209cef84-8e3d-4290-9b9d-273914e02e59.webp?v=1714889727","width":2000},{"alt":null,"id":23890190794851,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7aee474a8c45649d0bc06e67030dc8f9e2e56d61_6ee10307-2590-4aae-85ba-f671274d7fda.webp?v=1714889729"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7aee474a8c45649d0bc06e67030dc8f9e2e56d61_6ee10307-2590-4aae-85ba-f671274d7fda.webp?v=1714889729","width":2000},{"alt":null,"id":23890192990307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/894e25442317c477894cf8a2f647e6a5937d716b_af624add-72c2-4470-8f08-a281ac130bc9.webp?v=1714889732"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/894e25442317c477894cf8a2f647e6a5937d716b_af624add-72c2-4470-8f08-a281ac130bc9.webp?v=1714889732","width":2000},{"alt":null,"id":23890195087459,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/511abb5d08c1070c28d4baff8d6dbfe695a2165d_aebd174a-2fe0-44e6-b8f1-d1480e61d0c4.webp?v=1714889734"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/511abb5d08c1070c28d4baff8d6dbfe695a2165d_aebd174a-2fe0-44e6-b8f1-d1480e61d0c4.webp?v=1714889734","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41904736370787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO03","requires_shipping":true,"taxable":true,"featured_image":{"id":31484877996131,"product_id":7414192078947,"position":3,"created_at":"2024-05-05T14:15:15+08:00","updated_at":"2024-05-05T14:15:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e5d543cdbe64f1dfb3188a5a7e3b04c36928565_e970a9be-492b-43c7-896b-f4b9f2fd73bf.webp?v=1714889715","variant_ids":[41904736370787]},"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-EO03","featured_media":{"alt":null,"id":23890179424355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e5d543cdbe64f1dfb3188a5a7e3b04c36928565_e970a9be-492b-43c7-896b-f4b9f2fd73bf.webp?v=1714889715"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41904736436323,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-EO03","requires_shipping":true,"taxable":true,"featured_image":{"id":31484890218595,"product_id":7414192078947,"position":10,"created_at":"2024-05-05T14:15:32+08:00","updated_at":"2024-05-05T14:15:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/894e25442317c477894cf8a2f647e6a5937d716b_af624add-72c2-4470-8f08-a281ac130bc9.webp?v=1714889732","variant_ids":[41904736436323]},"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-EO03","featured_media":{"alt":null,"id":23890192990307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/894e25442317c477894cf8a2f647e6a5937d716b_af624add-72c2-4470-8f08-a281ac130bc9.webp?v=1714889732"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41904736796771,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-EO03","requires_shipping":true,"taxable":true,"featured_image":{"id":31484873736291,"product_id":7414192078947,"position":1,"created_at":"2024-05-05T14:15:10+08:00","updated_at":"2024-05-05T14:15:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557cbffa8c7492cf61620320acde783d8cb8aa8b_d1c4ba50-aef7-44f1-959b-afa80bb7be0e.webp?v=1714889710","variant_ids":[41904736796771]},"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-EO03","featured_media":{"alt":null,"id":23890175000675,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557cbffa8c7492cf61620320acde783d8cb8aa8b_d1c4ba50-aef7-44f1-959b-afa80bb7be0e.webp?v=1714889710"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41904736370787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO03","requires_shipping":true,"taxable":true,"featured_image":{"id":31484877996131,"product_id":7414192078947,"position":3,"created_at":"2024-05-05T14:15:15+08:00","updated_at":"2024-05-05T14:15:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e5d543cdbe64f1dfb3188a5a7e3b04c36928565_e970a9be-492b-43c7-896b-f4b9f2fd73bf.webp?v=1714889715","variant_ids":[41904736370787]},"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-EO03","featured_media":{"alt":null,"id":23890179424355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e5d543cdbe64f1dfb3188a5a7e3b04c36928565_e970a9be-492b-43c7-896b-f4b9f2fd73bf.webp?v=1714889715"}},"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: "停產"
}