Quote Originally Posted by HenryGale View Post
I've run into an odd problem implementing Simple Google Analytics. When I finished all the installation steps in the readme, I found that my shop main page was loading completely blank, only the black background is visible.

I tracked the problem down to the code in tpl_main_page.php. When I add the code:

PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(
$template->get_template_dir('.php',DIR_WS_TEMPLATE$current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
to my tpl_main_page.php, my main page goes blank. When I remove it, it works again.

Any ideas? I'm using the default tpl_main_page.php, as my template didn't have one. So this code is the only change from the Zen Cart default.

Thanks in advance!
HG

A blank page means there is an error in your PHP code somewhere. Typically this happens when one inadvertently alters other code or places the php code listed in such a way where it mess with current code on the site.

To find out where your problem is make sure you have error checking turned on (default in 1.3.9 versions but if you don't have that you can download the error checking file "Debug Error logging").

To find out where the error is then, place your code back on the page and then try to access it. When you get the white page an error log will be written to your 'cache' folder (with the date / time ... this is how you tell which log goes with which action. If there are too many you can delete the error logs and repeat the above step so there is only one in there when needed.)

Open that error log and it will tell you the exact issue and line of code to look at. If you can;'t figure out what the error means, post it here and I'll walk you through it.