• Resolved longnguyenfrombayy

    (@longnguyenfrombayy)


    Hello,

    I am creating a marketplace website that allows many vendors to sell bookable services.

    The problem with bookable services is that you should only reduce the available stocks when the order is confirmed, not when the order is still pending (still on cart). Because, for some vendors only have 1 2 or 3 slots for their bookable services, if someone put all of them to the cart (without serious intention to purchase), then, WooCommerce will automatically reduce available stocks, and make serious customers unable to book it.

    So right now, when I put the order to my cart (not confirmed yet), WooCommerce system still automatically reduces the stocks, and it will be a trouble for us. May you advise the way to disable this function?

    Many thanks in advance,
    Long.

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thomas Shellberg

    (@shellbeezy)

    Automattic Happiness Engineer

    Hey Long,

    Are you using WooCommerce Bookings for these products? If so, take a look at the settings you can adjust for this, here:

    https://docs.woocommerce.com/document/bookings-faq/#section-24

    Thread Starter longnguyenfrombayy

    (@longnguyenfrombayy)

    Hello Thomas,

    Thanks for your timely reply.

    Yes, I currently use WooCommerce Booking.

    Actually, I am aware of this setting. However, I still prefer to disable stock reduction functionality since some hosts only have 1 or 2 available slots for their bookable services. And, if a lot of guests just put those slots in cart repeatly, then, this bookable service is always out of stock (while it is not confirmed and paid yet).

    Actually, my business is quite different, so, I prefer to disable this function to make it simple. If you can help with a code to disable this function, I would be very grateful.

    Thanks & best regards,
    Long.

    melinda a11n

    (@melindahelt)

    Automattic Happiness Engineer

    Hi there!

    I would suggest using a very low hold-stock time, of say 5 minutes. That would be enough for someone to enter in their credit card information. Removing that completely would require custom development, and honestly, may make for some frustrated users who think a slot is available and find that it is not by the time they complete the checkout process.

    Thread Starter longnguyenfrombayy

    (@longnguyenfrombayy)

    Hello,

    Actually, right now, I m using a customized filter for users to filter # of persons available for each listing.

    In this case, when a user input 4 persons to # of persons filter, then the filter will display all listings with maximum 4 slots left. However, let’s say another user put 1 slot in cart, without proceeding further. Then, WooCommerce counts the listing only has 3 slots left, while my filter still counts it 4 slots left because my filter doesn’t have a logic to count the slot that is put in cart.

    Right now, I have a freelance developer to help me with this. And, we have an issue that we can’t find the location where the value data of items that is put in cart. To create a logic, we need to find where the value of item saved in cart is stored.

    If you can give a brief instruction about where to find this value, I would be very thankful for that.

    Then, I will combine this logic, with a very low hold-stock time (5mins) to complete our system. We believe it would be the best for our website.

    Hope to have your support in this case.

    Thanks & best regards,
    Long.

    Jesse Pearson (a11n)

    (@jessepearson)

    Automattic Happiness Engineer

    @longnguyenfrombayy The value you are looking for is not able to be referenced easily. Cart sessions are stored in wp_woocommerce_sessions in a mass of serialized data. Depending on how busy your site is the entries in this table could be in the thousands. To comb through that data constantly would be an issue.

    It may be easier to create a custom function that’s tied to the add to cart actions that sets a value in the meta data for the product. This would also need to be updated once the transaction was complete or if the item was removed from cart.

    Either way, it is a pretty custom solution.

    Thread Starter longnguyenfrombayy

    (@longnguyenfrombayy)

    Hello,

    It may be easier to create a custom function that’s tied to the add to cart actions that sets a value in the meta data for the product. This would also need to be updated once the transaction was complete or if the item was removed from cart.

    -> Actually, we are facing difficulty when implementing this. May you give us a more detailed instruction?

    In the worst scenario, can you give us the instruction to disable the functionality of stock reduce when booking order is put in cart?

    Hope to have your support in this case.

    Thanks & best regards,
    Long.

    Thomas Shellberg

    (@shellbeezy)

    Automattic Happiness Engineer

    @longnguyenfrombayy – Something to consider:

    Just as easily as a “non-serious” shopper could add a booking to the cart and leave it there, by disabling the Bookings in-cart stock hold function, you run the risk of overbooking your products, particularly if the booking only has 1 or 2 slots available. The former scenario is not only rarer than the latter scenario but the latter scenario requires a lot more apologizing and admin work to fix(you would have to refund the order, explain that it’s overbooked, etc).

    Jesse Pearson (a11n)

    (@jessepearson)

    Automattic Happiness Engineer

    @longnguyenfrombayy It is also possible to reduce the time In Cart bookings exist to just a few minutes, if you’d like. Please keep in mind that if you lower this to 5 minutes or lower, the item could be removed from the cart before the user checks out.
    https://docs.woocommerce.com/document/bookings-snippets/#section-4

    Jesse Pearson (a11n)

    (@jessepearson)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thread Starter longnguyenfrombayy

    (@longnguyenfrombayy)

    hello,

    We are trying to follow your instructions, but it doesn’t work.

    Can you please tell me the way to disable this function. Im totally aware of any disadvantages when disabling this function, and I accept it. Please, help me.

    Thanks & best regards,
    Long.

    Jesse Pearson (a11n)

    (@jessepearson)

    Automattic Happiness Engineer

    @longnguyenfrombayy Since Bookings is a premium plugin, you also get premium support. Please submit a ticket through your account at https://WooCommerce.com .

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Disable stock reduce function for pending order’ is closed to new replies.