We have compiled a list of the most common problems reported with the Ecommerce Templates WordPress integration.
If you are having an issue and don't find it addressed below, please do post on our support forum and one of the developers will be able to help you out.
If you receive this error on your store pages it means that the PHP include lines haven't been added to the file header.php or that you have updated your theme and the header.php file has been overwritten.
In WordPress go to Appearance > Editor page and choose Header (header.php). The very first line will probably be
immediately after that add
so the page now begins like this
It may be the header.php begins with a doctype declaration like this
...if that is the case add the lines above so the beginning of header.php now looks like this
include "vsadmin/inc/metainfo.php"; ?><!DOCTYPE html>
If the title of the page shows as "Page not found" but the content shows correctly it just means that the page isn't available in your WordPress admin under All Pages - just add the page there using the correct permalink for that page. You don't necessarily need to add it to any of your menus but it will need to be listed there.
This may well happen if you server is running an older version of PHP / mySQL. Make sure your server is running a minimum version of PHP v5.3 (v5.0 with mySQLi installed) If you are not sure of that a quick note to your host should sort it out. Once you have been updated to 5.3 or above check your vsadmin/db_conn_open.php file is set up to use the mySQLi connection required by this integration. It should look like this
// You host should be able to provide you with these settings if you do not know them already
$db_username = "xxxxx_username"; // Your database login username
$db_password = "PaSsWoRd123"; // Your database login password
$db_name = "xxxxx_dbname"; // The name of the database you wish to use
$db_host = "localhost"; // The address of the database. Often this is localhost, but may be for example db.yoursite.com
// Please do not edit anything below this line. //
$GLOBALS['ectdatabase'] = new mysqli($db_host, $db_username, $db_password, $db_name);
print '<html><head><title>Database connect error</title></head><body><div style="margin:20px;clear:both">Database Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error() . '</div>';
print('<div style="margin:20px;clear:both">You need to set your database connection in vsadmin/db_conn_open.php</div>');
print '<div style="margin:20px;clear:both">For help setting your database connection please see...<br />';
print '<a href="https://www.ecommercetemplates.com/phphelp/ecommplus/instructions.asp#dbconn" target="_blank">https://www.ecommercetemplates.com/phphelp/ecommplus/instructions.asp#dbconn</a></div>';
print '<div style="margin:20px;clear:both">We also have a support forum here...<br />';
print '<a href="https://www.ecommercetemplates.com/support/" target="_blank">https://www.ecommercetemplates.com/support/</a></div>';
If it doesn't copy the above into db_conn_open.php and put back your values for the user, database, password and host.
This probably means that the user you set up hasn't been assigned to the database or that it doesn't have full permissions for the database it was assigned to. Go to your hosting control panel and make the user has been assigned and has full permissions for the store database.
Make sure you have run the file createdb.php in your browser. After running the file you should get a successful message which means all the store database tables have been created.
The most likely reason for this is that your header.php doesn't start with the following code
Check the address bar when adding to cart. It could be you are switching to the URL with / without the "www" eg the products page is not using the www but the cart page is. It may be you need to make a change to your .htaccess file, our developers can help with that on the support forum but do also check that in your store control panel, your Store URL is set correctly in the main admin settings page.
The syntax is slightly different for the includes.php file in WordPress. For example on a regular PHP if you wanted to turn on the "Email a Friend" feature, you would add
to the list but for the WordPress integration that should be
Other examples would be
$GLOBALS['emailfromname']="Your Store Name";
Make sure you have this line in header.php
<link rel="stylesheet" type="text/css" href="/css/ectcart.css"/>
and that you have uploaded ectcart.css to the /css/ folder in the site root.
IIf you are using ECT v6.9.3 or above make sure you have uploaded ectcart.js to the /js/ folder in the site root and that you have this line in header.php