Skip Navigation

[Resolved] Cant change quantity on product page

This support ticket is created 3 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 3 voices.

Last updated by Christian Cox 3 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#2134195

I am trying to: Figure out why the plus and minus icons are not effecting change on the product pages. they do nothing. There is also 'up' and 'down' arrows though which do work.

Link to a page where the issue can be seen: hidden link

To view the site use PW: grouperWILD2021

I expected to see:
The product quantity change
Instead, I got: nothing

#2134563

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

mIFOTqA3PD.gif

Hi there

I just tested this locally and the Add to Cart button appears to be working correctly (see gif).

I can't check on the page you linked to because the password is incorrect.

I'm not sure where the plus/minus icons you describe come from, I don't think they are added by Toolset.

Can you test disabling all non-Toolset plugins and switching theme to twentytwentyone and checking a product page again?

Are they still added? If not, you should be able to determine what adds them, and with that we can try to reproduce and look into it further.

#2135843

This code should work: grouperWILD2022

We’ve got two types of products, one of which uses the toolset content template. That’s the one with the issue:
hidden link

Our regular products do not have the issue. Example:
hidden link

Thus it must be a toolset issue...

#2136861
Screen Shot 2021-08-08 at 8.35.54 AM.png

Hello, I have been debugging this issue and I have determined that the reason the plus and minus buttons are not working in the Toolset template version is that some CSS classes are applied to the number input field incorrectly when Toolset types is open. If you are familiar with the browser inspector tools you can see that the CSS classes applied to the quantity input field are listed as "input-text*qty*text" in the Toolset version, but in the non-Toolset version they are correctly listed as "input-text qty text" (screenshot attached here). For some reason I'm not fully aware of, Toolset is placing asterisks between these CSS classnames instead of spaces. The plus and minus buttons are added by Kadence, after a bit of digging I was able to find the setting responsible for showing these buttons in Appearance > Customizer > WooCommerce > Single Product Layout > General tab > "Use Custom Quantity Plus and Minus". I activated this option and was able to see the plus/minus buttons in my local test site as well as the same problem you experienced where the buttons do not adjust the product quantity and also seem to be cause some styling issues.

A fix you can try now, without needing to wait for changes in our software:
- Edit the Toolset Content Template and select the Add to Cart block. In the sidebar, toggle open the Block Output panel and choose the option "WooCommerce Native Output". In my local site this restores the plus/minus button functionality, but it also impacts the button styles. I can't say for sure how it will impact the styles on your site, but we can try to add CSS fixes if necessary after the change. Let me know if you need a hand with that. I'll let you know as I receive more information about the CSS classnames being concatenated incorrectly. For now, it seems the workaround is necessary.

#2138919

Our developers have issued a patch for this problem, so the workaround should not be necessary. You can download the patch here:
hidden link

To apply the patch, unzip the package and upload the file it contains to replace the one with the same name, located in the path:

/wp-content/plugins/woocommerce-views/library/toolset/woocommerce-views/templates/global/quantity-input.php

This should solve the problem where CSS classnames are concatenated incorrectly in the Toolset Add to Cart block output. Please install the patch and let me know if the problem is not resolved.