Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

can I be taken directly 1st product info


Recommended Posts

I have a small store I am working on that only has three categories. Each category has less than 15 items. I am using a contribution (Thumbnail Category Browse ) that will place the thumbnail of all other products in that category on the product_info page.


So what I want to do is to be able to click a category link and be taken directly to the first item in that category. Is this possible????

Link to comment
Share on other sites

1) define "first" and modify your query appropriately in the MIDDLE section of the index.php file.


2 do not call the product listing file but use the ID generated by the query in step 1 to redirect to the product info page




addicted to writing code ... can't get enough of databases either, LOL!


my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum


Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

I am sorry but without knowing alot about PHP I am at a loss as to exactly what to do. I hate to simply ask you to give me the code but If you would not mind shedding a bit more light on this subject I would greatly apprecieate it.


Is this the section I need to be focused on?


// show the products in a given categorie
  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...