Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

new! Search products by model or name...on admin


Guest

Recommended Posts

Hi, today I was look for finding a way to search products by model number, and I read the http://www.oscommerce.com/forums/viewtopic.php...ht=model+search

 

I try to insert, but it finds all, like select all..., I find a new way (I hope this help to this forum) to search by model, or name...

 

1. find

// Get categories_id for product if search

2. ABOVE look for...

 

$products_count = 0;

if ($HTTP_GET_VARS['search']) {

$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_bimage, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_model, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and d.products_name like '%" . $HTTP_GET_VARS['search'] . "%' order by " . $order_it_by);

 

change for...

( p.products_model like '%" . $HTTP_GET_VARS['search'] . "%' or pd.products_name like '%" . $HTTP_GET_VARS['search'] . "%')

 

 

 

Hope this helps for somebody who need this search feature on admin!

 

 

 

Edwin :D

Link to comment
Share on other sites

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