Jump to content
Sign in to follow this  
99darkgreenGT

Orderlist contrib

Recommended Posts

I have found another slight issue in that my "Manufacturer" does not display anything. I have seen a couple of people with a similar problem but I have not seen a solution posted. I suspect that it is the query in some way so mine is posted below in case someone can point me in the right direction???

 

 

CODE

 

// Manufacturer Listing

//Use the products ID# to find the proper Manufacturer of this specific product

$v_query = tep_db_query("SELECT manufacturers_id FROM ".TABLE_PRODUCTS." WHERE products_id = '".$order->products[$i]['products_id']."'");

$v = tep_db_fetch_array($v_query);

//Select the proper Manufacturers Name via the Manufacturers ID# then display that name for a human readable output

$mfg_query = tep_db_query("SELECT manufacturers_name FROM ".TABLE_MANUFACTURERS." WHERE manufacturers_id = '".$v['manufacturers_id']."'");

$mfg = tep_db_fetch_array($mfg_query);

// End Manufacturer Listing

?>

<b><a href="<?php echo tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $order->products[$i]['products_id'] . '&oID=' . $oID . '&origin=' . FILENAME_ORDERS . '?oID=' . $oID . '&retOID=' . $oID . '&retAction=edit');?>"><?php echo $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name']; ?></a></b> <?php echo OL_MODEL . $order->products[$i]['model']; ?><br><?php echo OL_MANU . $mfg['manufacturers_name']; ?><br>

 

 

Any suggestions would be gratefully received..........

 

Many thanks.

 

Paul.

 

 

I also have the same problem has anyone been able to resolve this?

Edited by Optimalkiller

Share this post


Link to post
Share on other sites

Hi Again!

 

Has anyone had any progress in creating a filter that will sort by product name? It would be extremely helpful feature for me. We have started selling "virtual" event tickets and I need to be able to print out a specific attendance list for each event date.

 

I've been playing around with it, but I am more of a "copy and paster" and seem to just be making a mess of it.

 

Could someone help point me in the right direction? Thanks so much!

Share this post


Link to post
Share on other sites

In addition to trying to create a SEARCH BY PRODUCT filter, I think I have come across one last bug.

 

When I filter by STATUS all the information parameters are displayed properly.

 

When I filter using SELECT CLIENT, there is mostly missing information in Client Details. Looks like:

 

Account ID:

Company:

 

Customer Name: IS displayed

Default Address:

Suburb:

Location: , ,

ZIP / Post Code:

Telephone:

 

Billing Name:

Billing Address:

Suburb:

Location: , ,

ZIP / Post Code:

Delivery Name:

Delivery Address:

Suburb:

Location: , ,

ZIP / Post Code:

FAX:

 

Does anyone know the fix for this? Thanks! :thumbsup:

Share this post


Link to post
Share on other sites
Problem now resolved.

 

Care to let us in? have the same problem and can't get it fixed.

 

Would be gratefull...


Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Share this post


Link to post
Share on other sites

I just added the Orderlist Contrib. Works great, especially since I can preview each order by clicking on it. Thanks for this !

 

Unfortunately I when I click on a product id I get the following error message :

 

Warning: reset(): Passed variable is not an array or object in /home/ellandel/public_html/osCommerce/catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/ellandel/public_html/osCommerce/catalog/admin/includes/classes/object_info.php on line 18

 

Any idea what I did wrong or what is missing ?

 

Thanks

 

Ellandel

Share this post


Link to post
Share on other sites

HI Guys,

 

I have the Orderlist contrib installed and it seems to work fine. I have found a few bugs corresponding to the manufacturers, but I'm not concerned with that aspect so it's not a big deal. But there is an annoying bug that I can seem to figure out how to fix. When I first go to the contrib, and have yet to define any kind of search criteria, I get this error:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

select *, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' and o.orders_status = '' and ot.class = 'ot_total' order by o.orders_id DESC limit -20, 20

 

 

I searched the orerlist.php file for the place where the limit -20, 20 section gets inserted but I've come up empty. There is apparently something that I don't understand yet concering the building of the SQL statement.

 

The script seems to work fine without errors once I set some search criteria, but it doesn't instill confidence in my customer when they see this every time they initiate the contribution.

 

Any help you can give would be greatly appreciated.

Share this post


Link to post
Share on other sites

Hello,

 

I actually found a fix for the problem that I was having where if the search criteria found no records, then there would be a SQL error.

 

Here's what I did,

In orderlist.php near line 388 find

$rows = 0;
 $orders_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows);
 $orders_query = tep_db_query($orders_query_raw);

 

Just before, insert

if ($records > 0){

 

Then towards the bottom of the file, find

if ($printable != 'on') {

and insert a

}

just before the statement to close out the "if" started previously.

 

This seems to fix the problem and skips the offending code when no records are found.

Share this post


Link to post
Share on other sites
In addition to trying to create a SEARCH BY PRODUCT filter, I think I have come across one last bug.

 

When I filter by STATUS all the information parameters are displayed properly.

 

When I filter using SELECT CLIENT, there is mostly missing information in Client Details. Looks like:

 

Account ID:

Company:

 

Customer Name: IS displayed

Default Address:

Suburb:

Location: , ,

ZIP / Post Code:

Telephone:

 

Billing Name:

Billing Address:

Suburb:

Location: , ,

ZIP / Post Code:

Delivery Name:

Delivery Address:

Suburb:

Location: , ,

ZIP / Post Code:

FAX:

 

Does anyone know the fix for this? Thanks! :thumbsup:

 

1) Has anyone found a way to sort by product name and

 

2) Has anyone fixed the missing info when sorting by client name?

 

I would LOVE to get this working!! Thanks, Patty

Share this post


Link to post
Share on other sites

Anyone have any clues as to why I'm getting "NOT IN STOCK!!:" under the product name for products that are in stock? I assume I should be seeing a stock number there, which would be nice.

 

Been staring at the code for hours and can't even figure out where that wording is coming from.

 

Otherwise a brilliant contribution.

Share this post


Link to post
Share on other sites

The contribution is great but needs a lot of work around to show what you want. First of all it does not show today's records unless you will choose the proper status. When you select a date range it won't show them. Too bad.

 

Also, when you choose a name from the drop down costumers list then most of the fields are left empty.

 

Currently I am trying to solve it. The advice would be welcomed and appreciated if anyone has already fixed that.

 

Thanks.

Share this post


Link to post
Share on other sites
Anyone have any clues as to why I'm getting "NOT IN STOCK!!:" under the product name for products that are in stock? I assume I should be seeing a stock number there, which would be nice.

 

Been staring at the code for hours and can't even figure out where that wording is coming from.

 

Otherwise a brilliant contribution.

 

Hi, do you found a solution for this? I have the same problem. Also I can not get product information on the link.

Share this post


Link to post
Share on other sites
Anyone have any clues as to why I'm getting "NOT IN STOCK!!:" under the product name for products that are in stock? I assume I should be seeing a stock number there, which would be nice.

 

Been staring at the code for hours and can't even figure out where that wording is coming from.

 

Otherwise a brilliant contribution.

 

Hi, do you found a solution for this? I have the same problem. Also I can not get product information on the link.

Share this post


Link to post
Share on other sites
Hi, do you found a solution for this? I have the same problem. Also I can not get product information on the link.

 

I also could not get product information on the link. I actually have exacly same files upload to 2 different sites, one is working very well, another one just no go.

 

The working one can got pID correctly, the address shows:

 

admin/categories.php?action=new_product_preview&read=only&pID=142&oID=&origin=orders.php?oID=&retOID=&retAction=edit

 

The non-working one cannot get pID, the address shows:

 

admin/categories.php?action=new_product_preview&read=only&pID=&oID=&origin=orders.php?oID=&retOID=&retAction=edit

 

The only difference is working one is Linux 2.6.26.5 via PHP 5.2.3 and MySQL 5.0.41, and the non-working one is Linux 2.6.23.17 via PHP 5.2.6 and MySQL 5.0.45.

 

Anyone please help?

Share this post


Link to post
Share on other sites

I am working with orderlist version 5.1d and an examination of the code that handles attributes exposed some code that seemed odd to me.

 

		   if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
		  for ($j=0, $k=sizeof($order->products[$i]['attributes']); $j<$k; $j++) {
		  $j=0;
			while ($products_options = $order->products[$i]['attributes'][$j]['option']) {
			  echo '  <font color="0000FF"><small>' . $products_options . '</font>' . ' = ' . $order->products[$i]['attributes'][$j]['value'];
			  if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
			  echo '</small><br>';
		  $j++;
		}
	  }
	} 

 

why would you mess around with the for loop variable "$j" inside the loop? How does php handle this kind of code . Is the $j referenced inside the loop the same as the $j in the for statement?>

 

Thanks

 

Kevin

Share this post


Link to post
Share on other sites

I am getting this error when I click on product under order details:

 

Warning: reset() [function.reset]: Passed variable is not an array or object

 

I know this has been asked before. Has anyone found a solution to this.

 

v 2.2 rc2

Share this post


Link to post
Share on other sites

I have also noticed on the order listing page, the product only shows up if payment was made using paypal. If cc was used it will not show up.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×