Best eCommerce Tutorial: Debug an Error in Zencart

Leave a Comment
ZenCart truly is the art of e-commerce; free, user-friendly, open source shopping cart software. The ecommerce web site design program is being developed by a group of like-minded shop owners, programmers, designers, and consultants that think ecommerce web design could be and should be done differently. 

Some shopping cart solutions seem to be complicated programming exercises instead of responding to users' needs, ZenCart puts the merchants and shoppers requirements first. Similarly, other shopping cart software programs are nearly impossible to install and use without an IT degree, ZenCart can be installed and set-up by anyone with the most basic web site building and computer skills.

There are hundreds of shopping cart programs available, but none come close to offering the level of options, features and support available with ZenCart. Even the commercial programs have a hard time competing.

Best eCommerce Tutorial: Debug an Error in Zencart

By default Zencart disables all kinds of errors. Due for this when an error is encountered then all of you might view is the “dreaded white page” which is poor programming apply if you're creating in PHP. As PHP is really a scripting language it stops execution when it encounters an error because of that you should have a exhausting time debugging your application. You won't solely waste your effort and time but as well as many of the hair left in your head. I do know I did. Simply joking!

You have to allow error reporting with your software throughout development and disable it when deploying it towards the production server. Open up the includes/application_top. php file. Look for error_reporting and you'll face a block of code as follows:
if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true) {
ini_set('display_errors', '1');
error_reporting(E_ALL);
} else {
error_reporting(0);
}


The code checks for the constant STRICT_ERROR_REPORTING if its true and then it enables error_reporting and likewise shows the errors on the online page. In case the false (by default) then error_reporting is disabled. You have to outline the constant as the not present inside the code. Simply add the listed line just before the if block and in fact now the block of code can seem like: define('STRICT_ERROR_REPORTING', true);
if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true) {
@ini_set('display_errors', '1');
error_reporting(E_ALL);
} else
{
error_reporting(0);
}

Currently whenever you run the web site it'll show all notices, warnings and errors. Don’t get frightened in case you observe lots of lines come up on the online page. This can help you to debug the difficulty and proper it. This also benefits you in creating great code and gives you the chance to build the code as eror free as you can.

Best and Cheap Zencart Hosting Recommendation

After finishing the tutorial mentioned above, if you continue to have a ecommerce web host in your mind, then it ought to be worth trying. Or if you currently feel confused and want some suggestion, then you'll read our previous article about Zencart hosting recommendation
Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment