x
Pages:1234567...22»
May
14
2012

How to send emails from custom module in magento

index

Magento core modules provides some important functions to send emails. In todays article we will see how to send a custom email from a custom module in magento. For our example we are going to create a Sample Feedback Form and submit them to admin in our custom module Step 1: The config.xml file of the sample feedback form is shown below, here the email template name is specified, helper class and controller class is [...]

May
2
2012

How to create custom helloworld api in magento

index

Magento CoreAPI provides a set of common resources for managing customer, catalog etc. Sometimes we Need to Provide our Own API from our website to thirdparties. In this tutorial we will see how to create our own custom helloworld api in magento. For Simplicity Access Control restrictions are left out in this example. Step 1: Let us start our module with the config.xml and api.xml file in our module. config.xml defines the model class and [...]

Apr
26
2012

Facebook like sticky header using Waypoints jQuery plugin

JQUERY_LOGO2

Most interesting feature nowadays in all web apps is User Interface. Facebook has the simple and most powerful interface, the navigation like Home, Profile and other few links that stick  to the top, whenever you scroll or navigate to the bottom of the page so that user may be able to navigate where ever he/she wants. In this tutorial we will see how to create a simple sticky header in web application with Waypoints jQuery plugin. Lets [...]

Apr
25
2012

How to reverse a number in php without built in functions

php_logo_128

A Simple PHP Home work code that returns the reverse of a given number, <php $num = 1234; $rem =0; $rev =0; $originalnum = $num; while($num > 0) { $rem = $num %10; $rev = ($rev * 10)+ $rem; $num = $num /10; } echo “Original Number: “. $originalnum; echo ” Reverse : “. $rev; > The Logic here is simple. First get the given number and extract the final digit. Initially the reverse of [...]

Apr
18
2012

How to create template file from custom module in drupal

drupal

A Drupal theme is a set of files that defines the presentation layer. Drupal has its own way of styling data. After the data is fetched from database or other source, the data needs to be passed to several hook functions for adding additional data, markup and style. In this article we will see how to create a template file for theming custom module data. Step 1: Lets start with our mydons_learnthemes.info file. The .info [...]

Apr
12
2012

What is the use of session_id() in PHP ?

php_logo_128

The session_id() is one of the in built functions in PHP.  Almost in all Framework’s and CMS’s it has been utilized to find the current session.  In this tutorial we will see how to utilize this session_id() in small applications apart from Framework and CMS.  Generally the session_id() will be used to track existence of same user across all the pages of PHP application. A Realtime example would be “tracking whether same user is navigating [...]

Apr
10
2012

Using CURL Functions in magento way

index

PHP CURL library is used to fetch third party contents, transfer files and post data. Magento Wraps the CURL Functions in its library with its own wrapper functions. There is no Hard and Fast Rule that we need to only use this function, but the magento core code makes use of this library. Varien_Http_Adapter_Curl class is responsible for providing the wrapper functions. Let’s see some code snippets to understand how it works. <?php mageFilename = [...]

Apr
4
2012

How to Disable Caches programmatically in magento

index

Magento has an in built Caching System that improves the Performance of the website. But this feature should be turned off during Development and theme design to view our changes properly. Sometimes we may come across a situation like our admin panel cannot be accessed due to some unfinished code or error. Even though we fixed the code magento may cache that error page and produce the same result. Even if we cleared the contents [...]

Apr
2
2012

How to toggle character case in PHP without strlower, strupper & ucfirst (inbuilt) and Array function

php_logo_128

Toggling between upper and lower case letter is quite challenging.  There is a PHP inbuilt function’s which can do this operation  PHP: strtoupper – Manual , PHP strtolower() Function & PHP: ucfirst – Manual , the real challenge would be you have to toggle case of the given word without using PHP built in function and Array function. You might have got a chance to solve these kind of programs in the interview, some will [...]

Mar
28
2012

How to reverse a string in PHP without strrev(inbuilt) and Array function

php_logo_128

Reverse a string in PHP is pretty simple.  PHP provides inbuilt function to reverse a string PHP: strrev – Manual but knowing the logic of how it works is very simple and interesting. In the interview you may come across “Write a PHP function which should reverse the given string, condition u should not use strrev (inbuilt) function and array functions “.  You can answer this question with few steps, Assign the given string to [...]

Pages:1234567...22»

Give us LIKE

Keep Updated Weekly

"It's Time to BE — the World You Want to See" Subscribe Free & Tell Your Friends

Categories

Data Warehoues

Offers !

Offers !

Offers !