<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Elias Interactive &#187; Magento Payment Method</title>
	<atom:link href="http://www.eliasinteractive.com/blog/tag/magento-payment-method/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eliasinteractive.com</link>
	<description>Ecommerce consulting &#38; solutions for online store retailers</description>
	<lastBuildDate>Thu, 01 Sep 2011 18:45:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Google Search Trends for Magento</title>
		<link>http://www.eliasinteractive.com/blog/google-search-trends-for-magento/</link>
		<comments>http://www.eliasinteractive.com/blog/google-search-trends-for-magento/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 15:00:21 +0000</pubDate>
		<dc:creator>Josh Colter</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento Commerce]]></category>
		<category><![CDATA[magento ecommerce]]></category>
		<category><![CDATA[Magento Payment Method]]></category>
		<category><![CDATA[magento service provider]]></category>
		<category><![CDATA[modify magento]]></category>

		<guid isPermaLink="false">http://eliasinteractive.com/?p=356</guid>
		<description><![CDATA[Note: Scale is based on the average worldwide traffic of magento in all years. Magento continues to pick up steam with online search, as you can see from the Google search trend graph above.  Here are the top 5 cities searching for Magento: 1. Delhi, India 2. Hamburg, Germany 3. &#8230; <a href="http://www.eliasinteractive.com/blog/google-search-trends-for-magento/">Continue Reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Note: <span>Scale is based on the average worldwide traffic of <strong><span style="color: #4684ee;">magento</span></strong> in all years.</span></p>
<p style="text-align: center;"><img class="aligncenter" title="Magento Search Trends" src="http://trends.google.com/trends/viz?q=magento+&amp;date=all&amp;geo=all&amp;graph=weekly_img&amp;sort=0&amp;sa=N" alt="" width="450" height="175" /></p>
<p>Magento continues to pick up steam with online search, as you can see from the Google search trend graph above.  Here are the top 5 cities searching for Magento:</p>
<table class="list" border="0" cellspacing="0" cellpadding="2" width="100%">
<tbody>
<tr>
<td style="border-left: medium hidden; padding: 5px 3px 5px 10px;" width="1" align="right" valign="center"><span>1.</span></td>
<td style="padding: 5px 3px;" align="left" valign="center"><span>Delhi<span style="color: #393939;">, India</span></span></td>
<td style="border-right: medium hidden; padding: 2px 3px;" valign="center">
<table class="bar" style="height: 4px;" border="0" cellspacing="0" width="100">
<tbody>
<tr>
<td bgcolor="#4684ee"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="border-left: medium hidden; padding: 5px 3px 5px 10px;" width="1" align="right" valign="center"><span>2.</span></td>
<td style="padding: 5px 3px;" align="left" valign="center"><span>Hamburg<span style="color: #393939;">, Germany</span></span></td>
<td style="border-right: medium hidden; padding: 2px 3px;" valign="center">
<table class="bar" style="height: 4px;" border="0" cellspacing="0" width="81">
<tbody>
<tr>
<td bgcolor="#4684ee"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="border-left: medium hidden; padding: 5px 3px 5px 10px;" width="1" align="right" valign="center"><span>3.</span></td>
<td style="padding: 5px 3px;" align="left" valign="center"><span>Frankfurt Am Main<span style="color: #393939;">, Germany</span></span></td>
<td style="border-right: medium hidden; padding: 2px 3px;" valign="center">
<table class="bar" style="height: 4px;" border="0" cellspacing="0" width="76">
<tbody>
<tr>
<td bgcolor="#4684ee"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="border-left: medium hidden; padding: 5px 3px 5px 10px;" width="1" align="right" valign="center"><span>4.</span></td>
<td style="padding: 5px 3px;" align="left" valign="center"><span>Munich<span style="color: #393939;">, Germany</span></span></td>
<td style="border-right: medium hidden; padding: 2px 3px;" valign="center">
<table class="bar" style="height: 4px;" border="0" cellspacing="0" width="68">
<tbody>
<tr>
<td bgcolor="#4684ee"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="border-left: medium hidden; padding: 5px 3px 5px 10px;" width="1" align="right" valign="center"><span>5.</span></td>
<td style="padding: 5px 3px;" align="left" valign="center"><span>San Francisco<span style="color: #393939;">, CA, USA</span></span></td>
<td style="border-right: medium hidden; padding: 2px 3px;" valign="center">
<table class="bar" style="height: 4px;" border="0" cellspacing="0" width="62">
<tbody>
<tr>
<td bgcolor="#4684ee"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div id="tweetbutton356" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fbit.ly%2FmI30O0&amp;via=tweetelias&amp;text=Google%20Search%20Trends%20for%20Magento&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.eliasinteractive.com%2Fblog%2Fgoogle-search-trends-for-magento%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.eliasinteractive.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.eliasinteractive.com/blog/google-search-trends-for-magento/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento: Create New Payment Method -&gt; Cash On Delivery</title>
		<link>http://www.eliasinteractive.com/blog/magento-create-new-payment-method-cash-on-delivery/</link>
		<comments>http://www.eliasinteractive.com/blog/magento-create-new-payment-method-cash-on-delivery/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 18:10:03 +0000</pubDate>
		<dc:creator>Lee Taylor</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento Custom Module]]></category>
		<category><![CDATA[Magento Payment Method]]></category>
		<category><![CDATA[Overwriting Magento Core Code]]></category>

		<guid isPermaLink="false">http://eliasinteractive.com/?p=311</guid>
		<description><![CDATA[About: How To Create a Magento Custom Module and A &#8220;Cash On Delivery&#8221; Payment Method Who&#8217;s Interested: Informative to the semi-technically savvy What: Custom Magento Payment Method   So I&#8217;ve seen more and more people raising awareness about desire to create a new payment method that allows orders to be &#8230; <a href="http://www.eliasinteractive.com/blog/magento-create-new-payment-method-cash-on-delivery/">Continue Reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<style>
body#blog #main .left-sidebar .blog .dp-highlighter ol li.alt span.comments { background:none;} body#blog #main .left-sidebar .blog .dp-highlighter ol li span.comments { background:none;}
</style>
<p><strong>About:</strong> How To Create a Magento Custom Module <em>and</em> A &#8220;Cash On Delivery&#8221; Payment Method<br />
<strong>Who&#8217;s Interested:</strong> Informative to the semi-technically savvy<br />
<strong>What:</strong> Custom Magento Payment Method</p>
<p> </p>
<p>So I&#8217;ve seen more and more people raising awareness about desire to create a new payment method that allows orders to be paid via &#8220;cash on delivery&#8221; or &#8220;on pickup&#8221; by customer. <em>Is this helpful to companies who sell to local clients? Absolutely.</em></p>
<p> </p>
<p><em><span style="font-style: normal;">So in offering a solution, I&#8217;ll go ahead and outline <em>what</em> files need to be created and <em>why</em> with hopes to help educate the intigued learner in how to create a <strong><span style="color: #00ccff;">Magento Custom Module</span></strong> as well. The benefit in knowing how to do this is modifying existing Magento functionality in a way that it will not be overwritten upon a successful Magento upgrade.</span></em></p>
<p> </p>
<p><em><span style="font-style: normal;">Thus, I&#8217;ll jump in. The following <strong>5</strong> files will be created (relative to one&#8217;s Magento root folder):<br />
 </span></em></p>
<ul>
<blockquote>
<li>confix.xml</li>
<li>system.xml</li>
<li>PaymentMethod.php</li>
<li>mysql4-install-0.1.0.php</li>
<li>NewModule.xml</li>
</blockquote>
</ul>
<p><em>Here are their contents (with comments) and relative paths:</em></p>
<p><span id="more-311"></span></p>
<p> </p>
<p><strong>app/code/local/Mage/NewModule/etc/config.xml</strong> <em>(below)</em></p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--
/**
* Elias Interactive
*
* @title	  Magento -&gt; Custom Payment Module for Cash On Delivery
* @category   Mage
* @package    Mage_Local
* @author	  Lee Taylor / Elias Interactive -&gt; lee [at] eliasinteractive [dot] com
* @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*/

--&gt;

&lt;config&gt;
&lt;global&gt;
&lt;!-- declare model group for new module --&gt;
&lt;models&gt;
&lt;!-- model group alias to be used in Mage::getModel('newmodule/...') --&gt;
&lt;newmodule&gt;
&lt;!-- base class name for the model group --&gt;
&lt;class&gt;Mage_NewModule_Model&lt;/class&gt;
&lt;/newmodule&gt;
&lt;/models&gt;

&lt;!-- declare resource setup for new module --&gt;
&lt;resources&gt;
&lt;!-- resource identifier --&gt;
&lt;newmodule_setup&gt;
&lt;!-- specify that this resource is a setup resource and used for upgrades --&gt;
&lt;setup&gt;
&lt;!-- which module to look for install/upgrade files in --&gt;
&lt;module&gt;Mage_NewModule&lt;/module&gt;
&lt;/setup&gt;
&lt;!-- specify database connection for this resource --&gt;
&lt;connection&gt;
&lt;!-- do not create new connection, use predefined core setup connection --&gt;
&lt;use&gt;core_setup&lt;/use&gt;
&lt;/connection&gt;
&lt;/newmodule_setup&gt;
&lt;newmodule_write&gt;
&lt;use&gt;core_write&lt;/use&gt;
&lt;/newmodule_write&gt;
&lt;newmodule_read&gt;
&lt;use&gt;core_read&lt;/use&gt;
&lt;/newmodule_read&gt;
&lt;/resources&gt;
&lt;/global&gt;

&lt;!-- declare default configuration values for this module --&gt;
&lt;default&gt;
&lt;!-- 'payment' configuration section (tab) --&gt;
&lt;payment&gt;
&lt;!-- 'newmodule' configuration group (fieldset) --&gt;
&lt;newmodule&gt;
&lt;!-- by default this payment method is inactive --&gt;
&lt;active&gt;1&lt;/active&gt;
&lt;!-- model to handle logic for this payment method --&gt;
&lt;model&gt;newmodule/paymentMethod&lt;/model&gt;
&lt;!-- order status for new orders paid by this payment method --&gt;
&lt;order_status&gt;1&lt;/order_status&gt;
&lt;!-- default title for payment checkout page and order view page --&gt;
&lt;title&gt;Cash On Delivery&lt;/title&gt;
&lt;/newmodule&gt;
&lt;/payment&gt;
&lt;/default&gt;
&lt;/config&gt;
</pre>
<p><strong>app/code/local/Mage/NewModule/etc/system.xml</strong> <em>(below)</em></p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--
/**
* Elias Interactive
*
* @title	  Magento -&gt; Custom Payment Module for Cash On Delivery
* @category   Mage
* @package    Mage_Local
* @author	  Lee Taylor / Elias Interactive -&gt; lee [at] eliasinteractive [dot] com
* @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*/

--&gt;

&lt;config&gt;
&lt;sections&gt;
&lt;!-- payment tab --&gt;
&lt;payment&gt;
&lt;groups&gt;
&lt;!-- newmodule fieldset --&gt;
&lt;newmodule translate=&quot;label&quot; module=&quot;paygate&quot;&gt;
&lt;!-- will have title 'Cash On Delivery' --&gt;
&lt;label&gt;Cash On Delivery&lt;/label&gt;
&lt;!-- position between other payment methods --&gt;
&lt;sort_order&gt;670&lt;/sort_order&gt;
&lt;!-- do not show this configuration options in store scope --&gt;
&lt;show_in_default&gt;1&lt;/show_in_default&gt;
&lt;show_in_website&gt;1&lt;/show_in_website&gt;
&lt;show_in_store&gt;0&lt;/show_in_store&gt;
&lt;fields&gt;
&lt;!-- is this payment method active for the website? --&gt;
&lt;active translate=&quot;label&quot;&gt;
&lt;!-- label for the field --&gt;
&lt;label&gt;Enabled&lt;/label&gt;
&lt;!-- input type for configuration value --&gt;
&lt;frontend_type&gt;select&lt;/frontend_type&gt;
&lt;!-- model to take the option values from --&gt;
&lt;source_model&gt;adminhtml/system_config_source_yesno&lt;/source_model&gt;
&lt;!-- field position --&gt;
&lt;sort_order&gt;1&lt;/sort_order&gt;
&lt;!-- do not show this field in store scope --&gt;
&lt;show_in_default&gt;1&lt;/show_in_default&gt;
&lt;show_in_website&gt;1&lt;/show_in_website&gt;
&lt;show_in_store&gt;0&lt;/show_in_store&gt;
&lt;/active&gt;
&lt;order_status translate=&quot;label&quot;&gt;
&lt;label&gt;New order status&lt;/label&gt;
&lt;frontend_type&gt;select&lt;/frontend_type&gt;
&lt;source_model&gt;adminhtml/system_config_source_order_status&lt;/source_model&gt;
&lt;!--&lt;source_model&gt;adminhtml/system_config_source_order_status_new&lt;/source_model&gt;--&gt;
&lt;!--&lt;source_model&gt;adminhtml/system_config_source_order_status_processing&lt;/source_model&gt;--&gt;
&lt;sort_order&gt;4&lt;/sort_order&gt;
&lt;show_in_default&gt;1&lt;/show_in_default&gt;
&lt;show_in_website&gt;1&lt;/show_in_website&gt;
&lt;show_in_store&gt;0&lt;/show_in_store&gt;
&lt;/order_status&gt;
&lt;allowspecific translate=&quot;label&quot;&gt;
&lt;label&gt;Payment from applicable countries&lt;/label&gt;
&lt;frontend_type&gt;allowspecific&lt;/frontend_type&gt;
&lt;sort_order&gt;50&lt;/sort_order&gt;
&lt;source_model&gt;adminhtml/system_config_source_payment_allspecificcountries&lt;/source_model&gt;
&lt;show_in_default&gt;1&lt;/show_in_default&gt;
&lt;show_in_website&gt;1&lt;/show_in_website&gt;
&lt;show_in_store&gt;1&lt;/show_in_store&gt;
&lt;/allowspecific&gt;
&lt;specificcountry translate=&quot;label&quot;&gt;
&lt;label&gt;Payment from Specific countries&lt;/label&gt;
&lt;frontend_type&gt;multiselect&lt;/frontend_type&gt;
&lt;sort_order&gt;51&lt;/sort_order&gt;
&lt;source_model&gt;adminhtml/system_config_source_country&lt;/source_model&gt;
&lt;show_in_default&gt;1&lt;/show_in_default&gt;
&lt;show_in_website&gt;1&lt;/show_in_website&gt;
&lt;show_in_store&gt;1&lt;/show_in_store&gt;
&lt;/specificcountry&gt;

&lt;title translate=&quot;label&quot;&gt;
&lt;label&gt;Title&lt;/label&gt;
&lt;frontend_type&gt;text&lt;/frontend_type&gt;
&lt;sort_order&gt;2&lt;/sort_order&gt;
&lt;show_in_default&gt;1&lt;/show_in_default&gt;
&lt;show_in_website&gt;1&lt;/show_in_website&gt;
&lt;show_in_store&gt;0&lt;/show_in_store&gt;
&lt;/title&gt;
&lt;/fields&gt;
&lt;/newmodule&gt;
&lt;/groups&gt;
&lt;/payment&gt;
&lt;/sections&gt;
&lt;/config&gt;
</pre>
<p><strong>app/code/local/Mage/NewModule/Model/PaymentMethod.php</strong> <em>(below)</em></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/**
* Elias Interactive
*
* @title	  Magento -&gt; Custom Payment Module for Cash On Delivery
* @category   Mage
* @package    Mage_Local
* @author	  Lee Taylor / Elias Interactive -&gt; lee [at] eliasinteractive [dot] com
* @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*/

class Mage_NewModule_Model_PaymentMethod extends Mage_Payment_Model_Method_Abstract
{
protected $_code  = 'newmodule';
//protected $_formBlockType = 'payment/form_checkmo';
//protected $_infoBlockType = 'payment/info_cod';

/**
* Assign data to info model instance
*
* @param   mixed $data
* @return  Mage_Payment_Model_Method_Checkmo
*/
public function assignData($data)
{
$details = array();
if ($this-&gt;getPayableTo()) {
$details['payable_to'] = $this-&gt;getPayableTo();
}
if ($this-&gt;getMailingAddress()) {
$details['mailing_address'] = $this-&gt;getMailingAddress();
}
if (!empty($details)) {
$this-&gt;getInfoInstance()-&gt;setAdditionalData(serialize($details));
}
return $this;
}

public function getPayableTo()
{
return $this-&gt;getConfigData('payable_to');
}

public function getMailingAddress()
{
return $this-&gt;getConfigData('mailing_address');
}

}
</pre>
<p><strong>app/code/local/Mage/NewModule/sql/newmodule_setup/mysql4-install-0.1.0.php</strong> <em>(below)</em></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
// here are the table creation/updates for this module
</pre>
<p><strong>app/etc/modules/NewModule.xml</strong> <em>(below)</em></p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--
/**
* Elias Interactive
*
* @title	  Magento -&gt; Custom Payment Module for Cash On Delivery
* @category   Mage
* @package    Mage_Local
* @author	  Lee Taylor / Elias Interactive -&gt; lee [at] eliasinteractive [dot] com
* @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*/
--&gt;
&lt;config&gt;
&lt;modules&gt;
&lt;!-- declare Mage_NewModule module --&gt;
&lt;mage_NewModule&gt;
&lt;!-- this is an active module --&gt;
&lt;active&gt;true&lt;/active&gt;
&lt;!-- this module will be located in app/code/local code pool --&gt;
&lt;codePool&gt;local&lt;/codePool&gt;
&lt;!-- specify dependencies for correct module loading order --&gt;
&lt;depends&gt;
&lt;mage_Payment /&gt;
&lt;/depends&gt;
&lt;!-- declare module's version information for database updates --&gt;
&lt;version&gt;0.1.0&lt;/version&gt;
&lt;/mage_NewModule&gt;
&lt;/modules&gt;
&lt;/config&gt;
</pre>
<p>Again, this serves as a basic configuration for a new payment method that allows <em>Cash On Delivery</em> and is written as a <em>Magento Custom Module</em>. Modifying these files may be necessary, though this should be a good outline to get you started. Any help needed, post here and we&#8217;ll get some dialogue going to find solutions for your needs.</p>
<p><em><strong>Or</strong></em> simply download the files here:</p>
<p style="text-align: center;"><a href="http://eliasinteractive.com/wp-content/uploads/2008/09/COD_PaymentMethod.zip">Elias: Cash On Delivery (Magento Payment Method)</a></p>
<p style="text-align: center;"> </p>
<p style="text-align: center;"> </p>
<style> /*body#blog #main .left-sidebar .blog .comments { background:#ccc;}*/ </style>
<div id="tweetbutton311" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fbit.ly%2FlOhPjt&amp;via=tweetelias&amp;text=Magento%3A%20Create%20New%20Payment%20Method%20-%26gt%3B%20Cash%20On%20Delivery&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.eliasinteractive.com%2Fblog%2Fmagento-create-new-payment-method-cash-on-delivery%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.eliasinteractive.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.eliasinteractive.com/blog/magento-create-new-payment-method-cash-on-delivery/feed/</wfw:commentRss>
		<slash:comments>111</slash:comments>
		</item>
	</channel>
</rss>

