How to add SSL certificate magento

Magento
Here I can show how to install SSL certificate in Magento. Before we go to Magento SSL certificate this important to know all what is SSL and why we need this. What is SSL? SSL is an acronym for Secure Sockets Layer, an encryption technology that was created by Netscape. SSL creates an encrypted connection between your web server and your visitors' web browser allowing for private information to be transmitted without the problems of eavesdropping, data tampering, or message forgery. Once you have done the SSL install, you can access a site securely by changing the URL from http:// to https://. When an SSL certificate is installed on a website, you can be sure that the information you enter (credit card or any other information), is secured and only…
Read More

Override Magento Admin Controller

Magento
When you use magento sometime need to customize some admin core functionality based on requirement. If you want to change core functionality of any controller so you need to override controller action with your controller action. Learning how to perform this action may be helpful to those who have computer forensics degrees. how to override magento admin controller action This example to show you override edit action from ProductController.php is located app/code/core/Mage/Adminhtml/controllers/Catalog Step 1: Create new module from app/etc/Justwebdevelopment_Overridecontroller.xml [sourcecode language="plain"] <?xml version="1.0"?> <config> <modules> <Justwebdevelopment_Overridecontroller> <active>true</active> <codePool>local</codePool> </Justwebdevelopment_Overridecontroller> </modules> </config> [/sourcecode] Step 2: Make config.xml from app/code/local/Justwebdevelopment/Overridecontroller/etc/config.xml [sourcecode language="plain"] <?xml version="1.0"?> <config> <modules> <Justwebdevelopment_Overridecontroller> <version>0.0.1</version> </Justwebdevelopment_Overridecontroller> </modules> <admin> <routers> <adminhtml> <args> <modules> <Justwebdevelopment_Overridecontroller before="Mage_Adminhtml">Justwebdevelopment_Overridecontroller</Justwebdevelopment_Overridecontroller> </modules> </args> </adminhtml> </routers> </admin> </config> [/sourcecode] Using above code you want to override any…
Read More

Get Magento URL and Path

Magento
When you work or develop magento site so many places you need to some magento URL. Magento URL and magento path is very helpful to make development easy. When you want to create magento static block and you want to show some image or set any page link then you need to set exact path for that. Maegnto provide some basic path or URL by default. Here I want to show you magento path and URL. Use magento URL in static block get SKIN URL [php]{{skin url='images/sampleimage1.png'}}[/php] get Media URL [php]{{media url='/sampleimage1.png'}}[/php] get Store URL [php]{{store url='contact.html'}}[/php] get Base URL [php]{{base url='yourstore/contact.html'}}[/php] Use magento URL path in PHTML get Homepage URL [php]<?php $home_url = Mage::helper('core/url')->getHomeUrl(); ?>[/php] Or check current page is homepage [php]<?php if( Mage::getSingleton('cms/page')->getIdentifier() == 'home' && Mage::app()->getFrontController()->getRequest()->getRouteName() ==…
Read More

How to create custom module in magento

Magento
Magento is best eCommerce system now a days which is offering rich customization possibilities by extensions and modules. Magento is built on a fully modular model that influences an unlimited scalability and flexibility for your store. Ajaxform and Ajaxsubmit There are many things custom modules can do, from editing your Database, to handling module upgrades to overriding classes (Blocks, Controllers, Models) … and more! Magento is an open source solution. So you can write new modules for Magento by yourself. Here I want to show you how to create simple costume module magento. In Magento all modules are organized under a package. This package is nothing but a simple folder under codepool containing different modules. For example all core modules of magento system is kept under package “Mage” (open the…
Read More

Get attribute name and value magento

Magento
In magento you can create as many custom attributes for your products as you want.Suppose you want to add or display brand color for every product on home, category or product page. So this is very easy to do with custom attributes. If we were to create a new custom attribute called "brand_color" and the attribute was of a "Text Field" type, we could do something like the following at a product level to obtain its value. [php]<?php echo $_product->getBrandColor(); ?>[/php] Get attribute collection [php]<?php $attribute = $_product->getResource()->getAttribute('my_attribute'); ?>[/php] Get attribute type [php]<?php $attribute = $_product->getResource()->getAttribute('my_attribute')->getAttributeType(); ?>[/php] Get attribute Label [php]<?php $attribute = $_product->getResource()->getAttribute('my_attribute')->getFrontendLabel(); ?>[/php] Attribute is visible or not [php]<?php $attribute = $_product->getResource()->getAttribute('my_attribute')->getIsVisible(); ?>[/php] Attribute is required [php]<?php $attribute = $_product->getResource()->getAttribute('my_attribute')->getIsRequired(); ?>[/php] Get attribute value [php]<?php $attributeValue = Mage::getModel('catalog/product')->load($_product->getId())->getMyAttribute();?>[/php]…
Read More

Excute custom query in magento

Magento
Magento has provide us very good features for handling or interacting with Database tables. Magento give all the data by default but some time we need to get or insert some custom data.So for this we need to write custom query. Database Connections In Magento [php] <?php // fetch read database connection that is used in Mage_Core module $read= Mage::getSingleton('core/resource')->getConnection('core_read'); // fetch write database connection that is used in Mage_Core module $write = Mage::getSingleton('core/resource')->getConnection('core_write'); ?> [/php] How to excute custom query in magento [php] <?php // fetch read database connection that is used in Mage_Core module $read= Mage::getSingleton('core/resource')->getConnection('core_read'); $value=$read->query("SELECT ...."); $row = $value->fetch(); echo "<pre>";print_r($row);echo "</pre>"; // As Array ?> [/php] Insert custom data in magento tabel [php] <?php // fetch write database connection that is used in Mage_Core module…
Read More

Add New Field to Magento Contact Form

Magento
In magento default contact us form provide only four fileds information like Name, Email, Telephone and comment but some time need to more information for contact form it's depends on bussiness model and criteria. If you want to add new field or need more inforation about the user from contact us so this artical to be helpfull to you. Below are the step how to add new field in magento contact us form. This example to show you how to add extra input type field in magento contact us form. Step 1: Add field to phtml file Go to app -> design -> frontend -> yourpackage -> yourtheme -> template -> contacts -> form.phtml If you want to add required field: [sourcecode language="plain"] <li> <label for="email"><em>*</em><?php echo Mage::helper('contacts')->__('Company Name') ?></label>…
Read More

How to show latest tweet on magento site

Magento
Display latest tweet on magento site without any extension. Twitter is most popular social networking site in a day.Using this code publish their Twitter account posts directly onto any section of their Magento store.This is a fast and effective way to keep your website up to date with relevant information. Once integrated, messages are able to appear directly into a designated section of your website and will appear in real-time as soon as the messages are posted. Benefit of twitter integrate into magento store Keep your Magento store live with fresh information via Twitter data feeds Fast and effective way to integrate your Magento store with Twitter Keep your website up to date with relevant information posts Step 1: Create magento_tweet.phtml from catalog/product/magento_tweet.phtml [php] <?php function getTime($time){ $tweetdate = $time;…
Read More

Please check for sufficient write file permissions in magento connect manager

Magento
If you want to use install any other magento extension or upgrade your mangeto from magento connect manager its really very easy to do that. You can find really some great extensions some are paid and some are free from magento commerce site.Find extension that interest you, click "Get extension key", agree with license agreement and get key. But some times you want use magento connect manager and its display error like "Please check for sufficient write file permissions". Magento Connect requires write permissions to the Magento files in order to install new extensions or upgrade the software to a new version. You can change your file/folder permissions either thru your FTP Client (like FileZilla) OR thru a SSH client (like Putty). Go inside your Magento folder & change permissions…
Read More

How to get Magento layout outside of Magento

Magento
Get Magento Content Outiside of Magento I integreated wordpress in my magento store and I will try to get magento data in wordpress file. I want to same header in my both site magento and wordpress. I tryed to hard and finally got the solution to get any magento layout in wordpress. Below are the script to get magento layout outside of magento. [php] <?php require_once '/home/.../public_html/.../app/Mage.php'; umask(0); /* not Mage::run(); */ Mage::app('default'); // get layout object $layout = Mage::getSingleton('core/layout'); //get block object $block = $layout->createBlock('page/template_links'); /* choose whatever category ID you want */ //$block->setCategoryId(3); $block->setTemplate('page/template/links.phtml'); echo $block->renderView(); ?> [/php] Get Magento layout outside of Magento Below script to get whole magento header section with top links out side of magento. [php] <?php require_once '/home/.../public_html/.../app/Mage.php'; umask(0); /* not Mage::run(); */…
Read More