How to delete test orders in Magento

Following queries will single Magento orders. where prifix_ is your database table prefix if you use one. 100000001 is the order number that you would like to delete

Read this article…

Time conversions

Use following function to convert time into different units e.g. days, months, years, weeks etc It take the value in seconds.

Read this article…

Shorten a string…

This simple function returns a shorten string back.

Read this article…

How to calculate distance between two locations

A very useful function that can be used to calculate distance between two points using latitude and longitude values. $unit parameter can be passed to get return in miles, kilometers, or nautical miles. How to use: Another function:

Read this article…

Saving default component settings in Joomla 1.6 and 1.7 component installation

When developing a component for Joomla 1.6 / 1.7 I came accross the issue that it does not save defaut values in database. So users had to open component configuration and save to have the settings take effect. Looking into components folder in #__component_name show ‘{}’ meaning no parameters at all. Solueiton was to use postflight [...]

Read this article…

How to install a new language in Joomla 1.5 websites

Joomla content management system comes offers various language packs and translations. You can download language packs from following URL: http://joomlacode.org/gf/project/jtranslation/frs/   Once you have the language files that you want to install on your computer go ahead and login into Joomla backend at [your_website]/administrator and go to Extensions > Install/Uninstall.   After installation you can [...]

Read this article…

Login into a Joomla website using PHP and CURL

Following PHP script uses CURL to login into a Joomla 1.5 website to access private pages.

Read this article…

Creating zip archives in PHP

PHP comes with a ZipArchive class that lets us create and manipulate .zip files. Creating a Zip file using PHP Following code will create master.zip with files containing master.css, new.css, layout.css Extracting a Zip file using PHP

Read this article…

Installing Joomla via SSH

SSH (“Secure SHell”) is a means of establishing a secure command-line shell interface on a remote system. Log into your server via SSH and navigate to location where you would like to install Joomla e.g To get the path for file to download goto: http://joomlacode.org/gf/project/joomla/frs/?action=index use wget in SSH client (e.g. putty) to retrieve the [...]

Read this article…

Installing Magento via SSH With The Full Download

Following code used version 1.6.0.0, make sure to change the version number if you want to install a different version number: To delete magento folder and tar file:

Read this article…