Forums / General Questions / help - in admin > orders > Search by Product Name or ID:XX or Model > jumbo mumbo

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

Locked

Started by keylesslocks on 5 Sep 2008, 8:30 PM · Views: 2,136

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
5 Sep 2008, 8:30 PM
#1
keylesslocks avatar

keylesslocks

Zen Follower

Join Date:
May 2007
Posts:
267
Plugin Contributions:
0

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.

MonkFunk Music Community
Free Music Website

8 Sep 2008, 6:22 PM
#2
keylesslocks avatar

keylesslocks

Zen Follower

Join Date:
May 2007
Posts:
267
Plugin Contributions:
0

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

8 Sep 2008, 7:42 PM
#3
keylesslocks avatar

keylesslocks

Zen Follower

Join Date:
May 2007
Posts:
267
Plugin Contributions:
0

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

8 Sep 2008, 8:22 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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.

8 Sep 2008, 8:34 PM
#5
keylesslocks avatar

keylesslocks

Zen Follower

Join Date:
May 2007
Posts:
267
Plugin Contributions:
0

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

8 Sep 2008, 8:52 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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

keylesslocks:

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.

8 Sep 2008, 9:16 PM
#7
keylesslocks avatar

keylesslocks

Zen Follower

Join Date:
May 2007
Posts:
267
Plugin Contributions:
0

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

DrByte:

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 Sep 2008, 9:25 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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/showthread.php?p=518384#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.

8 Sep 2008, 10:23 PM
#9
keylesslocks avatar

keylesslocks

Zen Follower

Join Date:
May 2007
Posts:
267
Plugin Contributions:
0

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

8 Sep 2008, 10:52 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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): ```

<?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:``` <?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.

8 Sep 2008, 11:11 PM
#11
keylesslocks avatar

keylesslocks

Zen Follower

Join Date:
May 2007
Posts:
267
Plugin Contributions:
0

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

hey hey hey!

it worked!

thanks so much!

` Eric

MonkFunk Music Community
Free Music Website

9 Sep 2008, 2:21 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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

FYI, I took that code from the next version of Zen Cart ... so, that change is already in place for the next release.

.
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.