Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

BestSeller Contribution installation problem


susan767

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

Link to comment
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 ======>>>>>.

Link to comment
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,

Link to comment
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);
?>

Link to comment
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 ======>>>>>.

Link to comment
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

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.

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