Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

syntax error, unexpected T_STRING en checkout_process


considered

Recommended Posts

Posted

Hi.

 

I have this error on check out

 

*Parse error*: syntax error, unexpected T_STRING in

*/home/ibexmoo/public_html/euro_catalog/checkout_process.php* on line *125*

 

this is the line: line 125:

$stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename

 

here the code:

// Stock Update - Joao Correia 
   if (STOCK_LIMITED == 'true') { 
     if (DOWNLOAD_ENABLED == 'true') { 
       $stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename 
                           FROM " . TABLE_PRODUCTS . " p 
                           LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa 
                            ON p.products_id=pa.products_id 
                           LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad 
                            ON pa.products_attributes_id=pad.products_attributes_id 
                           WHERE p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"; 
// Will work with only one option for downloadable products 
// otherwise, we have to build the query dynamically with a loop 
       $products_attributes = $order->products[$i]['attributes']; 
       if (is_array($products_attributes)) { 
         $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'"; 
       } 
       $stock_query = tep_db_query($stock_query_raw); 
     } else {

 

 

 

Vic.

Posted

What version are you using? This is stock oscommerce checkout_process.php

 

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

$sql_data_array = array('orders_id' => $insert_id, <--Line 125

'title' => $order_totals[$i]['title'],

'text' => $order_totals[$i]['text'],

'value' => $order_totals[$i]['value'],

'class' => $order_totals[$i]['code'],

'sort_order' => $order_totals[$i]['sort_order']);

Posted
Hi.

 

I have this error on check out

 

*Parse error*: syntax error, unexpected T_STRING in

*/home/ibexmoo/public_html/euro_catalog/checkout_process.php* on line *125*

 

this is the line: line 125:

$stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename

 

here the code:

// Stock Update - Joao Correia 
   if (STOCK_LIMITED == 'true') { 
     if (DOWNLOAD_ENABLED == 'true') { 
       $stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename 
                           FROM " . TABLE_PRODUCTS . " p 
                           LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa 
                            ON p.products_id=pa.products_id 
                           LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad 
                            ON pa.products_attributes_id=pad.products_attributes_id 
                           WHERE p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"; 
// Will work with only one option for downloadable products 
// otherwise, we have to build the query dynamically with a loop 
       $products_attributes = $order->products[$i]['attributes']; 
       if (is_array($products_attributes)) { 
         $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'"; 
       } 
       $stock_query = tep_db_query($stock_query_raw); 
     } else {

 

 

 

Vic.

 

A solution that is often forgotten is to first undo what you've changed last.... When doing so line by line will give you the false line quite fast.

Archived

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

×
×
  • Create New...