<?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>Agence de Développement Informatique du Nord &#187; Helper</title>
	<atom:link href="http://blog.adin.pro/tag/helper/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adin.pro</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 26 Dec 2019 08:54:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Magento how to make a helper (and use it)</title>
		<link>http://blog.adin.pro/2013-05-24/magento-how-to-make-a-helper-and-use-it/</link>
		<comments>http://blog.adin.pro/2013-05-24/magento-how-to-make-a-helper-and-use-it/#comments</comments>
		<pubDate>Fri, 24 May 2013 09:36:05 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Helper]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=212</guid>
		<description><![CDATA[<p>Creating a helper is quite easy, go on your /etc module directory and edit your config.xml file ex : app/code/local/Adin/Epub/etc/config.xml Add a block inside the &#60;global> and after &#60;/blocks> Then creates the Helper folder on your module directory and create &#8230; <a href="http://blog.adin.pro/2013-05-24/magento-how-to-make-a-helper-and-use-it/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-05-24/magento-how-to-make-a-helper-and-use-it/">Magento how to make a helper (and use it)</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Creating a helper is quite easy, go on your /etc module directory and edit your config.xml file<br />
ex : app/code/local/Adin/Epub/etc/config.xml<br />
Add a <helpers> block inside the &lt;global> and after &lt;/blocks></p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;config&gt;
	&lt;modules&gt;
		&lt;Adin_Epub&gt;
			&lt;version&gt;1.0.0&lt;/version&gt;
		&lt;/Adin_Epub&gt;
	&lt;/modules&gt;
	
	&lt;global&gt;
		&lt;helpers&gt;
			&lt;epub&gt;
				&lt;class&gt;Adin_Epub_Helper&lt;/class&gt;
			&lt;/epub&gt;
		&lt;/helpers&gt;
	&lt;/global&gt;
	
&lt;/config&gt;
</pre>
<p>Then creates the Helper folder on your module directory and create a data class :<br />
app/code/local/Adin/Epub/Helper/Data.php</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
class Adin_Epub_Helper_Data extends Mage_Core_Helper_Abstract
{
    //fonction de test
    public function getTest()
    {
        return &quot;Ceci est un test de helper&quot;;
    }	
}
</pre>
<p>If you create a new module, don&#8217;t forget to activate it, for that, in app/etc/modules directory, create or append a xml file and add your new module, for example :</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;config&gt;
    &lt;modules&gt;
        &lt;Adin_Epub&gt;
            &lt;active&gt;true&lt;/active&gt;
            &lt;codePool&gt;local&lt;/codePool&gt;
        &lt;/Adin_Epub&gt;
    &lt;/modules&gt;
&lt;/config&gt;
</pre>
<p>Now, for using your new helper, just instanciate it and call the function :</p>
<pre class="brush: php; title: ; notranslate">
$helper = Mage::helper('epub');
echo $helper-&gt;getTest();
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-05-24/magento-how-to-make-a-helper-and-use-it/">Magento how to make a helper (and use it)</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-05-24/magento-how-to-make-a-helper-and-use-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
