Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What's the php or code controlling the new products summary format on categories???


becquersito

Recommended Posts

Posted

Sorry... i know my topic isn't quite clear.... i'll try to explain: When you select a categorie on the "categories" table, it drives you to a page headed by subcategories and few of the new products stright, right?. The problem in my page is that there are few mistakes: first, the products "summary" doesn't display price and, secondly, over the name of the product it displays the category name in english (not even on the current lenguage). So... my question is: how to remove the "category" on that summary or, better, how to display the right one according to the lenguage in use. And, second: how to display price?.

 

I tried everything.

 

Here's the example:

http://cooperacio.org/donacions/index.php?cPath=1

Posted

Well, i discovered that the possible mistake which makes display Categories in the wrong lenguage is in this piece of CODE, any idea?:

 

while ($new_products = tep_db_fetch_array($new_products_query)) {
  $new_products['products_name'] = tep_get_products_name($new_products['products_id']);
  $product_query = tep_db_query("select products_description  from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$new_products['products_id'] . "' and language_id = '" . (int)1 . "'");
  $product = tep_db_fetch_array($product_query);
  $new_products['products_description'] = $product['products_description'];
  // get products category
  $categories_query = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$new_products['products_id'] . "'");
  if (tep_db_num_rows($categories_query) > 0) {
    $categories = tep_db_fetch_array($categories_query);
    $categories_query2 = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories['categories_id'] . "'");
    $categories2 = tep_db_fetch_array($categories_query2);
    $category_name = $categories2['categories_name'];
  } else {
    $category_name = '';
  }

  echo '


        <td width=179 valign=top>
         <table cellspacing=0 cellpadding=0 width=164 align=center>
          <tr><td height=7></td></tr>
          <tr><td colspan=2 style="padding-left:3px"><a class=ml3 href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $category_name . '</a></td></tr>
          <tr><td colspan=2 style="padding-left:3px"><a class=ch4 href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></td></tr>

Archived

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

×
×
  • Create New...