| MyECP / OsCommerce 2.2 Installation Guide |
|
|
|
|
Thanks for chosing MyECP and we hope you will have a good time to build your project. Part 1 - IonCube Loader Installation Partie 2 - MyECP Installation in OsCommerce 2.2 <?php
if (isset( $_SERVER["HTTPS"] ) && $_SERVER["HTTPS"] == 'on') { $myecp_is_ssl_connection = 'https://'; } else { $myecp_is_ssl_connection = 'http://'; } $parse_url = parse_url( $myecp_is_ssl_connection . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ); $pathinfo = pathinfo( $parse_url['path'] ); echo 'JPATH_BASE = ' . dirname( __FILE__ ) . '<br />' . 'JURL_BASE = ' . $parse_url['host'] . (( $pathinfo['dirname'] != '/' ) ? $pathinfo['dirname'] : ''); ?> Transfer it at the root of your Joomla site where are stored the following files : configuration.php, index2.php, index.php ... /**
* .::Contribution MyECP::. * * NOTE : Define Security & Include MyECP "Top" */ define( '_MYECP', 1 ); if (file_exists( 'includes/myecp/myecp.php' )) require_once ( 'includes/myecp/myecp.php' ); Add to the last but one line or just before ?> this : /**
* .::Contribution MyECP::. * * NOTE : Define Security & Include MyECP "Bottom" */ if (file_exists( 'includes/myecp/myecp.php' )) require ( 'includes/myecp/myecp.php' ); This is how it should be : <?php
/* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2008 osCommerce Released under the GNU General Public License */ /** * .::Contribution MyECP::. * * NOTE : Define Security & Include MyECP "Top" */ define( '_MYECP', 1 ); if (file_exists( 'includes/myecp/myecp.php' )) require_once ( 'includes/myecp/myecp.php' ); // start the timer for the page parse time log define('PAGE_PARSE_START_TIME', microtime()); .. .... ...... define('WARN_SESSION_AUTO_START', 'true'); define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true'); /** * .::Contribution MyECP::. * * NOTE : Define Security & Include MyECP "Bottom" */ if (file_exists( 'includes/myecp/myecp.php' )) require ( 'includes/myecp/myecp.php' ); ?> For the third file edit "/includes/footer.php" and follow these instructions : /**
* .::Contribution MyECP::. * * NOTE : Joomla Footer */ if (is_object( $Functions_MyECP )) $Functions_MyECP->MyECP_HTML_Header('footer'); This is how it should be : <?php
/* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require(DIR_WS_INCLUDES . 'counter.php'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="1"> .. .... ...... </table> <?php } /** * .::Contribution MyECP::. * * NOTE : Joomla Footer */ if (is_object( $Functions_MyECP )) $Functions_MyECP->MyECP_HTML_Header('footer'); ?> And here is the fourth file which will be important to keep a perfect synchronization of the sessions. To do so just edit the file "includes/functions/sessions.php" and follow this : if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
And replace it with : if (!$SESS_LIFE = ini_get('session.gc_maxlifetime')) {
That's how it sould look like : <?php
/* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2008 osCommerce Released under the GNU General Public License */ if ( (PHP_VERSION >= 4.3) && ((bool)ini_get('register_globals') == false) ) { @ini_set('session.bug_compat_42', 1); @ini_set('session.bug_compat_warn', 0); } if (STORE_SESSIONS == 'mysql') { if (!$SESS_LIFE = ini_get('session.gc_maxlifetime')) { $SESS_LIFE = 1440; } .. .... ...... Now we only have to delete the left and right modules because osCommerce do not work as a template. We must edit the following files "/includes/column_left.php" and "/includes/column_right.php" <?php
?> If you replace all codes by this, your modules will disappear and let place to those of Joomla and of course MyECP.
|