<?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>5 Minute Fix Archives - gj</title>
	<atom:link href="https://blog.gaiterjones.com/tag/5-minute-fix/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.gaiterjones.com/tag/5-minute-fix/</link>
	<description>gaiterjones</description>
	<lastBuildDate>Thu, 11 Aug 2011 15:44:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.3</generator>
	<item>
		<title>FREE Magento Extension &#8211; Monitor /var/report Error files</title>
		<link>https://blog.gaiterjones.com/free-magento-extension-monitor-var-report-errors/</link>
					<comments>https://blog.gaiterjones.com/free-magento-extension-monitor-var-report-errors/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Thu, 14 Apr 2011 16:08:35 +0000</pubDate>
				<category><![CDATA[Free Magento Extensions]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Monitor Reports]]></category>
		<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[FREE Magento Extensions]]></category>
		<category><![CDATA[Monitor Magento Error Reports]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=372</guid>

					<description><![CDATA[I recently experienced an interesting problem with a Magento web store that went unnoticed because although the store appeared to be functioning perfectly well I was not aware of error...<a class="more-link" href="https://blog.gaiterjones.com/free-magento-extension-monitor-var-report-errors/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="hang-2-column     alignnone" title="Magento BuyXGetYFree Extension" src="https://blog.gaiterjones.com/wp-content/uploads/2011/03/buyxgeyfree-box.jpg" alt="Magento BuyXGetYFree Extension" width="168" height="168" />I recently experienced an interesting problem with a Magento web store that went unnoticed because although the store appeared to be functioning perfectly well I was not aware of error reports being created in the Magento <em>/var/report</em> folder. I don&#8217;t regularly check this folder and had I known about the error reports that were rapidly accumulating there I could have solved the problem with the store quicker!</p>
<p>I thought it would be a good idea to monitor this folder for new files and to be alerted by email when a change in the folder contents is detected, i.e. when a new error report is generated so that I am aware of Magento errors as soon as they happen.</p>
<p>I put together a quick PHP script and then converted it into a Magento Extension that runs as part of the magento scheduled cron tasks. The extension will check the /var/report folder every hour and send an email alert when a change in this folder is detected with the latest error report file attached.</p>
<p>The extension uses the Magento scheduler which should be enabled. And the Magento scheduler script <em>cron.php </em>should be configured to run periodically in your crontab.</p>
<p>To install the extension, copy the extension app folder to your magento store app folder. Refresh your magento cache. Logout from admin, and login again. Check out your var/reports folder, if you have not checked it for a while there could be reports there, it is quite safe to remove old reports.</p>
<p>The first time the extension runs you will receive an email if there are existing files in your var/report folder showing the total number of reports with the newest report attached. After that you will be alerted each time new reports are detected.</p>
<p>Configure the extension with a valid email addresses, in the My Extensions, Monitor Reports admin section.</p>
<p>Tested with Magento 1.3.x, 1.5.x</p>
<figure id="attachment_374" aria-describedby="caption-attachment-374" style="width: 620px" class="wp-caption alignnone"><img fetchpriority="high" decoding="async" class="hang-1-column       " title="Monitor Reports Extension configuration screen" src="https://blog.gaiterjones.com/wp-content/uploads/2011/04/monitorreports-620x330.jpg" alt="" width="620" height="330" /><figcaption id="caption-attachment-374" class="wp-caption-text">Monitor Reports Extension configuration screen</figcaption></figure>
<p>&nbsp;</p>
<p><strong><a href="https://blog.gaiterjones.com/dev/extension.php?id=6f35f46082c9cb637c809e7e04365ce9">Download the extension here</a>.</strong></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/free-magento-extension-monitor-var-report-errors/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>Magento Master Password 5 Minute Fix</title>
		<link>https://blog.gaiterjones.com/magento-master-password/</link>
					<comments>https://blog.gaiterjones.com/magento-master-password/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Mon, 14 Feb 2011 10:35:48 +0000</pubDate>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Magento Master Password]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=93</guid>

					<description><![CDATA[It can be annoying when you want to troubleshoot a Magento eCommerce site customer login problem, and you must first reset the customers account password to login as the customer...<a class="more-link" href="https://blog.gaiterjones.com/magento-master-password/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>It can be annoying when you want to troubleshoot a Magento eCommerce site customer login problem, and you must first reset the customers account password to login as the customer and troubleshoot the problem yourself.  It can also be useful to quickly login as the customer to examine their shopping cart or place an order on their behalf. To do this we need a so called &#8220;master password&#8221; to override the customer password in the Magento database and allow us to login to the Magento frontend as the customer.</p>
<p>This is a 5 minute quick fix! All we need is an MD5 hash and one or two  lines of code to configure an encrypted Magento store frontend master password to allow you to login to the frontend of your Magento eCommerce store with any registered users account.</p>
<h2>FREE EXTENSION</h2>
<p>A free extension to implement this solution is now available <a title="FREE Magento Extension – Magento Master Password" href="https://blog.gaiterjones.com/free-magento-extension-magento-master-password/">here</a>.</p>
<h2>DO IT YOURSELF</h2>
<p>First we need a master password, I always recommend using a <span style="text-decoration: underline;"><a href="http://strongpasswordgenerator.com/" target="_blank">Strong Password Generator</a></span> to generate a &#8220;good&#8221; hard to guess / remember password with at least 8 characters, for example lets use : <strong><span style="color: #888888;">Qbc55H8m</span></strong><br />
We don&#8217;t want this password to appear in plain text in our PHP code so lets make a one way MD5 hash of the password. Using the MD5 generator below I can create the MD5 hash by entering my strong password string &#8211; <strong>Qbc55H8m</strong></p>
<div>
<form> Enter a string:<br />
&nbsp;</p>
<p><input style="width: 336px;" onkeyup="this.form.hash.value = MD5(this.form.decoded.value)" name="decoded" type="text" /><br />
Calculated MD5 hash:&nbsp;</p>
<p><input style="width: 336px;" name="hash" type="text" /> </form>
<p><script src="/js/webtoolkit.md5.js" type="text/javascript"></script></p>
</div>
<p>Using the password &#8220;<strong>Qbc55H8m</strong>&#8221; I generated the following MD5 hash:</p>
<pre>acb1bb6a30a54a54f4558f3d3984bda6</pre>
<p>Create your MD5 hash now with your own password.</p>
<p>Now we are all set with our encrypted Magento universal master password, next we need to add two lines of code to the customer password authentication function within the core Magento code. We don&#8217;t want to edit the actual core files as these will be overwritten during an upgrade, so we will create a local copy of the file and make our modifications there.</p>
<p>In your <em><strong>/app/code/local </strong></em>folder create the following folder structure:</p>
<p><em><strong>Mage/Customer/Model</strong></em> (note folder names are case sensitive.)</p>
<p>Now copy the Magento core php file <strong>customer.php</strong> from <em><strong>app/code/core/Mage/Customer/Model </strong></em>to <em><strong>app/code/local/Mage/Customer/Model</strong></em></p>
<p>Open your app/code/local/Mage/Customer/Model local copy of <strong>customer.php</strong> in a text editor and around about line 300 (1.3.x) or 340 (1.4.x) you will see the function <em>validatePassword($password) </em>this is the function that validates the customer login password with the encrypted password in the Magento database. Add the following two lines of code to this function, remember to include the MD5 password you generated above :</p>
<pre class="brush:php">if (md5($password) == 'YOUR GENERATED MD5 PASSWORD') {
return true;
}</pre>
<p>So that your function now looks something like this</p>
<pre class="brush:php">    public function validatePassword($password)
    {
        // Master Password Check - PAJ 14.02.2011
		if (md5($password) == 'YOUR GENERATED MD5 PASSWORD') {
                return true;
        }

        if (!($hash = $this-&gt;getPasswordHash())) {
            return false;
        }
        return Mage::helper('core')-&gt;validateHash($password, $hash);
    }</pre>
<p>Save the file and refresh your Magento cache. Thats it, select a customer account and confirm that you can login with your master password. Remember to keep your master password safe!</p>
<p>Tested with Magento 1.3.3.0, 1.4.2.0, 1.5.0.0</p>
<p>Googled resources used to develop this solution :<br />
<a href="http://www.webtoolkit.info/javascript-md5.html">http://www.webtoolkit.info/javascript-md5.html<br />
</a><a href="http://strongpasswordgenerator.com/">http://strongpasswordgenerator.com/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-master-password/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Magento Google Element Translation Tool Implementation in 5 Minutes</title>
		<link>https://blog.gaiterjones.com/magento-google-translation-tool-implementation/</link>
					<comments>https://blog.gaiterjones.com/magento-google-translation-tool-implementation/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Thu, 10 Feb 2011 15:35:41 +0000</pubDate>
				<category><![CDATA[Language]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Google Translation]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=74</guid>

					<description><![CDATA[Google translations are not always perfect, and should not be relied on as a permanent solution to a Magento eCommerce multi language store front but implementing the Google element translation...<a class="more-link" href="https://blog.gaiterjones.com/magento-google-translation-tool-implementation/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><strong>Google </strong>translations are not always perfect, and should not be relied on as a <em>permanent </em>solution to a Magento eCommerce multi language store front but implementing the <a href="http://translate.google.com/translate_tools  ">Google element translation tool</a> into your Magento eCommerce site is a <strong><em>quick win</em></strong> especially if you are receiving a lot of visits from customers with a browser language that is different from your primary store language. We found customers were using Google to translate our store anyway, so why not implement the translation code <span style="text-decoration: underline;">ourselves</span>?</p>
<p>You can simply implement the Google element translation tool into Magento (and WordPress &#8211; see top left!) with support for over 50 languages in <strong>5 minutes</strong>.</p>
<p>Lets look at the default themes for Magento 1.3.x, 1.4.x and 1.5.x &#8211; in the <strong>header.phtml</strong> template file <strong>languages.phtml</strong> is used to automatically create a store switcher for Magento sites with more than one store. Lets replace the code in the language switcher phtml file with the Google element translation code.</p>
<p>Locate your version of the <em>languages.phtml</em> file and make a backup copy i.e. <em>languages.phtml.old</em>. Copy and paste the following code into<em> languages.phtml </em>replacing the existing code.</p>
<pre class="brush:plain">&lt;div class="form-language"&gt;
    &lt;label for="select-language"&gt;&lt;?php echo $this-&gt;__('Your Language:') ?&gt; &lt;/label&gt;

&lt;!-- Google Element Translator Styling--&gt;
		&lt;style&gt;
			.goog-te-combo{width: px !important;}
			.goog-te-balloon-frame{display: none !important;}
			font{background: transparent !important;}
			a font:hover{ color:  !important;}
			#google_translate_element{height: 26px !important;overflow: hidden !important;}
			.goog-te-banner-frame{display: none !important;}
			body{top: 0px !important;}
		&lt;/style&gt; 

&lt;!-- Google Element Translator --&gt;
	&lt;div id="google_language_drop"&gt;
		&lt;div id="google_translate_element" class="-blank"&gt;&lt;/div&gt;
			&lt;script&gt;
				function googleTranslateElementInit() {
					new google.translate.TranslateElement({
						includedLanguages: 'en,de,af,sq,ar,hy,az,eu,be,bg,ca,zh-CN,zh-TW,hr,cs,da,nl,et,tl,fi,fr,gl,ka,el,ht,iw,hi,hu,is,id,ga,it,ja,ko,la,lv,lt,mk,ms,mt,no,fa,pl,pt,ro,ru,sr,sk,sl,es,sw,sv,th,tr,uk,ur,vi,cy,yi',
						pageLanguage: '&lt;?php echo $this-&gt;__('en') ?&gt;',
						gaTrack: true,
						gaId: 'UA-12345678-1'
					}, 'google_translate_element');
				}
			&lt;/script&gt;
		&lt;script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"&gt;&lt;/script&gt;
	&lt;/div&gt;
&lt;/div&gt;</pre>
<p>The standard Google element translator code introduces a nasty looking frame at the top of translated pages and a few other stylings and images around the language drop down that we don&#8217;t want to see,  so we remove these first with some style elements. We then use the bog standard code from <a href="http://translate.google.com/translate_tools  ">Google </a>to include the element translator javascript which generates the country selection drop down box. You can specify which languages you want to include by editing the <em>includedLanguages </em>ISO two letter country codes. If you use Google Analytics then include your analytics account number to feed usage data into your Google Analytics account. If you have a multi language store remember to add a translation for &#8216;<em>en</em>&#8216; in your locale files to let Google know the language of the page it is translating (although if you leave this blank it will try and auto detect the language).</p>
<p>Save the new <em>languages.phtml</em> and refresh your site, you should see the new Select Language drop down box in the  site header, or whereever you placed the element translator within your sites Magento theme.</p>
<figure id="attachment_75" aria-describedby="caption-attachment-75" style="width: 530px" class="wp-caption aligncenter"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/02/google-translation-tool-integrated-with-magento-1-4-2.jpg"><img decoding="async" class="hang-1-column   " style="border: 1px solid black;" title="Google Translation Tool Integrated With Magento 1.4.2" src="https://blog.gaiterjones.com/wp-content/uploads/2011/02/google-translation-tool-integrated-with-magento-1-4-2.jpg" alt="Google Translation Tool Integrated With Magento 1.4.2" width="530" height="532" /></a><figcaption id="caption-attachment-75" class="wp-caption-text">Google Translation Tool Integrated With Magento 1.4.2</figcaption></figure>
<p>If your site already has multi language stores then you will need to integrate the code into your existing language switcher. You might want to hide the Google translator for visitors with a browser language that matches your site, you don&#8217;t want customers trying to translate your site with Google when you have already perfectly translated it yourself! You can accomplish this by wrapping the Google code in a PHP <em>If</em> statement e.g. if your site is in German and English, hide the translator from German speaking visitors:</p>
<pre class="brush:php">&lt;?php if (Mage::app()-&gt;getStore()-&gt;getId()==ID NUMBER OF ENGLISH STORE): ?&gt;

&lt;!-- Google Element Translator --&gt;

&lt;?php endif ?&gt;</pre>
<p>Style the #google_translate_element DIV if you need to place it correctly within your theme. I prefer switching stores using clickable flags, and for our store implemented a &#8220;Google&#8221; language flag <img loading="lazy" decoding="async" class="alignnone" style="margin-left: 2px; margin-right: 2px;" title="Google Translate Flag" src="https://blog.gaiterjones.com/wp-content/uploads/2011/02/google-translate.gif" alt="Google Translate Flag" width="18" height="18" /> that toggles the Google element translator DIV on or off for visitors with foreign language browsers &#8211;</p>
<pre class="brush:php">&lt;script type="text/javascript"&gt;
&lt;!--
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
//--&gt;
&lt;/script&gt;

&lt;a href="#" onClick="toggle_visibility('google_translate_element');"&gt;&lt;img width="16" height="16" src="&lt;?php echo $this-&gt;getSkinUrl('images/google-translate.gif') ?&gt;" id="lang-flag-google" title="Google Translate - please note we are not responsible for the accuracy of translations made with this service." /&gt;&lt;/a&gt;</pre>
<p>Tested with Magento 1.3.3, 1.4.2 and 1.5.0.</p>
<p>This post is dedicated to <span style="text-decoration: underline;"><a href="http://www.nilerodgers.com/" target="_blank">Nile Rodgers</a>.</span></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-google-translation-tool-implementation/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
			</item>
	</channel>
</rss>
