Guest Posted December 12, 2012 Posted December 12, 2012 hi there i have just installed a guest checkout here is the link to the one i installed : http://addons.oscommerce.com/info/8434 now the problem is my homepage is coming up with an error saying "Parse error: syntax error, unexpected $end in /home/theon063/public_html/includes/header.php on line 78 this is the code from the header.php file: <?php /* $Id$ Modified for Consolidated Login Page with Guest Checkout osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Copyright © 2012 osCbyJetta Released under the GNU General Public License */ if ($messageStack->size('header') > 0) { echo '<div class="grid_24">' . $messageStack->output('header') . '</div>'; } ?> <?php if (($oscTemplate->hasBlocks('boxes_menu')) || ($oscTemplate->hasBlocks('boxes_header'))) { ?> <div id="header"><?php echo $oscTemplate->getBlocks('boxes_header'); ?><?php echo $oscTemplate->getBlocks('boxes_menu'); ?></div> <div id="header" class="grid_24"> <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div> <div id="headerShortcuts"> <?php // GUEST CHECKOUT START if ($cart->count_contents() > 0) { // GUEST CHECKOUT END echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) . // GUEST CHECKOUT START // tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } if (!tep_session_is_registered('guest')) { // tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); echo tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); // GUEST CHECKOUT END if (tep_session_is_registered('customer_id')) { echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL')); } // GUEST CHECKOUT START } // GUEST CHECKOUT END ?> </div> <script type="text/javascript"> $("#headerShortcuts").buttonset(); </script> </div> <div class="grid_24 ui-widget infoBoxContainer"> <div class="ui-widget-header infoBoxHeading"><?php echo ' ' . $breadcrumb->trail(' » '); ?></div> </div> <?php if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerError"> <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td> </tr> </table> <?php } if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td> </tr> </table> <?php } ?> i cant see anything wrong here i am running oscommerce version 2.3.1 i am new to all this so would appreciate any help. please keep it as basic as possible. thanks in advance...
PupStar Posted December 12, 2012 Posted December 12, 2012 at a quick glance you may have a missing } check you installation again.
Guest Posted December 12, 2012 Posted December 12, 2012 @@alexpacteau Ok, well first of all, guest checkout contributions are a waste of time. The customer will have to complete ALL of the required information anyway. Secondly, there are only 77 lines of code in the file you posted above. Chris
Guest Posted December 12, 2012 Posted December 12, 2012 @@DunWeb hi that is all the code that is there i then clicked on the 78th line of code deleted a space character and then the error just went to the 77th line of code so i am completely stuck... please help me
Guest Posted December 12, 2012 Posted December 12, 2012 @@alexpacteau As Mark explained, you are missing a closing tag } Chris
MrPhil Posted December 13, 2012 Posted December 13, 2012 It looks like the unmatched { is on line 18. Comparing the file against an unmodified osC 2.3.3 version, I'm going to suggest you try the following. Find: <?php if (($oscTemplate->hasBlocks('boxes_menu')) || ($oscTemplate->hasBlocks('boxes_header'))) { ?> <div id="header"><?php echo $oscTemplate->getBlocks('boxes_header'); ?><?php echo $oscTemplate->getBlocks('boxes_menu'); ?></div> and change it to <?php if (($oscTemplate->hasBlocks('boxes_menu')) || ($oscTemplate->hasBlocks('boxes_header'))) { ?> <div id="header"><?php echo $oscTemplate->getBlocks('boxes_header'); ?><?php echo $oscTemplate->getBlocks('boxes_menu'); ?></div> <?php } ?> It's worth a try, but no promises.It will get rid of the PHP parse error, but may not work correctly.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.