Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HELP!


eric_jbdotcom

Recommended Posts

Let's See What We Have Here 

 

 

1064 - You have an error in your SQL syntax near '.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(' at line 1

 

select p.products_image, pd.products_name 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 products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '21' order by pd.products_name limit 0, 20

 

[TEP STOP]

 

This is the error I recieved when trying to look at my CATEGORIES! anyone have a clue?

 

http://just-blaze.com/shop

Link to comment
Share on other sites

select p.products_image, pd.products_name 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 products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '21' order by pd.products_name limit 0, 20

 

There is a comma missing between pd.products_name and p.products_id

Link to comment
Share on other sites

i know that, where would i change it?

 

this is the new .sql file i uploaded to the database

 

# Insert configuration items into the configuration table.

INSERT INTO configuration (

  configuration_title,

  configuration_key,

  configuration_value,

  configuration_description,

  configuration_group_id,

  date_added

  ) VALUES (

  'Display Product Description',

  'PRODUCT_LIST_DESCRIPTION',

  1,

  'Include product description in the product listing. The product description will be included under the product name. So, the product name has to be printed in the product listing',

  8,

  now()

  );

 

# Insert configuration items into the configuration table.

INSERT INTO configuration (

  configuration_title,

  configuration_key,

  configuration_value,

  configuration_description,

  configuration_group_id,

  date_added

  ) VALUES (

  'Product Description',

  'PRODUCT_LIST_DESCRIPTION_MAX_LENGTH',

  200,

  'Maximum number of caracters when displaying the product description in the product listing',

  3,

  now()

  );

Link to comment
Share on other sites

I now get this error

Fatal error: Call to undefined function: tep_flatten_product_description() in /home/jbadmin/public_html/shop/includes/modules/product_listing.php on line 118

 

 

here is the code its talking about:

 

            if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH)

            $lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'],  '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>';

Link to comment
Share on other sites

Add the following function in /catalog/includes/functions/general.php

 

function tep_flatten_product_description($description, $link)

{

  $description = ereg_replace('<[^>]*>', '', $description);

  if (strlen($description) > PRODUCT_LIST_DESCRIPTION_MAX_LENGTH){

    $sub_description = wordwrap($description, PRODUCT_LIST_DESCRIPTION_MAX_LENGTH,'$@$');

        $sub_des = explode('$@$',$sub_description);

        $description = $sub_des[0];

        $description .= "...".$link;

      }

  return $description;

}

Link to comment
Share on other sites

  • 4 weeks later...

Hi and thanks for the contrib :-)

 

I have a little problem with installing it, h?be you can help me.

 

I get the following error:

 

Fatal error: Cannot redeclare tep_flatten_product_description() (previously declared in c:\programmer\apache\apache\htdocs\dvdjay\includes\functions\general.php:1255) in c:\programmer\apache\apache\htdocs\dvdjay\includes\modules\product_listing.php on line 18

 

what do I do wrong??

 

Please help me :-)

 

Thanks again

 

John

Where is the anykey??

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...