$product = {"id":7769951207523,"title":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Meowing Glory - 貓咪藤蔓","handle":"iphone-13-mini-mod-nx-magsafe-printable-xf50","description":null,"published_at":"2025-04-16T13:18:11+08:00","created_at":"2025-04-15T22:29:20+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":43304755200099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0122824-XF50","requires_shipping":true,"taxable":true,"featured_image":{"id":34197814411363,"product_id":7769951207523,"position":8,"created_at":"2025-07-16T15:22:59+08:00","updated_at":"2025-07-16T15:23:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f585efee7d76eea7d9e824bdf54a6bfd68a1a5_04ca4a5d-4b19-42fd-a4de-b89dbb390444.webp?v=1752650580","variant_ids":[43304755200099]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Meowing Glory - 貓咪藤蔓 - 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-XF50","featured_media":{"alt":null,"id":25830116589667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f585efee7d76eea7d9e824bdf54a6bfd68a1a5_04ca4a5d-4b19-42fd-a4de-b89dbb390444.webp?v=1752650580"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43304760901731,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0122804-XF50","requires_shipping":true,"taxable":true,"featured_image":{"id":34197815263331,"product_id":7769951207523,"position":9,"created_at":"2025-07-16T15:22:59+08:00","updated_at":"2025-07-16T15:23:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/588f12355c7fe7b3bab21a285b68a2914a19eae9_d1915b7f-fbdc-4eb1-9834-e91b37411681.webp?v=1752650581","variant_ids":[43304760901731]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Meowing Glory - 貓咪藤蔓 - 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-XF50","featured_media":{"alt":null,"id":25830117015651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/588f12355c7fe7b3bab21a285b68a2914a19eae9_d1915b7f-fbdc-4eb1-9834-e91b37411681.webp?v=1752650581"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43304761065571,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01228J5-XF50","requires_shipping":true,"taxable":true,"featured_image":{"id":34197817819235,"product_id":7769951207523,"position":12,"created_at":"2025-07-16T15:23:01+08:00","updated_at":"2025-07-16T15:23:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf06f505db75c7cdb68bd3a1eddde81993a57c_289f416b-6d17-463f-8b28-9f33d20ff1ab.webp?v=1752650583","variant_ids":[43304761065571]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Meowing Glory - 貓咪藤蔓 - 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-XF50","featured_media":{"alt":null,"id":25830118228067,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf06f505db75c7cdb68bd3a1eddde81993a57c_289f416b-6d17-463f-8b28-9f33d20ff1ab.webp?v=1752650583"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bc8993ab180e5a85109b75fde8cf5a61c3d00f9_b366d48e-fe86-448a-a8ce-07e65f2f409d.webp?v=1744727367","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cc864deac48f031ab2a6bd38e1b3c5f9642db87_422f881c-d062-4f28-906d-ca0964707c9e.webp?v=1752650577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c439637bed63959c1ec7078795c46c97a48bff42_c2c67eb2-6b2f-41cb-8081-ebb8b10e58eb.webp?v=1752650577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7c0867c46836d3c13d14afd08b19ee76c925de6_65784a4b-2481-4640-b48f-b0861489fccd.webp?v=1752650577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8ce13cfff50050252d95b576cf16d2b711d0d62_5e1b65d6-f747-459e-b765-2e8b646f4ca7.webp?v=1752650578","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d859bf2759b68beb1f45e9c1d6308684f43fa556_0ba7daaa-ab5c-4dff-a28c-62470af7b0f0.webp?v=1752650579","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43567e6c61a67a5e38757d13f7cafa2c718d2f09_1805865d-d3a3-4698-9111-bb7accc914de.webp?v=1752650579","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f585efee7d76eea7d9e824bdf54a6bfd68a1a5_04ca4a5d-4b19-42fd-a4de-b89dbb390444.webp?v=1752650580","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/588f12355c7fe7b3bab21a285b68a2914a19eae9_d1915b7f-fbdc-4eb1-9834-e91b37411681.webp?v=1752650581","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c03831630577f000e993e41df48dc6a323de7c4_c855ce28-8e76-4a6b-ac6a-a13376d3076b.webp?v=1752650582","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfc3c454ccdb29001d52743113a8e3961fa488a5_32f151be-b2f2-4057-8434-dab2f6b67193.webp?v=1752650582","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf06f505db75c7cdb68bd3a1eddde81993a57c_289f416b-6d17-463f-8b28-9f33d20ff1ab.webp?v=1752650583"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bc8993ab180e5a85109b75fde8cf5a61c3d00f9_b366d48e-fe86-448a-a8ce-07e65f2f409d.webp?v=1744727367","options":["color"],"media":[{"alt":null,"id":25496582291555,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bc8993ab180e5a85109b75fde8cf5a61c3d00f9_b366d48e-fe86-448a-a8ce-07e65f2f409d.webp?v=1744727367"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bc8993ab180e5a85109b75fde8cf5a61c3d00f9_b366d48e-fe86-448a-a8ce-07e65f2f409d.webp?v=1744727367","width":2000},{"alt":null,"id":25830114394211,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cc864deac48f031ab2a6bd38e1b3c5f9642db87_422f881c-d062-4f28-906d-ca0964707c9e.webp?v=1752650577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cc864deac48f031ab2a6bd38e1b3c5f9642db87_422f881c-d062-4f28-906d-ca0964707c9e.webp?v=1752650577","width":2000},{"alt":null,"id":25830114623587,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c439637bed63959c1ec7078795c46c97a48bff42_c2c67eb2-6b2f-41cb-8081-ebb8b10e58eb.webp?v=1752650577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c439637bed63959c1ec7078795c46c97a48bff42_c2c67eb2-6b2f-41cb-8081-ebb8b10e58eb.webp?v=1752650577","width":2000},{"alt":null,"id":25830114852963,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7c0867c46836d3c13d14afd08b19ee76c925de6_65784a4b-2481-4640-b48f-b0861489fccd.webp?v=1752650577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7c0867c46836d3c13d14afd08b19ee76c925de6_65784a4b-2481-4640-b48f-b0861489fccd.webp?v=1752650577","width":2000},{"alt":null,"id":25830115246179,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8ce13cfff50050252d95b576cf16d2b711d0d62_5e1b65d6-f747-459e-b765-2e8b646f4ca7.webp?v=1752650578"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8ce13cfff50050252d95b576cf16d2b711d0d62_5e1b65d6-f747-459e-b765-2e8b646f4ca7.webp?v=1752650578","width":2000},{"alt":null,"id":25830115836003,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d859bf2759b68beb1f45e9c1d6308684f43fa556_0ba7daaa-ab5c-4dff-a28c-62470af7b0f0.webp?v=1752650579"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d859bf2759b68beb1f45e9c1d6308684f43fa556_0ba7daaa-ab5c-4dff-a28c-62470af7b0f0.webp?v=1752650579","width":2000},{"alt":null,"id":25830116163683,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43567e6c61a67a5e38757d13f7cafa2c718d2f09_1805865d-d3a3-4698-9111-bb7accc914de.webp?v=1752650579"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43567e6c61a67a5e38757d13f7cafa2c718d2f09_1805865d-d3a3-4698-9111-bb7accc914de.webp?v=1752650579","width":2000},{"alt":null,"id":25830116589667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f585efee7d76eea7d9e824bdf54a6bfd68a1a5_04ca4a5d-4b19-42fd-a4de-b89dbb390444.webp?v=1752650580"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f585efee7d76eea7d9e824bdf54a6bfd68a1a5_04ca4a5d-4b19-42fd-a4de-b89dbb390444.webp?v=1752650580","width":2000},{"alt":null,"id":25830117015651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/588f12355c7fe7b3bab21a285b68a2914a19eae9_d1915b7f-fbdc-4eb1-9834-e91b37411681.webp?v=1752650581"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/588f12355c7fe7b3bab21a285b68a2914a19eae9_d1915b7f-fbdc-4eb1-9834-e91b37411681.webp?v=1752650581","width":2000},{"alt":null,"id":25830117474403,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c03831630577f000e993e41df48dc6a323de7c4_c855ce28-8e76-4a6b-ac6a-a13376d3076b.webp?v=1752650582"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c03831630577f000e993e41df48dc6a323de7c4_c855ce28-8e76-4a6b-ac6a-a13376d3076b.webp?v=1752650582","width":2000},{"alt":null,"id":25830117834851,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfc3c454ccdb29001d52743113a8e3961fa488a5_32f151be-b2f2-4057-8434-dab2f6b67193.webp?v=1752650582"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfc3c454ccdb29001d52743113a8e3961fa488a5_32f151be-b2f2-4057-8434-dab2f6b67193.webp?v=1752650582","width":2000},{"alt":null,"id":25830118228067,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf06f505db75c7cdb68bd3a1eddde81993a57c_289f416b-6d17-463f-8b28-9f33d20ff1ab.webp?v=1752650583"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf06f505db75c7cdb68bd3a1eddde81993a57c_289f416b-6d17-463f-8b28-9f33d20ff1ab.webp?v=1752650583","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43304755200099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0122824-XF50","requires_shipping":true,"taxable":true,"featured_image":{"id":34197814411363,"product_id":7769951207523,"position":8,"created_at":"2025-07-16T15:22:59+08:00","updated_at":"2025-07-16T15:23:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f585efee7d76eea7d9e824bdf54a6bfd68a1a5_04ca4a5d-4b19-42fd-a4de-b89dbb390444.webp?v=1752650580","variant_ids":[43304755200099]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Meowing Glory - 貓咪藤蔓 - 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-XF50","featured_media":{"alt":null,"id":25830116589667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f585efee7d76eea7d9e824bdf54a6bfd68a1a5_04ca4a5d-4b19-42fd-a4de-b89dbb390444.webp?v=1752650580"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43304760901731,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0122804-XF50","requires_shipping":true,"taxable":true,"featured_image":{"id":34197815263331,"product_id":7769951207523,"position":9,"created_at":"2025-07-16T15:22:59+08:00","updated_at":"2025-07-16T15:23:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/588f12355c7fe7b3bab21a285b68a2914a19eae9_d1915b7f-fbdc-4eb1-9834-e91b37411681.webp?v=1752650581","variant_ids":[43304760901731]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Meowing Glory - 貓咪藤蔓 - 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-XF50","featured_media":{"alt":null,"id":25830117015651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/588f12355c7fe7b3bab21a285b68a2914a19eae9_d1915b7f-fbdc-4eb1-9834-e91b37411681.webp?v=1752650581"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43304761065571,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01228J5-XF50","requires_shipping":true,"taxable":true,"featured_image":{"id":34197817819235,"product_id":7769951207523,"position":12,"created_at":"2025-07-16T15:23:01+08:00","updated_at":"2025-07-16T15:23:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf06f505db75c7cdb68bd3a1eddde81993a57c_289f416b-6d17-463f-8b28-9f33d20ff1ab.webp?v=1752650583","variant_ids":[43304761065571]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Meowing Glory - 貓咪藤蔓 - 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-XF50","featured_media":{"alt":null,"id":25830118228067,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cf06f505db75c7cdb68bd3a1eddde81993a57c_289f416b-6d17-463f-8b28-9f33d20ff1ab.webp?v=1752650583"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43304755200099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0122824-XF50","requires_shipping":true,"taxable":true,"featured_image":{"id":34197814411363,"product_id":7769951207523,"position":8,"created_at":"2025-07-16T15:22:59+08:00","updated_at":"2025-07-16T15:23:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f585efee7d76eea7d9e824bdf54a6bfd68a1a5_04ca4a5d-4b19-42fd-a4de-b89dbb390444.webp?v=1752650580","variant_ids":[43304755200099]},"available":true,"name":"iPhone 13 mini Mod NX (MagSafe 兼容) ilovedoodle Meowing Glory - 貓咪藤蔓 - 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-XF50","featured_media":{"alt":null,"id":25830116589667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f585efee7d76eea7d9e824bdf54a6bfd68a1a5_04ca4a5d-4b19-42fd-a4de-b89dbb390444.webp?v=1752650580"}},"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: "停產" }