6. E – Commerce Website PHP Tutorial – Store Inventory Continued



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 6th video we will continue creating the Inventory management functionality in the Admin area. Editing existing products and deleting things made easy. 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

34 thoughts on “6. E – Commerce Website PHP Tutorial – Store Inventory Continued”

  1. I noticed that whenever I edited my product, it wouldn't update correctly when the page went back to inventory_list.php. If this happens to you, make sure you double check your SQL UPDATE statement. For me, I accidentally had an extra comma before the "WHERE" statement. It should be "UPDATE products SET product_name='$product_name', price='$price', details='$details',

    category='$category', subcategory='$subcategory' WHERE id='$pid'".

  2. could smeone help me…..i cant seem to edit the details….after i clicked edit, the form loads to the proper item for editing and i make changes to the item example the cost and its product name….but after i click the "make changes" button, the form loads back to inventory_list. php BUT it does not show the updated values….

  3. hi adam, i learning from your tutorial

    i got a question : whats this code mean ?
    if (isset($_POST['product_name']))
    iam aware that $_post catches your action from the form

    but why product_name ?

    thanks !

  4. hey dude , don't you think that there is a little problem with the IF-CONDITION that you used in the end …
    $sql = mysql_query("UPDATE products SET product_name='$product_name', price='$price', details='$details',category='$category', subcategory='$subcategory' WHERE id='$pid'");

    if ($_FILES['fileField']['tmp_name'] !=""  ) {
       // Place image in the folder
       $newname = "$pid.jpg";
    move_uploaded_file( $_FILES['fileField']['tmp_name'], "../inventory_images/$newname");        
        }

    because it is not doing the job as you said or as we are expecting …. because database is already updated before you check that IS ADMIN USER SELECT THE PRODUCT IMAGE OR NOT.. ?? so there is no use of if condition because if user forgot to chose the product image then database will be updated but image will not ……
     

  5. i have another error, how u delete $product_list, then in Inventory List can`t show nothing because it take this error: Undefined variable: product_list in /home/u289170539/public_html/storeadmin/inventory_edit.php on line 86, because u remove $product_list variable.. how i can solve it? lot of thx

  6. Adam…  I can't thank you enough for these tutorials!  I've gone through the social network series and half way through these almost…  and I feel like I've learned more than I ever did after 2 years of college programming.

  7. I love what you have done here! Thank you so so much for teaching me!
    The strangest part is while you have been talking about how many days left till Christmas during these videos, I realized that I have been following along day by day… 3 YEARS LATER!

  8. generous with malice , he updates stuff off the camera to make his tutorial seem flawless:) then in order to catch the full code you need to wait until he accidentaly scrolls through the entire page to get the full code

  9. Hi I have a small question, I am getting the form values all correctly from database but when i output product_name in to form it is cutting the word after a space like if it is 'Black Pant' i am only able to see "Black" and pant is cut down could you help me

Leave a Reply

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