Home
›
犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王10週年
$product = {"id":7414639951971,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王10週年","handle":"iphone-13-mini-mod-nx-magsafe-printable-eo05","description":null,"published_at":"2024-06-11T17:52:44+08:00","created_at":"2024-05-05T14:35:19+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":41907970441315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO05","requires_shipping":true,"taxable":true,"featured_image":{"id":31485927260259,"product_id":7414639951971,"position":6,"created_at":"2024-05-05T14:35:33+08:00","updated_at":"2024-05-05T14:35:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3f68212c10e2b5d9dfd7e9ae1bd7f22bdc35ff1_ac701da2-77e1-4f5b-b585-fcf0c0645903.webp?v=1714890933","variant_ids":[41907970441315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王10週年 - 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-EO05","featured_media":{"alt":null,"id":23891262537827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3f68212c10e2b5d9dfd7e9ae1bd7f22bdc35ff1_ac701da2-77e1-4f5b-b585-fcf0c0645903.webp?v=1714890933"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907970506851,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-EO05","requires_shipping":true,"taxable":true,"featured_image":{"id":31485921427555,"product_id":7414639951971,"position":2,"created_at":"2024-05-05T14:35:24+08:00","updated_at":"2024-05-05T14:35:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/602ba9ca3cf1133a8e3edaf31b1f35ee44563d31_55844edc-1bc3-4e6d-81cc-9dc05ce8cce6.webp?v=1714890924","variant_ids":[41907970506851]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王10週年 - 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-EO05","featured_media":{"alt":null,"id":23891256574051,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/602ba9ca3cf1133a8e3edaf31b1f35ee44563d31_55844edc-1bc3-4e6d-81cc-9dc05ce8cce6.webp?v=1714890924"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907970736227,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-EO05","requires_shipping":true,"taxable":true,"featured_image":{"id":31485922705507,"product_id":7414639951971,"position":3,"created_at":"2024-05-05T14:35:26+08:00","updated_at":"2024-05-05T14:35:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c29bd1542dde8bd23042ea774c410033790d0e_19bbbcd8-2d09-4a93-9086-a6659cdb561a.webp?v=1714890926","variant_ids":[41907970736227]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王10週年 - 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-EO05","featured_media":{"alt":null,"id":23891257983075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c29bd1542dde8bd23042ea774c410033790d0e_19bbbcd8-2d09-4a93-9086-a6659cdb561a.webp?v=1714890926"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3589b94db2a7662322936eb817169eaf0d102874_9990b5fe-9a73-4ce4-8284-919236e45bf7.webp?v=1714890921","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/602ba9ca3cf1133a8e3edaf31b1f35ee44563d31_55844edc-1bc3-4e6d-81cc-9dc05ce8cce6.webp?v=1714890924","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c29bd1542dde8bd23042ea774c410033790d0e_19bbbcd8-2d09-4a93-9086-a6659cdb561a.webp?v=1714890926","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/debdcc5be76800f03c631cc7998d9dc3fe675aba_a09ad948-9f6b-45dc-9521-83c19e8a7894.webp?v=1714890928","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71e7f076c7ce2c37f16e9538739cbb2d47099567_e851a028-48e0-4fb1-abfb-82d953b875d2.webp?v=1714890931","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3f68212c10e2b5d9dfd7e9ae1bd7f22bdc35ff1_ac701da2-77e1-4f5b-b585-fcf0c0645903.webp?v=1714890933","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677f437553583d6479dae488e337d78ad99fea06_f1e5f18d-10ed-47dd-81f0-495a467de21e.webp?v=1714890935","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9677abffc6390219d90d3ed4247ff69a86cb353c_c207daf0-160d-4b9b-a279-420a45f4bdc7.webp?v=1714890938","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28a1cc55a8ed2aeca1225ccddbc1fabc335164f9_99ceacf5-14ea-496c-8d3c-29be460959ab.webp?v=1714890941","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5693e2a656304a6bd1ef4c85be04e56073ba9a4_316dd9b4-a58a-4619-b71c-3a3551b56ae3.webp?v=1714890943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef2cc8708b3e7626063ad23b97ab3ca54b05a694_c030ccc0-85d3-4f95-9cbc-3bbb0dc1a04b.webp?v=1714890946"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3589b94db2a7662322936eb817169eaf0d102874_9990b5fe-9a73-4ce4-8284-919236e45bf7.webp?v=1714890921","options":["color"],"media":[{"alt":null,"id":23891255361635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3589b94db2a7662322936eb817169eaf0d102874_9990b5fe-9a73-4ce4-8284-919236e45bf7.webp?v=1714890921"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3589b94db2a7662322936eb817169eaf0d102874_9990b5fe-9a73-4ce4-8284-919236e45bf7.webp?v=1714890921","width":2000},{"alt":null,"id":23891256574051,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/602ba9ca3cf1133a8e3edaf31b1f35ee44563d31_55844edc-1bc3-4e6d-81cc-9dc05ce8cce6.webp?v=1714890924"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/602ba9ca3cf1133a8e3edaf31b1f35ee44563d31_55844edc-1bc3-4e6d-81cc-9dc05ce8cce6.webp?v=1714890924","width":2000},{"alt":null,"id":23891257983075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c29bd1542dde8bd23042ea774c410033790d0e_19bbbcd8-2d09-4a93-9086-a6659cdb561a.webp?v=1714890926"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c29bd1542dde8bd23042ea774c410033790d0e_19bbbcd8-2d09-4a93-9086-a6659cdb561a.webp?v=1714890926","width":2000},{"alt":null,"id":23891259654243,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/debdcc5be76800f03c631cc7998d9dc3fe675aba_a09ad948-9f6b-45dc-9521-83c19e8a7894.webp?v=1714890928"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/debdcc5be76800f03c631cc7998d9dc3fe675aba_a09ad948-9f6b-45dc-9521-83c19e8a7894.webp?v=1714890928","width":2000},{"alt":null,"id":23891260932195,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71e7f076c7ce2c37f16e9538739cbb2d47099567_e851a028-48e0-4fb1-abfb-82d953b875d2.webp?v=1714890931"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71e7f076c7ce2c37f16e9538739cbb2d47099567_e851a028-48e0-4fb1-abfb-82d953b875d2.webp?v=1714890931","width":2000},{"alt":null,"id":23891262537827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3f68212c10e2b5d9dfd7e9ae1bd7f22bdc35ff1_ac701da2-77e1-4f5b-b585-fcf0c0645903.webp?v=1714890933"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3f68212c10e2b5d9dfd7e9ae1bd7f22bdc35ff1_ac701da2-77e1-4f5b-b585-fcf0c0645903.webp?v=1714890933","width":2000},{"alt":null,"id":23891263848547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677f437553583d6479dae488e337d78ad99fea06_f1e5f18d-10ed-47dd-81f0-495a467de21e.webp?v=1714890935"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677f437553583d6479dae488e337d78ad99fea06_f1e5f18d-10ed-47dd-81f0-495a467de21e.webp?v=1714890935","width":2000},{"alt":null,"id":23891265421411,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9677abffc6390219d90d3ed4247ff69a86cb353c_c207daf0-160d-4b9b-a279-420a45f4bdc7.webp?v=1714890938"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9677abffc6390219d90d3ed4247ff69a86cb353c_c207daf0-160d-4b9b-a279-420a45f4bdc7.webp?v=1714890938","width":2000},{"alt":null,"id":23891267190883,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28a1cc55a8ed2aeca1225ccddbc1fabc335164f9_99ceacf5-14ea-496c-8d3c-29be460959ab.webp?v=1714890941"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28a1cc55a8ed2aeca1225ccddbc1fabc335164f9_99ceacf5-14ea-496c-8d3c-29be460959ab.webp?v=1714890941","width":2000},{"alt":null,"id":23891269058659,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5693e2a656304a6bd1ef4c85be04e56073ba9a4_316dd9b4-a58a-4619-b71c-3a3551b56ae3.webp?v=1714890943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5693e2a656304a6bd1ef4c85be04e56073ba9a4_316dd9b4-a58a-4619-b71c-3a3551b56ae3.webp?v=1714890943","width":2000},{"alt":null,"id":23891270860899,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef2cc8708b3e7626063ad23b97ab3ca54b05a694_c030ccc0-85d3-4f95-9cbc-3bbb0dc1a04b.webp?v=1714890946"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef2cc8708b3e7626063ad23b97ab3ca54b05a694_c030ccc0-85d3-4f95-9cbc-3bbb0dc1a04b.webp?v=1714890946","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41907970441315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO05","requires_shipping":true,"taxable":true,"featured_image":{"id":31485927260259,"product_id":7414639951971,"position":6,"created_at":"2024-05-05T14:35:33+08:00","updated_at":"2024-05-05T14:35:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3f68212c10e2b5d9dfd7e9ae1bd7f22bdc35ff1_ac701da2-77e1-4f5b-b585-fcf0c0645903.webp?v=1714890933","variant_ids":[41907970441315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王10週年 - 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-EO05","featured_media":{"alt":null,"id":23891262537827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3f68212c10e2b5d9dfd7e9ae1bd7f22bdc35ff1_ac701da2-77e1-4f5b-b585-fcf0c0645903.webp?v=1714890933"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907970506851,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-EO05","requires_shipping":true,"taxable":true,"featured_image":{"id":31485921427555,"product_id":7414639951971,"position":2,"created_at":"2024-05-05T14:35:24+08:00","updated_at":"2024-05-05T14:35:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/602ba9ca3cf1133a8e3edaf31b1f35ee44563d31_55844edc-1bc3-4e6d-81cc-9dc05ce8cce6.webp?v=1714890924","variant_ids":[41907970506851]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王10週年 - 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-EO05","featured_media":{"alt":null,"id":23891256574051,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/602ba9ca3cf1133a8e3edaf31b1f35ee44563d31_55844edc-1bc3-4e6d-81cc-9dc05ce8cce6.webp?v=1714890924"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907970736227,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-EO05","requires_shipping":true,"taxable":true,"featured_image":{"id":31485922705507,"product_id":7414639951971,"position":3,"created_at":"2024-05-05T14:35:26+08:00","updated_at":"2024-05-05T14:35:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c29bd1542dde8bd23042ea774c410033790d0e_19bbbcd8-2d09-4a93-9086-a6659cdb561a.webp?v=1714890926","variant_ids":[41907970736227]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王10週年 - 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-EO05","featured_media":{"alt":null,"id":23891257983075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c29bd1542dde8bd23042ea774c410033790d0e_19bbbcd8-2d09-4a93-9086-a6659cdb561a.webp?v=1714890926"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41907970441315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO05","requires_shipping":true,"taxable":true,"featured_image":{"id":31485927260259,"product_id":7414639951971,"position":6,"created_at":"2024-05-05T14:35:33+08:00","updated_at":"2024-05-05T14:35:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3f68212c10e2b5d9dfd7e9ae1bd7f22bdc35ff1_ac701da2-77e1-4f5b-b585-fcf0c0645903.webp?v=1714890933","variant_ids":[41907970441315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 可愛大王10週年 - 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-EO05","featured_media":{"alt":null,"id":23891262537827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3f68212c10e2b5d9dfd7e9ae1bd7f22bdc35ff1_ac701da2-77e1-4f5b-b585-fcf0c0645903.webp?v=1714890933"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null
var sellingStatus
if ($bumper) {
$(document).ready(function() {
var productImg = $product.images[0]
var bumperVariants = $bumper.variants;
var bumperColors = new Object();
var currentVariant = '';
var productType = '';
bumperVariants.forEach(variant => {
bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src;
});
if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') {
mergeImages(
[productImg, bumperColors[currentVariant]],
{ crossOrigin: 'anonymous' }
).then(mergedImg => {
$('.merged-img').attr('src', mergedImg);
});
} else {
mergeImages(
[bumperColors[currentVariant], productImg],
{ crossOrigin: 'anonymous' }
).then(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: "停產"
}