Archive for August, 2010

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 wordpress developers write the code to create widgets in admin side. and he use following code: var ajaxurl =''; var data = { action: 'action_function_name' }; // since 2.8 ajaxurl is always defined in the admin...

Many times we need to show all roles in a dropdown for our widget and we try to find in database but we are unable to get correct value.. so here I am providing a good solution to get all list of...

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 =...

Today I have work in magento and work was save multiple dates in an attribute witout entering multiple values in one field. and need to provide multiple text box ( with date icon to select date )where user can select date and submit the form. On the...

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...

After reading my previous post Drag and Drop div area with pure javascript - Step 1, you have created javascript file draganddrop.js. Means you can add this javascript file to html page. so create a file index.html file and put below content in the head...

Today I have to work on drag and drop functionality and I found that on mostly sites it provides using Jquery but I have to develop with pure javascript. so I found best code for it. and this was the solution : First create a file draganddrop.js and put...

If you want to show any div area in the middle on click any link or button then follow these steps: 1. First download and add JQuery js in your file. 2. now create a function If you want to show any div area in the middle on click any link or button...

This is most useful when you don't know that what will be table prefix on server side. This situation may be generate when you are developing project at local system and you know table prefix and you have no access on server side so you are not able to...

Any developer wants to check what sql is executing during page load. so he can check and identify the getting errors: To print the sql go to folder : app\code\core\Mage\Catalog\Model\ and open file Layer.php search the function : and...

Javascript Trim Functions Use the code below to make trim a method of all Strings. These are useful to place in a global Javascript file included by all your pages. String.prototype.trim = function() { return...

Magento comes with built in function for retrieving URL paths. Function is called getBaseUrl() and its located under Mage class. However, function is not documented as it should be. Documentation only states that function retrieves $type parametar...

Its a very simple:


Categories

By Google