$product = {"id":7769858867299,"title":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Cat Dive - 跳水貓咪","handle":"iphone-13-mini-mod-nx-magsafe-printable-xf51","description":null,"published_at":"2025-04-16T13:59:04+08:00","created_at":"2025-04-15T21:20:42+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區I Love Doodle","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-ilovedoodle","device-iPhone 13 Mini","merge","reseller-ilovedoodle"],"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":43304272461923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0122824-XF51","requires_shipping":true,"taxable":true,"featured_image":{"id":34197786296419,"product_id":7769858867299,"position":10,"created_at":"2025-07-16T15:22:34+08:00","updated_at":"2025-07-16T15:22:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4543fd346b44feccb040c09f7033ee4a9a20007_eccdfebd-6da6-4a9d-b7b6-c0ff6ce95cfa.webp?v=1752650555","variant_ids":[43304272461923]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Cat Dive - 跳水貓咪 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-XF51","featured_media":{"alt":null,"id":25830101712995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4543fd346b44feccb040c09f7033ee4a9a20007_eccdfebd-6da6-4a9d-b7b6-c0ff6ce95cfa.webp?v=1752650555"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43304277213283,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0122804-XF51","requires_shipping":true,"taxable":true,"featured_image":{"id":34197781872739,"product_id":7769858867299,"position":4,"created_at":"2025-07-16T15:22:30+08:00","updated_at":"2025-07-16T15:22:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220cee5ae4b4e3ffbcb92b02e7dfed30a3f0f3a6_440788f4-d339-44ef-8bf1-282d0add387b.webp?v=1752650552","variant_ids":[43304277213283]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Cat Dive - 跳水貓咪 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122804-XF51","featured_media":{"alt":null,"id":25830099157091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220cee5ae4b4e3ffbcb92b02e7dfed30a3f0f3a6_440788f4-d339-44ef-8bf1-282d0add387b.webp?v=1752650552"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43304277377123,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01228J5-XF51","requires_shipping":true,"taxable":true,"featured_image":{"id":34197781119075,"product_id":7769858867299,"position":3,"created_at":"2025-07-16T15:22:29+08:00","updated_at":"2025-07-16T15:22:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4daa6ea8797211824f9ec323d52168c3742caa_bbc9d007-1ae3-4f8d-b3e0-739784dbeb6e.webp?v=1752650551","variant_ids":[43304277377123]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Cat Dive - 跳水貓咪 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01228J5-XF51","featured_media":{"alt":null,"id":25830098796643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4daa6ea8797211824f9ec323d52168c3742caa_bbc9d007-1ae3-4f8d-b3e0-739784dbeb6e.webp?v=1752650551"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ba4455feffb91702b9661debda59f5b54595c_881e1c5b-42fa-47b2-9fa2-303a4d6829d1.webp?v=1744723249","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a8e248b9fdc7ec45df1be2e94c4440d69c0c8c3_174a4fa4-7abf-43ed-88ae-0c9cc20cfe2d.webp?v=1752650550","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4daa6ea8797211824f9ec323d52168c3742caa_bbc9d007-1ae3-4f8d-b3e0-739784dbeb6e.webp?v=1752650551","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220cee5ae4b4e3ffbcb92b02e7dfed30a3f0f3a6_440788f4-d339-44ef-8bf1-282d0add387b.webp?v=1752650552","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d512514a32590826ad3193a5e546ca10115e207f_c28c6cf3-a61f-4145-9f2d-9bcd37dcb7fc.webp?v=1752650552","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6523df6924aa95cc1320a064e38385104c10ae1_ecc860aa-c9f0-4226-aac4-962f3009f248.webp?v=1752650553","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aeff4ac24584119c5b13e844842521142364b7ad_3bf31474-317c-4794-b401-ad2fc568e499.webp?v=1752650553","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a792dc9efdac13f400bc506b162b23da90a4b080_87dbd168-8c7d-4b00-a2b8-e08d4816cc66.webp?v=1752650554","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/117604fc572db1e8625946ffdcfbaf76c32cc1f4_661ae2c7-c4ca-4412-93e3-3454108d51ec.webp?v=1752650555","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4543fd346b44feccb040c09f7033ee4a9a20007_eccdfebd-6da6-4a9d-b7b6-c0ff6ce95cfa.webp?v=1752650555","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1968142af68cb61db7e4b910643798e0ca996d5_a73153de-1110-45d7-ae40-3eeb1d85d71c.webp?v=1752650556","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1f0588a89b42380b6434904f9fa5fc791d20a4_ba91c7ae-aabf-45f2-a0c9-00c8b584bb54.webp?v=1752650557"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ba4455feffb91702b9661debda59f5b54595c_881e1c5b-42fa-47b2-9fa2-303a4d6829d1.webp?v=1744723249","options":["color"],"media":[{"alt":null,"id":25496373166179,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ba4455feffb91702b9661debda59f5b54595c_881e1c5b-42fa-47b2-9fa2-303a4d6829d1.webp?v=1744723249"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ba4455feffb91702b9661debda59f5b54595c_881e1c5b-42fa-47b2-9fa2-303a4d6829d1.webp?v=1744723249","width":2000},{"alt":null,"id":25830098075747,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a8e248b9fdc7ec45df1be2e94c4440d69c0c8c3_174a4fa4-7abf-43ed-88ae-0c9cc20cfe2d.webp?v=1752650550"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a8e248b9fdc7ec45df1be2e94c4440d69c0c8c3_174a4fa4-7abf-43ed-88ae-0c9cc20cfe2d.webp?v=1752650550","width":2000},{"alt":null,"id":25830098796643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4daa6ea8797211824f9ec323d52168c3742caa_bbc9d007-1ae3-4f8d-b3e0-739784dbeb6e.webp?v=1752650551"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4daa6ea8797211824f9ec323d52168c3742caa_bbc9d007-1ae3-4f8d-b3e0-739784dbeb6e.webp?v=1752650551","width":2000},{"alt":null,"id":25830099157091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220cee5ae4b4e3ffbcb92b02e7dfed30a3f0f3a6_440788f4-d339-44ef-8bf1-282d0add387b.webp?v=1752650552"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220cee5ae4b4e3ffbcb92b02e7dfed30a3f0f3a6_440788f4-d339-44ef-8bf1-282d0add387b.webp?v=1752650552","width":2000},{"alt":null,"id":25830099517539,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d512514a32590826ad3193a5e546ca10115e207f_c28c6cf3-a61f-4145-9f2d-9bcd37dcb7fc.webp?v=1752650552"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d512514a32590826ad3193a5e546ca10115e207f_c28c6cf3-a61f-4145-9f2d-9bcd37dcb7fc.webp?v=1752650552","width":2000},{"alt":null,"id":25830099976291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6523df6924aa95cc1320a064e38385104c10ae1_ecc860aa-c9f0-4226-aac4-962f3009f248.webp?v=1752650553"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6523df6924aa95cc1320a064e38385104c10ae1_ecc860aa-c9f0-4226-aac4-962f3009f248.webp?v=1752650553","width":2000},{"alt":null,"id":25830100369507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aeff4ac24584119c5b13e844842521142364b7ad_3bf31474-317c-4794-b401-ad2fc568e499.webp?v=1752650553"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aeff4ac24584119c5b13e844842521142364b7ad_3bf31474-317c-4794-b401-ad2fc568e499.webp?v=1752650553","width":2000},{"alt":null,"id":25830100992099,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a792dc9efdac13f400bc506b162b23da90a4b080_87dbd168-8c7d-4b00-a2b8-e08d4816cc66.webp?v=1752650554"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a792dc9efdac13f400bc506b162b23da90a4b080_87dbd168-8c7d-4b00-a2b8-e08d4816cc66.webp?v=1752650554","width":2000},{"alt":null,"id":25830101352547,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/117604fc572db1e8625946ffdcfbaf76c32cc1f4_661ae2c7-c4ca-4412-93e3-3454108d51ec.webp?v=1752650555"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/117604fc572db1e8625946ffdcfbaf76c32cc1f4_661ae2c7-c4ca-4412-93e3-3454108d51ec.webp?v=1752650555","width":2000},{"alt":null,"id":25830101712995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4543fd346b44feccb040c09f7033ee4a9a20007_eccdfebd-6da6-4a9d-b7b6-c0ff6ce95cfa.webp?v=1752650555"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4543fd346b44feccb040c09f7033ee4a9a20007_eccdfebd-6da6-4a9d-b7b6-c0ff6ce95cfa.webp?v=1752650555","width":2000},{"alt":null,"id":25830101942371,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1968142af68cb61db7e4b910643798e0ca996d5_a73153de-1110-45d7-ae40-3eeb1d85d71c.webp?v=1752650556"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1968142af68cb61db7e4b910643798e0ca996d5_a73153de-1110-45d7-ae40-3eeb1d85d71c.webp?v=1752650556","width":2000},{"alt":null,"id":25830102204515,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1f0588a89b42380b6434904f9fa5fc791d20a4_ba91c7ae-aabf-45f2-a0c9-00c8b584bb54.webp?v=1752650557"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1f0588a89b42380b6434904f9fa5fc791d20a4_ba91c7ae-aabf-45f2-a0c9-00c8b584bb54.webp?v=1752650557","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43304272461923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0122824-XF51","requires_shipping":true,"taxable":true,"featured_image":{"id":34197786296419,"product_id":7769858867299,"position":10,"created_at":"2025-07-16T15:22:34+08:00","updated_at":"2025-07-16T15:22:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4543fd346b44feccb040c09f7033ee4a9a20007_eccdfebd-6da6-4a9d-b7b6-c0ff6ce95cfa.webp?v=1752650555","variant_ids":[43304272461923]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Cat Dive - 跳水貓咪 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-XF51","featured_media":{"alt":null,"id":25830101712995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4543fd346b44feccb040c09f7033ee4a9a20007_eccdfebd-6da6-4a9d-b7b6-c0ff6ce95cfa.webp?v=1752650555"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43304277213283,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0122804-XF51","requires_shipping":true,"taxable":true,"featured_image":{"id":34197781872739,"product_id":7769858867299,"position":4,"created_at":"2025-07-16T15:22:30+08:00","updated_at":"2025-07-16T15:22:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220cee5ae4b4e3ffbcb92b02e7dfed30a3f0f3a6_440788f4-d339-44ef-8bf1-282d0add387b.webp?v=1752650552","variant_ids":[43304277213283]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Cat Dive - 跳水貓咪 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122804-XF51","featured_media":{"alt":null,"id":25830099157091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220cee5ae4b4e3ffbcb92b02e7dfed30a3f0f3a6_440788f4-d339-44ef-8bf1-282d0add387b.webp?v=1752650552"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43304277377123,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01228J5-XF51","requires_shipping":true,"taxable":true,"featured_image":{"id":34197781119075,"product_id":7769858867299,"position":3,"created_at":"2025-07-16T15:22:29+08:00","updated_at":"2025-07-16T15:22:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4daa6ea8797211824f9ec323d52168c3742caa_bbc9d007-1ae3-4f8d-b3e0-739784dbeb6e.webp?v=1752650551","variant_ids":[43304277377123]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Cat Dive - 跳水貓咪 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01228J5-XF51","featured_media":{"alt":null,"id":25830098796643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea4daa6ea8797211824f9ec323d52168c3742caa_bbc9d007-1ae3-4f8d-b3e0-739784dbeb6e.webp?v=1752650551"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43304272461923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0122824-XF51","requires_shipping":true,"taxable":true,"featured_image":{"id":34197786296419,"product_id":7769858867299,"position":10,"created_at":"2025-07-16T15:22:34+08:00","updated_at":"2025-07-16T15:22:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4543fd346b44feccb040c09f7033ee4a9a20007_eccdfebd-6da6-4a9d-b7b6-c0ff6ce95cfa.webp?v=1752650555","variant_ids":[43304272461923]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Cat Dive - 跳水貓咪 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-XF51","featured_media":{"alt":null,"id":25830101712995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4543fd346b44feccb040c09f7033ee4a9a20007_eccdfebd-6da6-4a9d-b7b6-c0ff6ce95cfa.webp?v=1752650555"}},"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: "停產" }