Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Orderlist contrib


99darkgreenGT

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
Link to comment
Share on other sites

  • Replies 92
  • Created
  • Last Reply

Top Posters In This Topic

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!

Link to comment
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:

Link to comment
Share on other sites

  • 3 weeks later...
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)

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
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.

Link to comment
Share on other sites

  • 4 weeks later...
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

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

  • 7 months later...
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.

Link to comment
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.

Link to comment
Share on other sites

  • 6 months later...
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?

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...

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

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...