<?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></title>
	<atom:link href="http://www.sonassi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sonassi.com</link>
	<description>Sonassi &#124; We Make Magento Ecommerce Websites</description>
	<lastBuildDate>Thu, 26 Apr 2012 09:59:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Nested XML Menus using addLink() in Magento</title>
		<link>http://www.sonassi.com/knowledge-base/magento-kb/nested-xml-menus-using-addlink-in-magento/</link>
		<comments>http://www.sonassi.com/knowledge-base/magento-kb/nested-xml-menus-using-addlink-in-magento/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 18:10:15 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[magento addlink]]></category>
		<category><![CDATA[magento addlinkblock]]></category>
		<category><![CDATA[magento nested addlink]]></category>
		<category><![CDATA[magento nested link add]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=3383</guid>
		<description><![CDATA[Natively Magento doesn&#8217;t have a direct method to nest menu items using the page/template_links->addLink() function, but we had some menus that will never change and are best set in the layout XML rather than in the database/CMS. There is a feature to addLinkBlock() &#8211; but this relies on the block outputting the wrapping &#60;li&#62; &#8211; but as we intended to nest addLink(), this wouldn&#8217;t quite work. So we put together a tiny extension to offer this functionality, The files You&#8217;ll need to create the following files and directories first, ./app/code/community/Sonassi/TemplateLinks ./app/code/community/Sonassi/TemplateLinks/etc ./app/code/community/Sonassi/TemplateLinks/Block/Page/Template ./app/etc/modules/Sonassi_TemplateLinks.xml ./app/code/community/Sonassi/TemplateLinks/etc/config.xml ./app/code/community/Sonassi/TemplateLinks/Block/Page/Template/Links.php ./app/design/frontend/x/x/template/page/template/links_nested.phtml Add this to ./app/etc/modules/Sonassi_TemplateLinks.xml &#60;?xml version="1.0"?&#62; &#60;!-- /* * @category Module * @package Sonassi_TemplateLinks * @copyright Copyright (c) 2012 Sonassi */ --&#62; &#60;config&#62; &#60;modules&#62; &#60;Sonassi_TemplateLinks&#62; &#60;active&#62;true&#60;/active&#62; &#60;codePool&#62;community&#60;/codePool&#62; &#60;/Sonassi_TemplateLinks&#62; &#60;/modules&#62; &#60;/config&#62; Add this to ./app/code/community/Sonassi/TemplateLinks/etc/config.xml &#60;?xml version=&#34;1.0&#34;?&#62; &#60;!-- /* * @category Module * @package Sonassi_TemplateLinks * @copyright Copyright (c) 2012 Sonassi */ --&#62; &#60;config&#62; &#60;modules&#62; &#8230; <a href="http://www.sonassi.com/knowledge-base/magento-kb/nested-xml-menus-using-addlink-in-magento/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
		<script type="text/javascript">
		SyntaxHighlighter.config.clipboardSwf = 'http://www.sonassi.com/wp-content/plugins/syntax-highlighter-and-code-prettifier/scripts/clipboard.swf';
		SyntaxHighlighter.all();
	</script>
	<p>Natively Magento doesn&#8217;t have a direct method to nest menu items using the <code>page/template_links->addLink()</code> function, but we had some menus that will never change and are best set in the layout XML rather than in the database/CMS. There is a feature to <code>addLinkBlock()</code> &#8211; but this relies on the block outputting the wrapping <code>&lt;li&gt;</code> &#8211; but as we intended to nest <code>addLink()</code>, this wouldn&#8217;t quite work.</p>
<p>So we put together a tiny extension to offer this functionality,</p>
<h3>The files</h3>
<p>You&#8217;ll need to create the following files and directories first,</p>
<pre>
./app/code/community/Sonassi/TemplateLinks
./app/code/community/Sonassi/TemplateLinks/etc
./app/code/community/Sonassi/TemplateLinks/Block/Page/Template
./app/etc/modules/Sonassi_TemplateLinks.xml
./app/code/community/Sonassi/TemplateLinks/etc/config.xml
./app/code/community/Sonassi/TemplateLinks/Block/Page/Template/Links.php
./app/design/frontend/x/x/template/page/template/links_nested.phtml
</pre>
<p>Add this to <code>./app/etc/modules/Sonassi_TemplateLinks.xml</code></p>
<pre class="brush:php">
&lt;?xml version="1.0"?&gt;
&lt;!--
/*
* @category    Module
* @package     Sonassi_TemplateLinks
* @copyright   Copyright (c) 2012 Sonassi
*/
--&gt;
&lt;config&gt;
  &lt;modules&gt;
    &lt;Sonassi_TemplateLinks&gt;
      &lt;active&gt;true&lt;/active&gt;
      &lt;codePool&gt;community&lt;/codePool&gt;
    &lt;/Sonassi_TemplateLinks&gt;
  &lt;/modules&gt;
&lt;/config&gt;
</pre>
<p>Add this to <code>./app/code/community/Sonassi/TemplateLinks/etc/config.xml</code></p>
<pre class="brush:php">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--
/*
* @category    Module
* @package     Sonassi_TemplateLinks
* @copyright   Copyright (c) 2012 Sonassi
*/
--&gt;
&lt;config&gt;
  &lt;modules&gt;
    &lt;Sonassi_TemplateLinks&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;depends/&gt;
    &lt;/Sonassi_TemplateLinks&gt;
  &lt;/modules&gt;
  &lt;global&gt;
    &lt;blocks&gt;
      &lt;templatelinks&gt;
        &lt;class&gt;Sonassi_TemplateLinks_Block&lt;/class&gt;
      &lt;/templatelinks&gt;
    &lt;/blocks&gt;
  &lt;/global&gt;
&lt;/config&gt;
</pre>
<p>Add this to <code>./app/code/community/Sonassi/TemplateLinks/Block/Page/Template/Links.php</code></p>
<pre class="brush:php">
&lt;?php
/*
 * @category    Module
 * @package     Sonassi_TemplateLinks
 * @copyright   Copyright (c) 2012 Sonassi
 */
class Sonassi_TemplateLinks_Block_Page_Template_Links extends Mage_Page_Block_Template_Links
{
    protected function _construct()
    {
        $this-&gt;setTemplate('page/template/links_nested.phtml');
    }
    public function addLink($label, $url = '', $title = '', $prepare = false, $urlParams = array(), $position = null, $liParams = null, $aParams = null, $beforeText = '', $afterText = '', $childMenu = false)
    {
        if (is_null($label) || false === $label) {
            return $this;
        }
        $link = new Varien_Object(array(
            'label' =&gt; $label,
            'url' =&gt; ($prepare ? $this-&gt;getUrl($url, (is_array($urlParams) ? $urlParams : array())) : $url),
            'title' =&gt; $title,
            'li_params' =&gt; $this-&gt;_prepareParams($liParams),
            'a_params' =&gt; $this-&gt;_prepareParams($aParams),
            'before_text' =&gt; $beforeText,
            'after_text' =&gt; $afterText,
            'child_menu' =&gt; ($childMenu ? $this-&gt;getLayout()-&gt;getBlock($childMenu) : '')
        ));
        $this-&gt;_links[$this-&gt;_getNewPosition($position)] = $link;
        if (intval($position) &gt; 0) {
            ksort($this-&gt;_links);
        }
        return $this;
    }
}
</pre>
<p>And finally, put this code in <code>./app/design/frontend/x/x/template/page/template/links_nested.phtml</code></p>
<pre class="brush:php">
&lt;?php
/*
* @category    Template
* @package     Sonassi_TemplateLinks
* @copyright   Copyright (c) 2012 Sonassi
*/
?&gt;
&lt;?php
/**
 * @see Mage_Page_Block_Template_Links
 */
?&gt;
&lt;?php $_links = $this-&gt;getLinks(); ?&gt;
&lt;?php if(count($_links)&gt;0): ?&gt;
&lt;ul class=&quot;links&quot;&lt;?php if($this-&gt;getName()): ?&gt; id=&quot;&lt;?php echo $this-&gt;getName() ?&gt;&quot;&lt;?php endif;?&gt;&gt;
    &lt;?php foreach($_links as $count=&gt;$_link): ?&gt;
        &lt;?php if ($_link instanceof Mage_Core_Block_Abstract):?&gt;
            &lt;?php echo $_link-&gt;toHtml() ?&gt;
        &lt;?php else: ?&gt;
            &lt;li&lt;?php if($_link-&gt;getIsFirst()||$_link-&gt;getIsLast()||$count): ?&gt; class=&quot;&lt;?php if($_link-&gt;getIsFirst()): ?&gt;first&lt;?php endif; ?&gt;&lt;?php if($_link-&gt;getIsLast()): ?&gt; last&lt;?php endif; ?&gt; link-&lt;?php echo $count ?&gt;&quot;&lt;?php endif; ?&gt; &lt;?php echo $_link-&gt;getLiParams() ?&gt;&gt;
            	&lt;?php echo $_link-&gt;getBeforeText() ?&gt;&lt;a href=&quot;&lt;?php echo $_link-&gt;getUrl() ?&gt;&quot; title=&quot;&lt;?php echo $_link-&gt;getTitle() ?&gt;&quot; &lt;?php echo $_link-&gt;getAParams() ?&gt;&gt;&lt;?php echo $_link-&gt;getLabel() ?&gt;&lt;/a&gt;&lt;?php echo $_link-&gt;getAfterText() ?&gt;
            	&lt;?php echo ($_link-&gt;getChildMenu()) ? $_link-&gt;getChildMenu()-&gt;toHtml() : ''; ?&gt;
            &lt;/li&gt;
        &lt;?php endif;?&gt;
    &lt;?php endforeach; ?&gt;
&lt;/ul&gt;
&lt;?php endif; ?&gt;
</pre>
<h3>Making some nested menus</h3>
<p>Now that the extension is in place, you can start creating some nested menus, it follows the same syntax and arguments as the built in <code>addLink()</code> function. </p>
<p>So first we create the main menu, the key is to set a new element in <code>addLink</code> called <code>&lt;childMenu/&gt;</code></p>
<pre class="brush:php; highlight:[13]">
&lt;reference name=&quot;mymainmenu.links&quot;&gt;
    &lt;action method=&quot;addLink&quot; translate=&quot;label title before_text&quot;&gt;
        &lt;label&gt;Information Centre&lt;/label&gt;
        &lt;url /&gt;
        &lt;title&gt;Information Centre&lt;/title&gt;
        &lt;prepare /&gt;
        &lt;urlParams /&gt;
        &lt;position&gt;100&lt;/position&gt;
        &lt;liParams&gt;id=&quot;mymainmenu-menu&quot;&lt;/liParams&gt;
        &lt;aParams /&gt;
        &lt;before_text /&gt;
        &lt;after_text /&gt;
        &lt;childMenu&gt;mymainmenu.sublinks&lt;/childMenu&gt;
    &lt;/action&gt;
&lt;/reference&gt;
</pre>
<p>Then we create the submenu,</p>
<pre class="brush:php">
&lt;block type=&quot;page/template_links&quot; name=&quot;mymainmenu.sublinks&quot; as=&quot;mymainmenuSubLinks&quot;&gt;
    &lt;action method=&quot;setName&quot;&gt;
        &lt;name&gt;mymainmenu-sublinks&lt;/name&gt;
    &lt;/action&gt;
    &lt;action method=&quot;addLink&quot; translate=&quot;label title before_text&quot;&gt;
        &lt;label&gt;Contact Us&lt;/label&gt;
        &lt;url /&gt;
        &lt;title&gt;Contact Us&lt;/title&gt;
        &lt;prepare /&gt;
        &lt;urlParams /&gt;
        &lt;position&gt;110&lt;/position&gt;
        &lt;liParams /&gt;
        &lt;before_text /&gt;
        &lt;after_text /&gt;
    &lt;/action&gt;
    &lt;action method=&quot;addLink&quot; translate=&quot;label title before_text&quot;&gt;
        &lt;label&gt;Shipping and Delivery&lt;/label&gt;
        &lt;url /&gt;
        &lt;title&gt;Shipping and Delivery&lt;/title&gt;
        &lt;prepare /&gt;
        &lt;urlParams /&gt;
        &lt;position&gt;120&lt;/position&gt;
        &lt;liParams /&gt;
        &lt;before_text /&gt;
        &lt;after_text /&gt;
    &lt;/action&gt;
&lt;/block&gt;
</pre>
<p>And that is it. You can continue to nest as many levels as you want, just remember to make sure you declare the empty parameters (like <code>aParams</code> or <code>liParams</code>) even if you are not using them &#8211; as the core functionality isn&#8217;t forgiving if you miss out, or re-sequence the arguments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/knowledge-base/magento-kb/nested-xml-menus-using-addlink-in-magento/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Giving support access to Magento (for EE support) &#8230; with a regex</title>
		<link>http://www.sonassi.com/knowledge-base/giving-support-access-to-magento-for-ee-support-with-a-regex/</link>
		<comments>http://www.sonassi.com/knowledge-base/giving-support-access-to-magento-for-ee-support-with-a-regex/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 14:33:19 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[magento ips]]></category>
		<category><![CDATA[magento support ip list]]></category>
		<category><![CDATA[magento support ip nginx]]></category>
		<category><![CDATA[magento support ips]]></category>
		<category><![CDATA[magento support ips regex]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=3373</guid>
		<description><![CDATA[As part of an EE upgrade, we&#8217;ve just hit a reproducable core bug with 1.11; as we have to focus on the other fixes, we&#8217;re letting Magento&#8217;s EE SLA&#8217;ed support take care of the core bugs. But, in order to do that, they need access to the machine. The Magento support IPs 207.86.19.64/28 216.127.124.224/27 67.88.151.96/28 74.62.207.56/29 195.14.124.0/23 178.255.178.34 93.183.209.230 80.92.227.82 208.86.253.141 208.86.253.142 208.86.253.168 208.86.253.233 208.86.253.234 208.86.253.239 As we&#8217;re restricting Nginx to maintenance mode &#8211; we need to open access for their IP ranges. Magento have around 600 IP addresses that they need to you open up, which the majority of is within large subnet blocks; however, Nginx doesn&#8217;t support subnets for the type of matching we use for maintenance mode. So first I tried just putting all 600 IPs in, subnet to individual IP conversion was courtesy of TechZoom. if ($remote_addr ~ (67.88.151.96&#124;67.88.151.97&#124;67.88.151.98&#124;67.88.151.99&#124;67.88.151.100&#124;67.88.151.101&#124;67.88.151.102&#124;6.... But Nginx didn&#8217;t like this &#8230; Testing &#8230; <a href="http://www.sonassi.com/knowledge-base/giving-support-access-to-magento-for-ee-support-with-a-regex/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As part of an EE upgrade, we&#8217;ve just hit a reproducable core bug with 1.11; as we have to focus on the other fixes, we&#8217;re letting Magento&#8217;s EE SLA&#8217;ed support take care of the core bugs. But, in order to do that, they need access to the machine.</p>
<h3>The Magento support IPs</h3>
<pre class="brush:shell">
207.86.19.64/28
216.127.124.224/27
67.88.151.96/28
74.62.207.56/29
195.14.124.0/23
178.255.178.34
93.183.209.230
80.92.227.82
208.86.253.141
208.86.253.142
208.86.253.168
208.86.253.233
208.86.253.234
208.86.253.239
</pre>
<p>As we&#8217;re restricting <a href="http://www.sonassi.com/blogs/maintenance-page-with-nginx-with-specific-permitted-access/" title="Nginx maintenance mode for Magento">Nginx to maintenance mode</a> &#8211; we need to open access for their IP ranges. Magento have around 600 IP addresses that they need to you open up, which the majority of is within large subnet blocks; however, Nginx doesn&#8217;t support subnets for the type of matching we use for maintenance mode. </p>
<p>So first I tried just putting all 600 IPs in, subnet to individual IP conversion was courtesy of <a href="http://www.techzoom.net/tools/network-ip-calculator.en" rel="external nofollow">TechZoom</a>. </p>
<pre class="brush:shell">
if ($remote_addr ~ (67.88.151.96|67.88.151.97|67.88.151.98|67.88.151.99|67.88.151.100|67.88.151.101|67.88.151.102|6....
</pre>
<p>But Nginx didn&#8217;t like this &#8230;</p>
<pre class="brush:shell">
Testing nginx configuration: nginx: [emerg] too long parameter "(67.88.151..."
</pre>
<p>So a more sensible approach was to use regular expressions for the IP range. No problem for a <code>regex</code> master like myself (eek!). So I converted the subnet blocks to <code>regex</code>.</p>
<pre class="brush:shell">
67.88.151.(9[6-9]|10[0-9]|11[01])
74.62.207.(5[6-9]|6[0-9]|7[0-3])
195.14.12[45].([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])
216.127.124.2(2[4-9]|[34][0-9]|5[0-5])
</pre>
<p>And to combine that with the other (non-contiguous) IPs, you get this,</p>
<pre class="brush:shell">
if ($remote_addr ~ "(195.14.12[45].([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])|67.88.151.(9[6-9]|10[0-9]|11[01])|74.62.207.(5[6-9]|6[0-9]|7[0-3])|216.127.124.2(2[4-9]|[34][0-9]|5[0-5])|178.255.178.34|93.183.209.230|80.92.227.82|208.86.253.141|208.86.253.142|208.86.253.168|208.86.253.233|208.86.253.234|208.86.253.239)") {
  set $maintenance off;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/knowledge-base/giving-support-access-to-magento-for-ee-support-with-a-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maintenance page with Nginx with specific permitted access</title>
		<link>http://www.sonassi.com/knowledge-base/maintenance-page-with-nginx-with-specific-permitted-access/</link>
		<comments>http://www.sonassi.com/knowledge-base/maintenance-page-with-nginx-with-specific-permitted-access/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 12:57:49 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[magento nginx block]]></category>
		<category><![CDATA[magento nginx maintenance]]></category>
		<category><![CDATA[maintenance mode magento]]></category>
		<category><![CDATA[nginx 503 magento]]></category>
		<category><![CDATA[restrict ip magento maintenance]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=3367</guid>
		<description><![CDATA[At the moment, we&#8217;re in a fairly complicated upgrade of a Magento live store and during the upgrade window, it is necessary to put up a holding page. A simple maintenance.flag file isn&#8217;t going to cut it for this process, so cutting off users at the web server is more suitable. For this particular customer, they have a complex 3 server cluster running a single site with over 240,000 unique visitors per day, so Nginx was a more appropriate choice. Going into maintenance Putting up a maintenance page with a 503 header is required, but in addition to this, to make sure payment gateway IPNs can function correctly, we need to permit access to some URLs (where we do not know the source IP address), eg. PayPal or Ogone. Also, we&#8217;ll need to add our own IP address to the allow list. In the Nginx vhost configuration file: server { &#8230; <a href="http://www.sonassi.com/knowledge-base/maintenance-page-with-nginx-with-specific-permitted-access/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At the moment, we&#8217;re in a fairly complicated upgrade of a Magento live store and during the upgrade window, it is necessary to put up a holding page. A simple <code>maintenance.flag</code> file isn&#8217;t going to cut it for this process, so cutting off users at the web server is more suitable.</p>
<p>For this particular customer, they have a complex 3 server cluster running a single site with over 240,000 unique visitors per day, so Nginx was a more appropriate choice.</p>
<h3>Going into maintenance</h3>
<p>Putting up a maintenance page with a 503 header is required, but in addition to this, to make sure payment gateway IPNs can function correctly, we need to permit access to some URLs (where we do not know the source IP address), eg. PayPal or Ogone. Also, we&#8217;ll need to add our own IP address to the allow list. </p>
<p>In the Nginx vhost configuration file:</p>
<pre class="brush:shell">
server {
..
 set $maintenance on;
 if ($remote_addr ~ (my.ip.add.ress|my.second.ipadd.ress|my.third.ipadd.ress)) {
  set $maintenance off;
 }
 if ($uri ~ ^/(index.php/)?(ogone|paypal)/(.*)$ ) {
  set $maintenance off;
 }
 if ($maintenance = on) {
  return 503;
 }
 location /maintenance {
 }
 error_page 503 @maintenance;
 location @maintenance {
  root $maintenance_root;
  rewrite ^(.*)$ /index.html break;
 }
..
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/knowledge-base/maintenance-page-with-nginx-with-specific-permitted-access/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fully Automated Magento Install Script</title>
		<link>http://www.sonassi.com/knowledge-base/fully-automated-magento-install-script/</link>
		<comments>http://www.sonassi.com/knowledge-base/fully-automated-magento-install-script/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 13:45:00 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[magento automated installer]]></category>
		<category><![CDATA[magento enterprise install script]]></category>
		<category><![CDATA[magento install script]]></category>
		<category><![CDATA[magento install via ssh]]></category>
		<category><![CDATA[sonassi magento installer]]></category>
		<category><![CDATA[ssh install magento]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=3345</guid>
		<description><![CDATA[As we&#8217;re a popular Magento hosting and Magento development company, we find ourselves installing Magento quite a lot throughout the day. A few years ago we wrote an installation script, but rudely forgot to share it with the community. You can find it here http://sys.sonassi.com/install-magento.sh (full) OR http://s.onas.si/?installmage (shortened) The features • Using the script is really easy • Support for CE/EE • Supports installation with/without sample data • Chooses the correct sample data for the version of Magento you are using • Automatically re-indexes after installation • Automatically completes the full installer (with en_GB defaults) • Automatically creates an admin account • Supports CE 1.3/1.4/1.5/1.6 EE 1.10/1.11 Using the installer for Community Edition &#160; First log into your SSH account and execute, wget -O install-magento.sh http://sys.sonassi.com/install-magento.sh &#160; Then execute the script, it takes a minimum of 5 arguments and 2 optional arguments. Required arguments 1. DB Host 2. DB &#8230; <a href="http://www.sonassi.com/knowledge-base/fully-automated-magento-install-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As we&#8217;re a popular <a href="http://www.sonassihosting.com/magento-hosting.html" title="UK Magento Hosting" rel="external">Magento hosting</a> and <a href="http://www.sonassi.com/what-we-do/magento-development/" title="Magento Developers UK">Magento development company</a>, we find ourselves installing Magento quite a lot throughout the day.</p>
<p>A few years ago we wrote an installation script, but rudely forgot to share it with the community. You can find it <a href="http://sys.sonassi.com/install-magento.sh" rel="external">here</a></p>
<pre class="brush:shell">
http://sys.sonassi.com/install-magento.sh (full)
OR
http://s.onas.si/?installmage (shortened)
</pre>
<h3>The features</h3>
<p>• Using the script is really easy<br />
• Support for CE/EE<br />
• Supports installation with/without sample data<br />
• Chooses the correct sample data for the version of Magento you are using<br />
• Automatically re-indexes after installation<br />
• Automatically completes the full installer (with en_GB defaults)<br />
• Automatically creates an admin account<br />
• Supports CE 1.3/1.4/1.5/1.6 EE 1.10/1.11</p>
<h3>Using the installer for Community Edition</h3>
<p><span class="round-one">&nbsp;</span> First log into your SSH account and execute,</p>
<pre class="brush:shell">
wget -O install-magento.sh http://sys.sonassi.com/install-magento.sh
</pre>
<p><span class="round-two">&nbsp;</span> Then execute the script, it takes a minimum of 5 arguments and 2 optional arguments.</p>
<pre class="brush:shell">
Required arguments
1. DB Host
2. DB User
3. DB Name
4. DB Pass
5. Magento version
Optional arguments (for auto install)
6. Store URL
7. Admin Email Address
</pre>
<p><span class="round-three">&nbsp;</span> So for a full installation, that automatically installs Magento, adds sample data and completes the final install process, you would run.</p>
<pre class="brush:shell">
install-magento.sh mydbhost myuser mydb "mypass" "1.6.2.0" "www.mystore.com" "info@mystore.com"
</pre>
<p>Which would show &#8230;</p>
<pre class="brush:shell">
Do you really want to install in /home/mystore/public_html/ [y/N]: y
Do you want to install sample data? [y/N]: y
Starting installation, please wait ...
>> Downloading Magento 1.11 ... Done
>> Downloading sample data ... Done
>> Extracting files ... Done
>> Importing sample data ... Done
>> Setting up Mage ... Done
>> Cleaning up ... Done
>> Installing Magento ... SUCCESS
>> Re-indexing all indexes ... Done
>> Removing admin notifications ... Done
########################################
 INSTALLATION COMPLETE
 Admin Url     : www.mystore.comadmin
 Admin Username: info@mystore.com
 Admin Password: RfvDY-/l
########################################
</pre>
<h3>Using the installer for Enterprise Edition</h3>
<p><span class="round-one">&nbsp;</span> If you wish to install <strong>Magento Enterprise</strong> edition &#8211; then you&#8217;ll need to download the <code>tar.gz</code> archive from your &#8220;My Account&#8221; section on MagentoCommerce.com. </p>
<p><span class="round-two">&nbsp;</span> Upload the file to the base directory of where the installation will be</p>
<p><span class="round-three">&nbsp;</span> Rename the <code>tar.gz</code> file to be <code>latest-magento.tar.gz</code></p>
<p><span class="round-four">&nbsp;</span> Continue with the instructions from CE above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/knowledge-base/fully-automated-magento-install-script/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Magento Checklist for Design Elements</title>
		<link>http://www.sonassi.com/knowledge-base/magento-checklist-for-design-elements/</link>
		<comments>http://www.sonassi.com/knowledge-base/magento-checklist-for-design-elements/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 11:35:22 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[magento basecamp]]></category>
		<category><![CDATA[magento checklist]]></category>
		<category><![CDATA[magento design elements]]></category>
		<category><![CDATA[magento design items]]></category>
		<category><![CDATA[magento development]]></category>
		<category><![CDATA[magento enterprise]]></category>
		<category><![CDATA[magento enterprise development]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=3320</guid>
		<description><![CDATA[We are starting a new Magento Enterprise project today and whilst populating some of the base items in the Basecamp project, I thought it might be of use to the community to list the basic minimum items we add to our templating/skinning check-list for a Magento website. Ignoring any project specific pages/customisations, the following list is the minimum pages we must skin/satisfy for a Magento project. It is also the list of designs that we ask clients/agencies to supply if they are supplying their own design for us to skin/build. So in no particular order &#8230; Magento design check-list Main Template Main template (header) Main template (top navigation) Main template (footer) Main template (footer navigation) Main template (favicon) Main template (1 col) Main template (2 col right) Main template (2 col left) Main template (3 col) Main template (notifications success/error/info) Sidebar Elements Sidebar &#8211; Poll (vote overview) Sidebar &#8211; Poll &#8230; <a href="http://www.sonassi.com/knowledge-base/magento-checklist-for-design-elements/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are starting a new <strong>Magento Enterprise</strong> project today and whilst populating some of the base items in the <a href="http://basecamp.com" title="Basecamp" rel="nofollow external">Basecamp</a> project, I thought it might be of use to the community to list the basic minimum items we add to our templating/skinning check-list for a Magento website.</p>
<p>Ignoring any project specific pages/customisations, the following list is the minimum pages we must skin/satisfy for a Magento project. It is also the list of designs that we ask clients/agencies to supply if they are supplying their own design for us to skin/build. </p>
<p>So in no particular order &#8230;</p>
<div class="checklist two-col">
<div class="col1">
<div class="pad-in">
<h2>Magento design check-list</h2>
<h3>Main Template</h3>
<p>Main template (header)<br />
Main template (top navigation)<br />
Main template (footer)<br />
Main template (footer navigation)<br />
Main template (favicon)<br />
Main template (1 col)<br />
Main template (2 col right)<br />
Main template (2 col left)<br />
Main template (3 col)<br />
Main template (notifications success/error/info)</p>
<h3>Sidebar Elements</h3>
<p>Sidebar &#8211; Poll (vote overview)<br />
Sidebar &#8211; Poll (vote results)<br />
Sidebar &#8211; Checkout mini cart<br />
Sidebar &#8211; Wish list<br />
Sidebar &#8211; Newsletter<br />
Sidebar &#8211; Recently viewed<br />
Sidebar &#8211; Compare products</p>
<h3>Back-end misc</h3>
<p>Administration (store address, telephone number)<br />
Administration (header image &#8211; emails/invoice pdfs)</p>
<h3>Category</h3>
<p>Category (grid view)<br />
Category (list view)<br />
Category (paginated content)<br />
Category (with layered navigation)<br />
Category (with layered navigation filter selected)</p>
<h3>Product</h3>
<p>Product pages (simple view)<br />
Product pages (configurable view)<br />
Product pages (grouped view)<br />
Product pages (bundle view)</p>
<h3>Product Reviews</h3>
<p>Product Reviews (rating form)<br />
Product Reviews (single review view)<br />
Product Reviews (rating list view)
</p></div>
</div>
<div class="col2">
<div class="pad-in">
<h3>Search</h3>
<p>Search (simple results view)<br />
Search (simple results view with layered navigation)<br />
Search (advanced search form)<br />
Search (advanced results view)<br />
Search (advanced results view with layered navigation)<br />
Search (popular search terms index view)</p>
<h3>Checkout</h3>
<p>Checkout (cart overview without products)<br />
Checkout (cart overview with products)<br />
Checkout (one page)<br />
Checkout (multi-address)<br />
Checkout (success)<br />
Checkout (failure)</p>
<h3>Customer</h3>
<p>Customer Account (login)<br />
Customer Account (logout)<br />
Customer Account (forgot password)<br />
Customer Account (send to a friend)<br />
Customer Account (registration)<br />
Customer Account (dashboard)<br />
Customer Account (tags/reviews)<br />
Customer Account (wishlist)<br />
Customer Account (address book)<br />
Customer Account (orders)<br />
Customer Account (print order/shipment)</p>
<h3>Tags</h3>
<p>Tags (all tags index view)<br />
Tags (catalog view)</p>
<h3>CMS</h3>
<p>CMS (contact us)<br />
CMS (homepage)<br />
CMS (404 page)<br />
CMS (maintenance page)<br />
CMS (500 error page)
</p></div>
</div>
<p><br class="clear" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/knowledge-base/magento-checklist-for-design-elements/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple cPanel Backup Rotation Script</title>
		<link>http://www.sonassi.com/knowledge-base/simple-cpanel-backup-rotation-script/</link>
		<comments>http://www.sonassi.com/knowledge-base/simple-cpanel-backup-rotation-script/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 20:51:16 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Hosting Tips]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[cpanel backup rotation]]></category>
		<category><![CDATA[cpanel keep daily backups]]></category>
		<category><![CDATA[cpanel rotate backups]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=3295</guid>
		<description><![CDATA[cPanel has a brilliant backup facility built in, however it only keeps 1 backup per backup type. So if you have daily backups enabled running every day of the week, your previous day&#8217;s backup will be lost &#8211; the same applies to weekly and monthly backups. This can be a bit of a nuisance if you need to restore a file deleted the day before a backup ran. So using a simple script that hooks into cPanel&#8217;s backup script, you can retain backups for any number of days, weeks or months and it will only consume a very minimal amount of space &#8211; as the script uses hard links. So only the files that have changed will actually take up disk space. Backup rotation script Create a new file /scripts/postcpbackup.sh and put the following in it. You can customise the types of backups to be rotated and the retention period. &#8230; <a href="http://www.sonassi.com/knowledge-base/simple-cpanel-backup-rotation-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
		<script type="text/javascript">
		SyntaxHighlighter.config.clipboardSwf = 'http://www.sonassi.com/wp-content/plugins/syntax-highlighter-and-code-prettifier/scripts/clipboard.swf';
		SyntaxHighlighter.all();
	</script>
	<p>cPanel has a brilliant backup facility built in, however it only keeps 1 backup per backup type. So if you have daily backups enabled running every day of the week, your previous day&#8217;s backup will be lost &#8211; the same applies to weekly and monthly backups.</p>
<p>This can be a bit of a nuisance if you need to restore a file deleted the day before a backup ran.</p>
<p>So using a simple script that hooks into cPanel&#8217;s backup script, you can retain backups for any number of days, weeks or months and it will only consume a very minimal amount of space &#8211; as the script uses hard links. So only the files that have changed will actually take up disk space.</p>
<h3>Backup rotation script</h3>
<p>Create a new file <code>/scripts/postcpbackup.sh</code> and put the following in it. You can customise the types of backups to be rotated and the retention period.</p>
<pre class="brush:shell">
#!/bin/sh
# Simple backup directory rotation script for cPanel
#
# Allows daily, weekly and monthly backups to be kept for X number of days using
# hard links for retained backup copies, so disk space usage is extremely minimal
#
# Courtesy of www.SonassiHosting.com - The Magento Hosting experts
# Eg. /backup/cpbackup
BACKUP_ROOT_DIR=/backup/cpbackup
# Eg. daily weekly monthly
BACKUP_TYPES=( daily weekly )
# Eg. 1440 10080 40320 - the number of minutes for each respective backup type
BACKUP_AGE=( 1440 10080 )
# Eg. 7 4 1 - How many historical versions to keep of each backup
BACKUP_RETENTION=( 3 1 )
#######################################
# Do not edit anything below this line
#######################################
BACKUP_DATE=`date +%F`
for (( i = 0 ; i < ${#BACKUP_TYPES[@]} ; i++ )); do
  TYPE=${BACKUP_TYPES[$i]}
  AGE=${BACKUP_AGE[$i]}
  RETENTION=${BACKUP_RETENTION[$i]}
  MAX_AGE=`expr $RETENTION \\* $AGE`
  MIN_AGE=`expr $AGE + 60`
  if [ ! -d $BACKUP_ROOT_DIR/$TYPE ] || [[ ! `find $BACKUP_ROOT_DIR/$TYPE\_* -maxdepth 1 -mmin -$MIN_AGE -type d` == "" ]]; then
    echo "DIR '$TYPE' doesn't exist or previous backup too young ($AGE mins)"
    continue
  fi
  # Remove oldest backup
  find $BACKUP_ROOT_DIR/$TYPE\_* -maxdepth 1 -type d -mmin +$MAX_AGE -exec rm -rf {} \; > /dev/null 2>&#038;1
  mkdir -p $BACKUP_ROOT_DIR/$TYPE\_$BACKUP_DATE
  # Synchronise files
  rsync -a --delete \
    --link-dest=$BACKUP_ROOT_DIR/$TYPE $TYPE/. $BACKUP_ROOT_DIR/$TYPE\_$BACKUP_DATE/
done
</pre>
<h3>Backup restoration from rotation</h3>
<p>Just bear in mind, this code does not integrate into the backup restoration aspect of cPanel &#8211; so if you do need to restore/find a file &#8211; you will have to rename the folders appropriately.</p>
<p>Eg. to restore a daily backup from 2012-04-03</p>
<pre class="brush:shell">
cd /backups/cpbackup
mv daily{,.previous}
mv daily_2012-04-03 daily
</pre>
<p>Then use the standard restoration tool in WHM, after the restore is complete, just move the folders back to how they were</p>
<pre class="brush:shell">
mv daily daily_2012-04-03
mv daily.previous daily
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/knowledge-base/simple-cpanel-backup-rotation-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento Product Price Is Zero with Catalogue Price Rule</title>
		<link>http://www.sonassi.com/knowledge-base/magento-kb/magento-product-price-is-zero-with-catalogue-price-rule/</link>
		<comments>http://www.sonassi.com/knowledge-base/magento-kb/magento-product-price-is-zero-with-catalogue-price-rule/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 16:26:59 +0000</pubDate>
		<dc:creator>Francois</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[catalog price rules]]></category>
		<category><![CDATA[core bug]]></category>
		<category><![CDATA[fixed amount]]></category>
		<category><![CDATA[magento catalogue price rules broken]]></category>
		<category><![CDATA[magento fixed amount discount]]></category>
		<category><![CDATA[magento price wrong]]></category>
		<category><![CDATA[magento prices 0]]></category>
		<category><![CDATA[prices set to 0]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=3271</guid>
		<description><![CDATA[We have come across a somewhat critical core code error in Magento versions less than 1.5 when using the &#8220;Fixed Amount discount&#8221;. Any SKU that the respective rule applies to results in the final sale price of the product being £0. This seems to only occur in certain scenarios, but is easily replicated on a Magento 1.4.2.0 clean demo store. The fix Rather than posting the full code for an extension based override, we&#8217;re just going to post the code snippet and the simpler PHP autoloader priority based fix using the ./app/code/local directory. Create ./app/code/local/Mage/CatalogRule/Helper/Data.php And paste the following code inside: class Mage_CatalogRule_Helper_Data extends Mage_Core_Helper_Abstract { public function calcPriceRule ($actionOperator, $ruleAmount, $price) { $priceRule = 0; switch ($actionOperator) { case 'to_fixed': $priceRule = $ruleAmount; break; case 'to_percent': $priceRule= $price * $ruleAmount / 100; break; case 'by_fixed': $priceRule = $price - $ruleAmount; break; case 'by_percent': $priceRule = $price * (1 - &#8230; <a href="http://www.sonassi.com/knowledge-base/magento-kb/magento-product-price-is-zero-with-catalogue-price-rule/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
		<script type="text/javascript">
		SyntaxHighlighter.config.clipboardSwf = 'http://www.sonassi.com/wp-content/plugins/syntax-highlighter-and-code-prettifier/scripts/clipboard.swf';
		SyntaxHighlighter.all();
	</script>
	<p>We have come across a somewhat critical core code error in Magento versions less than 1.5 when using the &#8220;Fixed Amount discount&#8221;. Any SKU that the respective rule applies to results in the final sale price of the product being £0. This seems to only occur in certain scenarios, but is easily replicated on a Magento 1.4.2.0 clean demo store.</p>
<h3>The fix</h3>
<p>Rather than posting the full code for an extension based override, we&#8217;re just going to post the code snippet and the simpler PHP autoloader priority based fix using the <code>./app/code/local</code> directory.</p>
<p>Create <code>./app/code/local/Mage/CatalogRule/Helper/Data.php</code></p>
<p>And paste the following code inside:</p>
<pre class="brush:php">
class Mage_CatalogRule_Helper_Data extends Mage_Core_Helper_Abstract
{
 public function calcPriceRule ($actionOperator, $ruleAmount, $price)
 {
 $priceRule = 0;
 switch ($actionOperator) {
 case 'to_fixed':
 $priceRule = $ruleAmount;
 break;
 case 'to_percent':
 $priceRule= $price * $ruleAmount / 100;
 break;
 case 'by_fixed':
 $priceRule = $price - $ruleAmount;
 break;
 case 'by_percent':
 $priceRule = $price * (1 - $ruleAmount / 100);
 break;
 }
 return $priceRule;
 }
}
</pre>
<p>Save your file, flush your cache and re-apply your catalogue price rule.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/knowledge-base/magento-kb/magento-product-price-is-zero-with-catalogue-price-rule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Success through the Magento Partner Program</title>
		<link>http://www.sonassi.com/you-me-and-sonassi/success-through-magento-partner-program/</link>
		<comments>http://www.sonassi.com/you-me-and-sonassi/success-through-magento-partner-program/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 14:10:16 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Magento News]]></category>
		<category><![CDATA[You, me and Sonassi]]></category>
		<category><![CDATA[magento bronze partner]]></category>
		<category><![CDATA[Magento Developer Certification]]></category>
		<category><![CDATA[magento enterprise partner]]></category>
		<category><![CDATA[magento industry partner]]></category>
		<category><![CDATA[magento partner program]]></category>
		<category><![CDATA[magento platinum partner]]></category>
		<category><![CDATA[magento solution partner]]></category>
		<category><![CDATA[magento trusted extensions]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=3197</guid>
		<description><![CDATA[First, I&#8217;ll introduce who we are, we are Sonassi - a web development company that for almost 4 years has specialised in developing Magento stores, providing the fastest, most reliable and stable Magento hosting in Europe and providing Magento consultative services. Amongst our peers; Blue Acorn, Inchoo, Classy Llama, Sumo Heavy and a few more; we are one of a few companies in the world who can claim to be Magento experts. We have watched the Magento community has grow rapidly over the past 4 years, with new companies adopting the platform by the day; as a very early adopter, this is great to see. What prompted this article was an email from Phil Robinson at Magento, inviting us to be part of the Magento Trusted extension program for our excellent Magento/Wordpress Integration Extension. Finally, I thought, validation of Magento extension quality and the overall improvement of Magento connect &#8211; &#8230; <a href="http://www.sonassi.com/you-me-and-sonassi/success-through-magento-partner-program/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>First, I&#8217;ll introduce who we are, we are <strong>Sonassi </strong>- a web development company that for almost 4 years has specialised in <strong>developing Magento stores</strong>, providing the fastest, most reliable and stable Magento hosting in Europe and providing Magento consultative services. Amongst our peers; <a href="http://www.blueacorn.com/" rel="external">Blue Acorn</a>, <a href="http://inchoo.net/" rel="external">Inchoo</a>, <a href="http://classyllama.com/" rel="external">Classy Llama</a>, <a href="http://www.sumoheavy.com/">Sumo Heavy</a> and a few more; we are one of a <em>few</em> companies in the world who can claim to be <strong>Magento experts</strong>.</p>
<p>We have watched the Magento community has grow rapidly over the past 4 years, with new companies adopting the platform by the day; as a very early adopter, this is great to see. </p>
<p>
<img src="http://www.sonassi.com/wp-content/uploads/2012/04/magento-trusted-extension.png" alt="Magento Trusted Extension" title="Magento Trusted Extension" width="90" height="56" class="left aligncenter size-full wp-image-3234" />What prompted this article was an email from Phil Robinson at Magento, inviting us to be part of the Magento Trusted extension program for our excellent <a href="http://www.sonassi.com/knowledge-base/magento-kb/magento-wordpress-deluxe-extension/" rel="external">Magento/Wordpress Integration Extension</a>. Finally, I thought, validation of Magento extension quality and the overall improvement of Magento connect &#8211; unfortunately <strong>I was misunderstood</strong>. My interest was soon followed up with an email outlining all the fees involved to be an <strong>Industry Partner</strong>.<br />
<br class="clear" />
</p>
<p>This got me thinking, as we&#8217;re not currently an &#8220;official&#8221; partner, what are the real benefits of the Magento partnership program, specifically the Solution Partner Program. <em>What does it offer the consumer, what does it offer the agency?</em>.</p>
<h3>Our community grew Magento</h3>
<p>During the early stages of Magento&#8217;s birth; documentation, guides, blogs and other information were completely non-existant; and it required heavy participation from development firms (like ourselves) to be the ones to write guides, books, articles &#038; blog posts <strong><em>and</em></strong> even help others on the Magento Commerce forums. These early community members put in place the groundwork for most of the development of extensions and stores you see today.</p>
<p>But back in early 2008, those who frequently contributed weren&#8217;t really given any type of formal accreditation or reward. But if you were willing to pay a little &#8211; you could get a little badge under your forum avatar &#8211; &#8220;Community Partner&#8221;.</p>
<h3>So what partnership level means what then</h3>
<p>Buried in a PDF, the <a href='http://www.sonassi.com/wp-content/uploads/2012/04/0925_PDFPartnerBlog_R2.pdf'>Finding Magento Solution Partners</a> documentation classifies the different levels as follows, <strong>(which would make Sonassi a Gold partner)</strong>.</p>
<div class="post3197-partner-levels-wrap green-gradient-bg-179">
<ul class="post3197-partner-levels">
<li>
<div class="pad-in">
<h3>Gold Partners</h3>
<p>A Gold partner may best suit your needs if:</p>
<p>•	 your business is medium to large in size<br />
•	 you have a site that requires a lot of customization, extensive back-end integration with existing operations, or implementation of multiple third-party applications
</p></div>
</li>
<li>
<div class="pad-in">
<h3>Silver Partners</h3>
<p>A Silver partner may best suit your needs if:</p>
<p>•	 your business is small to mid-size<br />
•	 you are either entering the world of eCommerce for the first time or need to upgrade an existing online store<br />
•	 your site will require some customization and back-end integration or a moderate number of third-party application integrations
</p></div>
</li>
<li>
<div class="pad-in">
<h3>Bronze Partners</h3>
<p>A Bronze partner may be the best choice if:</p>
<p>•	 you are a small business or new to eCommerce<br />
•	 you require relatively minor customization or third-party software integration</p>
<p>Many Bronze partners are new to Enterprise implementations or just getting started in our program. They have eCommerce expertise, and many have done development work with the Magento open-source code.
</p></div>
</li>
</ul>
<p><br class="clear" />
</div>
<div class="img-wrap right">
<img src="http://www.sonassi.com/wp-content/uploads/2012/04/magento-partner-pricing-20082.png" alt="Magento Partner Pricing" title="Magento Partner Pricing" width="495" height="569" class="aligncenter size-full wp-image-3220" />
</div>
<h3>The dawn of the partner age</h3>
<p>Later, in 2008, the partner age begun and the <a href='http://www.sonassi.com/wp-content/uploads/2012/04/magento_partnership_2008.pdf'>Magento Partner Pricing (2008)</a> was released. You could now be part of the Magento elite and partner your way to success, with a nominal annual fee, varying from a fractional $800 to $3,800. </p>
<p>The strategy of the partner program has been very similar in structure since 2008; more revenue for Magento &#8211; either through annual membership, partner revenue commitment &#8211; commission through sales of support/product licenses (Pro/EE).</p>
<p>In 2012, membership pricing has increased <em>slightly</em>, ranging from $2,500 to $10,000 + revenue commitment.</p>
<p>Our understanding is that Magento partner program consists of <strong>best-of-breed</strong> agencies to showcase Magento and how good it really is,  which to some degree it does. </p>
<h3>Are Magento partners, Magento experts?</h3>
<p>Perhaps. The requirements to be a Silver solution partner (and above) would imply that. But the truth is, we cannot answer this accurately &#8211; and that is our concern. </p>
<p>The Bronze level is the gateway to the program, allowing agencies to enter the ecosystem; there is no barrier to entry in terms of qualification or ability. Bronze partners are those considered to develop primarily on CE with a future interest in EE. Bear in mind that unless you frequently develop EE stores, anything above Bronze isn&#8217;t for you.</p>
<p>Next up are your Silver partners, which admittedly is slightly harder to obtain. You are required to have a minimum of 2 Magento certified developers, but more importantly, you are expected to be using EE, taking on a minimum of 3 new EE clients every year (to satisfy the minimum annual commitment revenue of $50,000). </p>
<p>Gold level is much the same, a requirement for 4 certified developers and minimum commitment revenue of $100,000. </p>
<p>After speaking to Magento, one simply can&#8217;t choose to be a Silver/Gold partner, but rather are subject to approval by Magento; both for financial targets but also their general attitude towards EE and Magento as a whole. They have to earn it.</p>
<h3>Bigger is better, or is it?</h3>
<p>The partner program exists as a way to prove to the world that you are a capable Magento agency, but Magento appear to have neglected to differentiate the levels to the end user. Before researching this article, even I didn&#8217;t know the differences between entering at Bronze level and <strong>earning</strong> your Silver level &#8211; you can&#8217;t just pay for it, but have to instead prove your dedication and worth to Magento.</p>
<p>But does the SME know the difference between what each level means? Do they know a Bronze partner is likely unfamiliar with Magento but a Silver partner is not just familiar, but has earned the development certification to prove their knowledge of Magento. This is a real weakness of the program, simply because Magento have neglected to properly explain the differences to end users.</p>
<p>So those boutique Magento agencies looking to take the next step might consider entering the partner program, starting at the lowest level, a Bronze partner. But we wonder if this gives them any edge over a non-partner. After all, Magento&#8217;s definition of a Bronze partner (below), is that of a company likely unfamiliar with Magento and usually only familiar of working with small businesses. </p>
<p>This shows a gap, wherein an agency can be very proficient with Magento, but either continues to develop on CE or doesn&#8217;t have the volume of EE clients to satisfy the minimum commitment revenue. This would position them between Bronze and Silver, perhaps a new partner level should be added to satisfy this, <strong>Bronze+</strong>.</p>
<div class="img-wrap right">
<img src="http://www.sonassi.com/wp-content/uploads/2012/04/magento-partner-downsides.png" alt="" title="Magento Partner Downsides" width="451" height="182" class="alignnone size-full wp-image-3338" />
</div>
<h3>We want to join, but could it hurt us</h3>
<p>Sonassi has wanted to join the partner program since day 1, but we would aim to immediately be a Gold partner (who wouldn&#8217;t), paying the membership fee of $10,000 each year isn&#8217;t an issue, but paying a revenue commitment and having to promote the commission-based Enterprise Edition over Community Edition could be. We don&#8217;t like the idea of having to launch a minimum of 8 EE stores per year, how could we give each project the care and attention it needs, if we are focused on hitting targets.</p>
<p>It would likely be that we would only qualify to be a Bronze partner (simply due to the fact only 10% of the stores we develop use EE) &#8211; which we fear would cost us more than it would gain. We would be grouped with companies, who by Magento&#8217;s definition, are new to Magento. Our biggest fear would be losing a potential lead just because of our lesser partner status before we even get the chance to bid.</p>
<p>For development, we look to target medium sized business; for hosting, we look to target enterprise sized business. But by only being a Bronze partner &#8211; we&#8217;ve immediately branded ourselves less capable than a Silver/Gold partner &#8211; even though we know <em>we have a far better understanding</em> of Magento than a lot of Silver and Gold partners.</p>
<h3>The partner program currently devalues Magento</h3>
<p>The ambiguity and lack of distinction between levels does the program and its partners an injustice. It isn&#8217;t clear how hard a Gold partner has had to work to earn their stripes, similarly, how easy it has been for a Bronze partner to enter.</p>
<p>It also needs an intermediary step for those between Silver and Bronze. Agencies who are Magento experts, but primarily use CE &#8211; Bronze+.</p>
<p>For anyone looking at the program for the first time, it would be easy to misunderstand what it means to be a partner (even I am guilty of this).</p>
<ul>
<li><span class="round-one">&nbsp;</span>It is revenue based, pay more, rank higher</li>
<li class="clear"><span class="round-two">&nbsp;</span>There is no formal distinction between what each level means to an end-user</li>
<li class="clear"><span class="round-three">&nbsp;</span>An agency, can still be a partner without even having worked with Magento</li>
</ul>
<p><br class="clear" /></p>
<h3>So, are Sonassi going to partner up?</h3>
<p>We want to, but at the moment find ourselves with a lot of questions. We believe CE is not only a viable option for production Magento stores, but an enterprise option in itself. Many of our clients would not benefit from the minor benefits of EE and unless there was a specific feature in EE that was not cost-effective for us to build ourselves &#8211; I would certainly struggle (morally and ethically) to tell a client that they needed EE, just so that could hit our revenue commitment.</p>
<p><strong>Will we see success with the partner program? <em>Time will tell</em>.</strong></p>
<p><br class="clear" /></p>
<div class="mag_alert">
<a href="http://www.sonassi.com/what-we-do/magento-development/"><img src="http://www.sonassi.com/wp-content/uploads/2012/04/magento-certified-developer-agency1.png" alt="Magento Certified Developer" title="Magento Certified Developer" width="144" height="217" class="right alignnone size-full wp-image-3251" /></a></p>
<h3 class="sonassi-green">But there may be hope yet, Magento Certified Developers</h3>
<p>So it begs the question, how do you know if a Magento agency is as good as they say they are? Thankfully, there is now a recognised accreditation that developers can obtain. Not just in exchange for money, but a formal examination that can both be passed and failed.</p>
<p>Most agencies, that truly specialise in Magento, are making sure that all their developers have the appropriate training to obtain this valuable qualification &#8211; we&#8217;re in the middle of it at the moment, with the goal of 100% of our development workforce being <strong>Magento Certified</strong>.</p>
<p><strong>Developer Certification is what any business/individual looking for a Magento agency should use to judge their competency &#8211; in addition to any other standard vetting procedures.</strong></p>
<p><br class="clear" />
</div>
<p><br class="clear" /></p>
<h3>But what about judging Magento Hosting</h3>
<p>In the absence of any formal Magento hosting accreditation, ignoring the value-less partner program, <a href="http://magebenchmark.sonassi.com/" rel="external">MageBenchmark</a> stands to be the original and most accurate Magento performance benchmarking and comparison website, find it at <a href="http://magebenchmark.sonassi.com/" rel="external">http://magebenchmark.sonassi.com/</a></p>
<p><br class="clear" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/you-me-and-sonassi/success-through-magento-partner-program/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Stop Magento Permissions Errors &#8230; Permanently</title>
		<link>http://www.sonassi.com/knowledge-base/stop-magento-permissions-errors-permanently/</link>
		<comments>http://www.sonassi.com/knowledge-base/stop-magento-permissions-errors-permanently/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 14:35:29 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[acl magento]]></category>
		<category><![CDATA[chmod magento]]></category>
		<category><![CDATA[chown magento]]></category>
		<category><![CDATA[magento 775]]></category>
		<category><![CDATA[magento 777]]></category>
		<category><![CDATA[magento umask]]></category>
		<category><![CDATA[permissions magento]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=3096</guid>
		<description><![CDATA[When working with customers not hosting with Sonassi Hosting, we continually run into the same permissions errors &#8211; along with the rest of the Magento using world. This isn&#8217;t an issue if PHP runs as the same user as your FTP/SSH user, but if they are different, all kinds of headaches ensue. Whenever granted root access to a server, we normally carry out the following, to rule out any future permissions headaches. Please bear in mind, this practice is secure for dedicated hosting but may present security issues with shared hosting if the Apache process isn&#8217;t chroot&#8217;ed per user. In our example, the user is sonassi and the group is apache Add the FTP/SSH user to the Apache group Most importantly, we need to make sure that the FTP/SSH user is part of the Apache group, in our example, its apache (but is also commonly www-data) usermod -a -G apache &#8230; <a href="http://www.sonassi.com/knowledge-base/stop-magento-permissions-errors-permanently/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When working with customers not hosting with Sonassi Hosting, we continually run into the same permissions errors &#8211; along with the rest of the Magento using world. This isn&#8217;t an issue if PHP runs as the same user as your FTP/SSH user, but if they are different, all kinds of headaches ensue.</p>
<p>Whenever granted root access to a server, we normally carry out the following, to rule out any future permissions headaches. Please bear in mind, this practice is secure for dedicated hosting but may present security issues with shared hosting if the Apache process isn&#8217;t chroot&#8217;ed per user.</p>
<p>In our example, the user is <strong>sonassi</strong> and the group is <strong>apache</strong></p>
<h3>Add the FTP/SSH user to the Apache group</h3>
<p>Most importantly, we need to make sure that the FTP/SSH user is part of the Apache group, in our example, its <code>apache</code> (but is also commonly <code>www-data</code>)</p>
<pre class="brush:shell">
usermod -a -G apache sonassi
</pre>
<p>Keep adding as many users to the group as you have for FTP/SSH.</p>
<h3>Reset original permissions</h3>
<p>So before we start, lets make sure all the permissions are correct.</p>
<pre class="brush:shell">
chown -R sonassi:apache /home/sonassi/public_html
chmod -R 775 /home/sonassi/public_html
</pre>
<h3>ACLs and Sticky Bits</h3>
<p>ACLs in Linux allow us to define specific rules, in our case, what permissions files should inherit upon creation. A <strong>sticky bit</strong> (mentioned later) takes care of group inheritance, but does not help with the permissions, <em>which is why we use ACLs</em>.</p>
<p>Start by enabling ACL support on the active partition, <strong>please ensure your Kernel was compiled with ACL support</strong></p>
<pre class="brush:shell">
mount -o remount,acl /home
</pre>
<p>Now ACLs are enabled, we can set the ACL rules and group sticky bits:</p>
<pre class="brush:shell">
setfacl -d -m u::rwx,g::rwx,o::rx /home/sonassi/public_html
chmod g+s /home/sonassi/public_html
</pre>
<h3>But I don&#8217;t have ACL support</h3>
<p>If your Kernel doesn&#8217;t support ACLs you can also use <code>umask</code> (which is a run time setting for BASH, FTP and PHP) to set the default file permissions. Magento usually sets <code>umask(0)</code> in <code>index.php</code>, however, it would be in your interests to change this.</p>
<p>In your <code>index.php</code> change the <code>umask</code> line to be</p>
<pre class="brush:shell">
umask(022);
</pre>
<p>And in your BASH environment for SSH, set this in either you <code>.bashrc</code> or <code>.bash_profile</code></p>
<pre class="brush:shell">
umask 022
</pre>
<p>For your FTP server, you&#8217;ll need to read the documentation for it, but the principal is the same.</p>
<h3>All done</h3>
<p>Now, whenever a new file is created, it will be created with the correct permissions and group, allowing your FTP/SSH user to create files and the web server will still be able to write and vice-versa. </p>
<p>Now sit back and relax knowing you&#8217;ll never be recursively setting permissions again, or never experience the issue by changing your hosting to the UKs best <a href="http://www.sonassihosting.com" title="UK Magento hosting">Magento specialist host, Sonassi Hosting</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/knowledge-base/stop-magento-permissions-errors-permanently/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Abandoned PHP fCGI Process Clean-up</title>
		<link>http://www.sonassi.com/knowledge-base/abandoned-php-fcgi-process-clean-up/</link>
		<comments>http://www.sonassi.com/knowledge-base/abandoned-php-fcgi-process-clean-up/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 11:17:19 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[committed memory php]]></category>
		<category><![CDATA[cpanel abandoned php]]></category>
		<category><![CDATA[fgcid zombie]]></category>
		<category><![CDATA[leftover php]]></category>
		<category><![CDATA[php zombie]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=3092</guid>
		<description><![CDATA[We found a bug recently where PHP processes were being abandoned and left to continually consume memory and accumulate. This seems to be prevalent with Apache 2.2.x and mod_fcgid 2.3.5. Whilst we await an actual fix, we&#8217;ve wrote a quick script to help &#8220;clean up&#8221; these zombie processes to prevent the machine eventually swapping. This works for cPanel and any other server running mod_fcgid. It isn&#8217;t meant to be a permanent solution, but a means to help the issue temporarily. Firstly, create the following file, /scripts/phpcleanup.sh, then add the following line to your root crontab 5 2 * * * /scripts/phpcleanup.sh #!/bin/sh # PHP Cleanup script for abandoned PHP processes as a bug fix to issue in EasyApache, # See http://forums.cpanel.net/f189/lost-abandoned-php-processes-apache-2-2-17-mod_fcgid-2-3-5-suexec-180571.html # # Courtesy of www.SonassiHosting.com - The Magento Hosting experts phpbin='/usr/bin/php' membefore=`cat /proc/meminfo &#124; grep Committed_AS &#124; awk '{print $2}'` procsbefore=`ps ax &#124; grep "$phpbin" &#124; grep -v grep &#8230; <a href="http://www.sonassi.com/knowledge-base/abandoned-php-fcgi-process-clean-up/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
		<script type="text/javascript">
		SyntaxHighlighter.config.clipboardSwf = 'http://www.sonassi.com/wp-content/plugins/syntax-highlighter-and-code-prettifier/scripts/clipboard.swf';
		SyntaxHighlighter.all();
	</script>
	<p>We found a <a href="http://forums.cpanel.net/f189/lost-abandoned-php-processes-apache-2-2-17-mod_fcgid-2-3-5-suexec-180571-p2.html#post1111551" rel="external">bug </a>recently where PHP processes were being abandoned and left to continually consume memory and accumulate. This seems to be prevalent with <code>Apache 2.2.x</code> and <code>mod_fcgid 2.3.5</code>. Whilst we await an actual fix, we&#8217;ve wrote a quick script to help &#8220;clean up&#8221; these zombie processes to prevent the machine eventually swapping.</p>
<p>This works for cPanel and any other server running mod_fcgid. It isn&#8217;t meant to be a permanent solution, but a means to help the issue temporarily.</p>
<p>Firstly, create the following file, <code>/scripts/phpcleanup.sh</code>, then add the following line to your <code>root</code> crontab</p>
<pre class="brush:shell">
5 2 * * * /scripts/phpcleanup.sh
</pre>
<pre class="brush:shell">
#!/bin/sh
# PHP Cleanup script for abandoned PHP processes as a bug fix to issue in EasyApache,
# See http://forums.cpanel.net/f189/lost-abandoned-php-processes-apache-2-2-17-mod_fcgid-2-3-5-suexec-180571.html
#
# Courtesy of www.SonassiHosting.com - The Magento Hosting experts
phpbin='/usr/bin/php'
membefore=`cat /proc/meminfo | grep Committed_AS | awk '{print $2}'`
procsbefore=`ps ax | grep "$phpbin" | grep -v grep | wc -l`
killolderthan=`date -d "-1 day" +%s`
for pid in `ps auxwwwf | grep "$phpbin" | grep -v grep | awk '{print $2}'`; do
  starttime=`ps -F $pid | awk 'NR==2 {print $8}'`
  startdate=`date -d "$starttime" +%s`
  if [ $startdate -lt $killolderthan ]; then
   #echo "$pid is a Zombie ($starttime), killing ..."
   kill $pid >/dev/null 2>&#038;1
  fi
done
memafter=`cat /proc/meminfo | grep Committed_AS | awk '{print $2}'`
procsafter=`ps ax | grep "$phpbin" | grep -v grep | wc -l`
procskilled=`expr $procsbefore - $procsafter`
if [ $procskilled -gt 0 ]; then
  echo `expr $membefore - $memafter`"MB RAM has been freed"
  echo "$procskilled processes were killed"
else
  echo "No processes were killed"
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/knowledge-base/abandoned-php-fcgi-process-clean-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

