susan767 Posted January 18, 2009 Share Posted January 18, 2009 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 Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 18, 2009 Share Posted January 18, 2009 '</a><br>'); Reread the installation instructions and follow them exactly. Quote 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 More sharing options...
susan767 Posted January 18, 2009 Author Share Posted January 18, 2009 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, Quote Link to comment Share on other sites More sharing options...
MaNoLiA Posted January 18, 2009 Share Posted January 18, 2009 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); ?> Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 18, 2009 Share Posted January 18, 2009 (edited) ##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 January 18, 2009 by geoffreywalton Quote 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 More sharing options...
susan767 Posted January 19, 2009 Author Share Posted January 19, 2009 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 Quote Link to comment Share on other sites More sharing options...
susan767 Posted January 19, 2009 Author Share Posted January 19, 2009 Oh, I just found out that the BestSeller box does not appear on FireFox..... weird.... Does everyone have this problem? Quote Link to comment Share on other sites More sharing options...
susan767 Posted January 19, 2009 Author Share Posted January 19, 2009 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.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.