nickschick Posted April 1, 2006 Posted April 1, 2006 I have been using the Creloaded 6.15 version of Oscommerce and as no-one has been able to help me on the forums there I thought I might ask for your assistance here. I downloaded and installed the above version of oscommerce on my local server, I made no changes to the version when I discovered that I could not access 'Customer's' via the admin panel (I can find orders okay), I kept receiving the following message: 'unexpected 'else' on customers.php line 706': '?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td align="right" class="main"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('action'))) .'">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr></form> <?php } else { (Line 706) ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><?php echo tep_draw_form('search', FILENAME_CUSTOMERS, '', 'get'); ?> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); ?></td> </form></tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <?php $HEADING_LASTNAME = TABLE_HEADING_LASTNAME; $HEADING_LASTNAME .= '<a href="' . $_SERVER['PHP_SELF'] . '?sort=lastname&order=ascending">'; $HEADING_LASTNAME .= '?<img src="images/arrow_up.gif" border="0"></a>'; $HEADING_LASTNAME .= '<a href="' . $_SERVER['PHP_SELF'] . '?sort=lastname&order=decending">'; $HEADING_LASTNAME .= '?<img src="images/arrow_down.gif" border="0"></a>'; $HEADING_FIRSTNAME = TABLE_HEADING_FIRSTNAME; $HEADING_FIRSTNAME .= '<a href="' . $_SERVER['PHP_SELF'] . '?sort=firstname&order=ascending">'; $HEADING_FIRSTNAME .= '?<img src="images/arrow_up.gif" border="0"></a>'; $HEADING_FIRSTNAME .= '<a href="' . $_SERVER['PHP_SELF'] . '?sort=firstname&order=decending">'; $HEADING_FIRSTNAME .= '?<img src="images/arrow_down.gif" border="0"></a>'; $HEADING_ACCOUNT_CREATED = TABLE_HEADING_ACCOUNT_CREATED; $HEADING_ACCOUNT_CREATED .= '<a href="' . $_SERVER['PHP_SELF'] . '?sort=account_created&order=ascending">'; $HEADING_ACCOUNT_CREATED .= '?<img src="images/arrow_up.gif" border="0"></a>'; $HEADING_ACCOUNT_CREATED .= '<a href="' . $_SERVER['PHP_SELF'] . '?sort=account_created&order=decending">'; $HEADING_ACCOUNT_CREATED .= '?<img src="images/arrow_down.gif" border="0"></a>'; ?>' I removed the } else { to leave just: <?php } ?> This worked in so much as I could finally get into admin/customers however none of the customers were listed even though they appear in Orders etc. Does anyone have any ideas as to why the customers are missing? Thanks, Michelle
Guest Posted April 1, 2006 Posted April 1, 2006 Hi Michelle, The problem lies just above this section of code I suspect, where you are missing an if statement followed by an { bracket. I suspect that somewhere along the line the following section will differ (I have included up to your infamous } else { statement: <?php if ($processed == true) { if ($cInfo->customers_newsletter == '1') { echo ENTRY_NEWSLETTER_YES; } else { echo ENTRY_NEWSLETTER_NO; } echo tep_draw_hidden_field('customers_newsletter'); } else { echo tep_draw_pull_down_menu('customers_newsletter', $newsletter_array, (($cInfo->customers_newsletter == '1') ? '1' : '0')); } ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td align="right" class="main"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('action'))) .'">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr></form> <?php } else { ?> Though it is possible the problem lies higher up this file somewhere. As its not strictly speaking an osc file, I dont want to post the whole thing here, also I am not sure which version of CRE you are using. Best bet is probably to download a new copy and replace that file - just make sure it is the same version as the one you already have running!
nickschick Posted April 2, 2006 Author Posted April 2, 2006 Hi Michelle, The problem lies just above this section of code I suspect, where you are missing an if statement followed by an { bracket. I suspect that somewhere along the line the following section will differ (I have included up to your infamous } else { statement: <?php if ($processed == true) { if ($cInfo->customers_newsletter == '1') { echo ENTRY_NEWSLETTER_YES; } else { echo ENTRY_NEWSLETTER_NO; } echo tep_draw_hidden_field('customers_newsletter'); } else { echo tep_draw_pull_down_menu('customers_newsletter', $newsletter_array, (($cInfo->customers_newsletter == '1') ? '1' : '0')); } ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td align="right" class="main"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('action'))) .'">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr></form> <?php } else { ?> Though it is possible the problem lies higher up this file somewhere. As its not strictly speaking an osc file, I dont want to post the whole thing here, also I am not sure which version of CRE you are using. Best bet is probably to download a new copy and replace that file - just make sure it is the same version as the one you already have running! Thanks for your reply. I downloaded the package for CRE 6.15 again and copied the Customer.php file over to my Admin directory but still the problem remains. Unfortunately, I do not know enough about the code to spot a mistake - also, I cannot fathom why I should have this problem with this version and everyone else seems okay! Any other suggestions come to mind? Regards, Michelle
Recommended Posts
Archived
This topic is now archived and is closed to further replies.