Thread: Quick Updates

Results 1 to 10 of 50

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    Salem, West Virginia
    Posts
    15
    Plugin Contributions
    0

    Default Re: Quick Updates

    While we're talking about Quick Updates here, I thought I might share how I fixed up the Quick Updates preview product and edit product link icons to work with the latest version of Zen Cart (they seem to be disabled by default in Quick Updates 1.3).

    First, make sure that "Display the link towards the products information page" and "Display the link towards the page where you will be able to edit the product" are set to True under Configuration > Quick Updates

    Then, in quick_updates.php, change your SQL query by going to the line that says "//// select categories" and replacing the code under it with this:

    PHP Code:
      if ($current_category_id == 0){
              if(
    $manufacturer){
                
    $products_query_raw "select p.products_id, p.products_type, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, pc.categories_id from  " TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION .  " pd, " TABLE_PRODUCTS_TO_CATEGORIES " pc where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and p.manufacturers_id = " $manufacturer $sort_by ";
              }else{
                    
    $products_query_raw "select p.products_id, p.products_type, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, pc.categories_id from  " TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION .  " pd, " TABLE_PRODUCTS_TO_CATEGORIES " pc where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id $sort_by ";
            }
      } else {
             if(
    $manufacturer){
                     
    $products_query_raw "select p.products_id, p.products_type, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, pc.categories_id from  " TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION .  " pd, " TABLE_PRODUCTS_TO_CATEGORIES " pc where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" $current_category_id "' and p.manufacturers_id = " $manufacturer $sort_by ";
              }else{
                    
    $products_query_raw "select p.products_id, p.products_type, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, pc.categories_id from  " TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION .  " pd, " TABLE_PRODUCTS_TO_CATEGORIES " pc where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" $current_category_id "' $sort_by ";
            }
      } 
    Finally, still in quick_updates.php, find the section of the document that starts with "//// links to preview or full edit" and replace the following two lines with this code:

    PHP Code:
    if(QUICKUPDATES_DISPLAY_PREVIEW == 'true')echo "<td class=\"smallText\" align=\"left\"><a href=\"".zen_href_link (FILENAME_PRODUCT'cPath='.$products['categories_id'].'&pID='.$products['products_id'].'&product_type='.$products['products_type'].'&action=new_product_preview&read=only&sort_by='.$sort_by.'&page='.$split_page.'&origin='.$origin)."\">"zen_image(DIR_WS_IMAGES 'icon_info.gif'TEXT_IMAGE_PREVIEW) ."</a></td>\n";
    if(
    QUICKUPDATES_DISPLAY_EDIT == 'true')echo "<td class=\"smallText\" align=\"left\"><a href=\"".zen_href_link (FILENAME_PRODUCT'cPath='.$products['categories_id'].'&pID='.$products['products_id'].'&product_type='.$products['products_type'].'&action=new_product')."\">"zen_image(DIR_WS_IMAGES 'icon_arrow_right.gif'TEXT_IMAGE_SWITCH_EDIT) ."</a></td>\n"
    If you are using Quick Updates with Register Globals turned off (see my earlier post), you'll also want to add this line of code near the top of the document (right under [FONT="Courier New"]require('includes/application_top.php');[/FONT]):
    PHP Code:
    $sort_by $_GET['sort_by']; 
    That's it! They seem to be working great now for me. Hope it's helpful to someone.

    Uncle Bob

  2. #2
    Join Date
    Jun 2006
    Posts
    39
    Plugin Contributions
    0

    Default Re: Quick Updates

    Hi uncle bob, thanks for your info it has been very helpful.

    However we really do need that search box. Take this example.

    You have a batch of invoices come in -> 20 products to be updated. You have assigned your own product code to the products, so what do you do on the current system.

    1) Find the manufacturer... Hmm, 300 of those, might take a while, rather large and cumbersome drop down! Then find the product, 500 of those... again, another slow process.

    or

    2) Type in the product code in the search -> Hey presto, your there.

    Is there anyway that we can pull the code from the search box on the front page, and simply change the form variables?

  3. #3
    kelvyn Guest

    Default Re: Quick Updates

    Yeah, I could really do with this also, and for the cross-sell module. Paging through 5,600 products ain't fun!

    I think Zen Cart was build from a "few products" point of view, and we're trying to push it too far with all this hi-tech stuff!

  4. #4
    Join Date
    Jun 2006
    Location
    Salem, West Virginia
    Posts
    15
    Plugin Contributions
    0

    Default Re: Quick Updates

    You're right about how useful something like that would be. Unfortunately, I don't think the front page search box is really going to be that helpful in setting up something like this. You could always try though.

    By the way, what were you referring to by "product code"? Were you talking about the product's ID number? It's model number? I was just wondering which value would need to be pulled from the database.

    Perhaps one day a client of mine will need that functionality and I'll be able to take the time to program it in. If so, I'll be sure to post the code for you.

  5. #5
    Join Date
    Jun 2006
    Posts
    39
    Plugin Contributions
    0

    Default Re: Quick Updates

    Hi,

    I renamed all the lang files for "model" to "product code", because model is really an unnecessary field...

    So I would need to pull that from the db.

 

 

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 2.0*
    By Doodlebuckets in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 6 Jun 2007, 01:32 PM
  3. Quick Updates
    By tuckerm in forum Customization from the Admin
    Replies: 11
    Last Post: 16 Dec 2006, 11:45 PM

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