4. E – Commerce Website Tutorial – PHP MySQL Inventory Management



Series: http://www.developphp.com/video/PHP#eCommerce-Website-Tutorial
Source Download: http://www.developphp.com/video/PHP/PayPal-IPN-PHP-Instant-Payment-Notification-Script
In this 4th video we will create the Inventory management page in the Admin area. List all inventory and make a form and parser for adding new inventory items. The E – Commerce Web Site we will be assembling is one in which all of the inventory is in a MySQL database and we offer a custom PHP cart for a unique shopping experience. It is a site that handles sales, customers, and inventory.

source

38 thoughts on “4. E – Commerce Website Tutorial – PHP MySQL Inventory Management”

  1. Ok I figured the last problem out, but now I am having a problem with the data uploading to the database I think it might be my coedeing though can anyone help, also if anyone gets stuck in the last problem let me know

  2. 22:57 I really need that tutorial, anyone knows where I can find it as I cant find it on the website neither here on Youtube.

    Thanks I will develop a free website for anyone who finds it 🙂

  3. Hi, First of all, THANK YOU FOR EVERYTHING!!!

    I just hope you are still paying attention to us mortals, I have seen your tutorials again and again while working on a personal project.. and I'm stuck.. I keep getting this mess for some reason:

    "
    Notice: Undefined index: price in …./inventory_list.php on line 56

    Notice: Undefined index: details in …./inventory_list.php on line 59

    Warning: Cannot modify header information – headers already sent by (output started at …./inventory_list.php:56) in …./inventory_list.php on line 74    "

    this shows above the menu on top of my website right after I submit a new item, at one point I tried to put the original code as you left it… still no luck..

  4. Is anyone having or had an issue with the images not uploading to the inventory images folder? It was working for me at first but once I moved all my files to another computer and re created the database and tables. In the the table the id has been assigned but the image does not show on the site. Any help would be greatly appreciated.

  5. THE RIGHT FORM OF THIS :
    $product_list="$date_added – $id – $product_name &nbsp;&nbsp;&nbsp; <a href='#'>edit</a> &bull; <a href='#'>delete</a><br/>";
    IS THIS:
    $product_list="$product_list $date_added – $id – $product_name &nbsp;&nbsp;&nbsp; <a href='#'>edit</a> &bull; <a href='#'>delete</a><br/>";
    IF YOU DON'T DO THAT YOU WOULD HAVE ONLY THE LAST PRODUCT IN THE PRODUCTS LIST.

  6. does anyone know why images do not upload to the "inventory_images" folder on the server? the database product information inserts just fine to the database!!

  7. Hi Adam, A caption says on this video that the image and product details uploaded ok. However I've found that all the details upload ok except for the image. The image does not upload, even on your untouched code. Is there anything I can do to get it working? Thank you

  8. hi, am getting this error while adding a new product, can anyone assist please:
    the error:-Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:xampphtdocsMyOnlineStorestoreadmininventory_list.php on line 62
    Unknown column 'product_name' in 'field list'

  9. hello adam, can you help me? what if iwant to view record from multiple table, i try this but the output repeat itself like this.

    $sql = mysql_query("SELECT * FROM tbl_product, product_category, product_subcategory ORDER BY date_added DESC");
    $productCount = mysql_num_rows($sql); // count the output amount
    if ($productCount > 0) {

        while($row = mysql_fetch_array($sql)){
                 $id = $row["product_id"];
                 $product_name = $row["product_name"];
                 $product_category = $row["product_category"];
                 $unit_price = $row["unit_price"];
                 $quantity = $row["quantity"];
                 $product_subcategory = $row["product_subcategory"];
                 $size = $row["size"];
                 $color = $row["color"];
                 $date_added = strftime("%b %d, %Y", strtotime($row["date_added"]));
    $inventory_list .= "Product ID: $id — product_name: $product_name — product category: $product_category — product subcategory: $product_subcategory — size: $size — color: $color — unit price: $unit_price — quantity: $quantity — <a href='inventory_edit.php?pid=$id'>edit</a> — <a href='inventory_list.php?deleteid=$id'>delete</a><br />";

    when i echo it,the output will bhe like this products record view couple of time, how can i fix this? can you please help me.

    Product ID: 9 — product_name: black shoes — product category: asd — product subcategory: formal shoe — size: 5 — color: red — unit price: 12.00 — quantity: 32 — edit — delete
    Product ID: 9 — product_name: black shoes — product category: asd — product subcategory: asd2 — size: 12332 — color: asdas — unit price: 12.00 — quantity: 32 — edit — delete
    Product ID: 10 — product_name: red shoe — product category: asd — product subcategory: formal shoe — size: 5 — color: red — unit price: 343.00 — quantity: 5345 — edit — delete
    Product ID: 10 — product_name: red shoe — product category: asd — product subcategory: asd2 — size: 12332 — color: asdas — unit price: 343.00 — quantity: 5345 — edit — delete
    Product ID: 9 — product_name: black shoes — product category: men shoe — product subcategory: formal shoe — size: 5 — color: red — unit price: 12.00 — quantity: 32 — edit — delete
    Product ID: 9 — product_name: black shoes — product category: men shoe — product subcategory: asd2 — size: 12332 — color: asdas — unit price: 12.00 — quantity: 32 — edit — delete
    Product ID: 10 — product_name: red shoe — product category: men shoe — product subcategory: formal shoe — size: 5 — color: red — unit price: 343.00 — quantity: 5345 — edit — delete
    Product ID: 10 — product_name: red shoe — product category: men shoe — product subcategory: asd2 — size: 12332 — color: asdas — unit price: 343.00 — quantity: 5345 — edit — delete

  10. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 

    How do I deal with this ? 

  11. Wow! I am working on this video when suddenly 28:16 I notice my date is Dec 23, 2013! As I flipped from your video to my page, I had to do a double take since the dates were almost identical, just 3 years apart. lol

  12. Ey man i just wanne tell you thanks for you tutorial. I am currently busy developing an website for my own company and i didn't know how to get the id for each item. Thanks to you i now know!, thanks!

  13. Everything is working great for me except from the last part.When i add the following code, the links do not appear next to the product name.

    $product_list = "$id – $productName &nbsp;<a href='#'>edit</a>&nbsp;<a href='#'>delete</a><br/>";
     
    Embedding html within php can be a real pain!! 

  14. Hi sir, i am new in a company and my first work is an e commerce website development..i had completed your 20 tutorial videos and created my own website but it doesn't work properly..Can you please mail me the complete source code to my mail jasirec@gmail.com..thank you sir.

  15. I'm not sure why but I'm not getting any output. Also I'm not getting any error message. I even tried changing a variable to see if I'd get an error message. Sometimes I do and on others nothing. Any ideas?

  16. Hi I am looking for a lil twist on this data entry form as shown by Mr. Khoury. Is it possible to have the same form for entering the data and then using it also for editing some entry. Can someone show me how it could be done. Thanks

  17. dude this block is giving me a blank page , you are ommiting something ;

    $product_list="";
    $sql = mysql_query("SELECT * FROM products ORDER BY date_added DESC");
    $productCount = mysql_num_rows($sql);//Count the output amount

    blah blah….

Leave a Reply

Your email address will not be published. Required fields are marked *