<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Adding a new tab under one page checkout – full working module</title>
	<atom:link href="http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/feed/" rel="self" type="application/rss+xml" />
	<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/</link>
	<description>Magento Design and Magento Development Professionals - Inchoo</description>
	<lastBuildDate>Fri, 10 Feb 2012 19:34:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: hjay</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-24162</link>
		<dc:creator>hjay</dc:creator>
		<pubDate>Tue, 06 Dec 2011 13:38:33 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-24162</guid>
		<description>Guys I am at my wits end. I did everything above and when I try to log in to admin area after clearing cache I get an error.

I&#039;m using version 1.6.1

Please help</description>
		<content:encoded><![CDATA[<p>Guys I am at my wits end. I did everything above and when I try to log in to admin area after clearing cache I get an error.</p>
<p>I&#8217;m using version 1.6.1</p>
<p>Please help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jayendra</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-24047</link>
		<dc:creator>jayendra</dc:creator>
		<pubDate>Tue, 29 Nov 2011 07:05:51 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-24047</guid>
		<description>Hi,

How can I download this module?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>How can I download this module?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francesco</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-23822</link>
		<dc:creator>Francesco</dc:creator>
		<pubDate>Sun, 20 Nov 2011 01:25:50 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-23822</guid>
		<description>I have installed this module for Magento 1.6 on frontend it’s working fine with all the options but on Backend the option selected on frontend is not displayed, why??

Thanks</description>
		<content:encoded><![CDATA[<p>I have installed this module for Magento 1.6 on frontend it’s working fine with all the options but on Backend the option selected on frontend is not displayed, why??</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mayank</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-23713</link>
		<dc:creator>Mayank</dc:creator>
		<pubDate>Wed, 16 Nov 2011 06:00:32 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-23713</guid>
		<description>Hi,
I have followed the full process for adding the module, but it is not visible on my front end. Also I have my own theme please let me know that how could I do this process by putting the whole things in my own folder- let say fido.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I have followed the full process for adding the module, but it is not visible on my front end. Also I have my own theme please let me know that how could I do this process by putting the whole things in my own folder- let say fido.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shweta</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-23673</link>
		<dc:creator>shweta</dc:creator>
		<pubDate>Tue, 15 Nov 2011 05:02:49 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-23673</guid>
		<description>I have installed this module for Magento 1.5.on frontend it&#039;s working fine with all the options but on Backend along with order the details are not diaplying .</description>
		<content:encoded><![CDATA[<p>I have installed this module for Magento 1.5.on frontend it&#8217;s working fine with all the options but on Backend along with order the details are not diaplying .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waqar</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-23642</link>
		<dc:creator>Waqar</dc:creator>
		<pubDate>Sun, 13 Nov 2011 19:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-23642</guid>
		<description>Hi
I have updated all the necessary option (but I guess I am missing something). The &quot;How did you hear about us?&quot; doesn&#039;t even show on the main OnePage checkout. However I managed to display it in adminpanel. Help needed. 
Thanks</description>
		<content:encoded><![CDATA[<p>Hi<br />
I have updated all the necessary option (but I guess I am missing something). The &#8220;How did you hear about us?&#8221; doesn&#8217;t even show on the main OnePage checkout. However I managed to display it in adminpanel. Help needed.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-23457</link>
		<dc:creator>Muhammad</dc:creator>
		<pubDate>Sun, 06 Nov 2011 17:45:49 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-23457</guid>
		<description>How can I add simple text when my customer selects OTHER from the drop down menu?</description>
		<content:encoded><![CDATA[<p>How can I add simple text when my customer selects OTHER from the drop down menu?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-23443</link>
		<dc:creator>Muhammad</dc:creator>
		<pubDate>Sun, 06 Nov 2011 15:25:39 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-23443</guid>
		<description>I installed it on Magento 1.6v and it&#039;s working fine</description>
		<content:encoded><![CDATA[<p>I installed it on Magento 1.6v and it&#8217;s working fine</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aki</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-23061</link>
		<dc:creator>Aki</dc:creator>
		<pubDate>Wed, 12 Oct 2011 15:24:55 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-23061</guid>
		<description>I&#039;m sorry again, I did everything from the beginning and I could save the data. 

Thanks again for your article.</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry again, I did everything from the beginning and I could save the data. </p>
<p>Thanks again for your article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aki</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-23025</link>
		<dc:creator>Aki</dc:creator>
		<pubDate>Sat, 08 Oct 2011 13:38:06 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-23025</guid>
		<description>I&#039;m sorry again, I have another question. I&#039;d like to move the step before payment. I modified 2 files, app/code/local/Inchoo/Heared4us/Block/Onepage.php and app/code/local/Inchoo/Heared4us/controllers/OnepageController.php 

After the modification, the onepage checkout step goes wrong. The process is turn back to shopping cart page. Obviously I did something wrong.... Are there other files I should change?</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry again, I have another question. I&#8217;d like to move the step before payment. I modified 2 files, app/code/local/Inchoo/Heared4us/Block/Onepage.php and app/code/local/Inchoo/Heared4us/controllers/OnepageController.php </p>
<p>After the modification, the onepage checkout step goes wrong. The process is turn back to shopping cart page. Obviously I did something wrong&#8230;. Are there other files I should change?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aki</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-23024</link>
		<dc:creator>Aki</dc:creator>
		<pubDate>Sat, 08 Oct 2011 12:43:13 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-23024</guid>
		<description>Hello Branko, thank you so much for this post. Also, thank you Michael Terracide and nemo. 

I followed your instruction as below but I couldn&#039;t save the value. 

1) System &gt; Configuration &gt; Design and write down “custom” under Admin theme section.

2) Follow Michael’s instructions above, by modifying the mysql4-install-01.0.php.
replace
$row = Mage::getSingleton(&#039;core/resource&#039;)-&gt;getConnection(&#039;core_read&#039;)-&gt;fetchRow($sql);
to
$row = Mage::getSingleton(‘core/resource’)-&gt;getConnection(‘core_read’)-&gt;addColumn(Mage::getSingleton(‘core/resource’)-&gt;getTableName(‘sales/order’), ‘giftaid’, ‘TEXT NULL’);

3) Add “heard4us” in the sales_flat_order table.
ALTER TABLE sales_flat_order ADD heared4us text;


heared4us in sales_flat_order table is empty after the order process was completed.  So I put a value manually in heared4us and it was shown in admin. 

So I think something wrong when the value is saved but I don&#039;t know where I should fix.

Does anyone please give me some advice? My magento version is 1.4.2.0.</description>
		<content:encoded><![CDATA[<p>Hello Branko, thank you so much for this post. Also, thank you Michael Terracide and nemo. </p>
<p>I followed your instruction as below but I couldn&#8217;t save the value. </p>
<p>1) System &gt; Configuration &gt; Design and write down “custom” under Admin theme section.</p>
<p>2) Follow Michael’s instructions above, by modifying the mysql4-install-01.0.php.<br />
replace<br />
$row = Mage::getSingleton(&#8216;core/resource&#8217;)-&gt;getConnection(&#8216;core_read&#8217;)-&gt;fetchRow($sql);<br />
to<br />
$row = Mage::getSingleton(‘core/resource’)-&gt;getConnection(‘core_read’)-&gt;addColumn(Mage::getSingleton(‘core/resource’)-&gt;getTableName(‘sales/order’), ‘giftaid’, ‘TEXT NULL’);</p>
<p>3) Add “heard4us” in the sales_flat_order table.<br />
ALTER TABLE sales_flat_order ADD heared4us text;</p>
<p>heared4us in sales_flat_order table is empty after the order process was completed.  So I put a value manually in heared4us and it was shown in admin. </p>
<p>So I think something wrong when the value is saved but I don&#8217;t know where I should fix.</p>
<p>Does anyone please give me some advice? My magento version is 1.4.2.0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominik</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-22567</link>
		<dc:creator>Dominik</dc:creator>
		<pubDate>Mon, 05 Sep 2011 16:17:28 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-22567</guid>
		<description>@Jason: 
Can you please be more specific of your steps you&#039;re exactly doing?</description>
		<content:encoded><![CDATA[<p>@Jason:<br />
Can you please be more specific of your steps you&#8217;re exactly doing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-22531</link>
		<dc:creator>Glenn</dc:creator>
		<pubDate>Thu, 01 Sep 2011 10:53:16 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-22531</guid>
		<description>This works as described if I use bank deposit as the payment method. Eg the checkout step shows up &amp; works, and I can see the value on the admin panel.

But when using PayPal standard (which 95% of orders do), the value doesn&#039;t show up in the admin panel, and there is no value written to the heared4us attribute in the sales_flat_order table.

Any ideas on why this is or how to troubleshoot would be appreciated!</description>
		<content:encoded><![CDATA[<p>This works as described if I use bank deposit as the payment method. Eg the checkout step shows up &amp; works, and I can see the value on the admin panel.</p>
<p>But when using PayPal standard (which 95% of orders do), the value doesn&#8217;t show up in the admin panel, and there is no value written to the heared4us attribute in the sales_flat_order table.</p>
<p>Any ideas on why this is or how to troubleshoot would be appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Irina</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-22485</link>
		<dc:creator>Irina</dc:creator>
		<pubDate>Mon, 29 Aug 2011 10:12:30 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-22485</guid>
		<description>Hello,

The module works great except that the filled in tab dose not get updated on the progress bar.

Do you maybe already have a fix for that?</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>The module works great except that the filled in tab dose not get updated on the progress bar.</p>
<p>Do you maybe already have a fix for that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-22284</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 11 Aug 2011 06:16:56 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-22284</guid>
		<description>This works as per instructions for Magento 1.5.1. 

Same instructions here but much clearer. 

http://www.atomicpages.net/blog/2011/06/23/how-did-you-hear-about-us-in-magento-15/ 

Remember to clear cache, log out, log back in, after uploading module to be able to see &quot;Admin Theme&quot; option.

Does not seem to work if using PayPal Standard as a payment option. 

Any ideas on how to fix that?</description>
		<content:encoded><![CDATA[<p>This works as per instructions for Magento 1.5.1. </p>
<p>Same instructions here but much clearer. </p>
<p><a href="http://www.atomicpages.net/blog/2011/06/23/how-did-you-hear-about-us-in-magento-15/" rel="nofollow">http://www.atomicpages.net/blog/2011/06/23/how-did-you-hear-about-us-in-magento-15/</a> </p>
<p>Remember to clear cache, log out, log back in, after uploading module to be able to see &#8220;Admin Theme&#8221; option.</p>
<p>Does not seem to work if using PayPal Standard as a payment option. </p>
<p>Any ideas on how to fix that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amit</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-22207</link>
		<dc:creator>amit</dc:creator>
		<pubDate>Fri, 05 Aug 2011 11:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-22207</guid>
		<description>Hi Dear thanks for this module but i did not see on checkout page of modern theme in magento 1.5.1.0 plz help me how can i customized..
Array ( [login] =&gt; Array ( [label] =&gt; Checkout Method [allow] =&gt; 1 ) [billing] =&gt; Array ( [label] =&gt; Billing Information [is_show] =&gt; 1 ) [shipping] =&gt; Array ( [label] =&gt; Shipping Information [is_show] =&gt; 1 ) [shipping_method] =&gt; Array ( [label] =&gt; Shipping Method [is_show] =&gt; 1 ) [payment] =&gt; Array ( [label] =&gt; Payment Information [is_show] =&gt; 1 ) [heared4us] =&gt; Array ( [allow] =&gt; 1 ) [review] =&gt; Array ( [label] =&gt; Order Review [is_show] =&gt; 1 ) )  after print of steps it shows i think it is not calling hearedus.php file why any reason</description>
		<content:encoded><![CDATA[<p>Hi Dear thanks for this module but i did not see on checkout page of modern theme in magento 1.5.1.0 plz help me how can i customized..<br />
Array ( [login] =&gt; Array ( [label] =&gt; Checkout Method [allow] =&gt; 1 ) [billing] =&gt; Array ( [label] =&gt; Billing Information [is_show] =&gt; 1 ) [shipping] =&gt; Array ( [label] =&gt; Shipping Information [is_show] =&gt; 1 ) [shipping_method] =&gt; Array ( [label] =&gt; Shipping Method [is_show] =&gt; 1 ) [payment] =&gt; Array ( [label] =&gt; Payment Information [is_show] =&gt; 1 ) [heared4us] =&gt; Array ( [allow] =&gt; 1 ) [review] =&gt; Array ( [label] =&gt; Order Review [is_show] =&gt; 1 ) )  after print of steps it shows i think it is not calling hearedus.php file why any reason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Branko Ajzele</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-22128</link>
		<dc:creator>Branko Ajzele</dc:creator>
		<pubDate>Sat, 30 Jul 2011 09:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-22128</guid>
		<description>@Richie

Typo :) -It was to late to fix it later when I noticed it, meaning I was sort of lazy :)</description>
		<content:encoded><![CDATA[<p>@Richie</p>
<p>Typo <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  -It was to late to fix it later when I noticed it, meaning I was sort of lazy <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richie</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-22123</link>
		<dc:creator>Richie</dc:creator>
		<pubDate>Fri, 29 Jul 2011 19:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-22123</guid>
		<description>Worked great, although I don&#039;t understand why you didn&#039;t set it up to say &quot;Where Did You Hear About Us&quot; rather than &quot;Heared For Us&quot;....either way, nice job.</description>
		<content:encoded><![CDATA[<p>Worked great, although I don&#8217;t understand why you didn&#8217;t set it up to say &#8220;Where Did You Hear About Us&#8221; rather than &#8220;Heared For Us&#8221;&#8230;.either way, nice job.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-3/#comment-21664</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 24 Jun 2011 09:05:37 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-21664</guid>
		<description>If people are still struggling with the way the goal posts have moved in regards to attributes then you can always create a new model to store the data. I think this would work across most versions.

So write an installer script / create a table hdyfu with hdyfu_id, order_id and hdyfu fields then...

/Heared4us/Model/Hdyfu.php

[code]
&lt;?php
  class Inchoo_Heared4us_Model_Hdyfu extends Mage_Core_Model_Abstract
  {
      public function _construct()
      {
          parent::_construct();
          $this-&gt;_init(&#039;heared4us/hdyfu&#039;);
      }
  } 
[/code]

/Heared4us/Model/Mysql4/Hdyfu.php

[code]
&lt;?php
  class Inchoo_Heared4us_Model_Mysql4_Hdyfu extends Mage_Core_Model_Mysql4_Abstract
  {
      public function _construct()
      {   
          $this-&gt;_init(&#039;heared4us/hdyfu&#039;, &#039;hdyfu_id&#039;);
      }
  }
[/code]

/Heared4us/Model/Mysql4/Hdyfu/Collection.php

[code]
&lt;?php
      class Inchoo_Heared4us_Model_Mysql4_Hdyfu_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
      {
          public function _construct()
          {
              //parent::__construct();
              $this-&gt;_init(&#039;heared4us/hdyfu&#039;);
          }
      }
[/code]

Then in Observer.php

[code]
&lt;?php
class Inchoo_Heared4us_Model_Observer
{
	
	const ORDER_ATTRIBUTE_FHC_ID = &#039;heared4us&#039;;
		
    /**
     * Event Hook: checkout_type_onepage_save_order
     * 
     * @author Branko Ajzele
     * @param $observer Varien_Event_Observer
     */
	public function hookToOrderSaveEvent()
	{

		//Fetch the data from select
		$_heared4us = null;
		$_heared4us = Mage::getSingleton(&#039;core/session&#039;)-&gt;getInchooHeared4us();

        //Attach it to the order
        $incrementId = Mage::getSingleton(&#039;checkout/session&#039;)-&gt;getLastRealOrderId();
        $order = Mage::getModel(&#039;sales/order&#039;)-&gt;loadByIncrementId($incrementId)-&gt;getData();

		$hdyfu = Mage::getModel(&#039;heared4us/hdyfu&#039;)
                  -&gt;setOrderId($order[&quot;entity_id&quot;])
				  -&gt;setHdyfu($_heared4us)
				  -&gt;save();
				
	}

}
[/code]

You can then join this to the order grid with a 

[code]
-&gt;joinleft(array(&#039;hdyfu&#039; =&gt; $_hdyfuTable), &#039;main_table.entity_id = hdyfu.order_id&#039;)
[/code]

in _prepareCollection

and a 

[code]
        $this-&gt;addColumn(&#039;hdyfu&#039;, array(
            &#039;header&#039; =&gt; Mage::helper(&#039;ordertags&#039;)-&gt;__(&#039;Reffered By&#039;),
            &#039;index&#039; =&gt; &#039;hdyfu&#039;,
            &#039;width&#039; =&gt; &#039;70px&#039;,
        ));
[/code]

in _prepareColumns.</description>
		<content:encoded><![CDATA[<p>If people are still struggling with the way the goal posts have moved in regards to attributes then you can always create a new model to store the data. I think this would work across most versions.</p>
<p>So write an installer script / create a table hdyfu with hdyfu_id, order_id and hdyfu fields then&#8230;</p>
<p>/Heared4us/Model/Hdyfu.php</p>
<pre class="brush: plain; title: ; notranslate">
&lt;?php
  class Inchoo_Heared4us_Model_Hdyfu extends Mage_Core_Model_Abstract
  {
      public function _construct()
      {
          parent::_construct();
          $this-&gt;_init('heared4us/hdyfu');
      }
  }
</pre>
<p>/Heared4us/Model/Mysql4/Hdyfu.php</p>
<pre class="brush: plain; title: ; notranslate">
&lt;?php
  class Inchoo_Heared4us_Model_Mysql4_Hdyfu extends Mage_Core_Model_Mysql4_Abstract
  {
      public function _construct()
      {
          $this-&gt;_init('heared4us/hdyfu', 'hdyfu_id');
      }
  }
</pre>
<p>/Heared4us/Model/Mysql4/Hdyfu/Collection.php</p>
<pre class="brush: plain; title: ; notranslate">
&lt;?php
      class Inchoo_Heared4us_Model_Mysql4_Hdyfu_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
      {
          public function _construct()
          {
              //parent::__construct();
              $this-&gt;_init('heared4us/hdyfu');
          }
      }
</pre>
<p>Then in Observer.php</p>
<pre class="brush: plain; title: ; notranslate">
&lt;?php
class Inchoo_Heared4us_Model_Observer
{

	const ORDER_ATTRIBUTE_FHC_ID = 'heared4us';

    /**
     * Event Hook: checkout_type_onepage_save_order
     *
     * @author Branko Ajzele
     * @param $observer Varien_Event_Observer
     */
	public function hookToOrderSaveEvent()
	{

		//Fetch the data from select
		$_heared4us = null;
		$_heared4us = Mage::getSingleton('core/session')-&gt;getInchooHeared4us();

        //Attach it to the order
        $incrementId = Mage::getSingleton('checkout/session')-&gt;getLastRealOrderId();
        $order = Mage::getModel('sales/order')-&gt;loadByIncrementId($incrementId)-&gt;getData();

		$hdyfu = Mage::getModel('heared4us/hdyfu')
                  -&gt;setOrderId($order[&quot;entity_id&quot;])
				  -&gt;setHdyfu($_heared4us)
				  -&gt;save();

	}

}
</pre>
<p>You can then join this to the order grid with a </p>
<pre class="brush: plain; title: ; notranslate">
-&gt;joinleft(array('hdyfu' =&gt; $_hdyfuTable), 'main_table.entity_id = hdyfu.order_id')
</pre>
<p>in _prepareCollection</p>
<p>and a </p>
<pre class="brush: plain; title: ; notranslate">
        $this-&gt;addColumn('hdyfu', array(
            'header' =&gt; Mage::helper('ordertags')-&gt;__('Reffered By'),
            'index' =&gt; 'hdyfu',
            'width' =&gt; '70px',
        ));
</pre>
<p>in _prepareColumns.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathew</title>
		<link>http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/comment-page-2/#comment-21621</link>
		<dc:creator>Mathew</dc:creator>
		<pubDate>Mon, 20 Jun 2011 23:35:15 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2946#comment-21621</guid>
		<description>Yep this works if you follow the instructions and notes and are willing to edit a few files. Pity I cannot upload attachment, mine works fine in 1.6.</description>
		<content:encoded><![CDATA[<p>Yep this works if you follow the instructions and notes and are willing to edit a few files. Pity I cannot upload attachment, mine works fine in 1.6.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

