Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
susan767

BestSeller Contribution installation problem

Recommended Posts

Hi,

 

I'm trying to install BestSeller 1.4 and getting following error.

 

Parse error: syntax error, unexpected '}' in /home/content/s/t/e/steve787/html/catalog/admin/includes/boxes/catalog.php on line 36

 

My catalog/admin/includes/boxes/catalog.php is as follows.

 

<?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>' .
							   // define_mainpage
							   '<a href="' . tep_href_link(FILENAME_DEFINE_MAINPAGE, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DEFINE_MAINPAGE . '</a><br>' .
							   // define_mainpage_eof
							   // define_bestseller
							   '<a href="' . tep_href_link(FILENAME_BESTSELLERS2, '', 'NONSSL') . '" class="menuBoxContentLink">' . 'Best Sellers' . '</a><br>');
							   // define_bestseller
							   '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a>' .
 }

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

 

Could somebody tell me I how can fix the syntax error?

 

Thanks,

 

Susan

Share this post


Link to post
Share on other sites

'</a><br>');

 

Reread the installation instructions and follow them exactly.


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

Share this post


Link to post
Share on other sites

But according to Readme.txt, I should

 

Step 5:

Add the following line to /catalog/admin/includes/boxes/catalog.php, right before the line that contains

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

 

 

#ADD:

'<a href="' . tep_href_link(FILENAME_BESTSELLERS2, '', 'NONSSL') . '" class="menuBoxContentLink">' . 'Best Sellers' . '</a><br>');

 

##Also, be sure to replace:

 

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

 

##With:

 

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

 

*****************

 

And as far as I can tell, that's exactly what I did.

 

Still confused,

Share this post


Link to post
Share on other sites

you did a mistake with replacing...

look the . before the } sais that there should come something more but it doesn't... so there should be a ; to say that that was it!

maybe you just pasted it in the wrong order...

If it doesn't work now, just try to change the order of the catalog.php in your first post so the ; is at the end!

 

try for example this:

 

<?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>' .
							   // define_mainpage
							   '<a href="' . tep_href_link(FILENAME_DEFINE_MAINPAGE, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DEFINE_MAINPAGE . '</a><br>' .
							   // define_mainpage_eof
							   // define_bestseller
							   '<a href="' . tep_href_link(FILENAME_BESTSELLERS2, '', 'NONSSL') . '" class="menuBoxContentLink">' . 'Best Sellers' . '</a><br>' . 
							   // define_bestseller
							   '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a>';
 }

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

Share this post


Link to post
Share on other sites
##Also, be sure to replace:

 

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

 

##With:

 

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

 

You are not going mad, you did exactly as the installation instruction said. Normally when this happens it is an error by the user not in the instructions.

 

Step 5:
Add the following line to /catalog/admin/includes/boxes/catalog.php, right before the line that contains

 

Should read

 

Step 5:
Add the following line to /catalog/admin/includes/boxes/catalog.php, right "AFTER" the line that contains

 

G

Edited by geoffreywalton

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

Share this post


Link to post
Share on other sites

Thanks, guys.

 

I did manage to install the contribution after identifying the glitch in the readme file as well as some other issues.

 

However,

my site is taking much too long to load and getting timed out.

 

This is a common problem with BestSeller contribution and some have resolved this by adding SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT to bestseller2.php.

 

Unfortunately, it is not working for me.

 

Any idea/suggestion on the solution would be highly appreciated,

 

Susan

Share this post


Link to post
Share on other sites

Okay, I looked at the code of column_right.php code of BestSeller contribution and learned that

it is only designed for MS Internet Explorer.

For other browsers, it should show the regular Best Seller box.

Hmmmmm....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×