redbrad0 Posted January 21, 2007 Share Posted January 21, 2007 We currently have a system where users can purchase tickets to different events thru our website. I know that I am not doing things 100% correct so I am in the process of trying to come up with the best way to handle things. Current I have things very simple..Orders - This table holds all the orders informationOrders_Tickets - Each ticket that is purchased is logged into this table and then referenced to the Orders table.To try and be real brief so I do not take up much of your time the following things need to now be handled1. Refund A Ticket - Either refund 1 ticket (incase they purchased 4 and only need 5) but we always keep the service fee per each ticket2. Refund a entire order - Same as #1 where we will keep the service fee that was assigned to each ticket3. When a event is over, we have to pay the venue/promoter. Sometimes we make multiple payments at different dates to the venue/promoter which all payments should be stored in the database.4. Some venue/promoters only sell 5-10 tickets per a show, so we end up just paying them for a group of shows all at once.5. Gift Cards - Not really where we mail out cards, but someone can send another user say $50 that gets applied to their account for Christmas or a Birthday. This user can then use the $50 to purchase tickets on our site, but if they do not spend the entire $50 on a event, it should take out for example a $15 order from the $50 which would make their balance $35 on the giftcard.There is more to all of this, but I think if someone can give me some pointers that I could finish everything up. Link to comment https://forums.phpfreaks.com/topic/35110-database-design-orders/ Share on other sites More sharing options...
christo16 Posted January 22, 2007 Share Posted January 22, 2007 Do you already have your two tables created? Link to comment https://forums.phpfreaks.com/topic/35110-database-design-orders/#findComment-166188 Share on other sites More sharing options...
redbrad0 Posted January 23, 2007 Author Share Posted January 23, 2007 Yes I have the two tables created, but I did not want to share the table names because I would rather someone give me their opinion if they were to write it from scratch so what I have done so far does not change their mind. Link to comment https://forums.phpfreaks.com/topic/35110-database-design-orders/#findComment-166816 Share on other sites More sharing options...
Jenk Posted January 23, 2007 Share Posted January 23, 2007 table "orders" for order id, customer/user id, date of ordering and perhaps a text field for comments (by the operator handling the order) and even a second comments field which is viewable by the user ('Pending', 'Dispatched' etc)table "order items" foreign key orders.order_id. product id, order id, quantity.would be suitable for my simplest of implementations. Link to comment https://forums.phpfreaks.com/topic/35110-database-design-orders/#findComment-167092 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.