osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Product Inventory Editor v1.0

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


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 10-23-2007, 10:15 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post Product Inventory Editor v1.0

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


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 11:48 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax