24 Feb 2014

How to disable and enable magento's default block

Generrally in magento store some of the default functionality and modules are there which comes by default in some location.Some people needs these default blocks and some don't.That means they need to disable those undesire modules or blocks.In this article I am going to show you how to disable some of default modules and blocks of content, like the callout banners in the right and left columns, or the poll, or newsletter signup.Also here you will be getting two different ways for disabling default modules and block content like:


20 Feb 2014

Get list of categories ,subcategories and sub-subcategories in custom script

This tutorial is going to show you one of the ways to list all sub-categories and sub sub categories through custom script for your Magento store.In This script I have shown all subcategories on the basis of main category means Root Catalog's Id.
If you change the $id = 1 then it will display suabcategory upto the first level that looks like below.

18 Feb 2014

Magento : How To Remove Back To School Block On Right Side That Comes Up After Checkout

Simple You can do by commenting the some codes in catalog.xml file by :
app\design\frontend\base\default\layout\catalog.xml
if you have installed any theme then according to that theme location :
app\design\frontend\default\yourtheme\layout\catalog.xml

10 Feb 2014

Magento : Get Base Url,Skin Url,Media Url,Js Url,Store Url and Current Url

There are different way to retrieve different URL paths depending in which section you’re editing.So Magento Mage Core, Admin Static Blocks, or Phtml edits are usually includes getting url path such images, javascript, base url, media and store url.Lets get the different URL on different location by following the below examples.

9 Feb 2014

How to Install Yii Application in Wamp Server(windows-7/8)


This is my first tutorial regarding Yii so I am showing all necessary steps and how to install the framework in wamp server.Before starting your Yii application in windows server you need set your php engine location in environment variable.Installing Yii framework is not as easy as Codeigniter, which is basically just copy and pasting framework in WAMP root. Installing Yii is little bit tricky as compared to Codeigniter. In this tutorial I will try to make it easy by giving you step by step explanation. So lets start.

Before giving all the steps I assume you have installed your wamp server having the directory
"C:\wamp\" and also I am showing all the details by testing through my system.

28 Jan 2014

Odesk php 5 exam question and answer

Question: You have two strings, which you want to concatenate.

$str1 = ‘Have a ‘;
$str2 = ‘Nice Day’;
The fastest way would be:

a. $str1.Concat($str2);
b. $str1.$str2;
c. “$str1$str2”;
d. None of the above

23 Jan 2014

Magento: event observer with save before and save after

Here I am going show how to create a simple product attribute programatically.I have created a simple script which is creating the product attribute when I do install my module or upgrade my module.So please look at the below code which I have created.

21 Jan 2014

Magento: different form fields in admin form part two

For First Part Please take look
Magento : different form fields in Admin form part one
In this article I am going to show how to add different form fields that you can use in admin forms e.g : text,button,radio..etc. app/code/local/MyNamespace/MyModule/Block/Adminhtml/Mymodule/Edit/Tab/Form.php

19 Jan 2014

Magento: Creating custom attribute using sql setup in custom module

/* Magento: Creating custom attribute using sql setup in custom module */
Here I am going show how to create a simple product attribute programatically.I have created a simple script which is creating the product attribute when I do install my module or upgrade my module.So please look at the below code which I have created.

13 Jan 2014

Magento: Submit custom form with magento’s built-in ajax with validation

/* Magento: Submit custom form with magento’s built-in ajax with validation */
Suppose I have created a custom form and I want submit that form through through ajax funtionality with magento’s own validation style.As you know for validating(not leaving blank) a field in magento we simply use a class called class="required-entry".So I have used required-entry class to validating my form. Below is my custom form which I have placed inside view.phtml file for giving product information through email to customer. If customer will click the link “get product details” then this form will be appeared and then he can fill up the form and submit for getting details.

11 Jan 2014

Magento: How To Subscribe Customer Email Id To Newsletter Subscription List Automatically

Sometimes we need to auto subscribe the customer email address without knowing to customer if he visit to our site or click on any events in the site .So in magento that functionality is also available but that generally goes through customer permission .but here you can set by below code to newsletter subscription list .

10 Jan 2014

Magento :Custom Form With Default Validation

/* Magento :Custom Form With Default Validation */
When I was new in magento.I had found in registration form of customer there are some default validation . I was really getting wondered that where that is ? Now I don’t like you to be wondered .That means there are some default classes available in magento which are present in validation.js file.So please the following details then you will be understood.So I have taken the below html as an example html.

1 Jan 2014

How To Validate Upload File Using Javascript

Here is my file type field and I have placed in my custom form .So I want to validate that file when user will browse any file means select any file. That event will occurred with onchange event. So I called a java script function check_photo() on onchange events.