Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error in Header Tags Controller need help


Recommended Posts

Hello I have tried to install Header Tags Controller v2.0 and the admin

 

But when I go in to my admin consol and click on: Catalog

 

I get this error in my browser:

Parse error: parse error, unexpected T_DOUBLE_ARROW in /home/webshop/public_html/admin/categories.php on line 225

 

And when I look at this file it looks like this on line 225:

'products_head_title_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_title_tag'][$language_id]),

'products_head_desc_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_desc_tag'][$language_id]),

'products_head_keywords_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_keywords_tag'][$language_id]));

 

Please help me and tell me what is wrong.

Best Regards

Hans

Link to comment
Share on other sites

Can you post a few lines before line 225?

 

Here is line: 216-240:

 

$languages = tep_get_languages();

for ($i=0; $i<sizeof($languages); $i++) {

$language_id = $languages[$i]['id'];

$prod_name = $HTTP_POST_VARS['products_name'][$language_id];

 

if (strlen($prod_name) > 1) {

$sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]),

'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]),

'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]));

'products_head_title_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_title_tag'][$language_id]),

'products_head_desc_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_desc_tag'][$language_id]),

'products_head_keywords_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_keywords_tag'][$language_id]));

 

 

if ($HTTP_GET_VARS['action'] == 'insert_product') {

$insert_sql_data = array('products_id' => $products_id,

'language_id' => $language_id);

$sql_data_array = tep_array_merge($sql_data_array, $insert_sql_data);

 

tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);

} elseif ($HTTP_GET_VARS['action'] == 'update_product') {

tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', 'products_id = '' . tep_db_input($products_id) . '' and language_id = '' . $language_id . ''');

}

}

}

I am happy if you have any ideas how to help me.

Best Regards

Hans

Link to comment
Share on other sites

Try changing this line:

 

'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]));

 

to this:

 

'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]),

 

and see if that fixes the problem

 

Eric Stamper

Link to comment
Share on other sites

Try changing this line:

 

'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]));

 

to this:

 

'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]),

 

and see if that fixes the problem

 

Eric Stamper

 

Then I get this error when I tried that:

 

Parse error: parse error, unexpected ',' in /home/webshop/public_html/admin/categories.php on line 224

 

Do you have more ideas?

All ideas are very velcome because I have been trying to fix this for several days now....please help me...

Link to comment
Share on other sites

Hans, this is your error as pointed out earlier:

'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]));

 

You have that line ending in an extra ); and it needs to be like the one above it with just a ),

 

The whole section of code reads:

            $sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]),

                                   'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]),

                                   'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]),

                                   'products_head_title_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_title_tag'][$language_id]),

                                   'products_head_desc_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_desc_tag'][$language_id]),

                                   'products_head_keywords_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_keywords_tag'][$language_id]));

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.
Note: Your post will require moderator approval before it will be visible.

Guest
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...