Magento: One Page Checkout Order Review

Post Recently Updated, Use Following URL:

During Magento One Page Checkout, i used to display order details(subtotal,tax,shipping,grand total ) at Payment Information section. Use checkout session, to retrieve order data.

//Order Totals
$orderDetails = Mage::getSingleton('checkout/session')->getQuote()->getTotals(); //Total object
$subtotal = $orderDetails["subtotal"]->getValue(); //Subtotal value
$shippingAmount = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingAmount() //Shipping Amount
$taxAmount =Mage::helper('checkout')->getQuote()->getShippingAddress()->getData('tax_amount') //Tax Amount
if(isset($orderDetails['discount']) && $orderDetails['discount']->getValue()) {
 $discount = $orderDetails['discount']->getValue(); //Discount value if applied
$grandtotal = $orderDetails["grand_total"]->getValue(); //Grand Total

Post Recently Updated, Use Following URL:


Magento: Add Column at Sales Orders Grid

Post Recently Updated, Use Following URL:

Order Mode

Magento admin orders custom field. For example, add custom field into grid as Order Type (Virtual Order Or Shipping Order).

File Path: app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php

protected function _prepareCollection()
$collection = Mage::getResourceModel($this->_getCollectionClass());

//New Lines
$resource = Mage::getSingleton('core/resource');
$orderReference = $resource->getTableName('sales/order');
$collection->getSelect()->join(array('so' => $orderReference),'main_table.entity_id = so.entity_id',array(''))
->columns('(CASE WHEN so.is_virtual = 1 THEN "Virtual Order" ELSE "Shipping Order" END) AS order_mode');

return parent::_prepareCollection();
protected function _prepareColumns()
//Place code where you need to show field
$this->addColumn('status_type', array(
'header' => Mage::helper('sales')->__('Order Mode'),
'index' => 'order_mode',
'type' => 'text',
'width' => '70px',
'filter' => false,
'sortable' => false,

While searching sales orders list, you are getting error as “Integrity constraint violation: 1052 Column ‘increment_id’ in where clause is ambiguous”. To resolve those errors add “filter_index” at required add column function. Use below code for increment id error, do same for “created_at”,”grand_total”,..

$this->addColumn('real_order_id', array(
    'header'=> Mage::helper('sales')->__('Order #'),
    'width' => '80px',
    'type'  => 'text',
    'index' => 'increment_id',

Post Recently Updated, Use Following URL:

cPanel: Change Files and Folders Permission Using Command

Cpanel Directory

Post Recently Updated, Use Following URL:

Below steps will update entire directories(files,folders & includes sub-directories) permission.

  1. Login to the SSH terminal.
  2. Select desired directory, using “cd..” command.
  3. Run cmd: find -type f -exec chmod –changes 644 {} + -o -type d -exec chmod –changes 755 {} +
  4. Exit

Post Recently Updated, Use Following URL:

JQuery | $(…).flexslider is not a function

Post Recently Updated, Use Following URL:

$(…).flexslider is not a function, this issue mainly occurs after upgrading the jquery version or Multiple initialization of jquery. Try below points will help you to sort out the issue.

  • if your jquery version  is greater than jquery-1.8.3.js, call the script at bottom of page before closing </body> tag or if version equal or less than 1.8.3 place the script top of page.
  • Check whether you not initialize the jquery more than once.

Post Recently Updated, Use Following URL:

CSS | Text Over Image using CSS

Below HTML code guide you to insert text (Hot Fried Prawns) over the image.

<!DOCTYPE html>
<title> CSS – Insert Text Over Image using CSS</title>
<link href=”; rel=”stylesheet” integrity=”sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u” crossorigin=”anonymous”>
<link href=”; rel=”stylesheet”>
<style type=”text/css”>
.banner-textimg-section {
text-align: right;
.banner-textimg-section > .banner-text {
padding-top: 10em;
padding-right: 5em;
position: absolute;
display: inline-block;
text-align: right;
width: 100%;
.banner-textimg-section > .banner-text{
transform: translateX(-100%);
-moz-transform: translateX(-100%);
-ms-transform: translateX(-40%);
-webkit-transform: translateX(-100%);
-o-transform: translateX(-100%);
.banner-img {
width: 100%;
.home-button-section.default-button-link {
font-family: ‘Miriam Libre’, sans-serif;
text-decoration: none;
color: #F44336;
background: #ffffff;
padding: 6px 20px 2px 20px;
text-transform: none;
font-weight: 600;
font-size: 2.5em;
display: inline-block;
vertical-align: middle;

Magento: Change Theme Using Controller

We can change the theme using magento controller by adding below code before $this->loadLayout(); , $this->renderLayout(); . Theme update reflects only on the specific controller.

public function indexAction()
/* Begin - Design Package */
                    ->setPackageName($package) // $package = base, default, {{custom_package}}, ...
                    ->setTheme($theme); //  $theme = iphone, default, {{custom_theme}}, ...
/* End */ $this->loadLayout(); $this->renderLayout(); }