Posts Tagged ‘checkout’

Hello Guys,

Today i’ll show you how to add affiliate code in checkout success page.

Below is the code for Product Specific Campaign setup for magento.

Open success.phtml from PATH:  Yourproject/app/design/frontend/package/theme/template/checkout/success.phtml.

Add Below code at the end of file.

We need to display below image code at checkout success page.

<img src="">  
<?php /****** START::  Affiliate  *******/?>
<?php  if($_orderID = $this->getOrderId()) {
$url = '';
$_order =  Mage::getModel('sales/order')->loadByIncrementId($_orderID);?>
<?php  $_items = $_order->getItemsCollection(); ?>
<?php $querystring='';
foreach ($_items as $_item):  ?>
<?php $querystring .='prod:'.$_item->getSku().':qty:'.$_item->getQtyOrdered();?>
<?php endforeach; ?>
<?php $querystring.= '/'.$_orderID;?>
<?php $url = $url.$querystring;?>
<img src="<?php echo $url?>" />
<?php }?>
<?php /****** END *********/?>

Bijal Bhavsar 🙂

We can change onepage checkout from 2column-right to 2column-left layout.

Step1: Open Checkout.xml from your-project/app/design/frontend/default/default/layout/
– Find checkout_onepage_index and replace below mention strings
– Replace remove name=”left” with remove name=”right”
– Replace page/2columns-right.phtml with page/2columns-left.phtml
– Replace reference name=”right” with reference name=”left”

Step2: Open opcheckout.js from your-project/skin/frontend/default/default/js/

– Replace col-right with col-left in below function

reloadProgressBlock: function(){
var updater = new Ajax.Updater($$('.col-right')[0], this.progressUrl, {method: 'get', onFailure: this.ajaxFailure.bind(this)});

Thats it.. only 2 step to change.
If this post is helpful to you than plz reply.

– Bijal Bhavsar 🙂