How Zen-Cart login and add to cart forms work

To login to Zen-Cart system either as a customer or a store Admin, Zen-Cart restricts access to a form that contains the securityToken value. This is a must. So if you need to build a log-in form in the outside of Zen-Cart framework, you must find a way to include this securityToken before you submit to data to the Zen-Cart login process. Beside the log-in mechanism, Zen-Cart has the cart functionality that require the securityToken also. Here’s all the data values that you need to…

Continue reading »

Coupon Admin fixes

This is the fix for Coupon Admin Zencart V1.5.3. If the option “All coupons” were selected, there’s no record display. This is incorrect. The coupons table has 5 valid coupons and in status “Y” and 1 coupon in status “N”. This option should display all records no matter what status it is. File changed: /admin/coupon_admin.php $status_array[] = array(‘id’ => ”, ‘text’ => TEXT_COUPON_ALL); Use this query instead: $cc_query_raw = “select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active, coupon_zone_restriction from ” . TABLE_COUPONS . “…

Continue reading »

How to debug Email in Zen-Cart

If you have an issue sending out an email from ZenCart such as order notification, regular marketing mails,… you may want to add this file into extra_datafiles, so that you’ll see the list of errors displayed on your browser. If you’re sending email from ZenCart Admin, place the file inside admin directory. – /myadmin/includes/extra_datafiles/email_debug.php If you’re sending email from Customer interface, place the file inside includes/extra_datafiles directory. The file contains this line of codes: define(‘EMAIL_SYSTEM_DEBUG’,’5′);// set to 0 to turn it off again

Continue reading »

Zen-cart email wasn’t sent thru SMTP Mail server

I hope my discovery can help some of you on Zen-Cart 1.5.3 running on Window XP. To send mail out successfully, your Windows server has to have Visual C++ 2008 redistribution package installed, OpenSSL for Windows, and some config in php.ini and Apache bin directory. 1. Enable php_openssl.dll and sockets from php.ini if phpinfo only displays “tcp, udp,” in Registered Stream Socket Transports. extension=php_openssl.dll extension=php_sockets.dll 2. Make sure that the extension_dir points to my extension directory, not the default ./ location. extension_dir = “c:/php53/ext” 3.…

Continue reading »

Modify Contact Us page in Zen-Cart

If you want to modify copy/text on this page, it’s very simple. Just go to YOUR-TEMPLATE directory under language dir to modify the way you want. includes/languages/english/html_includes/YOUR_TEMPLATE/define_contact_us.php However, if you plan to modify the form significantly, you’d look to spend more time to add codes in order to process the form. There’ll be multiple files you’ll have to open to modify in a PHP Editor such as EClipse or NuSphere client software. You can also add more php files and use require_once function to includes…

Continue reading »