Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #989894

    Hi! I have been setting up variable products with avia layout builder. However, i assigned stock to the variations and the quantity button was not respecting this stock. As example, i had a variation with 7 stock and another with 9 stock. Product quantity allowed to select 30 or 40, but when “add to cart” button was pressed, it just reloaded the page without adding anything to cart and also not showing any alerts or error messages (this due that as far as i know, layout builder override the default woocommerce functions).

    My solution was search in the kriesi forums and i found a thread that solved the problem almost completely:
    https://kriesi.at/support/topic/problem-with-the-add-to-cart-item-counter-in-woocommerce-for-variable-products/

    But the problem is that in my variable products it only let to add to cart the amount of stock from the variation that has less stock. Example, if i have 10 stock in a variation and 2 stock in another, it will only add 2 regardless of the selected variation. I have left credentials on the private section if you need to take a look

    Any help will be appreciated. Thanks so much in advance and keep the good job!

    #990113

    Hey Javi,

    Thank you for using Enfold.

    I would like to access the site but then encountered an error. Are you working on the site?
    Please let us know once the site is up so that we can check it.
    A link to the actual product with the issue will help.

    Best regards,
    Ismael

    #990297

    Sorry, i had activated an IP geo block plugin.

    You shall be able to login now, sorry for the inconvenience.

    • This reply was modified 5 years, 10 months ago by cohetete.
    #990298

    I also discovered yesterday that this error happens when a variation has stock of more than 10 products, if that’s helpful.

    #991355

    Hi,

    Thanks for the update. We adjusted the code a bit. It is working properly now.

    Original line:

    if($(this).is('.plus') && qtyNum < max) {
    

    Modified line:

    if($(this).is('.plus') && qtyNum != max) {
    

    Best regards,
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.