简体   繁体   中英

How to fix broken woocommerce quantity buttons

I have a Wordpress site with a custom theme and Woocommerce installed. The problem I am having is that buttons to increase the quantity (+/-) are not working. When a quantity button is clicked, it doesn't change the quantity value and the button jumps to the left. I assume it must be a problem between the theme and Woocommerce as Woocommerce works flawlessly elsewhere.

Does anybody know how to fix the woocommerce quantity buttons so that they increase/decrease the quantity field.

In case anyone was interested, it turned out that some styling from the theme was applying the css: left:1px; when the quantity buttons has the pseudo-class :active. So when a quantity button was clicked, the button was being moved to the left without the onclick event firing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM