Results 1 to 5 of 5
  1. #1

    Default Quick Updates 2.0*

    Just wanted to pop in and say how much I love this contribution. It has saved me years of time, especially when a manufacturer issues a price change and I need to update 100's of products. Thanks so much to Paul Mathot for his fab contribution! Works like a charm :o)

    Amy

  2. #2
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Quick Updates 2.0*



    Thanks for the nice words Amy And I love that contribution too

    I must say though that that I am certainly not the only one that worked on quick updates. At least 2 other zenners have contributed to it. Portali converted it to Zen and also Andrews (a_berezin) work on it has been *very* usefull. And I think about 10-20 osC members worked on it earlier (although doubt if there is much osC code left in recent versions).

    The developement of quick updates by so many people is a great example of the possibilities of open source software and the GPL licence.

    For the fun I looked up the first version of quick updates. This was the whole (stand alone) script:
    Code:
    <?php
    ### --- quick_updates.php --- ###
    
    $dbhost = ""; // database host
    $dbuser = ""; // database username
    $dbpassword = ""; // database password
    $db2use = ""; // name of database
    
    // opening database conx.
    function dbconnect() {
        global $dbhost, $dbuser, $dbpassword, $db2use;
        $link = @mysql_connect($dbhost,$dbuser,$dbpassword) or die("Connection failed: Please try later.");
        @mysql_select_db($db2use,$link) or die("Connection to database refused: Please try later.");
        return $link;
    }
    ?>
    <?php
    if ($action == "updateprices") {
        dbconnect();
        foreach($HTTP_POST_VARS['product_new_price'] as $id => $new_price) {
            mysql_query("UPDATE products SET products_price=$new_price WHERE products_id=$id");
        }
        echo "Your price list has been updated.";
        exit;
    }
    ?>
    <html>
    <head>
    <title>Update</title>
    <style type="text/css">
    <!--
    h4 {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small; text-align: center}
    p {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small}
    th {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small}
    td {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small}
    -->
    </style>
    <head>
    <body>
    <form name="update" method="post" action="<?php echo "$PHP_SELF?action=updateprices"; ?>">
    <table width="550" border="1" cellspacing="1" bordercolor="gray">
    <tr>
    <td colspan="3">
    <h4>Update</h4>
    </td>
    </tr>
    <?
    dbconnect();
        echo "<tr><th>Product ID</th><th>Product Name</th><th>Product Price</th></tr><tr>";
        $result = mysql_query("SELECT * FROM products, products_description WHERE products.products_id = products_description.products_id ORDER BY products.products_id");
        if ($row = mysql_fetch_array($result)) {
            do {
                echo "<td>".$row["products_id"]."</td>\n";
                echo "<td>".$row["products_name"]."</td>\n";
                echo "<td align=\"center\"><input type=\"text\" name=\"product_new_price[".$row['products_id']."]\" value={$row['products_price']}></td>\n";
                echo "</tr>\n";
            }
            while($row = mysql_fetch_array($result));
        }
        echo "</table>\n";
    ?>
    <br>
    <input type="submit" value="Update Prices">
    </form>
    </body>
    </html>
    Simple, but very fast and effective!

  3. #3

    Default Re: Quick Updates 2.0*

    Well, thanks to all 3 of you! I think it should be incorporated into a zen release, but that's just my humble opinion.

  4. #4
    Join Date
    Sep 2006
    Posts
    13
    Plugin Contributions
    0

    Default Re: Quick Updates 2.0*

    Yes this is a great mod.... one of the best yet. PM sent to you Paul.

  5. #5

    Default Re: Quick Updates 2.0*

    Paul, I have a question for you. I have uploaded about 245 new products via .csv file from the manufacturer. But the images in the file are all wrong and I have had to do major revamping of my input data since Easy Populate boogered up many of my products with wrong prices, weights, etc. I have corrected all of those with your fabulous mod (THANK YOU!) but I shudder at the idea of trying to redo all those products through Easy Populate again just to have the same corrections to be made all over again.

    OH PLEASE, is there a way through Quick Updates to alter the images for each product or am I going to have to go into each product individually to update the photos?

    Amy

 

 

Similar Threads

  1. MSRP to Quick Updates?
    By MSGOK in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 9 May 2009, 03:48 PM
  2. Quick Updates
    By jayson.gurney in forum All Other Contributions/Addons
    Replies: 49
    Last Post: 1 Mar 2008, 11:08 AM
  3. Quick Updates
    By tuckerm in forum Customization from the Admin
    Replies: 11
    Last Post: 16 Dec 2006, 11:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR