gartex Posted May 5, 2008 Share Posted May 5, 2008 I went to the Knowledge Base > catalog > boxes > add/remove boxes. I followed the instructions to add a box like the INFORMATION box. (the only thing I did different was put the box in the right column instead of the left - maybe that did it)But I'm now getting an error message instead of seeing my online catalog. The admin login is fine. I can add products, change languages, etc., but when I click "Online Catalog" I receive this error message : Fatal error: Call to a member function add_current_page() on a non-object in /home/public_html/osCommerce/includes/application_top.php on line 312 --This is what is on line 312 : $navigation->add_current_page(); PLEASE HELP. Thanks. Link to comment Share on other sites More sharing options...
germ Posted May 6, 2008 Share Posted May 6, 2008 Click Me If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
gartex Posted May 6, 2008 Author Share Posted May 6, 2008 I followed those instructions but received this error message after: Parse error: syntax error, unexpected T_ELSE in /home/public_html/osCommerce/includes/application_top.php on line 305 .............................................................. This is in 305's area: // navigation historyif (tep_session_is_registered('navigation')) {if (PHP_VERSION < 4) {$broken_navigation = $navigation;$navigation = new navigationHistory;$navigation->unserialize($broken_navigation);} else {$navigation = new navigationHistory;}} else {tep_session_register('navigation');$navigation = new navigationHistory;}$navigation->add_current_page(); It looks the same to me, but it doesn't work. Please help. Thanks Link to comment Share on other sites More sharing options...
germ Posted May 6, 2008 Share Posted May 6, 2008 Is that the way it looks in your PHP source code, or is it like this: // navigation history if (tep_session_is_registered('navigation')) { if (PHP_VERSION < 4) { $broken_navigation = $navigation; $navigation = new navigationHistory; $navigation->unserialize($broken_navigation); } else { $navigation = new navigationHistory; } } else { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); :unsure: It needs to be formatted like I posted it, not all "run together" like you posted it. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
gartex Posted May 6, 2008 Author Share Posted May 6, 2008 Yes it looks like you posted it. I don't know how to post it like you did, so this editor ran it all together - but in the PHP file it looks like yours. Also I changed everything back to the way it was before I tried to make a new box based on the information box - it still gives me this error. What should I do next? Thanks. Link to comment Share on other sites More sharing options...
germ Posted May 6, 2008 Share Posted May 6, 2008 Post lines 300 to about 325 from your file, and I'll see if I can modify it for you so all you need to do is copy/paste. But you MUST post your lines between CODE tags to preserve formatting. I can't monkey with it if it's all jumbled up... :huh: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
gartex Posted May 6, 2008 Author Share Posted May 6, 2008 Hi germ. For some reason the code kept going from the correct code form like you posted to the run-together mess like I posted. I finally got it to stay the right way & my catalog came back. I changed everything back from when I tried to add a new box based on the information box. But now I'm getting the message below in my right column instead of the other tables that should be in the rt. column. (when I deleted my new box the "?>" - which is the only thing on line 46 -moved up. I don't know if that was the cause of the error, but I put everything back the same way - the only thing that i noticed was the "?>" moved. I tried moving it back down a line where I thought it was, but it didn't help) error message: Parse error: syntax error, unexpected $end in /home/public_html/osCommerce/includes/column_right.php on line 46 This is the area around line 46 with "?>" on line 46: if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } require(DIR_WS_BOXES . 'reviews.php'); if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { include(DIR_WS_BOXES . 'languages.php'); include(DIR_WS_BOXES . 'currencies.php'); ?> Link to comment Share on other sites More sharing options...
germ Posted May 6, 2008 Share Posted May 6, 2008 Change this: include(DIR_WS_BOXES . 'currencies.php'); ?> To: include(DIR_WS_BOXES . 'currencies.php'); } ?> If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
gartex Posted May 7, 2008 Author Share Posted May 7, 2008 Thanks a bunch Jim. That fixed it. I'll get the hang of this some day. Really appreciate the help. Any ideas why the new box instructions I followed from the knowledge base didn't work? It says to copy the Information box & then add it to the left column with a new name. I copied the Info box, but tried to add it to the right column instead of the left. Would that have mattered? Maybe I should have just copied one of the boxes on the right side. Anyway - thanks again! :lol: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.