Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PLEASE HELP


chrisbg

Recommended Posts

Posted

When i tried to add product(s) in shoping cart, when i hit checkout button, than received emty browser with a message with in:

 

Parse error: parse error, unexpected T_IF in /xxx/www/xxx.com/www/xxx/oscommerce-2.2ms2/catalog/includes/classes/order.php on line 226

 

Here is the corresponded line:

 

if ($products[$i]['attributes']) {

$subindex = 0;

reset($products[$i]['attributes']);

while (list($option, $value) = each($products[$i]['attributes'])) {

$attributes_query = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'");

$attributes = tep_db_fetch_array($attributes_query);

 

$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options_name'],

'value' => $attributes['products_options_values_name'],

'option_id' => $option,

'value_id' => $value,

'prefix' => $attributes['price_prefix'],

'price' => $attributes['options_values_price']);

 

$subindex++;

}

}

 

 

PLEASE, somebody HELP???

Posted

There aren't too many places where an if is an unexpected statement, but one of them I can think of right off the bat is a missing semicolon on the line above... Can you confirm that you're not missing a semicolon there, and possibly paste in a little more than just the if block, like 10-15 lines of code that come right before it?

 

Richard.

Richard Lindsey

Posted
Are you using the Option Type Contribution?

 

jon

 

No, but i'm using contribution Pc Pro Creator, may be some files messing with it, /order.php is untouched ...

Posted
No, but i'm using contribution Pc Pro Creator, may be some files messing with it, /order.php is untouched ...

Hmmm... well, regardless, it's finding an error there for some reason... Can you post that code over again, but include 10-15 lines above it in your post?

 

Richard.

Richard Lindsey

Posted
Hmmm... well, regardless, it's finding an error there for some reason... Can you post that code over again, but include 10-15 lines above it in your post?

 

Richard.

 

i'll post code tomorrow, 'coz i have not access to the server right now, i'm in home, thanks for your reply

Posted
Hmmm... well, regardless, it's finding an error there for some reason... Can you post that code over again, but include 10-15 lines above it in your post?

 

Richard.

 

I found the answer:

I compared two files - order.php with original order.php within clean instalation of oscommerse. I founded 5 diferences, than just replace with original order.php and everything is OK now :-"

Thanks for replyes...

Archived

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

×
×
  • Create New...