Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help to locate Parse, Syntax Error


ecgbyme

Recommended Posts

Does anyone know what needs to be corrected in this line of code?

 

The error is:

Parse error: syntax error, unexpected '.', expecting '(' in /includes/modules/new_products.php on line 16

 

 

Line 16 is: $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 

I have tried forward slashes on both sides of /'text/' with no results.

 

Appreciate any help!

Link to comment
Share on other sites

Can someone help resolve this Parse Syntax error:

 

Here is the error: Parse error: syntax error, unexpected '.', expecting '(' in /includes/modules/new_products.php on line 16

 

 

Here is the code for line 16: $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 

 

I put some forward lines in /'text/' but no change ocurred.

 

Appreciate and help!

Link to comment
Share on other sites

Try posting 5 lines before and 2 after

 

Cheers

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Hi Geoffrey: Here is some of the code. It's not a big file.

Line 16 is in bold.

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- new_products //-->

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 

new contentBoxHeading($info_box_contents);

 

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id 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, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . 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);

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...