houssam_ballout Posted April 27, 2011 Share Posted April 27, 2011 Hello, I need help creating dynamic order (for invoice) in php. Its like an invoice, where the header is entered once, but the products, quantity are entered more than one time in the same page, so for example, if the user select a product and click add, it will displayed on a row & a new row become active. Also, the table called order, how should I manage it? As it may had multiple products per it? Any help is much appreciated Thanks Quote Link to comment https://forums.phpfreaks.com/topic/234911-dynamic-order-like-invoice/ Share on other sites More sharing options...
btherl Posted April 27, 2011 Share Posted April 27, 2011 Do you have much experience with php and MySQL? What's the most complicated task you've done with them? The reason I ask is that what you are asking is a very general question, and I don't want to give an unhelpful answer. Quote Link to comment https://forums.phpfreaks.com/topic/234911-dynamic-order-like-invoice/#findComment-1207263 Share on other sites More sharing options...
houssam_ballout Posted April 28, 2011 Author Share Posted April 28, 2011 Well, Its a page to add an invoice holding multiple products per it. I had created the products table & the vendor table. I need help creating the order table & how to build up the php table so that it can dynamically insert additional rows. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/234911-dynamic-order-like-invoice/#findComment-1207413 Share on other sites More sharing options...
btherl Posted April 28, 2011 Share Posted April 28, 2011 Can you show us what you have so far? I would expect you to have an order table with an order id (primary key), and an "order_products" table with an order id, product id and item count, and perhaps additional information like actual price charged (which may be different if there's a discount, for example). Quote Link to comment https://forums.phpfreaks.com/topic/234911-dynamic-order-like-invoice/#findComment-1207935 Share on other sites More sharing options...
houssam_ballout Posted April 28, 2011 Author Share Posted April 28, 2011 Well, I need help in this: I am willing to add multiple products, so an additional row will be created once the above had been completed, and those rows will not being inserted into the database without finally I press save. Help me ? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/234911-dynamic-order-like-invoice/#findComment-1207938 Share on other sites More sharing options...
btherl Posted April 28, 2011 Share Posted April 28, 2011 What kind of help do you want? If you want someone to write code for you, you can ask in the freelancing forum. What you are describing sounds good to me. You can add an additional row each time a new product is added to the order. Quote Link to comment https://forums.phpfreaks.com/topic/234911-dynamic-order-like-invoice/#findComment-1207948 Share on other sites More sharing options...
houssam_ballout Posted April 29, 2011 Author Share Posted April 29, 2011 should I create a temporary table that held temporary products before that are being saved to the main table. Quote Link to comment https://forums.phpfreaks.com/topic/234911-dynamic-order-like-invoice/#findComment-1208033 Share on other sites More sharing options...
Muddy_Funster Posted April 29, 2011 Share Posted April 29, 2011 I have found it much easier to create a new table per invoice/order with a master index table for lookup. Also - not trying to be nasty, but you're clearly not ready for this yet. Put it on the top shelf for now and work on learning rather than doing. Quote Link to comment https://forums.phpfreaks.com/topic/234911-dynamic-order-like-invoice/#findComment-1208057 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.