This is a discussion on Product Inventory Editor v1.0 within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; This extremely simple modification answers a problem I encountered with this extremely useful application. The entire product list can load ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| This extremely simple modification answers a problem I encountered with this extremely useful application. The entire product list can load fairly slowly if your inventory includes thousands of products. After adding several fields for editing, including some custom fields for my heavily modified store, I found the wait time for full loading to become interminable - and impractical when the main objective was to edit fields like stock levels quickly. Even if I waited for the full inventory to load, I'd still almost immediately initiate a search anyway to get to the items in which I was interested. The easiest solution for me was simply to bypass the full product listing, and go directly to the search page. Though a full alternative package might entail a re-named files and re-configured and -formatted pages, with extraneous code removed, I found a simple hack to be satisfactory. If you just go to line 22 of the product_list.php, you can replace $product_query = tep_db_query("select p.products_id, p.products_model, pd.products_name, p.products_format, p.products_condition, p.products_price, p.products_quantity, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); with $product_query = 0; You can also of course comment out the tep_db_query statement if you wish to preserve the snipped for possible future re-use or re-installation. As in $product_query = 0 //tep_db_query("select p.products_id, p.products_model, pd.products_name, p.products_format, p.products_condition, p.products_price, p.products_quantity, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'") ; Note that if you comment out in the above manner, you need to keep the semi-colon to terminate the statement, so you'll have to give it its own line, as above. You'll be fine. Clicking on Product List in admin/catalog will take you immediately to a page whose main area is blank, but with the search box readily available. Searches will execute quickly, and you can then perform whatever desired edits or stock adjustments on the products and fields that are found. At some point I may produce a full Product Search and Edit alternative that could be uploaded instead of or alongside Product Inventory Editor, but I'm still researching issues related to Search itself in mysql (upgrading to the latest versions in order to deal with apostrophes is a primary issue). --note: ATTACHED FILE IS NOT A FULL PACKAGE - it's just a copy of this text More...
__________________ Michael Sasek osCMax Developer
|
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Product Inventory Editor v1.0 | michael_s | New osCommerce Contributions | 0 | 07-28-2007 01:17 AM |
| Product Inventory Editor v1.0 | michael_s | New osCommerce Contributions | 0 | 07-23-2007 11:21 AM |
| Product Inventory Editor v1.0 | michael_s | New osCommerce Contributions | 0 | 07-22-2007 08:30 AM |
| Product Attributes Vs Inventory Qty | BoblLoveland | osCMax v2 Features Discussion | 6 | 12-22-2006 11:56 AM |
| Inventory and Product Attributes | KindsvaterFlat | osCommerce 2.2 Modification Help | 5 | 02-02-2005 08:30 PM |