Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Default help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

    when I search:
    in admin > orders > Search by Product Name or ID:XX or Model


    I search for a 4317943:

    1054 Unknown column 'o.orders_id' in 'on clause'
    in:
    [select count(distinct o.orders_id) as total from (zen_orders o, zen_orders_status s left join zen_orders_products op on (op.orders_id = o.orders_id) ) left join zen_orders_total ot on (o.orders_id = ot.orders_id) where (o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total') and (op.products_model like '%4317943%' or op.products_name like '4317943%')]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    Last edited by keylesslocks; 5 Sep 2008 at 09:31 PM. Reason: change notification
    MonkFunk Music Community
    Free Music Website

  2. #2

    Default Re: help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

    did I post this in the right place? I do not mean to bump thread, just want to make sure that this is the right place to post as I need to fix this asasasasap.

    I assume, I have to do some kind of repair or optimize table....

    please help... I need to use this function
    MonkFunk Music Community
    Free Music Website

  3. #3

    Default Re: help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

    I tried PHP MYADMIN, selected all rows and clicked repair table and still same error

    1054 Unknown column 'o.orders_id' in 'on clause'
    in:
    [select count(distinct o.orders_id) as total from (zen_orders o, zen_orders_status s left join zen_orders_products op on (op.orders_id = o.orders_id) ) left join zen_orders_total ot on (o.orders_id = ot.orders_id) where (o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total') and (op.products_model like '%4317943%' or op.products_name like '4317943%')]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    MonkFunk Music Community
    Free Music Website

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

    What's the URL on the page where you're seeing that? (minus your domain name)
    What version of Zen Cart?
    What addons/contributions do you have installed?
    What version of MySQL?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5

    Default Re: help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

    thanks for your response!

    What's the URL on the page where you're seeing that?
    .../admin/orders.php?search_orders_products=4317943


    What version of Zen Cart?
    1.3.8a

    What addons/contributions do you have installed?
    easy checkout, one step checkout, magic seo, slimbox

    (note: not installed any addons recently... it has worked since our last install)

    What version of MySQL?
    5.0.51a-community
    MonkFunk Music Community
    Free Music Website

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

    Quote Originally Posted by keylesslocks View Post
    it has worked since our last install
    What do you mean by that?
    I thought you were reporting a problem.
    When did the problem first start?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7

    Default Re: help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

    Quote Originally Posted by DrByte View Post
    What do you mean by that?
    I thought you were reporting a problem.
    When did the problem first start?
    I meant that I could search orders by part number since our last addon install....

    I am not sure when the problem started, I only use the feature about 1 x per month, I just used it last week and it gave me this error.

    It reminded me of a similar error I got for something else and all I had to do was repair the tables in the db, but it didn't work for this...

    thanks,

    ~ Eric
    MonkFunk Music Community
    Free Music Website

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

    Based on forum searches, I'm going to recommend this approach: http://www.zen-cart.com/forum/showth...384#post518384
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9

    Default Re: help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

    when I do what that says.... then when I goto:
    /admin/orders.php

    I get....

    1054 Unknown column 'o.orders_status' in 'where clause'
    in:
    [select count(*) as total from (zen_orders s, zen_orders_status o ) left join zen_orders_total ot on (o.orders_id = ot.orders_id) where (o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total') ]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.



    are you saying not do that exact thing? just the same approach? not sure.. I did that exactly and it still is not working... while it was broken, I tried doing a search and it didn't work as well, thought maybe it fixed one thing but messed up another, but it didn't neither worked...
    MonkFunk Music Community
    Free Music Website

  10. #10
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

    Sounds like you made a error.

    Since most people apparently have problems making those changes by telling them to change individual lines, I'll try another approach:
    Change this whole block (starting line 714):
    Code:
    <?php
        if (isset($_GET['cID'])) {
          $cID = zen_db_prepare_input($_GET['cID']);
          $orders_query_raw =   "select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
                                $new_fields . "
                                from (" . TABLE_ORDERS . " o, " .
                                TABLE_ORDERS_STATUS . " s " .
                                $new_table . ")
                                left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) " . "
                                where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' and ot.class = 'ot_total' order by orders_id DESC";
    
    //echo '<BR><BR>I SEE A: ' . $orders_query_raw . '<BR><BR>';
    
        } elseif ($_GET['status'] != '') {
          $status = zen_db_prepare_input($_GET['status']);
          $orders_query_raw = "select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
                              $new_fields . "
                              from (" . TABLE_ORDERS . " o, " .
                              TABLE_ORDERS_STATUS . " s " .
                              $new_table . ")
                              left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) " . "
                              where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total'  " .
                              $search . " order by o.orders_id DESC";
    
    //echo '<BR><BR>I SEE B: ' . $orders_query_raw . '<BR><BR>';
    
        } else {
          $orders_query_raw = "select " . $search_distinct . " o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
                              $new_fields . "
                              from (" . TABLE_ORDERS . " o, " .
                              TABLE_ORDERS_STATUS . " s " .
                              $new_table . ")
                              left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) " . "
                              where (o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' and ot.class = 'ot_total')  " .
                              $search . " order by o.orders_id DESC";
    
    //echo '<BR><BR>I SEE C: ' . $orders_query_raw . '<BR><BR>';
    
        }
    to this:
    Code:
    <?php
        if (isset($_GET['cID'])) {
          $cID = zen_db_prepare_input($_GET['cID']);
          $orders_query_raw =   "select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
                                $new_fields . "
                                from (" . TABLE_ORDERS_STATUS . " s, " .
                                TABLE_ORDERS . " o " .
                                $new_table . ")
                                left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total') " . "
                                where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' order by orders_id DESC";
    
    //echo '<BR><BR>I SEE A: ' . $orders_query_raw . '<BR><BR>';
    
        } elseif ($_GET['status'] != '') {
          $status = zen_db_prepare_input($_GET['status']);
          $orders_query_raw = "select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
                              $new_fields . "
                              from (" . TABLE_ORDERS_STATUS . " s, " .
                              TABLE_ORDERS . " o " .
                              $new_table . ")
                              left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total') " . "
                              where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' and s.orders_status_id = '" . (int)$status . "'  " .
                              $search . " order by o.orders_id DESC";
    
    //echo '<BR><BR>I SEE B: ' . $orders_query_raw . '<BR><BR>';
    
        } else {
          $orders_query_raw = "select " . $search_distinct . " o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
                              $new_fields . "
                              from (" . TABLE_ORDERS_STATUS . " s, " .
                              TABLE_ORDERS . " o " .
                              $new_table . ")
                              left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total') " . "
                              where (o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "')  " .
                              $search . " order by o.orders_id DESC";
    
    //echo '<BR><BR>I SEE C: ' . $orders_query_raw . '<BR><BR>';
    
        }
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Search box in Admin not searching in product name?
    By rudyh01 in forum Basic Configuration
    Replies: 6
    Last Post: 13 Dec 2011, 03:47 PM
  2. Can't find a way to search by Model in Advanced Search - could somebody help please?
    By Athens Collectibles in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 Sep 2011, 12:14 PM
  3. Replies: 1
    Last Post: 26 Jun 2010, 02:41 PM
  4. Search box not searching capitalized product name/model number
    By saitomedia in forum General Questions
    Replies: 2
    Last Post: 10 Feb 2010, 08:01 AM
  5. Can't search product name / model in order box.
    By kimsonvu in forum General Questions
    Replies: 1
    Last Post: 26 Aug 2008, 09:13 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