Archive for the ‘web development’ Category

Are you looking for a regular expression to make clickable url in the string? Yes!, you will get your solutions here: echo preg_replace("/http\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/", "$0", $string); If you want to open url in new tab...

Sometimes we written a code to enter some dynamic entry in the table but did not want to enter duplicate records for same id ( not primary field). and we found that we have entered many records in the table and not it is not possible to delete record...

In most cases we see that when we try to open any site then it add 'www' in the url or remove from the url. This can be manage by Htaccess in general sites on the server. Wordpres provides a good facility to manage this url setting. 1. Go Settings >...

In most cases, an user (A developer) need to write own code to generate an order, generate invoice for an order or generate shipment for an order then he need both order id and its increment id. You can get this increment value by following...

When I tried to export or import any profile, then I got a fatal error: Fatal error: Call to undefined method Mage_Adminhtml_Block_Abstract::getexceptions() in .......\app\code\core\Mage\Adminhtml\Block\System\Convert\Profile\Run.php on line 167 To...

I installed Magento on my local server. When I tried to add new category then I got a fatel error. What I did and what I got: I click on catalog > Manage Categories I got Fatal error: Call to undefined method...

In most cases we need to upload something on server without refreshing the page. for example we want to upload an image from popup window. But it will refresh the page and we will lost our popup and its content... so for this type of problems we providing...

What is the GD library? GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and "wrappers" are available for Perl, PHP and other languages. GD creates PNG, JPEG and GIF images, among other formats. GD...

Many times developer gets the time problem during project development. Because he works on date function which provides by PHP but site works on different server which time is different from developer country. So for this case you can use magento time...

Mostly time we need to create some variables at run time. because we do not want to write same line. For example you have an array like : $user_details = array( 'name' => 'test1', 'email' => 'test@example.com', 'phone_number' =>...

Sometimes we need to develop a website with Hindi font. But main problem is how to insert content in Hindi in admin panel. so here is a solution by this admin can enter content in Hindi font. It will work like: When admin type any word like 'welcm' and...

In most cases we need to get the current logged in user information like his/her email address, Id, any other attributes value. then we can get this by below code : //Customer Email...

According to magento characteristics, we can get the custom created product attributes at front side in easy way by $_product->getCustomCreateAttribute() But when we create an attribute for an category then magento does not show by...

This is helpful during write the plugin or widget for...

many times we need to do operation on two column values and show in the admin panel. for this we have to follow these steps: 1. Add column in your Grid.php file: 2. Now create a folder in the AdminHtml folder with name 'Renderer' 3. Create a...

Mostly all Models in the Magento have a corresponding Collection object that can be used to fetch multiple instances of a Model. To instantiate a Product collection, do the following $collection =...

My last two posts told to create javascript and html file. This post will tell you last step to drag and drop div are with pure javascript ( without jQuery ). Add below css code to head tags in the index.html file: body{ font-family: Trebuchet...