Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with error in PHP code


butchx5

Recommended Posts

Posted

Hi

I have installed a variety of contributions to my basic Template Monster template and checked the front end of my store loaded ok and appeared as it should after each one.

I did have a couple of glitches but managed to sort them.

 

However, I went to my store backend and am able to log in then I get the following message:

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/xxxxx/public_html/mystore.com/admin/includes/boxes/catalog.php on line 24

 

 

I am no PHP expert and cannot see the problem - which I know may well not be in line 24 at all. Can anyone point out how I need to change the coding please. This is the complete coding:

 

<?php
/*
 $Id: catalog.php 1739 2007-12-20 00:52:16Z hpdl $[/color][/size][/font]
[font="'Times New Roman"][size="3"][color="#000000"]  osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com[/color][/size][/font]
[font="'Times New Roman"][size="3"][color="#000000"]  Copyright (c) 2002 osCommerce[/color][/size][/font]
[font="'Times New Roman"][size="3"][color="#000000"]  Released under the GNU General Public License
*/
?>
<!-- catalog //-->
	  <tr>
	    <td>
<?php
 $heading = array();
 $contents = array();[/color][/size][/font]
[font="'Times New Roman"][size="3"][color="#000000"]  $heading[] = array('text'  => BOX_HEADING_CATALOG,
				 'link'  => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'));
 if ($selected_box == 'catalog') {
 $contents[] = array('text' =>'<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . 'Easy Populate''</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a>');
}
 $box = new box;
 echo $box->menuBox($heading, $contents);
?>
	    </td>
	  </tr>
<!-- catalog_eof //-->[/color][/size][/font]
[font="'Times New Roman"][size="3"][color="#000000"]

 

Hope someone can help.

 

Helen

Posted

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . 'Easy Populate''</a><br>' .

 

Change

 

'Easy Populate''</a><br>' .

 

to

'</a><br>' .

 

You then need to add back a line to run Easy Populate.

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted

Hi

Thanks for trying to help.

Please post the file again without any text formatting

 

I hope this is what you mean:

 

 

<?php

/*

$Id: catalog.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- catalog //-->

<tr>

<td>

<?php

$heading = array();

$contents = array();

 

$heading[] = array('text' => BOX_HEADING_CATALOG,

'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'));

if ($selected_box == 'catalog') {

$contents[] = array('text' =>'<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a>');

}

$box = new box;

echo $box->menuBox($heading, $contents);

?>

</td>

</tr>

<!-- catalog_eof //-->

 

As you can see I have removed the Easy Populate bit as per Geoffrey's advice - he is correct the error message has now gone BUT how do I now

 

You then need to add back a line to run Easy Populate.

 

By placing it where it was I thought I was following the installation documentation when I downloaded Easy Populate - obviously not - what/where should I incorproate Easy Populate?

 

Thanks

Helen

Posted

Replace this

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . 'Easy Populate''</a><br>' .                                                           

By this

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .        
'<a href="' . tep_href_link('easypopulate.php', '', 'NONSSL') . '" class="menuBoxContentLink">' . 'Esay Populate' . '</a><br>' .                                                  

Posted

Replace this

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . 'Easy Populate''</a><br>' .														  

By this

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .		
'<a href="' . tep_href_link('easypopulate.php', '', 'NONSSL') . '" class="menuBoxContentLink">' . 'Esay Populate' . '</a><br>' .												  

 

Thanks George - that seems to have worked.

 

(corrected misspelling of Easy Populate where you'd put Esay Populate - fingers out of sync with brain when typing - I do it all the time)

 

Helen

Posted

Replace this

 

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . 'Easy Populate''</a><br>' .

 

By this

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .

'<a href="' . tep_href_link('easypopulate.php', '', 'NONSSL') . '" class="menuBoxContentLink">' . 'Esay Populate' . '</a><br>' .

Archived

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

×
×
  • Create New...