Sometimes we face problem in XAMPP and WAMP that rewrite module (mod_rewrite) does not work properly
It is because the rewrite module is not enabled by default in Apache’s configuration settings.
But you can enable it manually by doing few simple steps:
The configuration file generally locates at:{apache_dir}/conf/httpd.conf
If you are using XAMPP or WAMP package then you will find the file at:
{xampp_dir}/apache/conf/httpd.conf
{wamp_dir}/apache/conf/httpd.conf
Search for the following string:
#LoadModule rewrite_module modules/mod_rewrite.
so and uncomment it (remove the ‘#’ sign).
Now search for another string AllowOverride None and replace it by AllowOverride All
Finally save the changes, close your text editor and restart your apache server.
Tuesday, December 25, 2012
Sunday, December 23, 2012
Magento Remove Proceed Button in Cart Page
As Cart has two Proceed checkout button at the top and Bottom but Sometimes we require to remove the Proceed checkout button in cart
Magento
proceed checkout
Wednesday, October 31, 2012
Magento Corssell and Upsells
Some time we get confused what is Crossell and Upsell. So let's understand the meaning and concept of the These two which are very important
An upsell is to get the customer to spend more money – buy a more expensive model of the same type of product, or add features / warranties that relate to the product in question.
A cross-sell is to get the customer to spend more money buy adding more products from other categories than the product being viewed or purchased.
More over they are confusing but let's take an example
I have Purchased the Nokia Mobile so here
Samsung Mobile == Upsell product
Micromax Mobile == Upsell product
LG Mobile == Upsell product
Nokia Headphone = Cross Sell
8 GB Memory Card = Cross Sell
So this is the only difference for upsell and Crossell
Hope it will helpful!
An upsell is to get the customer to spend more money – buy a more expensive model of the same type of product, or add features / warranties that relate to the product in question.
A cross-sell is to get the customer to spend more money buy adding more products from other categories than the product being viewed or purchased.
More over they are confusing but let's take an example
I have Purchased the Nokia Mobile so here
Samsung Mobile == Upsell product
Micromax Mobile == Upsell product
LG Mobile == Upsell product
Nokia Headphone = Cross Sell
8 GB Memory Card = Cross Sell
So this is the only difference for upsell and Crossell
Hope it will helpful!
Magento
crossell product,
Upsell Product
Sunday, October 21, 2012
Magento Showing Memory Usage at the Bottom Of Footer
The purpose of the profiler is for aiding in diagnosing slow page load times.
This should never be left enabled on a deployed website.But sometime we forgot to disable There are actually two aspects of disabling it:
This should never be left enabled on a deployed website.But sometime we forgot to disable There are actually two aspects of disabling it:
1. Turning off profiling under System (menu) -> Configuration (menu item) -> Developer (tab on left) -> Debug (accordion section)
2. Make sure all calls to Varien_Profiler::enable(); are commented out in your index.php file.
Hope This will Help You
2. Make sure all calls to Varien_Profiler::enable(); are commented out in your index.php file.
Hope This will Help You
Wednesday, October 10, 2012
Magento Tool Kit for Developer
One of the most Useful Extension for the Developer point of view.
Many professional developers all over the world use this extension to find possible performance bottlenecks.
Every point of view we can handle or Easy To get All information Module,Contollers,Databse Query,Events,Block,PHTML files ,path and many more
Just check out this link and Download for Free and thanks to "mgt-commerce.com" for Providing the Best Solution for the developer
This tool Make work Easier as than ever before!
Hope this will help you.
Many professional developers all over the world use this extension to find possible performance bottlenecks.
Every point of view we can handle or Easy To get All information Module,Contollers,Databse Query,Events,Block,PHTML files ,path and many more
Just check out this link and Download for Free and thanks to "mgt-commerce.com" for Providing the Best Solution for the developer
This tool Make work Easier as than ever before!
Hope this will help you.
Magento
Tool Kit for Developer
Sunday, October 7, 2012
Magento Get Categories
Magento get All Category on Pages.Easy way to access the active ,visible,certain level f category from the Collection..Follwing are the methods which we can use to get Category
Magento
Category
Saturday, October 6, 2012
Magento Remove Compare Products and Recently Viewed Block
Some time we get confused that which template file is working for the block which we have to removed or we need to add
So generically we can go in developer mode and enable the template links setting as Yes so we can Know which is the Template file for removing the piece of Code
For Removing the Compare Product Block or Recently View Block need to do changes in two files
So generically we can go in developer mode and enable the template links setting as Yes so we can Know which is the Template file for removing the piece of Code
For Removing the Compare Product Block or Recently View Block need to do changes in two files
Magento
Compare Products
Monday, September 10, 2012
Magento Create Own Log files
Magento comes with a built-in logging facility which can be enabled and configured in the back-end under System > Configuration > Developer. Alternatively you can enable the Developer Mode for the site to enable the log (on how to do this have a look at the index.php file). The exception log is always on.
Magento Comes with a built-in Logging Facility Which can be enabled and configured
Magento Comes with a built-in Logging Facility Which can be enabled and configured
Magento
log
Friday, September 7, 2012
Magento Add new input type in custom options
By Default Magento Product Custom options has following field which have radio,checkbox,Multiple select,Select....so if we need to add new input type in that custom options so here is the code
Note : Make sure that Don't disturb the Core Files always use Magento Standard
Note : Make sure that Don't disturb the Core Files always use Magento Standard
Magento
custom options
Use Magento Outside of Install Directory
One of the coolest parts of using Magento is that it can be accessed from different parts of the server even if you’re not within the Magento root Directory then also you can access it's functionlity
The main important or you can say life of magento is Mage.php, we need to access Mage.php because It holds the Mage class and defines some of the root functionality of Magento like retrieving the model, setting up the BaseUrl path and calling the rest of the
The main important or you can say life of magento is Mage.php, we need to access Mage.php because It holds the Mage class and defines some of the root functionality of Magento like retrieving the model, setting up the BaseUrl path and calling the rest of the
Magento Add attribute Filter
Magento has filterable condition which help to sort out the result.Let Look How it works
addAttributeToFilter is a function that can be called on a product collection in Magento. it adds a condition to the WHERE part of the MySQL query used to extract a product collection from the database
addAttributeToFilter is a function that can be called on a product collection in Magento. it adds a condition to the WHERE part of the MySQL query used to extract a product collection from the database
Sunday, September 2, 2012
Magento 1.3 and Magento 1.4 Fix "call to member function toHtml()"
One of the errors you will usually encounter when you use a theme made for Magento 1.3 on Magento 1.4.1 0 version is that
"call to a member function toHtml()". There is a very easy fix for this error.
The Error comes like line number may differ
"call to a member function toHtml()". There is a very easy fix for this error.
The Error comes like line number may differ
Magento
Magento 1.3,
Magento 1.4
Magento Local.xml for updating and Overriding XMl Structure
As Magento had important role of XML.while chnaging themes or Removing any block or layout chnages we are going in the each xml file of our theme and changing but there is one more solution that each time we don't need to update the each xml
The idea behind is the local.xml, placed inside your theme layout folder to override or update all xml references for that theme.
Every change to the local.xml file is evident so there is no need to search for changes inside xml files
The idea behind is the local.xml, placed inside your theme layout folder to override or update all xml references for that theme.
Every change to the local.xml file is evident so there is no need to search for changes inside xml files
Magento
local
Saturday, August 25, 2012
Magento Accordion Menu for Layered Navigation
One of the Most powerful feature in Magento is layer Navgation for filtering the Result .Based on the Attribute filter get work but some time attributes are more so layer navigation become lengthy and we need to scroll down more which is bad impression on site so we can add accordan menu for that which will allow accordon for each atribute
Magento
Accordon,
Layer navigation
Magento Out of Stocks and Back Order
By Default Magento does not allow to add "Out of stock" product n Cart .So we will be using the concept of Backorders which is there in magento by default but it is Disbale in admin.This concept will allow to add the "Out of stock" product in Cart
Magento
Backorders,
out of stock
Magento AOE Scheduler
Magento AOE Scheduler will help to Manage your scheduler/cron tasks including a timeline view also help to check the cron running on the site
Great Extension nearly work in all magento version.Hope this will help while running cron
Magento
Cron
Saturday, August 18, 2012
Magento Add Qty Items on Grid or List View
To show the quantity of items left in stock just add the following code in list.phtml
we have added int as by default magento will show in this manner 10.00
we have added int as by default magento will show in this manner 10.00
Magento
Quantity
Magento Add Quantity box in List OR Grid
Easy way to Add the Quantity Box in Grid or View list
Just paste the below code in the list.phtml where you required
Magento
Grid,
List,
Quantity Box
Tuesday, August 14, 2012
Magento Remove index.php from url
Magento by default added the index,php in url .So,As per the SEO page will not get indexed properly SO here we have try to Remove index.php in url from both End Access Magento URL without index.php
For example:
http://domain.com/index.php/category to
http://domain.com/category
Then Just follow steps
1) Login to admin section by using the URL http://domain.com/index.php/admin
2) then go to “System >> Configuration >>Web >> Search Engines Optimization” Use Web Server Rewrites : YES
3) Go to “System >> Configuration >>Web >>Secure” Use secure URL Frontend: YES
4)Then create the .htaccess file under your the magento installed folder.
For example:
http://domain.com/index.php/category to
http://domain.com/category
Then Just follow steps
1) Login to admin section by using the URL http://domain.com/index.php/admin
2) then go to “System >> Configuration >>Web >> Search Engines Optimization” Use Web Server Rewrites : YES
3) Go to “System >> Configuration >>Web >>Secure” Use secure URL Frontend: YES
4)Then create the .htaccess file under your the magento installed folder.
Friday, August 10, 2012
Magento Adding New Field in the product Custom Options
Magento had limited field in custom Options so if we required the New or To add the New field in the magento product Custom options just follow the steps
Note : Here DEAL is the new field you have to replace by your field name
Note : Here DEAL is the new field you have to replace by your field name
Magento
custom options
Magento Remove "+" from product custom options
AS By default Magento add "+" sign in custom options .In order to Remove we need to edit file which is located in
app\code\core\Mage\Catalog\Block\Product\View\Options\Abstract.php
app\code\core\Mage\Catalog\Block\Product\View\Options\Abstract.php
just copy the file and add in local which will become
app\code\local\Mage\Catalog\Block\Product\View\Options\Abstract.php
now serach $sign = '+';
just replace $sign = ' ';
Note:just remove the (+) symbol.That's it refresh the page
just replace $sign = ' ';
Note:just remove the (+) symbol.That's it refresh the page
Magento
custom options
Tuesday, August 7, 2012
Magento Add Custom Grid in Admin
Add custom column to admin grid for your module. we will see how to add a banner image column to our grid.
For example our module name will be Magento_Banner.
Adding Banner Image to Grid
For example our module name will be Magento_Banner.
Adding Banner Image to Grid
Magento
Custom Grid
Monday, August 6, 2012
Install ionCube loader on your WAMP or XAMPP server.
Some time while running magento on WAMP or XAMPP give error about the ionCube loader..so easy solution for this just follow this step
In order to run eSoftScript Pro on your server you must have installed ionCube on your
server. Herea are 2 quick ways to install the loader:
In order to run eSoftScript Pro on your server you must have installed ionCube on your
server. Herea are 2 quick ways to install the loader:
Saturday, July 28, 2012
Magento 2 will Release at the End of this Year
Magento have announced the Magento 2 project which will be realsing at the end of this year.
Magento 2 is the result of the Magento team’s learning curve in the world of ecommerce application development since its inception back in 2001.
Magento 2. Much in the way of improved functionality and performance has been promised. Some of the new features set to be included are:
Magento 2 is the result of the Magento team’s learning curve in the world of ecommerce application development since its inception back in 2001.
Magento 2. Much in the way of improved functionality and performance has been promised. Some of the new features set to be included are:
Magento
Magent 2
Magento send Custom Email
Magneto have default some of the already made Email Template .Now we also can make the Custom email Template used as per our need ,for standard of sending the Email.let's take an example of adding the Custom Email
Magento
Custom Email
Magento upgrading the MYSQL SCRIPT for Module
Every Module in Magento have the Sql folder in which all the insert script is written but some time we need to add new field in some tables so we need to upgrade the script .You don't need to change or run the query directly in databse it's wrong way
You can upgrade your module to make your necessary database changes. To do so,
You can upgrade your module to make your necessary database changes. To do so,
Magento Add to cart in Upsell Product
Magento by default doesn't show the "Add to CART" Button in Upsell product
just need to add the following code u will get the Add to Cart Button
just need to add the following code u will get the Add to Cart Button
<button type="button" class="form-button add-to-cart" onclick="window.location='<?php echo $this->getAddToCartUrl($_link) ?>';"> <?php echo $this->__('Add to Cart') ?> </button>
Magento
Upsell Product
Saturday, July 21, 2012
Magento - Limit Displayed Characters From Product Short Description
Magento by default showing more word in the Short Description ,But some time we want to reduce the length of Short description
We can use this code wherever we required the Short Description should come with limit words
We can use this code wherever we required the Short Description should come with limit words
Magento
Short Description
Sunday, July 15, 2012
Magento Observer and Dispacting Events
What is Event?
An Event is something that occurs in a certain place during a particular sequence flow. Say once a customer completes an order, the flow sequence would be to
1. Save the order details 2. Send e-mail confirmation to customer
may be more like before loading a database model, after loading a database model, before saving the cart object and many more
Events may be emitted before or after each of these flow points to introduce custom logic.
An Event is something that occurs in a certain place during a particular sequence flow. Say once a customer completes an order, the flow sequence would be to
1. Save the order details 2. Send e-mail confirmation to customer
may be more like before loading a database model, after loading a database model, before saving the cart object and many more
Events may be emitted before or after each of these flow points to introduce custom logic.
Magento Debugging tips
Here are some Debugging tips which will help to debug magneto code.As some of the tools are also availiable which will help to debug the code easily
There is one free extension availiable for the Debugging the code ,files,DB .....click on the following link
There is one free extension availiable for the Debugging the code ,files,DB .....click on the following link
Magento
Debugging
Saturday, July 14, 2012
Magento Maximum Length of Attribute
In Magento By default maximum length of an attribute is less than 30 synbols
we can upgrade to new value just need to edit one file
app/code/core/Mage/Eav/Model/Entity/Attribute.php copy to
app/code/local/Mage/Eav/Model/Entity/Attribute.php and
Find CONST ATTRIBUTE_CODE_MAX_LENGTH = 30; and
Replace CONST ATTRIBUTE_CODE_MAX_LENGTH = 50;
Hope this will help you
we can upgrade to new value just need to edit one file
app/code/core/Mage/Eav/Model/Entity/Attribute.php copy to
app/code/local/Mage/Eav/Model/Entity/Attribute.php and
Find CONST ATTRIBUTE_CODE_MAX_LENGTH = 30; and
Replace CONST ATTRIBUTE_CODE_MAX_LENGTH = 50;
Hope this will help you
Magento
Attribute
Magento Condition based on the Layout
Sometime we require to place the condition for particular layout you can use this two methods
Magento
Layout
Friday, June 1, 2012
Magento Set Title,Meta keywords and Meta Description
We can set the Title,Metakeywords and Meta description for our Custom Module.We can use the phtml or Php file for changing the title,Meta keywords and meta description
For Example we have title and Template in our XML file we will change though our php or phtml file
For Example we have title and Template in our XML file we will change though our php or phtml file
Magento
Description,
Keywords,
Title
Monday, May 28, 2012
Magento Add Custom links to Top menu
Sometime we don't require to show categry in the top navigation but we require to show our customlinks at the top menu
for example we are taking all footer links to be shown in the top menu where category is showing
How to add footer page links into the header i.e top menu
So first things first login to you admin Backend
for example we are taking all footer links to be shown in the top menu where category is showing
How to add footer page links into the header i.e top menu
So first things first login to you admin Backend
Saturday, May 26, 2012
Google API Calendar Service with Magento
Google Calendar allows client applications to view and update calendar events in the form of Google Data API feeds. Your client application can use the Google Calendar Data API to create new events, edit or delete existing events, and query for events that match particular criteria.
As Magento is using Zend library so Easily integrated with Magento with some customization
As Magento is using Zend library so Easily integrated with Magento with some customization
Sunday, May 20, 2012
Magneto Adding New Layout
Custom Module will help to make the New layout if we don't want to use the Magento default layout
We can add a new page layout in Magento, create a custom layout or create a new theme layout then here are the steps need to follow
We can add a new page layout in Magento, create a custom layout or create a new theme layout then here are the steps need to follow
Magento
Layout
Magento Best seller and Top seller
To show bestseller at Top seller at home page.so that best products should come on home page.For that follow the following steps
Create a Bestseller.php file and put it here :
Create a Bestseller.php file and put it here :
Wednesday, May 2, 2012
Magneto Get Router.Controller,Module,Action Name
Generally we get confused while checking the controller name .so require to known name for the controller,router,module,action.Below are the following methods which will help to get the controllers ,action ..etc as per the need
Magento
Action,
Controller,
Router
Wednesday, April 25, 2012
Magento Belvg
Belvg had launches the new extension which will help the developer to get relief from the pain with already overridden Magento classes (models, routers, blocks, helpers). The extension provides the list of changes, made by other developers, and indicates where rewriting are located.
Just Click on the Link and you can download easily as it is free extension
Hope this will help you!
Just Click on the Link and you can download easily as it is free extension
Hope this will help you!
Magento
Belvg
Friday, April 20, 2012
Magento Hide only particular category from left Navigation
Magneto Show Category on left side as but some time we require to hide particular category or subcategory
so we can remove just open the following file
so we can remove just open the following file
Magento
Categroy
Magento Remove Category from left Navigation
Magento By default shows the Category on the left side navigation but sometime we don't require to show the category on left side
so easy way to remove just open the following file and
so easy way to remove just open the following file and
Magento
Navigation
Wednesday, April 18, 2012
Magento increment QTY Box in Cart or View page
Magento had default textbox for Quantity but some time we require to add the qty box with increment value without entering the value in textbox.We can add the followimg code in cart or view page
Magento
Quantity Box
Sunday, April 15, 2012
Magento Can't able to login in admin
Some time After the installation of magento we can't able to login in admin and we stuck that we have not installed Properly generically while installing some of the permission is required which is not available and so we need to edit one file
Magento
Admin
Saturday, April 14, 2012
Magento Review Raitng layout
Due to some reason we required the rating review layout should look different on list page and different on view page but as magento had default one file which will work for both in list page and view page
Now we can easily show different layout of review in List page and different in view page or any other file
Need to follow this step
Need to follow this step
Magento
Rating
Magento get URL Paths
WE can Easily get the URL path from static blocks in CMS, PHP and phtml pages
To Retrieve URL path in STATIC BLOCK
To get SKIN URL
{{skin url='images/sampleimage.jpg '}}
To get Media URL
{{media url='/sampleimage.jpg'}}
To get Store URL
{{store url='mypage.html'}}
To get Base URL
{{base url='yourstore/mypage.html'}}
To Retrieve URL path in STATIC BLOCK
To get SKIN URL
{{skin url='images/sampleimage.jpg '}}
To get Media URL
{{media url='/sampleimage.jpg'}}
To get Store URL
{{store url='mypage.html'}}
To get Base URL
{{base url='yourstore/mypage.html'}}
Magento
URL
Wednesday, April 4, 2012
Magneto get Previous & Next Product Links on Product view Page
It will be easy if you will get the next and previous product from any page instead
of going to category or navigation or any other link
You can add this code in any of the temaplte file Suppose we are showing in the view.phtml
Magento
Products
Tuesday, April 3, 2012
Magento change main image to any product picture on mouse over
Magento change main image to any product picture on mouse over Magento eCommerce Product image change on hover: mouseover: Magento have default feature that when u click on the product image it will get opened in new window so now you can show the product image into the main image on mouseover or on mouse
Magento
Image
Sunday, April 1, 2012
Magento Newsletter Subscribe Form in Footer or Header
Sometime it may required to add the newslettersubscribe box in Header or Footer.Magento template you would need to go and find the relevant lines in the layout XML files and modify them to show in a new postition. This however was a tedious process; especially when it came to precise positioning on your page.
create a block on the fly and position it precisely in your template files with one line of code.
create a block on the fly and position it precisely in your template files with one line of code.
Magento
Newsletter
Tuesday, March 27, 2012
Magento Mass deletion of Coupon and Mass activation of Date
For deleting or changing the "from" and "to" date of the coupon each time we have to go into each coupon and then we have to delete it or change the date
Below functionality will help to do the mass deletion of the coupon and changes t he date also
For that we have to copy the app/code/core/Mage/Adminhtml/Block/Promo/Quote/Grid.php into
app/code/local/Mage/Adminhtml/Block/Promo/Quote/grid.php and following functions
Magento
Coupon
Magento show subcateogry instead of Products in grid/list Page
Magneto Have default functionality of showing the Products in list view or Grid view
But some time we require to show the Sub catgeory in list page and if that sub catrgoy have another subcategory
For showing that we need to work on following
But some time we require to show the Sub catgeory in list page and if that sub catrgoy have another subcategory
For showing that we need to work on following
Saturday, March 24, 2012
Magento Config.xml
However all the files are merged together during the parsing process.It will help to understand the XML structure. It is the reason that the module name is repeated as an XML element name (represented below as <(modulename)>) several times through every file - this is necessary to segregate configuration for each module. Without these elements, the configuration in these sections would be overwritten by the configuration files in other modules.
so let us understand the XMl and its ELements ans tructure
Every Config.xml has following elements
The XML sub-structure of each element is described separately below.
1)Modules
<modules>
<(NameSpace_ModuleName)>
<active>[true|false]</active>
<codePool>[core|community|local]</codePool>
<depends>
<(AnotherNameSpace_ModuleName) />
</depends>
<version>(version_number)</version>
</(NameSpace_ModuleName)>
</modules>
so let us understand the XMl and its ELements ans tructure
Every Config.xml has following elements
modules | global | admin | adminhtml | install | frontend | default | stores | websites |
1)Modules
<modules>
<(NameSpace_ModuleName)>
<active>[true|false]</active>
<codePool>[core|community|local]</codePool>
<depends>
<(AnotherNameSpace_ModuleName) />
</depends>
<version>(version_number)</version>
</(NameSpace_ModuleName)>
</modules>
active | codePool | depends | version |
Friday, March 23, 2012
Magento Add New field in Customer Admin
Adding an Attribute in Product quite simple we can add through admin but adding a field(attribute) in customer cannot be achieved through admin so here is the simple solution for adding the attribute in Category through Database.Open the phpmyadmin.Here we need to work on three tables.
Magento How to call a phtml file in magento cms page
You can't call a phtml file by writing php code in Magento admin panel as Magento admin panel doesn't support this.
To call a PHTML write the folllowing code in the page which you have created under CMS
To call a PHTML write the folllowing code in the page which you have created under CMS
Magento
CMS
Monday, March 19, 2012
Magento install step by step
Easy way to install magento on local machine with XAMPP or WAMP server
1) Go to Magento and download a latest copy of this software here.
Extract the folder to C:Xampphtdocs or C:wampwww (if you install them in default mode).
Download a sample data and extract them to your folder from magento site
1) Go to Magento and download a latest copy of this software here.
Extract the folder to C:Xampphtdocs or C:wampwww (if you install them in default mode).
Download a sample data and extract them to your folder from magento site
Saturday, March 10, 2012
Magento Template Hints
While Working on Magento Some time we can't able to find the template files of particular module so by default magento had provide the feature to Debug that and that can be seen in Front End
When you work with Magento, you will sooner or later as a developer can not avoid the Template Hints. The template hints can be found under the Admin
System> Configuration> Developer> Debug> Template Path Hints
Make it yes for all three or you make for Template links so screen will look like this and you can easily figure out the module name with template file
When you work with Magento, you will sooner or later as a developer can not avoid the Template Hints. The template hints can be found under the Admin
System> Configuration> Developer> Debug> Template Path Hints
Make it yes for all three or you make for Template links so screen will look like this and you can easily figure out the module name with template file
Template links shown in frontend |
Magento
Templates
Wednesday, March 7, 2012
Magento After Installation Admin Doesn't Login
If you want to install Magento on WAMP orXAMPP server, localhost, then you are going to face a very irritating problem with it, which does not let you go into the admin panel, even if you enter the correct details.
So, here is the simple fix to override this problem.
So, here is the simple fix to override this problem.
Magento
Installation
Sunday, March 4, 2012
Magento Add “is in stock” column in Products Grid
Adding the "Availability" in the column Catalog product gird
Here how to add new column to manage “in stock” and “out of stock” products
Here how to add new column to manage “in stock” and “out of stock” products
Magento
Stock
Tuesday, February 21, 2012
Magneto Removal of "/" for Duplicate Link
For SEO reasons store owners will often want to standardise the URL generation in their Magento store.so sometime duplicate link generate for the same page
Ex: :yourdomain.com/contactus/
yourdomain.com/contacts
Both will open the same page but why two link it is not standard for SEO purpose
So,for removing "/" from url we need to update changes in the following files
Ex: :yourdomain.com/contactus/
yourdomain.com/contacts
Both will open the same page but why two link it is not standard for SEO purpose
So,for removing "/" from url we need to update changes in the following files
Magento
Duplicate links
Sunday, February 19, 2012
Magento Add NOINDEX,FOLLOW
Some time we required to show the NoIndex,Follow in some pages only like CMS page or category page
we can add the following code as per the page in there respective XML
Like we don't want to show the Contacts us page in NOINDEX,FOLLOW
So open the contacts xml and add the code
<reference name="head">
<action method="setRobots"><value>NOINDEX,FOLLOW</value></action>
</reference>
Just refresh that page and you will get the Page in NOINDEX
Hope this will help you.....
we can add the following code as per the page in there respective XML
Like we don't want to show the Contacts us page in NOINDEX,FOLLOW
So open the contacts xml and add the code
<reference name="head">
<action method="setRobots"><value>NOINDEX,FOLLOW</value></action>
</reference>
Just refresh that page and you will get the Page in NOINDEX
Hope this will help you.....
Magento Get overall Bestselling Product
Magento Over all best selling Product on Home page
Add new function in files as per the version
- app/code/core/Mage/Sales/Model/Mysql4/Report/Bestsellers.php
- app/code/core/Mage/Sales/Model/Mysql4/Report/Bestsellers/Collection.php
- app/code/core/Mage/Sales/Model/Mysql4/Report/Bestsellers.php
- app/code/core/Mage/Sales/Model/Mysql4/Report/Bestsellers/Collection.php
Magento
Bestselling,
Products
Friday, February 10, 2012
Magento Edit the "Shipping & Handling" in Cart
Easy way to Edit the Text "Shiping & Handling" in Cart
Open the file app/code/core/ Mage/Sales/Model/Quote/ Address/Total/shipping.php
Copy in local folder app/code/local/ Mage/Sales/Model/Quote/ Address/Total/shipping.php
And search for the function fetch ()
in that you can edit the text for the "Shipping & handling" to Shipping or Some thing
Hope this will Help You
Thursday, February 9, 2012
Magneto add Manufacture in grid Column for Admin
Add the brand/manufacture in grid for admin
Just open the file \app\code\core\Mage\Adminhtml\Block\Catalog\Product\grid.php and
Paste in local folder app\code\local\Mage\Adminhtml\Block\Catalog\Product
and add the below code in _prepareColumns( ) function
Just open the file \app\code\core\Mage\Adminhtml\Block\Catalog\Product\grid.php and
Paste in local folder app\code\local\Mage\Adminhtml\Block\Catalog\Product
and add the below code in _prepareColumns( ) function
Thursday, February 2, 2012
How to show the Exact searh result in Magento
If you want to show the exact search reult for your products
Two things need to be changed
1) In admin system->configuration-> catalog->catlogsearch->Search Type
Make it as Like
Two things need to be changed
1) In admin system->configuration->
Make it as Like
Thursday, January 19, 2012
Magento Transactional Emails
Magento Provide Transitional emails which will allow to create or customize our won email template
Some of the Template variable which we can used in our customization or which are widely used and some magento provide by default
Some of the Template variable which we can used in our customization or which are widely used and some magento provide by default
Magento
Emails,
Transactional
Sunday, January 15, 2012
Magento Layout Elements
Layout Elements Which magento generally used in there XML
label: It helps the label of the handle which is shown as a descriptive reference in some areas of the admin panel.
reference: It is used to link an already defined block in any layout XML. To add any child block to an existing block, to modify attributes of an existing block or to perform any action on an existing block, the reference element is used to link to the existing block. The reference element must have a name attribute which refers to the existing block name.
block: It is used to define a new block. This element is usually defined inside a reference element when we want to create a new block. The block element must have a name attribute, which is a unique identifier of the block in the layout and a type attribute, which defines the block class name. If the block is of type or subtype of core/template, it can also have the template attribute which defines the actual phtml template file to be used for rendering the block
remove: It is used to remove an existing block from the layout. The block to be removed is specified with the name attribute
action: It defines an action to be performed on the referenced or newly defined block. An action is simply a method of the block instance on which it is to be executed. The method attribute defines the method name in the block instance and all child elements of the action element are treated as parameters to the method. This element can be placed inside reference or block elements.
update: It will loads an existing layout handle into the current layout handle. It provides a kind of inheritance of layout handles. It must have the handle attribute, which defines the handle of the block to be included.
label: It helps the label of the handle which is shown as a descriptive reference in some areas of the admin panel.
reference: It is used to link an already defined block in any layout XML. To add any child block to an existing block, to modify attributes of an existing block or to perform any action on an existing block, the reference element is used to link to the existing block. The reference element must have a name attribute which refers to the existing block name.
block: It is used to define a new block. This element is usually defined inside a reference element when we want to create a new block. The block element must have a name attribute, which is a unique identifier of the block in the layout and a type attribute, which defines the block class name. If the block is of type or subtype of core/template, it can also have the template attribute which defines the actual phtml template file to be used for rendering the block
remove: It is used to remove an existing block from the layout. The block to be removed is specified with the name attribute
action: It defines an action to be performed on the referenced or newly defined block. An action is simply a method of the block instance on which it is to be executed. The method attribute defines the method name in the block instance and all child elements of the action element are treated as parameters to the method. This element can be placed inside reference or block elements.
update: It will loads an existing layout handle into the current layout handle. It provides a kind of inheritance of layout handles. It must have the handle attribute, which defines the handle of the block to be included.
Magento
Layout
Magento Block Types
Magento uses some mostly commomn built-in blocks which are as follows.
core/template: It will renders a template defined by its template attribute. The majority of blocks defined in the layout are of type or subtype of core/template.
page/html: It's a subtype of core/template and defines the root block. All other blocks are child blocks of this block.
page/html_head: It will help the HTML head section of the page which contains elements for including JavaScript, CSS etc.
page/html_header: It will help the header part of the page which contains the site logo, top links, etc.
page/template_links: It is used to create a list of links. Links visible in the footer and header area use this block type.
core/text_list: This will allow Some blocks like content, left, right etc. are of type core/text_list. When these blocks are rendered, all their child blocks are rendered automatically without the need to call the getChildHtml() method.
page/html_wrapper: It is used to create a wrapper block which renders its child blocks inside an HTML tag set by the action setHtmlTagName. The default tag is <div> if no element is set.
page/html_breadcrumbs: It will help to define breadcrumbs on the page.
page/html_footer: It will help to define footer area of page which contains footer links, copyright message and other static links
core/messages: It will help to renders error/success/notice messages.
page/switch: It will help to used for the language or store switcher.
Note:There are many more but this are commonly used
core/template: It will renders a template defined by its template attribute. The majority of blocks defined in the layout are of type or subtype of core/template.
page/html: It's a subtype of core/template and defines the root block. All other blocks are child blocks of this block.
page/html_head: It will help the HTML head section of the page which contains elements for including JavaScript, CSS etc.
page/html_header: It will help the header part of the page which contains the site logo, top links, etc.
page/template_links: It is used to create a list of links. Links visible in the footer and header area use this block type.
core/text_list: This will allow Some blocks like content, left, right etc. are of type core/text_list. When these blocks are rendered, all their child blocks are rendered automatically without the need to call the getChildHtml() method.
page/html_wrapper: It is used to create a wrapper block which renders its child blocks inside an HTML tag set by the action setHtmlTagName. The default tag is <div> if no element is set.
page/html_breadcrumbs: It will help to define breadcrumbs on the page.
page/html_footer: It will help to define footer area of page which contains footer links, copyright message and other static links
core/messages: It will help to renders error/success/notice messages.
page/switch: It will help to used for the language or store switcher.
Note:There are many more but this are commonly used
Magento
Block
Magento How to Remove the Block through XML
Basically there are two ways to remove blocks in layout XML:
by using: <remove name="" />
by using: <action method="unsetChild">
Both are important to understand
<remove name="" /> will operate on a global context, after all the layouts are processed which means that it will remove the named layout block completely, regardless of which layout handle added it.
<action method="unsetChild"> operates on a localized context, specifically, in the context where you use it. So, if you want to remove a specific block from a specific layout handle and possibly insert it at another position or layout handle, you need to use this approach.
Let us understand with example
Use remove
<default>
<!-- remove the language and store switcher and footer links blocks, we won't use them -->
<remove name="top.menu" />
<remove name="footer_links" />
</default>
Use unsetChild to move or rearrange blocks in your layout:
<default>
<!-- move the breadcrumb block from the top.bar child block back to the template root -->
<reference name="top.bar">
<action method="unsetChild"><name>breadcrumbs</name></action>
</reference>
<reference name="root">
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</reference>
</default>
by using: <remove name="" />
by using: <action method="unsetChild">
Both are important to understand
<remove name="" /> will operate on a global context, after all the layouts are processed which means that it will remove the named layout block completely, regardless of which layout handle added it.
<action method="unsetChild"> operates on a localized context, specifically, in the context where you use it. So, if you want to remove a specific block from a specific layout handle and possibly insert it at another position or layout handle, you need to use this approach.
Let us understand with example
Use remove
<default>
<!-- remove the language and store switcher and footer links blocks, we won't use them -->
<remove name="top.menu" />
<remove name="footer_links" />
</default>
Use unsetChild to move or rearrange blocks in your layout:
<default>
<!-- move the breadcrumb block from the top.bar child block back to the template root -->
<reference name="top.bar">
<action method="unsetChild"><name>breadcrumbs</name></action>
</reference>
<reference name="root">
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</reference>
</default>
Magento
XML
Friday, January 13, 2012
Magento Add product on home page
There are numerous ways to put products on your home page
New products on home page
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}
New products on home page through xml
<reference name="content">
<block type="catalog/product_new" template="catalog/product/new.phtml">
<action method="setProductsCount"><count>5</count></action>
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
</block>
</reference>
All products on home page
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}
All products from one categroy
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="4" template="catalog/product/list.phtml"}}
New products on home page
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}
New products on home page through xml
<reference name="content">
<block type="catalog/product_new" template="catalog/product/new.phtml">
<action method="setProductsCount"><count>5</count></action>
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
</block>
</reference>
All products on home page
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}
All products from one categroy
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="4" template="catalog/product/list.phtml"}}
Magento
Products.Categroy
Tuesday, January 10, 2012
Magento add special character while importing Customer Data
Magento doesnot allow special Character for importing customer data generally
For Example In the Dutch translation the special characters do not (always) show up properly. If we have to import some data like sandéép through csv of magento import it will shows error
so best practice is
Go to .htaccess file and remove # from
AddDefaultCharset UTF-8
and
open the your csv file in .txt format and Save As under UTF-8 and then import the data in magento
Your special character will also get import in magento admin without any error
For Example In the Dutch translation the special characters do not (always) show up properly. If we have to import some data like sandéép through csv of magento import it will shows error
so best practice is
Go to .htaccess file and remove # from
AddDefaultCharset UTF-8
and
open the your csv file in .txt format and Save As under UTF-8 and then import the data in magento
Your special character will also get import in magento admin without any error
Magento display the custom attribute value in Frontend
Add an attribute from magento admin and that attribute should belong to corect attribute set
Then edit the template file either view.phtml or list.phtml
For example we are using in list.phtml
app/design/frontend/default/your-theme/template/catalog/product/list.phtml
and use one of these methods to pull your attribute on the product listing page (list or grid view):
<?php foreach ($_productCollection as $_product): ?>
<!-- these are regular text attributes -->
<?php echo $_product->getMyAttribute() ?>
<?php echo $_product->getAnotherCustomAttribute() ?>
<!-- this is dropdown attribute -->
<?php echo $_product->getAttributeText('your_attribute') ?>
<!-- this is a boolean attribute -->
<?php echo $_product->getMyAttributeName() ? "Yes" : "No" ?>
<?php endforeach?>
Then edit the template file either view.phtml or list.phtml
For example we are using in list.phtml
app/design/frontend/default/your-theme/template/catalog/product/list.phtml
and use one of these methods to pull your attribute on the product listing page (list or grid view):
<?php foreach ($_productCollection as $_product): ?>
<!-- these are regular text attributes -->
<?php echo $_product->getMyAttribute() ?>
<?php echo $_product->getAnotherCustomAttribute() ?>
<!-- this is dropdown attribute -->
<?php echo $_product->getAttributeText('your_attribute') ?>
<!-- this is a boolean attribute -->
<?php echo $_product->getMyAttributeName() ? "Yes" : "No" ?>
<?php endforeach?>
Magento
Attribute
Monday, January 9, 2012
Magento calling folder path
Magento uses its own structure to call the Particular file from specific folder
For example if we want to call the the .wsdl file which is stored in the app/modulename/etc/wsdl/your.wsdl
so we will write the code in our php file like this
public function __construct()
{
$this->_ yourWsdl = Mage::getModuleDir('etc', 'Mage_ Modulename') . DS . 'wsdl' . DS . ' Modulename'
. DS . ' your .wsdl';
}
{
$this->_ yourWsdl = Mage::getModuleDir('etc', 'Mage_ Modulename') . DS . 'wsdl' . DS . ' Modulename'
. DS . ' your .wsdl';
}
Where
your.wsdl is the file which is stored in the app/modulename/etc/wsdl/
Sunday, January 8, 2012
Magento Add Static Block through XML or Phtml
We are assuming that you know how to add the static block through admin.We can add the Static block in any page through two ways
Add through xml
<block type="cms/block" name="cms_test_block">
<action method="setBlockId"><block_id> test_block</block_id></action>
</block>
Through phtml files
<?php echo $this->getLayout()-> createBlock('cms/block')-> setBlockId('
test_block')-> toHTMl(); ?>
<block type="cms/block" name="cms_test_block">
<action method="setBlockId"><block_id>
</block>
Through phtml files
<?php echo $this->getLayout()->
Magento
XML
Magento Adding new field in category for admin
Adding an Attribute in Product quite simple we can add through admin but adding a field(attribute) in category cannot be achieved through admin so here is the simple solution for adding the attribute in Category through Database.Open the phpmyadmin.Here we need to work on three tables.
- eav_attribute
- eav_entity_attribute
- catalog_eav_attribute
Thursday, January 5, 2012
Magento How to get the Brand list in Product page
Add the Brand name on Product page
Note "manufacturer" is the Attribute code for Brand
<?php
$product = Mage::getModel('catalog/ product');
$attributes = Mage::getResourceModel('eav/ entity_attribute_collection')
->setEntityTypeFilter($ product->getResource()-> getTypeId())
->addFieldToFilter('attribute_ code', 'manufacturer');
$attribute = $attributes->getFirstItem()-> setEntity($product-> getResource());
$manufacturers = $attribute->getSource()-> getAllOptions(false);
?>
<ul id="manufacturer_list">
<?php foreach ($manufacturers as $manufacturer): ?>
<li><a href="#"><?php echo $manufacturer['label'] ?></a></li>
<?php endforeach; ?>
</ul>
$product = Mage::getModel('catalog/
$attributes = Mage::getResourceModel('eav/
->setEntityTypeFilter($
->addFieldToFilter('attribute_
$attribute = $attributes->getFirstItem()->
$manufacturers = $attribute->getSource()->
?>
<ul id="manufacturer_list">
<?php foreach ($manufacturers as $manufacturer): ?>
<li><a href="#"><?php echo $manufacturer['label'] ?></a></li>
<?php endforeach; ?>
</ul>
Magento get the current URL and Name of category
Magneto registry make it easier to get the current category name and category url
The registry object we are interested in is ‘current_category’ and utilise the registry call getName() to create call to retrieve the needed information.
Category Name: Mage::registry('current_category')->getName();
Category URL: Mage::registry('current_category')->getUrl();
The registry object we are interested in is ‘current_category’ and utilise the registry call getName() to create call to retrieve the needed information.
Category Name: Mage::registry('current_category')->getName();
Category URL: Mage::registry('current_category')->getUrl();
Wednesday, January 4, 2012
Adding review in Product page
1) Add form data to catalog.xml & view.phtml The first thing to do is to add the review blocks to
the correct XML reference in catalog.xml which is in
app > design > frontend > default > yourtheme > layout
you’ll see the <reference name=”content”> for the catalog_product_view class.
Inside this reference add the following code:
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form"/>
</block>
Now the XML is set up, you just need to echo it on the product page in
app > design > frontend > default > yourtheme > template > catalog > product > view.phtml
<?php echo $this->getChildHtml('product_review') ?>
the correct XML reference in catalog.xml which is in
app > design > frontend > default > yourtheme > layout
you’ll see the <reference name=”content”> for the catalog_product_view class.
Inside this reference add the following code:
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form"/>
</block>
Now the XML is set up, you just need to echo it on the product page in
app > design > frontend > default > yourtheme > template > catalog > product > view.phtml
<?php echo $this->getChildHtml('product_review') ?>
Magento
Products
Getting the reviews page URL for a product in the product page sidebar
Adding the Review url in your customization page
For example
Since it is a new block that is needed, you need new template file.
Add:
app/design/frontend/base/default/template/review/sidebar.phtml
Enter into it something like:
<div class="block block-reviews">
<div class="block-title">
<strong><span>Reviews</span></strong>
</div>
<div class="block-content">
<p><a href="<?php echo $this->getNewReview($this->getProductId()) ?>">NewReview</a></p>
</div>
</div>
For example
Since it is a new block that is needed, you need new template file.
Add:
app/design/frontend/base/default/template/review/sidebar.phtml
Enter into it something like:
<div class="block block-reviews">
<div class="block-title">
<strong><span>Reviews</span></strong>
</div>
<div class="block-content">
<p><a href="<?php echo $this->getNewReview($this->getProductId()) ?>">NewReview</a></p>
</div>
</div>
Monday, January 2, 2012
Remove Price from Custom Options
IF wana remove the price change indicators on the options of configurable products. The product shows the configurable options as a dropdown box at the moment.:
“Large +£20.00” and If want to just show the option name “Large”
You can easily remove by overriding the JS
Open the template file
catalog/product/view/type/options/configurable.phtml
Find the
var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
Replace with
Product.Config.prototype.formatPrice = function(){
return '';
}
var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
“Large +£20.00” and If want to just show the option name “Large”
You can easily remove by overriding the JS
Open the template file
catalog/product/view/type/options/configurable.phtml
Find the
var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
Replace with
Product.Config.prototype.formatPrice = function(){
return '';
}
var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
Add New Indian Currency symbol
To Add New Rupee symbol in magento currency follow below steps:
1)Copy the below url in your browser and add the css in your css folder
http://cdn.webrupee.com/font
same with js
http://cdn.webrupee.com/js
2) Add the css and js in Page.xml
3) Add below code in root.xml
path of file: lib/Zend/Locale/Data/root.xml open file in wordpad
find:
currency type=”INR”
replace symbol Rs with: amp#x20B9; (use & for amp).
4. After this refersh cache from admin and manually delete cache from front var/cache folder.
Now in front end it will display new India rupee symbol.
Magento
Currency
Sunday, January 1, 2012
Magento Certified Developer Exam
Register for a Magento Certified Developer Exam today and Find the Test center
Magento Launches Certified Developer Study Guides and Certified Developer Study Guides Plus for preparing for the Certification exam.The study guide will help to go through the topic related to certification exam. Down load the PDF and explore through Topic.PDF can be downloaded under Resource Tab at the bottom
Magento Launches Certified Developer Study Guides and Certified Developer Study Guides Plus for preparing for the Certification exam.The study guide will help to go through the topic related to certification exam. Down load the PDF and explore through Topic.PDF can be downloaded under Resource Tab at the bottom
Subscribe to:
Posts (Atom)