Quote Originally Posted by potteryhouse View Post
The attached file is a "Quick Fix", please test it to see if it does what you want before using on an active site.
The file will replace: stock_by_attribute\admin\includes\classes\products_with_attributes_stock.php
I suggest you back up before using this.
It will give you a search box, no product listing, and you must know the product ID number or product name to search for it (I commented out the model number as it gave me too many returns, you can change it back if you like, it is still in the file on line 115). Attachment 12884

Let me know how it goes please.


FYI, I have been trying to get pagination working with no good results as of yet.
This works great but it is still a hassle to find the product id number.

I have modified one line in the stats_products_purchased.php file located in the root of YOUR_ADMIN folder.

FROM THIS:
$products_query_raw = "select p.products_id, p.products_ordered, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $_SESSION['languages_id']. "' and p.products_ordered > 0 group by pd.products_id order by p.products_ordered DESC, pd.products_name";

TO THIS:
$products_query_raw = "select p.products_id, p.products_ordered, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $_SESSION['languages_id']. "' group by pd.products_id order by pd.products_name ASC, p.products_id";

This will still show you the products purchased, but it displays them by name rather than by quantity purchased
and will also show zero quantity purchases so you can easily get a product id number.

Be sure to BACKUP your original file before you modify it.