$product = {"id":7414578544739,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列","handle":"iphone-13-mini-mod-nx-magsafe-printable-pc10","description":null,"published_at":"2024-06-11T17:52:14+08:00","created_at":"2024-05-05T14:31:47+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 13 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","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":41907489800291,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PC10","requires_shipping":true,"taxable":true,"featured_image":{"id":31485804413027,"product_id":7414578544739,"position":6,"created_at":"2024-05-05T14:32:01+08:00","updated_at":"2024-05-05T14:32:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7ab44f108eebf26c09c3a2a8e0c6ec853f4a7c0_4607aec0-bcc6-4f34-ba91-a5e50bf19bf0.webp?v=1714890721","variant_ids":[41907489800291]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-PC10","featured_media":{"alt":null,"id":23891136741475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7ab44f108eebf26c09c3a2a8e0c6ec853f4a7c0_4607aec0-bcc6-4f34-ba91-a5e50bf19bf0.webp?v=1714890721"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907489898595,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-PC10","requires_shipping":true,"taxable":true,"featured_image":{"id":31485803495523,"product_id":7414578544739,"position":5,"created_at":"2024-05-05T14:31:59+08:00","updated_at":"2024-05-05T14:31:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f0f85faf2fd56fb40250cf8341ebbcb128f1a5b_222973c6-622e-4b9c-9a63-839dc27f6c22.webp?v=1714890719","variant_ids":[41907489898595]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122804-PC10","featured_media":{"alt":null,"id":23891135955043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f0f85faf2fd56fb40250cf8341ebbcb128f1a5b_222973c6-622e-4b9c-9a63-839dc27f6c22.webp?v=1714890719"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907490259043,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-PC10","requires_shipping":true,"taxable":true,"featured_image":{"id":31485800579171,"product_id":7414578544739,"position":1,"created_at":"2024-05-05T14:31:49+08:00","updated_at":"2024-05-05T14:31:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ac7554642d3f2d982f4e9bbf8286d49d6c4d6_c17e0119-80dd-4992-b03a-3608807dbbdb.webp?v=1714890709","variant_ids":[41907490259043]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01228J5-PC10","featured_media":{"alt":null,"id":23891133268067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ac7554642d3f2d982f4e9bbf8286d49d6c4d6_c17e0119-80dd-4992-b03a-3608807dbbdb.webp?v=1714890709"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ac7554642d3f2d982f4e9bbf8286d49d6c4d6_c17e0119-80dd-4992-b03a-3608807dbbdb.webp?v=1714890709","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e6a61c8e2e37af4d8b79e7ac57fc360bac5e8ae_5f621148-ccac-4df9-b673-e5f0d31f34aa.webp?v=1714890712","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd20f6527471a398f5cbbef8244b0bfd221e674b_963d120a-b8cd-42ab-ae1a-cf93561e3856.webp?v=1714890714","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f60b29c95473c256ba6fe8363575e49d397077a_9dc8c17f-a57a-4dbd-8011-65210374defe.webp?v=1714890716","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f0f85faf2fd56fb40250cf8341ebbcb128f1a5b_222973c6-622e-4b9c-9a63-839dc27f6c22.webp?v=1714890719","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7ab44f108eebf26c09c3a2a8e0c6ec853f4a7c0_4607aec0-bcc6-4f34-ba91-a5e50bf19bf0.webp?v=1714890721","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a49553e679c93bf5ad8f3ead62a0a195454256fe_dd11cff7-2c0a-4490-a99a-6a2580920fdb.webp?v=1714890723","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b26262981123190478199bf9a8042cdd6e60c787_7a199783-32c1-4791-a5a5-750cc014843c.webp?v=1714890725","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebcb600c01a32ff0ab470dac22861193fb967b36_5c671ac0-ca14-4d49-b3a0-bc0033b9e985.webp?v=1714890727","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bc4cdad0bbf407abd098f6c7a07cb5c7e2f1e4f_40ce6042-6b4c-40ea-a62d-d2ac3739bdf5.webp?v=1714890730"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ac7554642d3f2d982f4e9bbf8286d49d6c4d6_c17e0119-80dd-4992-b03a-3608807dbbdb.webp?v=1714890709","options":["color"],"media":[{"alt":null,"id":23891133268067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ac7554642d3f2d982f4e9bbf8286d49d6c4d6_c17e0119-80dd-4992-b03a-3608807dbbdb.webp?v=1714890709"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ac7554642d3f2d982f4e9bbf8286d49d6c4d6_c17e0119-80dd-4992-b03a-3608807dbbdb.webp?v=1714890709","width":2000},{"alt":null,"id":23891134152803,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e6a61c8e2e37af4d8b79e7ac57fc360bac5e8ae_5f621148-ccac-4df9-b673-e5f0d31f34aa.webp?v=1714890712"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e6a61c8e2e37af4d8b79e7ac57fc360bac5e8ae_5f621148-ccac-4df9-b673-e5f0d31f34aa.webp?v=1714890712","width":2000},{"alt":null,"id":23891134808163,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd20f6527471a398f5cbbef8244b0bfd221e674b_963d120a-b8cd-42ab-ae1a-cf93561e3856.webp?v=1714890714"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd20f6527471a398f5cbbef8244b0bfd221e674b_963d120a-b8cd-42ab-ae1a-cf93561e3856.webp?v=1714890714","width":2000},{"alt":null,"id":23891135299683,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f60b29c95473c256ba6fe8363575e49d397077a_9dc8c17f-a57a-4dbd-8011-65210374defe.webp?v=1714890716"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f60b29c95473c256ba6fe8363575e49d397077a_9dc8c17f-a57a-4dbd-8011-65210374defe.webp?v=1714890716","width":2000},{"alt":null,"id":23891135955043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f0f85faf2fd56fb40250cf8341ebbcb128f1a5b_222973c6-622e-4b9c-9a63-839dc27f6c22.webp?v=1714890719"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f0f85faf2fd56fb40250cf8341ebbcb128f1a5b_222973c6-622e-4b9c-9a63-839dc27f6c22.webp?v=1714890719","width":2000},{"alt":null,"id":23891136741475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7ab44f108eebf26c09c3a2a8e0c6ec853f4a7c0_4607aec0-bcc6-4f34-ba91-a5e50bf19bf0.webp?v=1714890721"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7ab44f108eebf26c09c3a2a8e0c6ec853f4a7c0_4607aec0-bcc6-4f34-ba91-a5e50bf19bf0.webp?v=1714890721","width":2000},{"alt":null,"id":23891137462371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a49553e679c93bf5ad8f3ead62a0a195454256fe_dd11cff7-2c0a-4490-a99a-6a2580920fdb.webp?v=1714890723"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a49553e679c93bf5ad8f3ead62a0a195454256fe_dd11cff7-2c0a-4490-a99a-6a2580920fdb.webp?v=1714890723","width":2000},{"alt":null,"id":23891138314339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b26262981123190478199bf9a8042cdd6e60c787_7a199783-32c1-4791-a5a5-750cc014843c.webp?v=1714890725"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b26262981123190478199bf9a8042cdd6e60c787_7a199783-32c1-4791-a5a5-750cc014843c.webp?v=1714890725","width":2000},{"alt":null,"id":23891139133539,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebcb600c01a32ff0ab470dac22861193fb967b36_5c671ac0-ca14-4d49-b3a0-bc0033b9e985.webp?v=1714890727"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebcb600c01a32ff0ab470dac22861193fb967b36_5c671ac0-ca14-4d49-b3a0-bc0033b9e985.webp?v=1714890727","width":2000},{"alt":null,"id":23891139821667,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bc4cdad0bbf407abd098f6c7a07cb5c7e2f1e4f_40ce6042-6b4c-40ea-a62d-d2ac3739bdf5.webp?v=1714890730"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bc4cdad0bbf407abd098f6c7a07cb5c7e2f1e4f_40ce6042-6b4c-40ea-a62d-d2ac3739bdf5.webp?v=1714890730","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41907489800291,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PC10","requires_shipping":true,"taxable":true,"featured_image":{"id":31485804413027,"product_id":7414578544739,"position":6,"created_at":"2024-05-05T14:32:01+08:00","updated_at":"2024-05-05T14:32:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7ab44f108eebf26c09c3a2a8e0c6ec853f4a7c0_4607aec0-bcc6-4f34-ba91-a5e50bf19bf0.webp?v=1714890721","variant_ids":[41907489800291]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-PC10","featured_media":{"alt":null,"id":23891136741475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7ab44f108eebf26c09c3a2a8e0c6ec853f4a7c0_4607aec0-bcc6-4f34-ba91-a5e50bf19bf0.webp?v=1714890721"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907489898595,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0122804-PC10","requires_shipping":true,"taxable":true,"featured_image":{"id":31485803495523,"product_id":7414578544739,"position":5,"created_at":"2024-05-05T14:31:59+08:00","updated_at":"2024-05-05T14:31:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f0f85faf2fd56fb40250cf8341ebbcb128f1a5b_222973c6-622e-4b9c-9a63-839dc27f6c22.webp?v=1714890719","variant_ids":[41907489898595]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122804-PC10","featured_media":{"alt":null,"id":23891135955043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f0f85faf2fd56fb40250cf8341ebbcb128f1a5b_222973c6-622e-4b9c-9a63-839dc27f6c22.webp?v=1714890719"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41907490259043,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01228J5-PC10","requires_shipping":true,"taxable":true,"featured_image":{"id":31485800579171,"product_id":7414578544739,"position":1,"created_at":"2024-05-05T14:31:49+08:00","updated_at":"2024-05-05T14:31:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ac7554642d3f2d982f4e9bbf8286d49d6c4d6_c17e0119-80dd-4992-b03a-3608807dbbdb.webp?v=1714890709","variant_ids":[41907490259043]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01228J5-PC10","featured_media":{"alt":null,"id":23891133268067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ac7554642d3f2d982f4e9bbf8286d49d6c4d6_c17e0119-80dd-4992-b03a-3608807dbbdb.webp?v=1714890709"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41907489800291,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0122824-PC10","requires_shipping":true,"taxable":true,"featured_image":{"id":31485804413027,"product_id":7414578544739,"position":6,"created_at":"2024-05-05T14:32:01+08:00","updated_at":"2024-05-05T14:32:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7ab44f108eebf26c09c3a2a8e0c6ec853f4a7c0_4607aec0-bcc6-4f34-ba91-a5e50bf19bf0.webp?v=1714890721","variant_ids":[41907489800291]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 mini - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0122824-PC10","featured_media":{"alt":null,"id":23891136741475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7ab44f108eebf26c09c3a2a8e0c6ec853f4a7c0_4607aec0-bcc6-4f34-ba91-a5e50bf19bf0.webp?v=1714890721"}},"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: "停產" }