LOL sing it girl!
Printable View
Ok, this worked fine on my test site, but installing it into a 150 live store gives me this error:
Suggestions?Quote:
PHP Parse error: syntax error, unexpected '}' in includes/modules/recent_products.php on line 20
Compare the includes/modules/recent_products.php files in your test and live store.. is the line where you get the error in your live store different?? and I don't use the line number as it's line 20 in the live store.. that same line might be a different line number in the test store..
Unable to compare. I uninstalled the mod from my test store once testing was completed.
During the initial install on the live store, filezilla kept timing out and disconnecting. So this morning, I did a complete uninstall, reinstall of the mod in case any files were corrupted the first time around.
Same results. The code in includes/modules/recent_products.php, lines 17-21 is below. I don't know a lot about php code...but I don't see what's wrong with it.
Code:if (RECENT_VIEWED_PRODUCTS_MAXIMUM < 1)
//set the maximum number of recently viewed products here
$maximum_recent = 5;
} else {
$maximum_recent = RECENT_VIEWED_PRODUCTS_MAXIMUM;
You're missing the { that should follow the if test:PHP Code:
if (RECENT_VIEWED_PRODUCTS_MAXIMUM < 1) {
//set the maximum number of recently viewed products here
$maximum_recent = 5;
} else {
$maximum_recent = RECENT_VIEWED_PRODUCTS_MAXIMUM;
Ahhhhhhhhhhhhhhh.. this totally explains the error.. since the error says that a closing bracket was found when there was no opening one..
Scriptjunkie, if you have a program like Developer's Notepad, it might have been able to help you spot this since it colors the code, and you can usually spot invalid stuff (like missing opening brackets..) because it would be colored differently.. Hard to explain this really.. If you use this program you will see what I mean.. Great for novices like myself to troubleshoot stuff with.
Hmmm....ok...now I'm getting these errors:
andQuote:
PHP Warning: require(includes/templates/template_default/templates/tpl_modules_recent_products.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /includes/templates/custom/templates/tpl_product_info_display.php on line 302
This is the code on line 302 of tpl_product_info_display.php:Quote:
PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/templates/template_default/templates/tpl_modules_recent_products.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /includes/templates/custom/templates/tpl_product_info_display.php on line 302
PHP Code:
<!--bof recent products module-->
<?php require($template->get_template_dir ('tpl_modules_recent_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates') . '/tpl_modules_recent_products.php'); ?>
<!--eof recent products module-->