• I have a site that has samples. A sample is related with a product, when I click in add to cart, the site add the sample to the cart. I want a max of 3 units per cart, but when I add in a page that is not product, it allows to add more than 3.

    In the cart page is working good.

    When I click add to cart and the cart allready has 3 elements, it open the product page. Is any way to prevent this? Only show the error message and stay on the same page?

    thanks

    • This topic was modified 2 weeks, 6 days ago by letone.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Taha Amin

    (@tahaamin)

    Hi @letone,

    Good morning, and thanks for reaching out! I hope you’re doing well. Apologies for the delayed response to your inquiry.

    I’m not entirely sure I fully understand the issue you’re facing, and I’d like to replicate it on my end to guide you through the resolution process. However, I’m a bit confused by your description, could you clarify what you mean by:

    “But when I add it to a page that is not a product?it allows to add more than 3, and in the cart page, it is working fine.”

    To help us resolve this more efficiently, could you provide some screenshots or a recorded video demonstrating the issue? That would greatly speed up the troubleshooting process.

    Additionally, could you let me know:

    • What option you are using for the limit? (e.g., per category or another setting)
    • Have you tried enabling “Validate on Add to Cart” in the General tab?
    • Have you tested the options “Hide ‘Add to Cart’ button on Shop Page” and “Hide ‘Add to Cart’ button on Product Page”? These options allow you to display a customizable message to your customers instead of the button.

    Please let me know if I’ve understood your issue correctly, and I’ll be happy to assist further!

    Thread Starter letone

    (@letone)

    Hello, thanks for the reply.

    The “problem” is that I’m adding products to the cart in a page that list several products but is not the shop page…this is a custom theme, can you help?

    I recorded my screen:

    https://www.dropbox.com/scl/fi/c10zb4gadfaya39l1c6u4/Screen-Recording-2025-03-10-at-09.42.14.mov?rlkey=deez75t1xbog2biegcdkm6bqv&st=z1m6409j&dl=0

    Plugin Support Taha Amin

    (@tahaamin)

    Hello letone,

    Thanks for sharing that. I can see the issue now. I am consulting the development team about this and will update you as soon as possible. Thanks for your patience.

    Best regards,

    Plugin Contributor Pablo Pacheco

    (@karzin)

    Hi @letone ,

    It seems that pressing the button adds the product to cart just like a regular Add to Cart button using AJAX.

    If that’s the case, please try to disable the WooCommerce option Products > General > Shop page > Add to cart behaviour > Enable AJAX add to cart buttons on archives.

    Let me know if it helps.

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