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 »

Modern PHP with Composer

For some of you who may not know about composer for PHP 5.3 and above, I’d like to summarize what I’ve discovered about this powerful tool so far. Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. (composer.org). To use it, go to the website and download the Composer-Setup.exe for windows or run a terminal to get the latest Composer version by command curl…

Continue reading »

How to detect screen resolution

PHP does not provide native function that can detect the device display resolution. Java Script can be used in this case, which will detect the display resolution. The script will do so, by using the width and height features of the screen. The required code for this has to be inserted into a HTML document. Once it is done, the settings can be switched to the PHP script through proper coding methods. This will be the codes that you can use to make your website…

Continue reading »

How to stop a webpage from auto refreshing constantly

There’re a few questions related to this matter I received today from my clients. Some of them have tried “break;” and “window.stop();” and “pause();” and “window.location.reload(false);”, … you name it; however, non of them works. There’s a trick to reload a webpage once and stop the webpage from auto-refreshing itself. At the end of the URL, add the pound sign like this # in the Get or Post URL. Then when you retrieve the value by GET/POST variables, remember to remove the # sign by…

Continue reading »

Editor issue with fresh installation of WordPress 3.5.1

For those of you who install fresh WordPress 3.5.1, you may experience some buttons / links of the HTML editor didn’t work such as the toggle between View/Text button, the Add Media or Add Image button. If it behaves so, this is another option you can do to fix it. 1) Back up all your WP files and Database 2) Go to this website http://wordpress.org/download/release-archive/ and download Version 3.4.2. 3) Install on your server. 4) Now log in as WP Admin and upgrade to 3.5.1.…

Continue reading »