$product = {"id":7189405565027,"title":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Batman - 小丑拳擊學院","handle":"iphone-13-mini-solidsuit-classic-magsafe-sb07","description":null,"published_at":"2024-02-27T15:13:20+08:00","created_at":"2024-02-23T17:58:30+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit MagSafe專區-Batman","tags":["20%","20240304-reseller-\u003ereplace_to-","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 13 mini","merge","reseller-solidsuit-magsafe-batman","Top50","type-Solidsuit MagSafe"],"price":125000,"price_min":125000,"price_max":125000,"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":41312202358883,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":30976873136227,"product_id":7189405565027,"position":15,"created_at":"2024-02-26T12:15:29+08:00","updated_at":"2024-02-26T12:15:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2dece48324a755d1596c43e7b0bbc557a8b0462_9ab70ca2-e70f-4b10-8868-95eb2ac4b35f.webp?v=1708920929","variant_ids":[41312202358883]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Batman - 小丑拳擊學院 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-SB07","featured_media":{"alt":null,"id":23353286131811,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2dece48324a755d1596c43e7b0bbc557a8b0462_9ab70ca2-e70f-4b10-8868-95eb2ac4b35f.webp?v=1708920929"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41312202621027,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":30976872317027,"product_id":7189405565027,"position":14,"created_at":"2024-02-26T12:15:26+08:00","updated_at":"2024-02-26T12:15:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8c4691ccedb9e4107a9ada8a485f897e4e23020_e2d1bf6b-90ad-4307-8384-4131b6f297a2.webp?v=1708920926","variant_ids":[41312202621027]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Batman - 小丑拳擊學院 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-SB07","featured_media":{"alt":null,"id":23353285312611,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8c4691ccedb9e4107a9ada8a485f897e4e23020_e2d1bf6b-90ad-4307-8384-4131b6f297a2.webp?v=1708920926"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1664796988f27aff1e7181469b189c275f03a5cb_c114711d-aeb3-41db-bbaf-e52a383ce005.webp?v=1708920892","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9163074448b51f2415596f16d9882d2fad282ccf_b0953a34-5cfa-477b-924e-ff3b3b907030.webp?v=1708920896","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f78f63fe26b33c284c78bcd81abdc1ef4191f8c6_77e54e39-87b7-4e7d-b34e-8e590a1b6c46.webp?v=1708920899","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ad688cd0f491e469f33b05a59ab203c521454ec_d922823c-45eb-4f9a-83de-0eb795d9c4f1.webp?v=1708920901","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c534efa99d0772df9c40f66053f99ed0bacc3fd6_42a5d01f-6c7b-4f3c-962c-14fdc55d3b65.webp?v=1708920904","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e34675e4a9c36bf3d07da62fe26ba9643a8fda_97e48e7b-3ef1-4967-a03f-ccedee0a84d3.webp?v=1708920906","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/118b18ef12426e1fb9db1cd2cf36e096a2eb05b4_20010554-11cb-4786-9e6b-43b0842fd182.webp?v=1708920909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7f6631d2e0815ddb434deab2dbca2ee72b38c4_e1d3c075-e74b-4b09-a41e-a0ea261a73bd.webp?v=1708920912","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fafed8fea5ce8a9e0f6a41d7276ebf53e4616a7_9537d2cd-fee0-430a-99f6-12b40a0be1fe.webp?v=1708920914","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0cf9a7e4590af886ccf291b6a547ba6fd13bf5f_c0de787f-b9ee-4360-918f-d80231a404ef.webp?v=1708920917","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/644765c80daf8db6b8779b9f75b3af71ed364c5a_df2f4483-e3d5-4e79-9bdd-6c1a2bbfc7b9.webp?v=1708920919","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5214a005903d84632ad83d7047679569f887e7_f82d9bbd-506c-44db-8c6f-0b47e24ff3e3.webp?v=1708920921","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e5dcd3d1a3a4fab55e15915e22669294a4fbae0_3f51a79e-b2cd-42f7-9221-0a81e562d50e.webp?v=1708920924","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8c4691ccedb9e4107a9ada8a485f897e4e23020_e2d1bf6b-90ad-4307-8384-4131b6f297a2.webp?v=1708920926","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2dece48324a755d1596c43e7b0bbc557a8b0462_9ab70ca2-e70f-4b10-8868-95eb2ac4b35f.webp?v=1708920929"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1664796988f27aff1e7181469b189c275f03a5cb_c114711d-aeb3-41db-bbaf-e52a383ce005.webp?v=1708920892","options":["color"],"media":[{"alt":null,"id":23353271418979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1664796988f27aff1e7181469b189c275f03a5cb_c114711d-aeb3-41db-bbaf-e52a383ce005.webp?v=1708920892"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1664796988f27aff1e7181469b189c275f03a5cb_c114711d-aeb3-41db-bbaf-e52a383ce005.webp?v=1708920892","width":2000},{"alt":null,"id":23353274433635,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9163074448b51f2415596f16d9882d2fad282ccf_b0953a34-5cfa-477b-924e-ff3b3b907030.webp?v=1708920896"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9163074448b51f2415596f16d9882d2fad282ccf_b0953a34-5cfa-477b-924e-ff3b3b907030.webp?v=1708920896","width":2000},{"alt":null,"id":23353275416675,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f78f63fe26b33c284c78bcd81abdc1ef4191f8c6_77e54e39-87b7-4e7d-b34e-8e590a1b6c46.webp?v=1708920899"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f78f63fe26b33c284c78bcd81abdc1ef4191f8c6_77e54e39-87b7-4e7d-b34e-8e590a1b6c46.webp?v=1708920899","width":2000},{"alt":null,"id":23353276334179,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ad688cd0f491e469f33b05a59ab203c521454ec_d922823c-45eb-4f9a-83de-0eb795d9c4f1.webp?v=1708920901"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ad688cd0f491e469f33b05a59ab203c521454ec_d922823c-45eb-4f9a-83de-0eb795d9c4f1.webp?v=1708920901","width":2000},{"alt":null,"id":23353277317219,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c534efa99d0772df9c40f66053f99ed0bacc3fd6_42a5d01f-6c7b-4f3c-962c-14fdc55d3b65.webp?v=1708920904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c534efa99d0772df9c40f66053f99ed0bacc3fd6_42a5d01f-6c7b-4f3c-962c-14fdc55d3b65.webp?v=1708920904","width":2000},{"alt":null,"id":23353278234723,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e34675e4a9c36bf3d07da62fe26ba9643a8fda_97e48e7b-3ef1-4967-a03f-ccedee0a84d3.webp?v=1708920906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e34675e4a9c36bf3d07da62fe26ba9643a8fda_97e48e7b-3ef1-4967-a03f-ccedee0a84d3.webp?v=1708920906","width":2000},{"alt":null,"id":23353279316067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/118b18ef12426e1fb9db1cd2cf36e096a2eb05b4_20010554-11cb-4786-9e6b-43b0842fd182.webp?v=1708920909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/118b18ef12426e1fb9db1cd2cf36e096a2eb05b4_20010554-11cb-4786-9e6b-43b0842fd182.webp?v=1708920909","width":2000},{"alt":null,"id":23353280397411,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7f6631d2e0815ddb434deab2dbca2ee72b38c4_e1d3c075-e74b-4b09-a41e-a0ea261a73bd.webp?v=1708920912"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7f6631d2e0815ddb434deab2dbca2ee72b38c4_e1d3c075-e74b-4b09-a41e-a0ea261a73bd.webp?v=1708920912","width":2000},{"alt":null,"id":23353281216611,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fafed8fea5ce8a9e0f6a41d7276ebf53e4616a7_9537d2cd-fee0-430a-99f6-12b40a0be1fe.webp?v=1708920914"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fafed8fea5ce8a9e0f6a41d7276ebf53e4616a7_9537d2cd-fee0-430a-99f6-12b40a0be1fe.webp?v=1708920914","width":2000},{"alt":null,"id":23353282068579,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0cf9a7e4590af886ccf291b6a547ba6fd13bf5f_c0de787f-b9ee-4360-918f-d80231a404ef.webp?v=1708920917"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0cf9a7e4590af886ccf291b6a547ba6fd13bf5f_c0de787f-b9ee-4360-918f-d80231a404ef.webp?v=1708920917","width":2000},{"alt":null,"id":23353282986083,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/644765c80daf8db6b8779b9f75b3af71ed364c5a_df2f4483-e3d5-4e79-9bdd-6c1a2bbfc7b9.webp?v=1708920919"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/644765c80daf8db6b8779b9f75b3af71ed364c5a_df2f4483-e3d5-4e79-9bdd-6c1a2bbfc7b9.webp?v=1708920919","width":2000},{"alt":null,"id":23353283772515,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5214a005903d84632ad83d7047679569f887e7_f82d9bbd-506c-44db-8c6f-0b47e24ff3e3.webp?v=1708920921"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5214a005903d84632ad83d7047679569f887e7_f82d9bbd-506c-44db-8c6f-0b47e24ff3e3.webp?v=1708920921","width":2000},{"alt":null,"id":23353284460643,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e5dcd3d1a3a4fab55e15915e22669294a4fbae0_3f51a79e-b2cd-42f7-9221-0a81e562d50e.webp?v=1708920924"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e5dcd3d1a3a4fab55e15915e22669294a4fbae0_3f51a79e-b2cd-42f7-9221-0a81e562d50e.webp?v=1708920924","width":2000},{"alt":null,"id":23353285312611,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8c4691ccedb9e4107a9ada8a485f897e4e23020_e2d1bf6b-90ad-4307-8384-4131b6f297a2.webp?v=1708920926"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8c4691ccedb9e4107a9ada8a485f897e4e23020_e2d1bf6b-90ad-4307-8384-4131b6f297a2.webp?v=1708920926","width":2000},{"alt":null,"id":23353286131811,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2dece48324a755d1596c43e7b0bbc557a8b0462_9ab70ca2-e70f-4b10-8868-95eb2ac4b35f.webp?v=1708920929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2dece48324a755d1596c43e7b0bbc557a8b0462_9ab70ca2-e70f-4b10-8868-95eb2ac4b35f.webp?v=1708920929","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41312202358883,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":30976873136227,"product_id":7189405565027,"position":15,"created_at":"2024-02-26T12:15:29+08:00","updated_at":"2024-02-26T12:15:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2dece48324a755d1596c43e7b0bbc557a8b0462_9ab70ca2-e70f-4b10-8868-95eb2ac4b35f.webp?v=1708920929","variant_ids":[41312202358883]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Batman - 小丑拳擊學院 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-SB07","featured_media":{"alt":null,"id":23353286131811,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2dece48324a755d1596c43e7b0bbc557a8b0462_9ab70ca2-e70f-4b10-8868-95eb2ac4b35f.webp?v=1708920929"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41312202621027,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":30976872317027,"product_id":7189405565027,"position":14,"created_at":"2024-02-26T12:15:26+08:00","updated_at":"2024-02-26T12:15:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8c4691ccedb9e4107a9ada8a485f897e4e23020_e2d1bf6b-90ad-4307-8384-4131b6f297a2.webp?v=1708920926","variant_ids":[41312202621027]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Batman - 小丑拳擊學院 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-SB07","featured_media":{"alt":null,"id":23353285312611,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8c4691ccedb9e4107a9ada8a485f897e4e23020_e2d1bf6b-90ad-4307-8384-4131b6f297a2.webp?v=1708920926"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41312202358883,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":30976873136227,"product_id":7189405565027,"position":15,"created_at":"2024-02-26T12:15:29+08:00","updated_at":"2024-02-26T12:15:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2dece48324a755d1596c43e7b0bbc557a8b0462_9ab70ca2-e70f-4b10-8868-95eb2ac4b35f.webp?v=1708920929","variant_ids":[41312202358883]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 Batman - 小丑拳擊學院 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-SB07","featured_media":{"alt":null,"id":23353286131811,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2dece48324a755d1596c43e7b0bbc557a8b0462_9ab70ca2-e70f-4b10-8868-95eb2ac4b35f.webp?v=1708920929"}},"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: "停產" }