وردپرس

Automatic deactivation of “+” button when quantity limit is reached


Hello,

I manage a WooCommerce store and I’m using the WPC Product Bundles and WPC Product Quantity plugins. My goal is to limit the number of items in several bundles (for example, 3 items in some bundles and different maximum quantities in others) while ensuring a smooth user experience.

Currently, when the maximum quantity for a bundle is reached, an error message appears, but the “+” button remains active, allowing the customer to continue clicking on it. I would like to achieve the following behavior:

  • When the maximum allowed quantity is reached in a bundle, the “+” button is automatically disabled (or hidden/grayed out), preventing the user from adding more items.

The aim is to apply this behavior to multiple bundles with different quantity limits, not just a single bundle.

Could you please let me know if this is possible through existing settings, or if I would need to customize the code (e.g., via JavaScript) to achieve this? If a solution already exists within your plugins, I would appreciate guidance on how to implement it.

Thank you for your assistance.

Best regards,

این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید

مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد

منبع: انجمن وردپرس

دکمه بازگشت به بالا