$product = {"id":7414616031331,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - Weiweiboy - 超級可愛大王","handle":"iphone-13-mini-mod-nx-magsafe-printable-eo01","description":null,"published_at":"2024-06-11T17:52:33+08:00","created_at":"2024-05-05T14:34:04+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":41907807617123,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31485886464099,"product_id":7414616031331,"position":10,"created_at":"2024-05-05T14:34:29+08:00","updated_at":"2024-05-05T14:34:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a0075b604b54c0dd2bc47554f97e7c184ba242c_8d97ec43-7773-4164-bad6-13f14ab7dcd4.webp?v=1714890869","variant_ids":[41907807617123]},"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-EO01","featured_media":{"alt":null,"id":23891221708899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a0075b604b54c0dd2bc47554f97e7c184ba242c_8d97ec43-7773-4164-bad6-13f14ab7dcd4.webp?v=1714890869"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907807748195,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31485878665315,"product_id":7414616031331,"position":5,"created_at":"2024-05-05T14:34:17+08:00","updated_at":"2024-05-05T14:34:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0b8c3e4ea62fb01add7cb99c8effb5177eea88f_f0d18faf-3cd4-44e6-b649-06b53cc76373.webp?v=1714890857","variant_ids":[41907807748195]},"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-EO01","featured_media":{"alt":null,"id":23891213910115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0b8c3e4ea62fb01add7cb99c8effb5177eea88f_f0d18faf-3cd4-44e6-b649-06b53cc76373.webp?v=1714890857"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907808043107,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31485877485667,"product_id":7414616031331,"position":4,"created_at":"2024-05-05T14:34:14+08:00","updated_at":"2024-05-05T14:34:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df40bc45c74253284f448161666032a0125c22f8_af6c1f29-c4d6-487c-af4d-49fcd470c04c.webp?v=1714890854","variant_ids":[41907808043107]},"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-EO01","featured_media":{"alt":null,"id":23891212533859,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df40bc45c74253284f448161666032a0125c22f8_af6c1f29-c4d6-487c-af4d-49fcd470c04c.webp?v=1714890854"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3326f67241fa860fdea03fbb9f36f395fbf523dc_b63a0efe-be1e-4b83-8352-d1a175c0668d.webp?v=1714890847","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aacbf4c82272a6df81b8a8a2fa67694ba2794b7_7f5825ae-8aa9-40e3-93b5-d11d93e07bde.webp?v=1714890849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18e4e9ef542b54061586195fc9c44b06a26f3eed_1f3d5414-56c6-4ca8-8c39-6ac52a300330.webp?v=1714890852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df40bc45c74253284f448161666032a0125c22f8_af6c1f29-c4d6-487c-af4d-49fcd470c04c.webp?v=1714890854","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0b8c3e4ea62fb01add7cb99c8effb5177eea88f_f0d18faf-3cd4-44e6-b649-06b53cc76373.webp?v=1714890857","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d031ff827f4a16b53ca43c4e57205446393b04b0_788fa08f-6f81-4869-b573-8a43de8b90f6.webp?v=1714890859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a770ab855086eac9c690820e64a353cee433b14f_d0fa024f-0fa5-4676-8c34-1cd845b3e87b.webp?v=1714890861","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/453816bc4eb4fca3a1a45e1b0de95be7fbda7379_6a0750ab-ba3b-4de8-bf01-f698208877b6.webp?v=1714890864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae93c4c7b29d525ff9916373621630b24cf2139b_6ce9e19c-d50d-4155-ac28-f3cc533eb9aa.webp?v=1714890866","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a0075b604b54c0dd2bc47554f97e7c184ba242c_8d97ec43-7773-4164-bad6-13f14ab7dcd4.webp?v=1714890869","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0abc7de0394f9056ea7ca4211a14a1fd42f62c00_562e11b3-dbbd-4ba9-8f6d-dba91582479f.webp?v=1714890871"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3326f67241fa860fdea03fbb9f36f395fbf523dc_b63a0efe-be1e-4b83-8352-d1a175c0668d.webp?v=1714890847","options":["color"],"media":[{"alt":null,"id":23891208929379,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3326f67241fa860fdea03fbb9f36f395fbf523dc_b63a0efe-be1e-4b83-8352-d1a175c0668d.webp?v=1714890847"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3326f67241fa860fdea03fbb9f36f395fbf523dc_b63a0efe-be1e-4b83-8352-d1a175c0668d.webp?v=1714890847","width":2000},{"alt":null,"id":23891210174563,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aacbf4c82272a6df81b8a8a2fa67694ba2794b7_7f5825ae-8aa9-40e3-93b5-d11d93e07bde.webp?v=1714890849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aacbf4c82272a6df81b8a8a2fa67694ba2794b7_7f5825ae-8aa9-40e3-93b5-d11d93e07bde.webp?v=1714890849","width":2000},{"alt":null,"id":23891211190371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18e4e9ef542b54061586195fc9c44b06a26f3eed_1f3d5414-56c6-4ca8-8c39-6ac52a300330.webp?v=1714890852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18e4e9ef542b54061586195fc9c44b06a26f3eed_1f3d5414-56c6-4ca8-8c39-6ac52a300330.webp?v=1714890852","width":2000},{"alt":null,"id":23891212533859,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df40bc45c74253284f448161666032a0125c22f8_af6c1f29-c4d6-487c-af4d-49fcd470c04c.webp?v=1714890854"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df40bc45c74253284f448161666032a0125c22f8_af6c1f29-c4d6-487c-af4d-49fcd470c04c.webp?v=1714890854","width":2000},{"alt":null,"id":23891213910115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0b8c3e4ea62fb01add7cb99c8effb5177eea88f_f0d18faf-3cd4-44e6-b649-06b53cc76373.webp?v=1714890857"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0b8c3e4ea62fb01add7cb99c8effb5177eea88f_f0d18faf-3cd4-44e6-b649-06b53cc76373.webp?v=1714890857","width":2000},{"alt":null,"id":23891215548515,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d031ff827f4a16b53ca43c4e57205446393b04b0_788fa08f-6f81-4869-b573-8a43de8b90f6.webp?v=1714890859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d031ff827f4a16b53ca43c4e57205446393b04b0_788fa08f-6f81-4869-b573-8a43de8b90f6.webp?v=1714890859","width":2000},{"alt":null,"id":23891216957539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a770ab855086eac9c690820e64a353cee433b14f_d0fa024f-0fa5-4676-8c34-1cd845b3e87b.webp?v=1714890861"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a770ab855086eac9c690820e64a353cee433b14f_d0fa024f-0fa5-4676-8c34-1cd845b3e87b.webp?v=1714890861","width":2000},{"alt":null,"id":23891218530403,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/453816bc4eb4fca3a1a45e1b0de95be7fbda7379_6a0750ab-ba3b-4de8-bf01-f698208877b6.webp?v=1714890864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/453816bc4eb4fca3a1a45e1b0de95be7fbda7379_6a0750ab-ba3b-4de8-bf01-f698208877b6.webp?v=1714890864","width":2000},{"alt":null,"id":23891220004963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae93c4c7b29d525ff9916373621630b24cf2139b_6ce9e19c-d50d-4155-ac28-f3cc533eb9aa.webp?v=1714890866"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae93c4c7b29d525ff9916373621630b24cf2139b_6ce9e19c-d50d-4155-ac28-f3cc533eb9aa.webp?v=1714890866","width":2000},{"alt":null,"id":23891221708899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a0075b604b54c0dd2bc47554f97e7c184ba242c_8d97ec43-7773-4164-bad6-13f14ab7dcd4.webp?v=1714890869"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a0075b604b54c0dd2bc47554f97e7c184ba242c_8d97ec43-7773-4164-bad6-13f14ab7dcd4.webp?v=1714890869","width":2000},{"alt":null,"id":23891222986851,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0abc7de0394f9056ea7ca4211a14a1fd42f62c00_562e11b3-dbbd-4ba9-8f6d-dba91582479f.webp?v=1714890871"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0abc7de0394f9056ea7ca4211a14a1fd42f62c00_562e11b3-dbbd-4ba9-8f6d-dba91582479f.webp?v=1714890871","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41907807617123,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31485886464099,"product_id":7414616031331,"position":10,"created_at":"2024-05-05T14:34:29+08:00","updated_at":"2024-05-05T14:34:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a0075b604b54c0dd2bc47554f97e7c184ba242c_8d97ec43-7773-4164-bad6-13f14ab7dcd4.webp?v=1714890869","variant_ids":[41907807617123]},"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-EO01","featured_media":{"alt":null,"id":23891221708899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a0075b604b54c0dd2bc47554f97e7c184ba242c_8d97ec43-7773-4164-bad6-13f14ab7dcd4.webp?v=1714890869"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907807748195,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31485878665315,"product_id":7414616031331,"position":5,"created_at":"2024-05-05T14:34:17+08:00","updated_at":"2024-05-05T14:34:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0b8c3e4ea62fb01add7cb99c8effb5177eea88f_f0d18faf-3cd4-44e6-b649-06b53cc76373.webp?v=1714890857","variant_ids":[41907807748195]},"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-EO01","featured_media":{"alt":null,"id":23891213910115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0b8c3e4ea62fb01add7cb99c8effb5177eea88f_f0d18faf-3cd4-44e6-b649-06b53cc76373.webp?v=1714890857"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907808043107,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31485877485667,"product_id":7414616031331,"position":4,"created_at":"2024-05-05T14:34:14+08:00","updated_at":"2024-05-05T14:34:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df40bc45c74253284f448161666032a0125c22f8_af6c1f29-c4d6-487c-af4d-49fcd470c04c.webp?v=1714890854","variant_ids":[41907808043107]},"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-EO01","featured_media":{"alt":null,"id":23891212533859,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df40bc45c74253284f448161666032a0125c22f8_af6c1f29-c4d6-487c-af4d-49fcd470c04c.webp?v=1714890854"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41907807617123,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31485886464099,"product_id":7414616031331,"position":10,"created_at":"2024-05-05T14:34:29+08:00","updated_at":"2024-05-05T14:34:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a0075b604b54c0dd2bc47554f97e7c184ba242c_8d97ec43-7773-4164-bad6-13f14ab7dcd4.webp?v=1714890869","variant_ids":[41907807617123]},"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-EO01","featured_media":{"alt":null,"id":23891221708899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a0075b604b54c0dd2bc47554f97e7c184ba242c_8d97ec43-7773-4164-bad6-13f14ab7dcd4.webp?v=1714890869"}},"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: "停產" }