Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Trying to install EasyPopulate, getting Parse Error


Recommended Posts

I installed this contribution today, tried it twice and anytime I click EasyPopulate from Catalog I get:


Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /../html/catalog/admin/easypopulate.php on line 659

Ive gone over the code, and with what little knowledge I have, I couldnt find anything wrong. This is lines 646-674:


if ($localfile){
	// move the file to where we can work with it
	$file = tep_get_uploaded_file('usrfl');			$attribute_options_query = "select distinct products_options_id from " . TABLE_PRODUCTS_OPTIONS . " order by products_options_id";

		$attribute_options_values = tep_db_query($attribute_options_query);

		$attribute_options_count = 1;
		//while ($attribute_options = tep_db_fetch_array($attribute_options_values)){
	if (is_uploaded_file($file['tmp_name'])) {
		tep_copy_uploaded_file($file, DIR_FS_DOCUMENT_ROOT . $tempdir);

	echo "<p class=smallText>";
	echo FILENAME ': ' . $localfile . "<br>";;

	// get the entire file into an array
	$readed = file(DIR_FS_DOCUMENT_ROOT . $tempdir . $localfile);

// now we string the entire thing together in case there were carriage returns in the data
$newreaded = "";
foreach ($readed as $read){
	$newreaded .= $read;

// now newreaded has the entire file together without the carriage returns.
// if for some reason excel put qoutes around our EOREOR, remove them then split into rows
$newreaded = str_replace('"EOREOR"', 'EOREOR', $newreaded);
$readed = explode( $separator . 'EOREOR',$newreaded);

Link to comment
Share on other sites

Found the problem, and it was simple as I thought.


This line:

echo FILENAME ': ' . $localfile . "<br>";;


was missing a '.' after 'FILENAME', so it should have been:

echo FILENAME . ': ' . $localfile . "<br>";;



Heads up for anyone installing this contribution.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...