Ecommerce Templates > WordPress > Convert to the WordPress version
If you are currently using Ecommerce Templates and are running the PHP version of the shopping cart it is possible to switch to using WordPress by following the steps below. We also offer a Wordpress Conversion service if you would like us to carry out the work for you. This is available to current ASP and PHP ECT users.
You will need to be currently using the PHP version of Ecommerce Templates - Version 6.5 or above is required. You can check your version number by logging into your control panel and you should see the version listed at the top of the main admin page eg Ecommerce Plus PHP v6.4.1.
Check with your host that your server is running a minimum of PHP v5.6. If that's not the case they should be able to update that for you.
You will need a copy of WordPress installed on your server and that will run off its own database. If you want to use one of our themes with ECT shopping cart software already integrated you can purchase that as Replacement Software and you can skip the integration steps below. Otherwise you will need to install the theme you want to work from and then complete the following steps.
As you are already running Ecommerce Templates you can use your current database, settings and products for the new set up. You will need to make sure you are running Version 6.3 or above of ECT and you also need to make sure that your db_conn_open.php file is set up for a mySQLi connection.
Open db_conn_open.php in a text editor and make sure it looks like this
<?php
// 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);
if(mysqli_connect_error()){
ob_clean();
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>';
die('</body></html>');
}
?>
If it doesn't copy the above into db_conn_open.php and put back your values for the user, database, password and host.
The WordPress integration require slightly different syntax for the parameters in vsadmin/includes.php. Open up that file in a text editor and change entries from for example
$useemailfriend=TRUE;
to
$GLOBALS['useemailfriend']=TRUE;
Other examples would be
$GLOBALS['emailfromname']="Your Store Name";
$GLOBALS['actionaftercart']=3;
etc.
You should now be ready to set up the store pages. These are the same 8 or 9 pages you have on your current site, for example categories.php, cart.php, products.php etc.
This is a two step process, first of all you will need to edit the header.php file in your WordPress admin and then set up those 8 or 9 stores pages in a text editor. Details of both these steps can found on our WordPress Installation help page.
Once you have completed Steps #4 and #5 you can upload the store pages you've created to the store root, type the URL into the address bar of your browser and make sure they are showing correctly.
The last step is to add store pages to your Wordpress menus and install any of the plugins you want to use.