webguy262 Posted February 21, 2010 Share Posted February 21, 2010 I'd like to use osC to allow users to schedule and pay for blocks of time (hour increments) at a sports facility. Any suggestions? Link to comment Share on other sites More sharing options...
MrPhil Posted February 21, 2010 Share Posted February 21, 2010 With some code modifications, I suppose it could be done, but osC was really designed to handle discrete physical products that just sit in inventory until sold. You would have to come up with some way of automatically "creating" products (a fixed block of time at the facility, say, for a month in advance). It would be dropped into the shopping cart and purchased like any physical product. After its time has passed, unsold inventory must be removed from the product database so no one will go and buy it. Creating the time-block "products" could be done with a daily cron job to update the product database (add another day's worth of products). Each hour you might run another cron job to go through the product inventory and destroy anything whose time has passed without being sold. Each product would have an inventory of "1" and cannot be backordered. So, it could be done, but it would require some coding (such as separate utilities) to create and destroy products on a schedule. That might be done without changing osC itself, but with separate PHP scripts to add and delete products from the database. They would have to be aware of your schedule, holidays and other special events, and unavailability due to various reasons (maintenance, parties, etc.). If you sell in 1-hour blocks, and someone wants 3 contiguous hours, they would have to buy the appropriate 3 blocks. They may not find out until checkout that someone else has grabbed one of those hours and just purchased it. I don't see any easy way to sell in bigger chunks. Another problem to consider is abandoned shopping carts, if they tie up your products and keep others from purchasing the time block. You may have to change osC code to be very aggressive in reclaiming carts that have been out too long. Anyway, something to consider. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.