• Resolved jesse1991

    (@jesse1991)


    Need help,

    In Hjem page, scroll down, you’ll see Amerikansk Pizza, the quantity buttons works along with the – and plus, but if you click on the other categroies under Amerikansk Pizza, it will only show number 1 without (-,+).

    Also when you click the quantity plus then press on velg, it will go to the product but the quantity doesn’t reflect, and get an error.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author RLDD

    (@rermis)

    Hi Jesse,
    Thank you for your question. I can confirm the buttons are loaded correctly for products that render on initial page load. The buttons won’t load for new products after page load, or if the page content changes. For instance, when the menu selection is clicked to load different categories, new products are rendered but the buttons are only intended to render on page load.
    You can try calling this function in javascript when categories are changed…
    <script type='text/javascript>wqb_init_cart();</script>

    Let me know if this helps.

    Thread Starter jesse1991

    (@jesse1991)

    I believe this is something to do with the content, because the script is already loaded, and when clicking on the other tab for category, the minus and plus is not showing up

    Thread Starter jesse1991

    (@jesse1991)

    Oh Thank you.

    Do you know where this script can be placed?

    Is it in the functions.php or it is okay in the code snippet? Tried in code snippet but getting an error.

    Plugin Author RLDD

    (@rermis)

    Thinking about this, the best solution is probably to integrate this call into the menu click event so that anytime the category is changed, the buttons will load with the new products. If this is not possible, you might have to call this in the footer, something similar to this…

    
    <script type='text/javascript'>
     setTimeout(function(){if (typeof wqb_init_cart === "function")wqb_init_cart();},3000);
    </script>
    
    Thread Starter jesse1991

    (@jesse1991)

    Hi Rhett,

    Thank you so much for the follow up. I’m not well versed on javascript yet, but can you please help me fixing this up please? I can’t figure out a way how to call and what to write in the condition.

    Thank you so much in advance.

    Plugin Author RLDD

    (@rermis)

    Ok, this is weird, but it looks like there is a plugin by the same name ‘Quantity Buttons for WooCommerce’ in the woocommerce.com site at https://woocommerce.com/document/quantity-increment-buttons-plus-minus/ made by FmeAddons. Despite the name, this plugin is not associated with this plugin ‘Quantity Buttons for WooCommerce’ in the WordPress plugin directory.

    Based on what I can tell, I think your site is using the plugin from WooCommerce. I would reach out to them for assistance. Hope this helps!

    Thread Starter jesse1991

    (@jesse1991)

    Can we try it out? I have the plug-in installed and activated, the one you’re seeing is just an extra script I placed in the functions.php which was disabled.

    Plugin Author RLDD

    (@rermis)

    Yes we could try. Currently when the page loads, the assets for the plugin aren’t there, so it could be overwritten by the other quantity button plugin. Could you try deactivating the plugin made by FmeAddons? I will check back in a bit.

    Thread Starter jesse1991

    (@jesse1991)

    I can’t find any plugins made by Fme activated.

    But if you can log in to the site here’s the admin access
    admin
    admin!@

    Plugin Author RLDD

    (@rermis)

    Hi Jesse,
    Ok, I was wrong, it looks like the site is using `Quantity Field on Shop Page for WooCommerce’ By Wooassist. It is another quantity buttons plugin. You are welcome to deactivate that plugin and try out this one temporarily. Perhaps I can tie the events to the menu for you.

    Thread Starter jesse1991

    (@jesse1991)

    Done, I activated the other plugin: Quantity Buttons for WooCommerce

    Plugin Author RLDD

    (@rermis)

    Ok, it looks like both quantity button plugins have the same issue, which is they are loading the buttons on page load, not when products load by ajax.

    The simplest fix is to not load products by ajax when other product categories are selected from the menu – just reload the page when new category is selected.

    The best fix is to create an event handler for all the products that load by ajax, so the buttons load with them. It’s not impossible, but might take some time, because both quantity plugins weren’t designed to load via ajax.

    I will consider supporting ajax on a future release of my plugin. Please don’t forget to change your pw!

    Thread Starter jesse1991

    (@jesse1991)

    Okay, seems that I have to use a different approach for this, since im using Apus Products category tabs. Will check out some other functionality that is not using Ajax.

    Would you think, this will work? https://woocommerce.com/document/quantity-increment-buttons-plus-minus/ If I try and use this?

    Thank you so much for checking it out. Please let me know when will be your next release.

    Plugin Author RLDD

    (@rermis)

    Actually, the quantity buttons plugin that is active (Quantity Field on Shop Page for WooCommerce) now should work perfectly as long as the category tabs do not use ajax.

    Thread Starter jesse1991

    (@jesse1991)

    Should I disable the ajax on this site? I think there’s no other function uses Ajax aside from that.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Quantity Field on Shop Page for WooCommerce’ is closed to new replies.