• Resolved rawan2021

    (@rawan2021)


    Hi

    I found few woocommerce plugins that help to restrict a purchase of a product to one per customer, and another one to bulk remove sale on products, so far nothing is compatible with WP version 6.2.1

    any recommendation for a good plugin?

    Thanjs

    Rawan

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugins will gradually update themselves to become compatible to latest wordpress and woocommerce. However, you can do this using a simple code snippet –

    Create a hook into the woocommerce_add_to_cart_validation filter that checks if the cart contains more than one product. If there are multiple products in the cart, it displays an error message and prevents additional products from being added.

    Plugin Support Beauty of Code (woo-hc)

    (@beautyofcode)

    Hi @rawan2021 ,

    Thanks for reaching out!

    If I understand correctly, you would like to restrict a purchase of a product to one per customer, is that correct?

    If so, there is a built-in option within WooCommerce that can help you achieve this.

    You can navigate to the Product edit page for the product you would like to restrict to one per order and scroll down to the Product Data → Inventory tab. Next, ensure that the Sold individually option is checked, like so:

    On the other hand, if you would like more advanced product restrictions, you can have a look at one of the below extensions:

    WooCommerce.com offers a 30-day refund policy which you can take advantage of, allowing you to test the extension, and make sure that it is what you are looking for.

    Should you have any pre-sales related questions, kindly contact us directly at WooCommerce.com → My Account → Support. You will need to create an account if you do not have one already.

    Hope this helps!

    Thread Starter rawan2021

    (@rawan2021)

    Thank you guys ,

    I did check the?Sold individually?option in product edit page, how ever this prevented the customer from adding to the quantity in the quantity box in product page, but the customer was able to go to the cart and again to the product and add another one. So that checked option did not do the job ?? I tried the bulk edit product for woocommerce but didn’t figure out how to do bulk edit, it looks like a sheet where I have to go manually to edit each option ??

    Your guidance is much appreciated.
    thank you

    Hi @rawan2021

    I did check the?Sold individually?option in product edit page, how ever this prevented the customer from adding to the quantity in the quantity box in product page, but the customer was able to go to the cart and again to the product and add another one. So that checked option did not do the job

    This is qutie strange that you are still able to add quantities to a product that is ticked as Sold Individually on the cart page.

    I replicated the scenario on my personal site running on the default Storefront theme, however, I am unable to reproduce the issue on my end.

    This is what I’m seeing on my cart page for a product that can only be sold once. You cannot update the quantity as the field is hidden as you can see below:

    It looks like a third-party plugin or your theme might be causing the conflict here.

    For us to investigate this further, can you please try to switch to the default Storefront theme and only WooCommerce plugin is enabled and see if this works?

    I tried the bulk edit product for woocommerce but didn’t figure out how to do bulk edit, it looks like a sheet where I have to go manually to edit each option ??

    To better picture what you are referring to here, can you please share with us a clear screenshot of what you see on your end so that we could address you more effectively?

    If you don’t already have a screenshot service installed, you can try https://snipboard.io. You can share the direct link to the image as a response to this topic.

    Thread Starter rawan2021

    (@rawan2021)

    Hi

    so sorry for the delay , I am using my test website for this which is set to safe mode, will this work as woocommerce isn’t transferred to there?

    i switched to storefront woocommerce theme and unfortunately was still able to add two products in one order by adding one then going to the product page again to add another one.

    Did I need to leave all plugins related to woocommerce active and disable the others?

    thank you

    Hello,

    Yes, it is to help you find the cause of the issue, I’d suggest running a conflict test to see if that makes a difference: https://woocommerce.com/document/how-to-test-for-conflicts/

    If that does not help, please share a copy of your System Status Report, found under WooCommerce > Status, on your site.

    And please share a copy of the fatal error log found under WooCommerce > System Status > Logs. This will provide us more information to investigate.

    Cheers.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I need to strict purchasing a product to one per order’ is closed to new replies.