damian1 Posted May 2, 2011 Share Posted May 2, 2011 Hi having followed the instructions on the download for the theme switcher link and reading the thread earlier about having to add the folders 'modules' and 'header_tags' I was presented with this error ' Parse error: syntax error, unexpected '<' in /home/wwwperso/public_html/includes/template_top.php on line 29' any ideas?.. im a complete novice with OSC so any assistance would be gratefull. Oh i should mention that it was the catalog/admin/includes/functions/modules/header_tags/ and ive added the last two folders! here is a copy of the offending code if it helps- > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" /> <title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" /> <link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.6.css" /><?php <script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.6.min.js"></script> <?php if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) { ?> <script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script> <script type="text/javascript"> $.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']); any assistance would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted May 2, 2011 Share Posted May 2, 2011 The first line of the code that you posted is the problem. That > should be ?>. Take a look at the file shipped in the Addon package for an example of what it should look like. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
damian1 Posted May 4, 2011 Author Share Posted May 4, 2011 The first line of the code that you posted is the problem. That > should be ?>. Take a look at the file shipped in the Addon package for an example of what it should look like. Regards Jim appologies it was a cut error :( here is the entire code for the template_top.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <meta name="robots" content="noindex,nofollow"> <title><?php echo TITLE; ?></title> <base href="<?php echo HTTP_SERVER . DIR_WS_ADMIN; ?>" /> <!--[if IE]><script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/excanvas.min.js'); ?>"></script><![endif]--> <link rel="stylesheet" type="text/css" href="<?php echo tep_catalog_href_link('ext/jquery/ui/redmond/jquery-ui-1.8.6.css'); ?>"> <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/jquery-1.4.2.min.js'); ?>"></script> <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/jquery-ui-1.8.6.min.js'); ?>"></script> <?php if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) { ?> <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/i18n/jquery.ui.datepicker-' . JQUERY_DATEPICKER_I18N_CODE . '.js'); ?>"></script> <script type="text/javascript"> $.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']); </script> <?php } ?> <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.js'); ?>"></script> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script type="text/javascript" src="includes/general.js"></script> </head> <body> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <?php if (tep_session_is_registered('admin')) { include(DIR_WS_INCLUDES . 'column_left.php'); } else { ?> <style> #contentText { margin-left: 0; } </style> <?php } ?> <div id="contentText"> have I not installed it in the correct format? thanks for your assistance:) Quote Link to comment Share on other sites More sharing options...
♥kymation Posted May 4, 2011 Share Posted May 4, 2011 That appears to be a stock, unmodified copy of template_top.php. I can't be certain because you posted it as text and not code, and that destroys formatting. I suggest that you compare this file to the one in the distribution, or just replace it with the one in the distribution. Then it should work. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
damian1 Posted May 5, 2011 Author Share Posted May 5, 2011 That appears to be a stock, unmodified copy of template_top.php. I can't be certain because you posted it as text and not code, and that destroys formatting. I suggest that you compare this file to the one in the distribution, or just replace it with the one in the distribution. Then it should work. Regards Jim Thanks for all your help on this one and yeah after I replaced it it worked fine...im having real issues installing the theme changing addon ive followed your instructions for changing the default layout but when i look for the theme roller does not appear in modules ..banging my head about this one ) kind regards damian1 Quote Link to comment Share on other sites More sharing options...
♥kymation Posted May 5, 2011 Share Posted May 5, 2011 Did you look in Modules >> Header Tags? If it's not there, you put the files in the wrong place. The file structure must be exactly the same as it is in the distribution. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
damian1 Posted May 6, 2011 Author Share Posted May 6, 2011 Did you look in Modules >> Header Tags? If it's not there, you put the files in the wrong place. The file structure must be exactly the same as it is in the distribution. Regards Jim thanks for your support :) managed to manually put the custom theme in thanks to an earlier post of yours! im will also admit that it took me about 5 mins ! As usual im going to ask something completely of the subject and query if you know of a way I can add a box into individual products so the customer can personalise them? again thanks for all your help! Damian1 Quote Link to comment Share on other sites More sharing options...
♥kymation Posted May 6, 2011 Share Posted May 6, 2011 I know there's an Addon for that but I don't remember the name. Post in the general help forum and somebody will probably remember. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
damian1 Posted May 12, 2011 Author Share Posted May 12, 2011 I know there's an Addon for that but I don't remember the name. Post in the general help forum and somebody will probably remember. Regards Jim yas im back with another question, now my custom theme appears on only some of my products - any ideas whats going on in there? ive launched it so u can look www.personalised-giftsuk.co.uk help ! Quote Link to comment Share on other sites More sharing options...
♥kymation Posted May 12, 2011 Share Posted May 12, 2011 Everything looks fine to me. Try clearing the cache in your browser (control/command and F5). Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
damian1 Posted May 12, 2011 Author Share Posted May 12, 2011 Everything looks fine to me. Try clearing the cache in your browser (control/command and F5). Regards Jim sorry jim ive done that but some products still appear in white boxes with white text|(i presume)... sorry to bug you on this one..apologies Quote Link to comment Share on other sites More sharing options...
damian1 Posted May 12, 2011 Author Share Posted May 12, 2011 sorry jim ive done that but some products still appear in white boxes with white text|(i presume)... sorry to bug you on this one..apologies And now my footer has decided to live in the header section...sigh... Quote Link to comment Share on other sites More sharing options...
♥kymation Posted May 12, 2011 Share Posted May 12, 2011 It appears that you have modified some of the code in catalog/includes/modules/header_tags/theme_switcher.php. I have no idea why you would do that. Please replace that file with the one from the distribution. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
damian1 Posted May 12, 2011 Author Share Posted May 12, 2011 It appears that you have modified some of the code in catalog/includes/modules/header_tags/theme_switcher.php. I have no idea why you would do that. Please replace that file with the one from the distribution. Regards Jim appologies have done that and no joy(( Quote Link to comment Share on other sites More sharing options...
♥kymation Posted May 12, 2011 Share Posted May 12, 2011 It's still wrong. The link to the stylesheet is showing up as <link rel="stylesheet" type="text/css" href="ext/jquery/ui/eggplant/jquery-ui-1.8.6.css" Note that the last > is missing. The line is also in the wrong place in the header, which leads me to believe you have not made the Theme Switcher mods at all and are just using a modified template_top.php. In either case you need to fix your mods to that file. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
damian1 Posted May 13, 2011 Author Share Posted May 13, 2011 It's still wrong. The link to the stylesheet is showing up as <link rel="stylesheet" type="text/css" href="ext/jquery/ui/eggplant/jquery-ui-1.8.6.css" Note that the last > is missing. The line is also in the wrong place in the header, which leads me to believe you have not made the Theme Switcher mods at all and are just using a modified template_top.php. In either case you need to fix your mods to that file. Regards Jim again your correct of course - i downloaded a test eggplant theme - as you can probably guess im a complete novice ( but am learning fast !)ill give it a bash and let you know :) Quote Link to comment Share on other sites More sharing options...
damian1 Posted May 13, 2011 Author Share Posted May 13, 2011 again your correct of course - i downloaded a test eggplant theme - as you can probably guess im a complete novice ( but am learning fast !)ill give it a bash and let you know :) okay ive checked and rechecked where the files are supposed to be and im sure there in the right places.. should i replace the header top with the one in your distribution? Quote Link to comment Share on other sites More sharing options...
damian1 Posted May 13, 2011 Author Share Posted May 13, 2011 okay ive checked and rechecked where the files are supposed to be and im sure there in the right places.. should i replace the header top with the one in your distribution? apologies template top :) Quote Link to comment Share on other sites More sharing options...
♥kymation Posted May 13, 2011 Share Posted May 13, 2011 Yes, try the copy of template_top.php in the distribution. That should get rid of the error I was seeing. Then we'll be able to tell if there is something else wrong. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
damian1 Posted May 13, 2011 Author Share Posted May 13, 2011 rather stupidly i forgot to delete line 29 :( amazingly enough as soon as I followed your instructions it all fell into place! thanks for all your assistance- you have the patience of a saint! Kind regards damian Quote Link to comment Share on other sites More sharing options...
♥kymation Posted May 13, 2011 Share Posted May 13, 2011 Glad to hear you got it fixed. We all started out where you are now, so don't worry about asking questions. Regards Jim Quote See my profile for a list of my addons and ways to get support. 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.