1 reply [Last post]
labguy's picture
Offline
Joined: 01/22/2009
Juice: 48

Hello,

I'm running Drupal 5.15 with UC 5.x-1.7.

Does anyone have suggestions on how to decrement stock when a customer "enters" the checkout page? There isn't a workflow condition for this (just for when they are done with checkout). Perhaps there is a hook or event I can use when the user clicks the "checkout" button? Thoughts?

Background (if you're interested):
My current shop uses the "decrement when checkout complete" which works just find for normal sales. However, we are going to start doing some "Free product promotions" where we don't want to oversell since it can be expensive. The current stock management (UC + multi stock options) only prevents purchasing before adding to cart and when attempting to checkout. Once a customer enters checkout, they get to purchase (even if there is only 1 left and 15 people in checkout at that time). So, my solution is to tie up stock once they go into checkout. I can easily write some code to cleanup abandoned checkouts and re-stock as needed.

Thank you for the help.

Jeff

Inventing new and unique products for people, robots (if they ask nicely), and a few plants.

Laboratory 424
Experiments in Progress
www.laboratory424.com

labguy's picture
Offline
Joined: 01/22/2009
Juice: 48
Re: Decrement stock when entering checkout?

Ok, I thought this workflow would get the job done, but it doesn't. Any ideas why:

Invoke on event: Order status gets updated

Condition: Check the order status is "in checkout"

Action: Decrement stock & send an arbitrary email.

I go from the cart, to checkout, fill out info, hit the review page...nothing. huh?

Jeff

Inventing new and unique products for people, robots (if they ask nicely), and a few plants.

Laboratory 424
Experiments in Progress
www.laboratory424.com