Jump to content

mre

Members
  • Content count

    6
  • Joined

  • Last visited

Posts posted by mre


  1. I installed Product Short Description v.2 which is mod by josh modified by aviveros.

    It is working on product_listing page, but I found difficulties with module new_products.

    I've added pd.short_desc to sql query and received error "Unknown table 'pd' in field list". I'm not familiar with sql queries, hopping someone will help.

     

    The query code, modified by SPPC, is as follow:

      if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
    $new_products_query = tep_db_query("select p.products_id, p.products_image, pd.short_desc, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
     } else {
    $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.short_desc,  p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit ". MAX_DISPLAY_NEW_PRODUCTS);
     }

     

    Chris

×