Having an event disappear once purchased

Posts: 50
Joined: 06/03/2008

I've been happly using the uc_events module - thanks to New Zeal - to create paid events (workshops, trainings, etc)

Now we'd like to allow people to sign up and pay for private sessions online. I'm going to create an event type and set up a filter so people can view a calendar that only shows available time slots for these. For this to work, I imagine that once a time slot (set up as a paid event) is purchased, it will need to disappear from the calendar.

Is there a way in CCK to have it delete an event/product once it is purchased? Or another way to achieve this result so the calendar only shows available time slots?

Thanks!
Jugney

Posts: 83
Joined: 03/31/2008

Might be an idea to check the stock part of Ubercart.
An event has a stock of one, after purchased, it's sold out.

Good luck!

Posts: 50
Joined: 06/03/2008

I had the same initial thought, but it appears that out of the box, uc_stock will only send an email notifying that the stock is low/empty, and not do anything else.

Does anyone know how to make it delete the product once the stock is low? I will continue researching, but as I'm a newbie it is hard to do things that aren't in the Administration UI (or perhaps that I haven't yet found in the UI!)

EDIT: I have been searching through and have found contributed modules that allow an item not to be purchased (The "Add to Cart" button becomes "Out of stock" and greyed out), but I still need to be able to have the event-product be deleted when purchased (or at least not published).

It seems creating a workflow configuration is the way to do this, but when trying to create this now workflow, there is no Action of "Delete" or "Unpublish" product. If only there was, I could do this!!! Is there any way to create a workflow for unpublishing a product?

Posts: 155
Joined: 08/07/2007
AdministratorNot Kulvik

I believe you can use workflow ng to set the product node to unpublished after checkout. This will not delete it, but it will make it so regular users can't see it.
Peace,
Andy

Posts: 50
Joined: 06/03/2008

This would be greatly helpful. Could you be more specific though? As I said, I went into the workflow-ng interface for creating a new process for doing this, and I didn't see "Unpublish" as one of the Actions I could set the new configuration to apply when the conditions are met.

Jugney

Posts: 50
Joined: 06/03/2008

Just wanted to let people know I did find a module called Alternative Price - this adds the option to set a product as "unique" - in other words, there is only one of that product and it unpublishes after its first purchase. This is close to doing what we need, except for the fact that we actually need Event nodes to unpublish, not Product nodes. I'm seeing if I can tweak the module now.