Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Live vs Test


oscNewbster

Recommended Posts

Is there a recommended procedure to test modified pages when you must use a single server and that server already has a live deployment of osCommerce?

 

On simple sites, if I have index.html live, I can edit index_test.html and view it until I decide to commit my changes by overwriting index.html with this index_test.html file. But since osCommerce is more complex, I assume I may need to reference additional "_test" files.

 

Also, in osCommerce, if I have index.php, I notice by just changing the name to index_test.php the layout may now render incorrectly. This is stumping me. Only the filename is different. Is there something in filenames.php (or elsewhere) I should change due to this new test file?

Link to comment
Share on other sites

There are different ways to get around this problem. You can either store a copy of your shop on your server in a different directory or run a copy on your local computer using e.g. EasyPHP.

 

If you want to do the first, create a directory like /testshop in the same manner than your live shop. Then copy all the files there and alter the configure.php according to the directory structure. Disadvantage is that you are using the same database as long as you didn't create a new one for testing purposes.

 

The second enables you to develop and test the shop offline on your local computer even without an internet connection. After testing the files you can upload anything altered to the production server.

Link to comment
Share on other sites

Is there a recommended procedure to test modified pages when you must use a single server and that server already has a live deployment of osCommerce?

 

On simple sites, if I have index.html live, I can edit index_test.html and view it until I decide to commit my changes by overwriting index.html with this index_test.html file. But since osCommerce is more complex, I assume I may need to reference additional "_test" files.

 

Also, in osCommerce, if I have index.php, I notice by just changing the name to index_test.php the layout may now render incorrectly. This is stumping me. Only the filename is different. Is there something in filenames.php (or elsewhere) I should change due to this new test file?

Option 1 - Create a subfolder in your root directory, call it test, and place the catalog folder in it. Your test site will be accessed "mydomain.com/test/catalog". The files in your live site will not be touched. You'll be modifying files in your test folder not the live one.

 

Option 2 - Download XAMPP and install in your computer. It provides the necessary environment for oscommerce to run in your local computer. You can make changes without going to your live remote web server. All the changes stay in your computer. When ready, you can upload to your live web server.

Link to comment
Share on other sites

Thanks Nullachtfuffzehn and BryceJr.

I actually was trying MAMP to get familiar with a new install of osCommerce. It didn't even occur to me to grab the live site and run it locally like this. Also, this method will provide me with a local backup.

 

Any idea about

Also, in osCommerce, if I have index.php, I notice by just changing the name to index_test.php the layout may now render incorrectly. This is stumping me. Only the filename is different. Is there something in filenames.php (or elsewhere) I should change due to this new test file?

 

The only difference I've noticed in the rendered html is the correct file has:

</tr></table></div>

while the incorrectly rendered html is:

</table></tr></table></div>

 

which to me is very strange since, as best I can tell, only the file names are different and they should be including the same files.

 

I'm thinking it could have something to do with how osCommerce uses PHP_SELF often, and that I need to make other changes to reference my new test file.

I tried to add this to application_top.php, but still no joy

$PHP_SELF = '/index_test.php'; $HTTP_SERVER_VARS['PHP_SELF'] = $PHP_SELF;

Link to comment
Share on other sites

Thanks Nullachtfuffzehn and BryceJr.

I actually was trying MAMP to get familiar with a new install of osCommerce. It didn't even occur to me to grab the live site and run it locally like this. Also, this method will provide me with a local backup.

 

Any idea about

 

The only difference I've noticed in the rendered html is the correct file has:

</tr></table></div>

while the incorrectly rendered html is:

</table></tr></table></div>

 

which to me is very strange since, as best I can tell, only the file names are different and they should be including the same files.

 

I'm thinking it could have something to do with how osCommerce uses PHP_SELF often, and that I need to make other changes to reference my new test file.

I tried to add this to application_top.php, but still no joy

$PHP_SELF = '/index_test.php'; $HTTP_SERVER_VARS['PHP_SELF'] = $PHP_SELF;

This >>topic might be of help to you.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...