In this tutorial I will let you know how to add a custom field in review in Magento. Reviews are important to get collect feedback from customers. Now if you want to get their email address too with their review, this tutorial will help you add an email field in review form. Add a input type field for email in template\review\form.phtml as below. Add an ’email’ field in review_detail table …
Magento Tutorials
Get product stock information in Magento
In this tutorial I will show you how to get product stock information in Magento. It will help you to get stock information of any product like quantity (qty), minimum quantity (min_qty), stock availability (is_in_stock), minimum and maximum sale quantity (min_sale_qty and max_sale_qty), etc. To get stock data first you need to load the product. Following are two different ways to load any product in Magento. By Product ID: By …
Get Add to Cart URL of any Product in Magento
In this tutorial I will show you how to get Add to Cart URL of any Product in Magento. It will help when you will create a custom page for any product. Following is the code to get add to cart url of any product. For example we need to fetch add to cart url of a product id “123”. Now you can use this $_url with button or link …
How to check if current page is homepage
In Magento sometimes we need to find out if current page is homepage or not, for some condition. So in this tutorial I will show you how to check if current page is homepage or not. If you are in template/page/html/header.phtml template file, then you can check for homepage with the following code: If you are in any other .phtml template file or in any other .php class file then …
Remove Category Title from Specific Page
As I have already explained how to remove title from category page in Magento in our previous tutorial. But if your requirement is to remove category title from specific page in Magento, you can do this by using following simple steps. Just go to following file and find the following line: Now for example if your category id is 55, you can remove category title for this page with following …
Get Order Details from Order ID in Magento
In Magento quite often you need to get order details from order ID. So in this tutorial I am going to show you how to get order details from order ID. There are two types of order ID’s, one is real order ID and the other is order increment ID. So first I will let you know how to get real order ID from order increment ID. To Get real …
Remove Title From Category Page in Magento
Magento displays category title on category listing page by default which has it’s own advantages. But due to some customization requirement, if you are looking to remove title from category page in Magento template, you can do that easily by follow simple and quick steps described in this tutorial. Just go to file and find following lines of code Now comment these lines look like below: By this way you …
How to Set up Cron Job in Magento
In Magento some features require a script to be run periodically. To run a script periodically, most operating systems have a built-in scheduled task called CRON. A CRON is a daemon which keeps running and gets activated at a said interval. It helps store owners to setup up and schedule commands which will run periodically at set time and date. Here is the tutorial for how to set up CRON …