Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse error - please help !


Kjolebutikken

Recommended Posts

Posted

Hi,

 

I have pdf datasheet contr. and products extra fields contr. installed. But when I open the pdf document I get this parse error:

 

Parse error: syntax error, unexpected T_STRING in /customers/kjolebutikken.com/kjolebutikken.com/httpd.www/oscdemo1/pdf/pdf_datasheet_functions.php on line 588

 

 

Here is the code I think is causing the problem, but I don't know what is wrong here:

 

$print_catalog_query = tep_db_query("select p.products_id, pd.products_name, cd.categories_name, p.". PDF_ALT_IMAGE .", p.products_model, pd.products_description, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.products_status, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price,  s.expires_date, m.manufacturers_name from ". TABLE_PRODUCTS . " p left join " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = '" . $products_id . "' and
					p.products_id = pd.products_id
					and pd.language_id = '" . $languages_id  . "'

$extra_fields_query = tep_db_query("
SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf
ON ptf.products_extra_fields_id=pef.products_extra_fields_id
WHERE ptf.products_id=". (int)$HTTP_GET_VARS['products_id'] ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."')
ORDER BY products_extra_fields_order");

while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
if (! $extra_fields['status']) // show only enabled extra field
continue;
}

 

 

Can anyone please help :-)

 

Thanks!

Best regards

Kjolebutikken

Posted

this line

and pd.language_id = '" . $languages_id  . "'

 

should be

and pd.language_id = '" . $languages_id . "'");

Posted
this line

and pd.language_id = '" . $languages_id  . "'

 

should be

and pd.language_id = '" . $languages_id . "'");

 

 

Hi, thank you, this worked fine :-)

 

Still, it did not help me much with my real problem though. Now that I can open the document, I see that the code I had put together here does not work, so my extra fields does not show in the pdf document anyway.

 

If you have any idea why this code does not make the extra fields show in the pdf document, and you have any ideas, please do not hesitate to let me know :-)

 

Thank you so much for your help!

Best regards

Kjolebutikken

Archived

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

×
×
  • Create New...