<?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>gj |</title>
	<atom:link href="https://blog.gaiterjones.com/category/5-minute-fix/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.gaiterjones.com/category/5-minute-fix/</link>
	<description>gaiterjones</description>
	<lastBuildDate>Wed, 10 May 2017 15:42:54 +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>How to use Amazon Cloud Drive with Owncloud</title>
		<link>https://blog.gaiterjones.com/how-use-amazon-cloud-drive-with-owncloud/</link>
					<comments>https://blog.gaiterjones.com/how-use-amazon-cloud-drive-with-owncloud/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Wed, 10 May 2017 17:05:52 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Owncloud]]></category>
		<category><![CDATA[Storage]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1610</guid>

					<description><![CDATA[Amazon offer cloud drive storage for photos free for Amazon Prime customers. For less that 10 yoyos per month you can upgrade to an unlimited cloud drive storage plan. Yes,...<a class="more-link" href="https://blog.gaiterjones.com/how-use-amazon-cloud-drive-with-owncloud/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>Amazon offer <a href="https://www.amazon.de/clouddrive">cloud drive storage</a> for photos free for Amazon Prime customers. For less that 10 <em>yoyos</em> per month you can upgrade to an unlimited cloud drive storage plan.</p>
<p>Yes, I did just say <span style="text-decoration: underline;">unlimited</span> storage.</p>
<p>This is pretty neat, but I already use an open source cloud storage system on my own cloud server &#8211; called er, <em><a href="https://owncloud.org/">Owncloud</a>. </em> Wouldn&#8217;t it be really nifty if I could attach the unlimited Amazon Cloud drive storage to my Owncloud.</p>
<p>Here is how to do it in 5 easy steps:</p>
<ol>
<li>Sign up for an unlimited Amazon Cloud Drive storage plan at <a href="https://www.amazon.de/clouddrive">https://www.amazon.de/clouddrive</a></li>
<li>Install and configure <a href="https://acd-cli.readthedocs.io/en/latest/setup.html">acd_cli</a>
<ol>
<li><em>pip3 install &#8211;upgrade &#8211;pre acdcli</em></li>
<li><em>acd_cli -v init</em>
<ol>
<li>authenticate with Amazon and save the generated oauth_data file to ~/.cache/acd_cli/oauth_data</li>
</ol>
</li>
</ol>
</li>
<li>Sync acd_cli
<ol>
<li><em>acd_cli -v sync</em></li>
</ol>
</li>
<li>Mount acd with fuse
<ol>
<li><em>acd_cli mount &#8211;allow-other -i 0 /home/acd/</em></li>
</ol>
</li>
<li>Create a new external storage folder in Owncloud
<figure id="attachment_1611" aria-describedby="caption-attachment-1611" style="width: 600px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" src="https://blog.gaiterjones.com/wp-content/uploads/2017/05/owncloud-external-acd.png" alt="" width="600" height="198" class="size-full wp-image-1611" /><figcaption id="caption-attachment-1611" class="wp-caption-text">Owncloud External ACD</figcaption></figure></li>
</ol>
<p>That&#8217;s it, Amazon cloud drive will now appear as an ACD folder in Owncloud.</p>
<p style="text-align: left;">Is it really unlimited? In their license agreement it says that your service will terminate if your usage &#8220;substantially exceeds or differs from normal use by other users&#8221;. Be sure to check out the fine print. A quick Google around shows users already at hundreds of terabytes which sounds good to me.</p>
<p><img decoding="async" src="https://blog.gaiterjones.com/wp-content/uploads/2017/05/wtf-acd-1.png" alt="" width="600" height="670" class="aligncenter wp-image-1619 size-full" /></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/how-use-amazon-cloud-drive-with-owncloud/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Magento, Poodle and Paypal &#8211; Disable SSL v3 Before December 3rd</title>
		<link>https://blog.gaiterjones.com/magento-poodle-paypal-disable-ssl-v3-december-3rd/</link>
					<comments>https://blog.gaiterjones.com/magento-poodle-paypal-disable-ssl-v3-december-3rd/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Thu, 27 Nov 2014 16:58:15 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Poodle SSL3 Vulnerability]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1250</guid>

					<description><![CDATA[The so called Poodle security vulnerability was announced by Google last Month (October 14 2014). The vulnerability effects SSL v3.0 a transport protocol which has been around for over 18...<a class="more-link" href="https://blog.gaiterjones.com/magento-poodle-paypal-disable-ssl-v3-december-3rd/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>The so called Poodle security vulnerability was announced by <a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html" target="_blank">Google </a>last Month (October 14 2014).</p>
<p>The vulnerability effects SSL v3.0 a transport protocol which has been around for over 18 years and is used to secure various TCP/IP protocols the most common of which being HTTPS so it is present in a lot of client and server software.</p>
<p>The workaround fix to mitigate this vulnerability is to simply disable SSL v3 support and fallback (or upgrade) to using the newer TLS 1.x protocol.</p>
<p>The vulnerability seems to be a real cause for concern for a lot of companies especially Paypal who <a href="https://devblog.paypal.com/poodle-ssl-3-0-vulnerability/?mkt_tok=3RkMMJWWfF9wsRojuqnPdO%2FhmjTEU5z16uQoW6Gzhpx41El3fuXBP2XqjvpVQcdnPbHKRw8FHZNpywVWM8TIL9kXt9BlJAzqD2w%3D">announced </a>recently that the will disable SSL v3 support on the 3rd of December 2014.</p>
<h1>How does this affect Magento</h1>
<p>In respect to Paypal payments from your Magento store using either the Standard or the Express payment model Magento behaves like a client communicating with the Paypal API over SSL to complete the Payment / Checkout transaction.</p>
<p>When Paypal removes support for SSL v3 your Magento store will <strong>no longer be able to communicate with Paypal</strong> unless you disable the support for SSL v3.0</p>
<p>Simply put this means you will not be able to process any orders with the Paypal payment system. Not the best news at this time of year when many businesses are in the middle of their busiest time of year on the run up to Christmas.</p>
<h1>HOW TO Fix Poodle for MAgento</h1>
<p>Fortunately the fix is pretty straight forward and actually doesn&#8217;t really have anything to do with Magento at all but rather the configuration of your web server software on your Magento host.</p>
<p>First you need to determine if the host your Magento shop is running on is using the SSL v3 protocol.</p>
<p>If you have command line access to your host, login and run nmap with the following command :</p>
<p><strong>nmap &#8211;script ssl-enum-ciphers -p 443 localhost</strong></p>
<p>If your host is <strong>NOT</strong> vulnerable you will see</p>
<div><strong>SSLv3: No supported ciphers found</strong></div>
<div></div>
<div>If you don&#8217;t have command line access run an external scan from a reputable  site such as <a href="http://www.symantec.com/connect/blogs/ssl-30-vulnerability-poodle-bug-aka-poodlebleed" target="_blank">Symantec</a>, The scan should clearly show you if your server supports SSL v3 or not.</div>
<h1>How to Disable SSL v3 on Ubuntu Server</h1>
<div>To upgrade to TLS 1.x and disable SSL v3 support on Ubuntu server, and many other servers running Apache locate the configuration file responsible for defining the SSL protocols supported by Apache. On Ubuntu it is</div>
<div></div>
<div><em>/etc/apache2/mods-available/ssl.conf</em></div>
<div></div>
<div>You can search for it with this grep command:</div>
<div></div>
<div><em>grep -i -r &#8220;SSLProtocol&#8221; /etc/apache2</em></div>
<div></div>
<div>Edit the file, find the SSLProtocol line and change it to</div>
<div></div>
<div><em>SSLProtocol all -SSLv2 -SSLv3</em></div>
<div></div>
<div>Restart Apache (service apache2 restart) and SSL v3 will be disabled.</div>
<div></div>
<div>Confirm this by running the scans again.</div>
<div></div>
<h1>How to test Paypal</h1>
<p>The best way to prepare for Paypal disabling SSL v3 is to test your Dev Magento install against the Paypal Sandbox site &#8211; http://sandbox.paypal.com</p>
<p>For peace of mind you should do this before December 3rd 2014.</p>
<p>Another simple test is to just do a simple PHP curl request to the Paypal sandbox servers. You can try this with a simple PHP script. Create a file paypal-tls-test.php in the root folder of your Magento shop and paste the following script into it.</p>
<p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
$url = &#8220;ssl://www.sandbox.paypal.com&#8221;;<br />
$fp = fsockopen ($url, 443);<br />
if (is_resource ($fp)) {<br />
echo &#8220;not affected&#8221;;<br />
}<br />
else {<br />
echo &#8220;affected&#8221;;<br />
}<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>Run the script from your store &#8211; http://storeurl.com/paypal-tls-test.php</p>
<p>If you receive the <strong>not affected</strong> response, then your host was able to talk to Paypal using TLS and you should also be able to process Paypal payments from Magento.</p>
<p>If you don&#8217;t have a dev server this might be the easiest way to test Paypal access from your Live server unless you are prepared to take the shop offline and configure the Paypal payment modules to use the Sandbox.</p>
<p>If you do not have access to the command line you need to talk to your hosting provider ASAP!</p>
<p>A lot of people (like me) may be reacting to this news a bit late but applying these simple changes should avoid any pre Christmas Poodle related Paypal headaches next week.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-poodle-paypal-disable-ssl-v3-december-3rd/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Javascript only EU Law Cookie Notification Message for WordPress and Magento</title>
		<link>https://blog.gaiterjones.com/javascript-eu-law-cookie-notification-message-wordpress-magento/</link>
					<comments>https://blog.gaiterjones.com/javascript-eu-law-cookie-notification-message-wordpress-magento/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Wed, 12 Feb 2014 18:49:40 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[EU Law]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1120</guid>

					<description><![CDATA[You know sometimes you just want a quick solution to a problem and wherever you look there are just complex, overpriced scripts that make your simple problem sound like something...<a class="more-link" href="https://blog.gaiterjones.com/javascript-eu-law-cookie-notification-message-wordpress-magento/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="hang-2-column      alignnone" alt="" src="http://voices.suntimes.com/wp-content/uploads/2013/08/Cookiemonster2_FB.jpg" width="150" height="100" /></p>
<p>You know sometimes you just want a quick solution to a problem and wherever you look there are just complex, overpriced scripts that make your simple problem sound like something that needs a lot of code and money to get to work.</p>
<p>I needed to display a cookie notification message on a wordpress and magento site, to avoid compatibility problems I wanted to avoid using jQuery and just do it as simply as possible in javascript.</p>
<p>After looking around at a lot of $10 jQuery solutions I found a free javascript only solution, modified it for Magento and WordPress and implemented it.</p>
<p>Download the code from Github <a href="https://github.com/gaiterjones/javascript-eu-law-cookie-notification" target="_blank">here</a></p>
<p>Whatever your opinion of the <a href="http://ico.org.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies" target="_blank">EU Cookie Law</a> which came into effect in 2012, sooner or later if you are in Europe you may need to show that you are doing something about it. Err actually it&#8217;s 2014, so I guess we are already a teeny weeny bit late.</p>
<p>From what I understand the law may differ in various countries (certainly outside Europe), so depending on where your website is, and who visits your site the law may or may not apply to you.</p>
<p>This script will let  you quickly implement a cookie notification banner with a link to your privacy policy. The notification itself uses cookies and will not be show again when closed.</p>
<p>You can implement this solution on any website by copying the install files to your web server and adding the following code to the footer of your site.</p>
<p><span style="font-family: 'Courier New', Courier, monospace; font-size: 13px; line-height: 18px;">&lt;script type=&#8221;text/javascript&#8221;&gt;</span></p>
<pre class="brush:php">var cookieNotificationURL='/cookies/';
var cookieNotificationLifetime=180;
var cookieNotificationMessage='This website uses cookies. For more information please ';
var cookieNotificationClickMessage='click here';
var cookieNotificationMessageFade=true;
var cookieNotificationPath='/path-to-install-folder/
&lt;/script&gt;

&lt;script type="text/javascript" src="/js/cookienotification/cookie.notification.min.js"&gt;&lt;/script&gt;</pre>
<p>This sets up some variables used by the script, the URL of the privacy info page, the lifetime of the cookie used by the script in days, messages displayed, the option to fade the message automatically and the path to the install folder &#8211; used to display the close image.</p>
<p>For wordpress simply paste this into the footer php file of your theme.</p>
<p>For Magento paste this into the footer.phtml template file of your Magento theme. You can translate the messages, and perhaps a good idea, choose to display the message only on non SSL pages &#8211; we don&#8217;t want this javascript to somehow screw up a sale!</p>
<p><span style="font-family: 'Courier New', Courier, monospace; font-size: 13px; line-height: 18px;">&lt;?php if (empty($_SERVER[&#8216;HTTPS&#8217;]) &amp;&amp; $_SERVER[&#8216;HTTPS&#8217;] = &#8216;off&#8217;): ?&gt;</span></p>
<pre class="brush:php">&lt;!-- Cookie Notification --&gt;
&lt;script type="text/javascript"&gt;
var cookieNotificationURL='/datenschutzerklaerung/';
var cookieNotificationLifetime=180;

&lt;?php if (Mage::app()-&gt;getStore()-&gt;getId()==2): ?&gt;
var cookieNotificationMessage='This website uses cookies. For more information please ';
var cookieNotificationClickMessage='click here';
&lt;?php else: ?&gt;
var cookieNotificationMessage='Diese Website verwendet Cookies. ';
var cookieNotificationClickMessage='Klicken Sie hier für weitere Informationen.';
&lt;?php endif ?&gt;
&lt;/script&gt;

&lt;script type="text/javascript" src="/js/cookienotification/cookie.notification.js"&gt;&lt;/script&gt;
&lt;?php endif ?&gt;</pre>
<p>Here I am manually checking the store id and translating the text to German. Remember to refresh your Magento cache after editing and saving the footer template file.</p>
<p>You can see the code working on this WordPress blog below, and also with Magento on my <a href="http://dev.gaiterjones.com/magento/" target="_blank">Magento development site.</a></p>
<p>Tested with Magento 1.8.x, WordPress 3.blah, Chrome, Firefox, IE11. Detects mobile devices and modifies banner size accordingly.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/javascript-eu-law-cookie-notification-message-wordpress-magento/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Enable Magento iPhone Theme for Mobile Browsers</title>
		<link>https://blog.gaiterjones.com/enable-magento-iphone-theme-for-mobile-browsers/</link>
					<comments>https://blog.gaiterjones.com/enable-magento-iphone-theme-for-mobile-browsers/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Mon, 13 May 2013 13:57:27 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Mobile]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=962</guid>

					<description><![CDATA[Do you know how many of your customers are visiting your site using a mobile device? If you don&#8217;t, take a quick look at your Google analytics and check the...<a class="more-link" href="https://blog.gaiterjones.com/enable-magento-iphone-theme-for-mobile-browsers/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_02.jpg"><img loading="lazy" decoding="async" class="hang-2-column      alignnone" alt="Magento Default IPhone theme" src="https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_02-226x440.jpg" width="136" height="264" /></a></p>
<p>Do you know how many of your customers are visiting your site using a mobile device? If you don&#8217;t, take a quick look at your Google analytics and check the figures under Audience -&gt; Mobile -&gt; Overview and Devices. If the % of visits from mobile devices is more than 10% of your total site visits then you might want to think about providing specific content for mobile visitors to your Shop otherwise you maybe losing out on sales.</p>
<figure id="attachment_968" aria-describedby="caption-attachment-968" style="width: 316px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2013/05/mobile-device-analytics.jpg"><img loading="lazy" decoding="async" class=" wp-image-968 " alt="Mobile Device Visitor stats from Google Analytics" src="https://blog.gaiterjones.com/wp-content/uploads/2013/05/mobile-device-analytics-395x440.jpg" width="316" height="352" srcset="https://blog.gaiterjones.com/wp-content/uploads/2013/05/mobile-device-analytics-395x440.jpg 395w, https://blog.gaiterjones.com/wp-content/uploads/2013/05/mobile-device-analytics.jpg 493w" sizes="(max-width: 316px) 100vw, 316px" /></a><figcaption id="caption-attachment-968" class="wp-caption-text">Mobile Device Visitor stats from Google Analytics</figcaption></figure>
<p>&nbsp;</p>
<p>Since Magento v1.4.x a built in mobile theme called iPhone is included with the source code.but it is not enabled by default. Here is a quick fix to enable the built in Magento iPhone theme for your Magento store to provide a better browsing experience for visitors using mobile devices.</p>
<p>Login to admin and goto <strong>System -&gt; Configuration</strong>. Click on <strong>General</strong> in the left hand menu and then <strong>Design</strong>. <strong></strong>Expand the theme section and then configure the following exceptions under Templates, Skin and Layout.</p>
<p>Matched Expression &#8211; iPhone|iPad|iPod|Android|IEMobile</p>
<p>Value &#8211; iphone</p>
<figure id="attachment_963" aria-describedby="caption-attachment-963" style="width: 440px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_01-2.jpg"><img loading="lazy" decoding="async" class="size-medium wp-image-963" title="Configure Exceptions for iPhone Theme" alt="Configure Exceptions for iPhone Theme" src="https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_01-2-440x346.jpg" width="440" height="346" srcset="https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_01-2-440x346.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_01-2-620x488.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_01-2.jpg 642w" sizes="(max-width: 440px) 100vw, 440px" /></a><figcaption id="caption-attachment-963" class="wp-caption-text">Configure Exceptions for iPhone Theme</figcaption></figure>
<p>&nbsp;</p>
<p>Click Save to save your settings.</p>
<p>Notice the user agents in the matched expressions, these define which mobile browsers identified by User Agent should use the mobile theme. The iPad has a fairly large screen so you might decide to exclude that for example.</p>
<p>If you visit your store now with a mobile device you will see the default iphone theme in action.</p>
<figure id="attachment_964" aria-describedby="caption-attachment-964" style="width: 226px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_02.jpg"><img loading="lazy" decoding="async" class="size-medium wp-image-964" alt="Magento Default IPhone theme" src="https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_02-226x440.jpg" width="226" height="440" srcset="https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_02-226x440.jpg 226w, https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_02-318x620.jpg 318w, https://blog.gaiterjones.com/wp-content/uploads/2013/05/screenshot_02.jpg 368w" sizes="(max-width: 226px) 100vw, 226px" /></a><figcaption id="caption-attachment-964" class="wp-caption-text">Magento Default IPhone theme</figcaption></figure>
<p>&nbsp;</p>
<p>Actually &#8211; its not very good is it, but it&#8217;s better than nothing and provides a good place to start building your own mobile theme. Alternatively (and I don&#8217;t say this very often) invest some $$ in the <a href="http://ecommerce.aheadworks.com/magento-extensions/iphone-theme.html" target="_blank">Aheadworks Mobile theme</a> because it really is excellent.</p>
<p>Whichever mobile theme you decide to use make sure you test it thoroughly on your staging server, especially if you have a lot of extension modules installed. You may need to customise the mobile theme to achieve the same functionality as you have from your desktop version. Remember to include an option switch from desktop to mobile versions on both sites so that visitors can also decide which theme they want to use.</p>
<p>For testing (if you don&#8217;t have a mobile device) set the user agent in your browser to a mobile browser i.e. iPhone. This is possible in Safari by enabling Developer Mode and clicking Develop -&gt; User Agent and selecting a mobile version of Safari from the drop down list. If you are a Mac user you can also use Xcode to run up an iPhone simulator as used for the screenshots above.</p>
<p>If your desktop site uses Flash, now is the time to start replacing it with HTML5 <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/enable-magento-iphone-theme-for-mobile-browsers/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Cannot log into Magento Admin? Magento Admin not loading? Magento Cache Refresh Script</title>
		<link>https://blog.gaiterjones.com/cannot-log-into-magento-admin-magento-admin-not-loading-magento-cache-refresh-script/</link>
					<comments>https://blog.gaiterjones.com/cannot-log-into-magento-admin-magento-admin-not-loading-magento-cache-refresh-script/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Mon, 22 Apr 2013 15:22:00 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Magento]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=947</guid>

					<description><![CDATA[It is possible to lock yourself out of the Magento back end admin interface simply by disabling a module which affects html rendering and stops you from logging back into...<a class="more-link" href="https://blog.gaiterjones.com/cannot-log-into-magento-admin-magento-admin-not-loading-magento-cache-refresh-script/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>It is possible to lock yourself out of the Magento back end admin interface simply by disabling a module which affects html rendering and stops you from logging back into the admin interface &#8211; which you need to do to re-enable the module &#8211; DOH! Its a real catch 22 situation.</p>
<p>If you are locked out of Magento admin, or your admin pages are not rendering correctly due to an admin change this post may just save your bacon.</p>
<p>If you have disabled an extension and need to re-enable it but the admin interface is not working, load up PHPMyAdmin and browse to your Magento database. Find the <strong>core_config_data</strong> table and then page through all the config options until you find the <strong>advanced/modules_disable_output</strong> rows. Find your disabled module &#8211; it will have a value of 1, and change the value back to 0 to enable it.</p>
<p>Paste the following code into a new .php file and save it to the root folder of your Magento store and run it in your browser. It will refresh the Magento cache, and re-enable the disabled module. Hopefully you should then be able to access admin again.</p>
<p>Depending on what has gone wrong with your configuration this may not always work, but if you have modified an admin config that for whatever reason has locked you out of admin then this method may work for you. It certainly is less painless than a full DB restore which is perhaps your other option.</p>
<p>Here is the cache refresh code.</p>
<pre class="brush:php">&lt;?php
require_once 'app/Mage.php';
umask( 0 );
Mage :: app( "default" );
$ver = Mage :: getVersion();
$userModel = Mage :: getModel( 'admin/user' );
$userModel -&gt; setUserId( 0 );
Mage :: getSingleton( 'admin/session' ) -&gt; setUser( $userModel );
echo "Refreshing cache...\n";
Mage :: app() -&gt; cleanCache();
$enable = array();
foreach ( Mage :: helper( 'core' ) -&gt; getCacheTypes() as $type =&gt; $label ) {
$enable[$type] = 1;
} 
Mage :: app() -&gt; saveUseCache( $enable );
echo "Cache refreshed";</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/cannot-log-into-magento-admin-magento-admin-not-loading-magento-cache-refresh-script/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Facebook Magento Store Front Shop Tab Application</title>
		<link>https://blog.gaiterjones.com/facebook-magento-store-front-tab/</link>
					<comments>https://blog.gaiterjones.com/facebook-magento-store-front-tab/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Sun, 28 Oct 2012 09:30:06 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento Facebook Store Front]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=844</guid>

					<description><![CDATA[I saw an email last week from a company offering a Facebook store front tab application service for Magento that imports your Magento products and creates a basic Magento store...<a class="more-link" href="https://blog.gaiterjones.com/facebook-magento-store-front-tab/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="hang-2-column alignnone" title="Facebook Store Front Magento Tab App" src="http://tommy.ismy.name/wp-content/uploads/2010/12/facebookapps.jpg" alt="" width="173" height="173" />I saw an email last week from a <a href="http://www.storeya.com/" target="_blank">company</a> offering a Facebook store front tab application service for Magento that imports your Magento products and creates a basic Magento store front presence in a Facebook tab application. I thought this was a pretty neat idea especially if you are using Facebook as a marketing tool for your Magento e-commerce site. What I did not find so neat was the price, they want upwards of $1000.00 per year for a fully dynamic storefront with up to date products and support.</p>
<p>Having recently done some work both with Facebook tab apps and exporting Magento product collections in PHP I thought that this is actually a pretty easy task to achieve and coded up an example Facebook Magento Store Front running in a Facebook tab that presents a simple view of your products, product information and a direct link to the product on your Magento web for customers to place orders.</p>
<p>The app talks directly to your Magento database so it will always be up to date. It supports multi language stores and will detect the customers browser language and switch languages accordingly.</p>
<p>This is really a quick win app, integrating quickly with your Magento installation and takes about 30mins to setup and get up and running in Facebook.</p>
<p>Check out my <a href="https://www.facebook.com/pages/gaiterjones/243428839036258?sk=app_366422776778014" target="_blank">demo Facebook storefront / shop tab app here</a>.</p>
<h1>Update</h1>
<p>This app has been replaced by version 2. You can see it working <a href="http://magento1.gaiterjones.com/MagentoFacebookStoreFront/">here</a>.</p>
<h1>DOWNLOAD</h1>
<p>Download the latest version of the application source code <a href="https://blog.gaiterjones.com/dev/extension.php?id=d97b5804dbc9391636a82e5f71ebd597" target="_blank">here</a>.</p>
<p>Basic installation and usage instructions below.</p>
<p>12.11.2012 &#8211; v0.97 &#8211; bug fixes and changes to user configuration setup, user config now held in .ini file.<br />
22.11.2012 &#8211; v1.0.1 &#8211; first public release</p>
<p>&nbsp;</p>
<figure id="attachment_852" aria-describedby="caption-attachment-852" style="width: 440px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/10/Screen-Shot-2012-11-06-at-16.12.53.png"><img loading="lazy" decoding="async" class="size-medium wp-image-852" title="Magento Facebook Store Front Tab" src="https://blog.gaiterjones.com/wp-content/uploads/2012/10/Screen-Shot-2012-11-06-at-16.12.53-440x338.png" alt="" width="440" height="338" srcset="https://blog.gaiterjones.com/wp-content/uploads/2012/10/Screen-Shot-2012-11-06-at-16.12.53-440x338.png 440w, https://blog.gaiterjones.com/wp-content/uploads/2012/10/Screen-Shot-2012-11-06-at-16.12.53-620x477.png 620w, https://blog.gaiterjones.com/wp-content/uploads/2012/10/Screen-Shot-2012-11-06-at-16.12.53.png 829w" sizes="(max-width: 440px) 100vw, 440px" /></a><figcaption id="caption-attachment-852" class="wp-caption-text">Magento Facebook Store Front Tab</figcaption></figure>
<p>&nbsp;</p>
<p><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/10/facebook-tab-analytics.jpg"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-873" src="https://blog.gaiterjones.com/wp-content/uploads/2012/10/facebook-tab-analytics-440x295.jpg" alt="Conversions From the Tab" width="440" height="295" srcset="https://blog.gaiterjones.com/wp-content/uploads/2012/10/facebook-tab-analytics-440x295.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2012/10/facebook-tab-analytics-620x416.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2012/10/facebook-tab-analytics.jpg 800w" sizes="(max-width: 440px) 100vw, 440px" /></a></p>
<p>&nbsp;</p>
<p><strong>Magento Facebook Store Front Tab Application</strong></p>
<p>&nbsp;</p>
<ol>
<li>Introduction</li>
<li>Prerequisites</li>
<li>Installation</li>
<li>Configuration</li>
<li>Usage</li>
<li>Languages</li>
</ol>
<p>&nbsp;</p>
<p><strong>Introduction</strong></p>
<p>&nbsp;</p>
<p>Magento Facebook Store Front Tab is an object oriented PHP script that integrates with a Magento installation to render product HTML designed to be displayed within a Facebook Tab. The application is able to render various product views, all products, new products, categories etc. with a simple product description and link to your actual Magento web store for purchases.</p>
<p>&nbsp;</p>
<p>The application supports normal desktop clients.</p>
<p>&nbsp;</p>
<p><strong>Prerequisites</strong></p>
<p>&nbsp;</p>
<p>This application requires a configured Facebook Account, Facebook Page and a configured Facebook application. A good knowledge of your Magento installation and Operating System is assumed as well as some experience with Facebook applications and PHP.</p>
<p>&nbsp;</p>
<p><strong>Installation</strong></p>
<p>&nbsp;</p>
<p>Extract the source files ideally to a sub folder of your Magento installation. e.g. /home/www/magento/facebook</p>
<p>&nbsp;</p>
<p>A new folder ‘magentotab’ will be created. Feel free to rename this folder if required.</p>
<p>&nbsp;</p>
<p>The application will then be accessible from your browser via the following url</p>
<p>&nbsp;</p>
<p><a href="http://www.YOURSHOP.com/facebook/magentotab">http://www.YOURSHOP.com/facebook/magentotab</a></p>
<p>&nbsp;</p>
<p>Where <a href="http://www.YOURSHOP.com">www.YOURSHOP.com</a> is the url to your Magento shop frontend. If you install the application somewhere other than your Magento installation folder then you will need to browse to the application via your configured web server path.</p>
<p>&nbsp;</p>
<p><strong>Configuration</strong></p>
<p>&nbsp;</p>
<p>Edit the file applicationConfig.php in /magentotab/config.</p>
<p>&nbsp;</p>
<p>Edit</p>
<p>const PATH_TO_MAGENTO_INSTALLATION = &#8216;/home/www/dev/magento/&#8217;;</p>
<p>&nbsp;</p>
<p>With the actual path to your Magento installation.</p>
<p>&nbsp;</p>
<p>Edit fbAppID, fbAppSecret and fbUrl with the App ID, Secret and URL from your configured Facebook app.</p>
<p>&nbsp;</p>
<p>To display a menu on the product page set the showMenu constant to true. Depending on traffic and your hosting etc. the application may run faster when the menu is disabled.</p>
<p>&nbsp;</p>
<p>To exclude categories from being shown in the product menu, configure the excludedProductCategories constant with a list of category id’s separated by a comma, e.g.</p>
<p>&nbsp;</p>
<p>const excludedProductCategories=&#8217;4,5,16,17,18,19,22,23,25,27,28,29,30,31,32,33,34,35,37&#8242;;</p>
<p>For google UTM tagging configure the googleUTMTag constant with a valid Google UTM URI.</p>
<p>&nbsp;</p>
<p>The bannerImage constant holds the name of the graphic file used as the banner at the top of the Facebook Tab page.</p>
<p>&nbsp;</p>
<p>Set the productLimit constant to define the number of products that will appear per page. This should be divisible by 9.</p>
<p>&nbsp;</p>
<p>Set the defaultCollectionType constant. This defines the default product view that will be shown. Options are</p>
<p>&nbsp;</p>
<p>newfromdate &#8211; Products set with the NEW FROM attribute &#8211; i.e. New Products.</p>
<p>allproducts &#8211; All Products</p>
<p>categoryproducts &#8211; Products from a category.</p>
<p>&nbsp;</p>
<p>Determine which product description will be shown for the product</p>
<p>useShortDescription=true &#8211; Use short description</p>
<p>useLongDescription=true &#8211; Use long description</p>
<p>&nbsp;</p>
<p>Configure language options</p>
<p>&nbsp;</p>
<p>const storesConfigured=&#8217;1,2,3&#8242;;</p>
<p>const storesLanguage=&#8217;de,en,fr&#8217;;</p>
<p>const storeDefaultLanguage=&#8217;en&#8217;;</p>
<p>&nbsp;</p>
<p>In this example there are three stores configured with the id’s 1, 2 and 3. The store languages for store 1,2,3 are de, en, fr &#8211; German, English, French. And the default language is ‘en’ &#8211; English.</p>
<p>&nbsp;</p>
<p>The showContact and showAbout constants enable a Contact and About button on the menu when set to true. This is currently in development.</p>
<p>&nbsp;</p>
<p>The allowStandAlone constant lets the application run in a standalone browser when set to true. When set to false the application will redirect to the Facebook URL of the app. Set to true for debugging the app standalone outside of Facebook.</p>
<p>&nbsp;</p>
<p>Set the pageLikeRequired constant to true if visitors must first Like the Facebook page the tab is running in before they can access the application.</p>
<p>&nbsp;</p>
<p>Set the URIToApp value to the URI path of the app on your server.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Save the configuration file.</p>
<p>&nbsp;</p>
<p><strong>Usage</strong></p>
<p>&nbsp;</p>
<p>To run the script for the first time browse to the URL of the script as defined above</p>
<p>&nbsp;</p>
<p>i.e. <a href="http://www.YOURSHOP.com/facebook/magentotab">http://www.YOURSHOP.com/facebook/magentotab</a></p>
<p>&nbsp;</p>
<p>If the Magento configuration path is correct you should see a list of products displayed, with or without menu options as specified in the configuration.</p>
<p>&nbsp;</p>
<p>If the application works correctly standalone then you are ready to integrate it with Facebook.</p>
<p>&nbsp;</p>
<p>To install the application as a Facebook Tab ensure that your Facebook application has been created and configured with the correct canvas URL’s to the application and then goto the following link</p>
<p>&nbsp;</p>
<p><a href="http://www.YOURSHOP.com/facebook/magentotab?fbtab=true">http://www.YOURSHOP.com/facebook/magentotab?fbtab=true</a></p>
<p>&nbsp;</p>
<p>This will return a link that will start the Tab installation process via Facebook. Select the Facebook page to install the Tab on.</p>
<p>&nbsp;</p>
<p>When the Tab is installed goto your Facebook page to confirm that the app is working.</p>
<p>&nbsp;</p>
<p><strong>Languages</strong></p>
<p>&nbsp;</p>
<p>To translate some of the interface text used in the application to your language, simply create a new language file in the php/locale folder named XX.txt where XX is your two letter language code. Use an existing language file as a template and add your translations to the file in the format</p>
<p>&nbsp;</p>
<p>Text=TranslatedText.</p>
<p>&nbsp;</p>
<p>Make sure your language settings are configured correctly in the application. You can force the application to the language you want using the storeid variable in the url</p>
<p>&nbsp;</p>
<p>i.e. <a href="http://www.YOURSHOP/facebook/magentotab/?storeid=2">http://www.YOURSHOP/facebook/magentotab/?storeid=2</a></p>
<p>&nbsp;</p>
<p>Will force the application to the language configured for store id 2.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/facebook-magento-store-front-tab/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
			</item>
		<item>
		<title>Generate EAN Barcodes for All Magento Products &#8211; Magento EAN Barcode Generator</title>
		<link>https://blog.gaiterjones.com/generate-ean-barcodes-for-all-magento-products-magento-ean-barcode-generator/</link>
					<comments>https://blog.gaiterjones.com/generate-ean-barcodes-for-all-magento-products-magento-ean-barcode-generator/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Wed, 10 Oct 2012 13:09:07 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Barcodes]]></category>
		<category><![CDATA[Magento]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=824</guid>

					<description><![CDATA[Generate EAN Barcodes for All Magento Products Following on from my post about mass exporting Magento data, I had the requirement to also mass generate EAN13 barcodes from scratch for...<a class="more-link" href="https://blog.gaiterjones.com/generate-ean-barcodes-for-all-magento-products-magento-ean-barcode-generator/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<h1><img loading="lazy" decoding="async" class="hang-2-column     alignnone" title="EAN13 Barcode for Magento Product" src="http://dev.gaiterjones.com/magento/myexport/ean/images/0123456000162.png" alt="" width="155" height="86" />Generate EAN Barcodes for All Magento Products</h1>
<p>Following on from my <a title="Magento Mass Import and Export of Product Unit Price and Tier Price Changes" href="https://blog.gaiterjones.com/magento-mass-import-and-export-of-product-unit-price-and-tier-price-changes/" target="_blank">post about mass exporting Magento data</a>, I had the requirement to also mass generate <a href="http://en.wikipedia.org/wiki/International_Article_Number_(EAN)" target="_blank">EAN13</a> barcodes from scratch for all Magento products in a store.</p>
<p>The barcode graphic functionality came courtesy of <a href="http://www.ashberg.de/php-barcode" target="_blank">Folke Ashberg</a> and I simply added the functionality to my basic <a title="Magento Mass Import and Export of Product Unit Price and Tier Price Changes" href="https://blog.gaiterjones.com/magento-mass-import-and-export-of-product-unit-price-and-tier-price-changes/" target="_blank">export php script</a>.</p>
<p>The script creates the EAN code and checksum (currently programmed for EAN13) using the a 5 digit product number derived from the Magento product id and your registered manufacturer code. The barcode image is generated on the fly and cached locally.</p>
<p>My requirement was to generate the EAN code and not the barcode image so I am not 100% if the image is to the EAN standard, I think the font may need to be changed, however if you require EAN numbers and images, e.g. for Amazon etc. then this is a good place to start!</p>
<h1>Magento EAN Generator</h1>
<p>You can download a standalone version of my Magento EAN Generator from GitHub <a href="https://github.com/gaiterjones/magento-ean-generator" target="_blank">here</a>. Install the code in a web accessible folder, or in your Magento installation folder. Open the application config file and configure the correct path to your Magento installation. Also configure your EAN prefix code.</p>
<p>Run the script by browsing to http://www.yoursite/eaninstallfolder/ean.php?export, this will generate a delimited txt file containing SKU and EAN13 code for all visible products in your store.</p>
<p>Or run the script from the command line using</p>
<p>php php.ean debug</p>
<p>&lt; MAGENTO EAN -&gt; D E B U G &gt;<br />
Exporting EAN data for 64 Magento product/s &#8230;<br />
Data file created at /home/www/dev/magento/myexport/eanexporttest.csv<br />
Export finished.</p>
<p>&nbsp;</p>
<p>Configure a writeable folder for the data file in config.</p>
<p>The CSV file contains the EAN data</p>
<p>sku,ean<br />
COOLSAUCE1,1234567001746<br />
Honeypot-1,1234567001739<br />
gaiterjones-1,1234567001715<br />
HTC Touch Diamond,1234567001661<br />
mycomputer,1234567001654<br />
computer_fixed,1234567001647<br />
computer,1234567001630<br />
micronmouse5000,1234567001623<br />
logidinovo,1234567001616<br />
logitechcord,1234567001609<br />
microsoftnatural,1234567001593</p>
<p>You can see an example of the scripts output <a href="http://dev.gaiterjones.com/magento/myexport/exportAllPricesHTML.php?percentChange=0&amp;percentVAT=0&amp;maxTiersToExport=1&amp;barcode=true&amp;noHeader=1" target="_blank">here</a>.</p>
<figure style="width: 432px" class="wp-caption alignnone"><img loading="lazy" decoding="async" title="Auto Generated Magento Product EAN13 Barcode" src="http://dev.gaiterjones.com/magento/myexport/ean/images/0123456000179.png" alt="" width="432" height="240" /><figcaption class="wp-caption-text">Auto Generated Magento Product EAN13 Barcode</figcaption></figure>
<p>&nbsp;</p>
<p>You might want to validate the generated EAN codes, specifically to validate the 13th checksum code, do this <a href="http://www.gs1.org/barcodes/support/check_digit_calculator" target="_blank">here</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/generate-ean-barcodes-for-all-magento-products-magento-ean-barcode-generator/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress MultiLanguage Support the Simple Way</title>
		<link>https://blog.gaiterjones.com/wordpress-multi-language-support/</link>
					<comments>https://blog.gaiterjones.com/wordpress-multi-language-support/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Fri, 14 Sep 2012 12:43:24 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Wordpress Multi Language]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=796</guid>

					<description><![CDATA[WordPress is a great multilanguage CMS, for a while I thought of it purely as a blogging tool but now I use it all the time when I need to...<a class="more-link" href="https://blog.gaiterjones.com/wordpress-multi-language-support/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="hang-2-column     alignnone" title="Wordpress Multilanguage Support" src="http://www.ideecon.com/wp-content/uploads/2011/12/wordpresslanguages.png" alt="" width="180" height="180" />WordPress is a great multilanguage CMS, for a while I thought of it purely as a blogging tool but now I use it all the time when I need to build a quick and effective marketing site. If you find a theme that you like and is adaptable you can put together a professional, great looking site that is easy for you or your clients to maintain in very little time.</p>
<p>Getting WordPress to work well with multi language content isn&#8217;t so straight forward, there are a lot of plugins available that offer multi language solutions but these seemed to be over complex for what I wanted.</p>
<p>My WordPress marketing sites are relatively simple with just a few pages used as marketing landing pages and stepping stones to e-commerce sites. I already created a simple method in PHP of detecting browser language and matching language to content in my pages however the WordPress frontend language remained in the default language of the installation. I did not want to modify core template files within WordPress as this makes upgrading difficult so after wasting time with Plugins I developed a very simple solution that sets the WordPress interface language for each visitor based on their browser language.</p>
<p>The WordPress WP-CONFIG.php file holds the main configuration settings for your WordPress installation, a global PHP constant WPLANG is defined here that sets the admin and frontend interface language using standard <a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Country-Codes" target="_blank">country</a> and <a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Language-Codes" target="_blank">language </a>codes, the default if WPLANG is not specified is American English en-US.</p>
<p>WordPress language packs come in .mo files that are located in the WordPress wp-content/languages folder, they are named after the language code, i.e. en_US.mo, de_DE.mo etc.</p>
<p>By detecting the browser language of the visitor and then checking if a corresponding .mo file exists in the languages folder we can automatically switch the WordPress interface language to match the visitors browser language &#8211; nice!</p>
<p>Decide which languages you want to support and download the corresponding .mo files, you can find all the language files available in the WordPress language file repository here <a href="http://svn.automattic.com/wordpress-i18n/">http://svn.automattic.com/wordpress-i18n/</a> e.g. here are the German language files <a href="http://svn.automattic.com/wordpress-i18n/de_DE/branches/2.8/messages/" target="_blank">http://svn.automattic.com/wordpress-i18n/de_DE/branches/2.8/messages/</a></p>
<p>If your WordPress site does not have a wp-content/languages folder, create a new one and copy your language files into it. Note you should copy your default language file too.</p>
<p>Now edit the WP-CONFIG.php file in the root folder of your WordPress installation and find the WP-LANG constant definition and comment it out:</p>
<p>#define (&#8216;WPLANG&#8217;, &#8221;);</p>
<p>and below it paste in the following code</p>
<pre class="brush:php">/**
 * Set language and load language files
 */
function detectlanguage() {
    $langcode = explode(";", $_SERVER['HTTP_ACCEPT_LANGUAGE']);
    $langcode = explode(",", $langcode['0']);
    return $langcode['0'];
    }

function fileExists($fileName, $caseSensitive = true) {

    if(file_exists($fileName)) {
        return $fileName;
    }
    if($caseSensitive) return false;

    // Handle case insensitive requests            
    $directoryName = dirname($fileName);
    $fileArray = glob($directoryName . '/*', GLOB_NOSORT);
    $fileNameLowerCase = strtolower($fileName);
    foreach($fileArray as $file) {
        if(strtolower($file) == $fileNameLowerCase) {
            return $file;
        }
    }
    return false;
}	

$languageDefault='en_US';
$language = detectlanguage();

if (isset($_GET['set_lang'])) { $language = $_GET['set_lang']; }

$languageFile= 'wp-content/languages/'. str_replace('-','_',$language). '.mo';
$wpLanguageFile=fileExists($languageFile,false);

// check if WP language file exists for browser language
if ($wpLanguageFile) {
	$wpLanguageFile = basename($wpLanguageFile, '.mo');
	// language supported
	define ('WPLANG', $wpLanguageFile);
    //echo "Language - $language detected. Language file exists and is supported."; 
} else {
	// language not supported default to EN
    //echo "Language - $language detected. Language file does not exist - defaulting to $languageDefault."; 
	define ('WPLANG', $languageDefault);
}</pre>
<p>Save the file and test. You can force the language selection by specifying it in the URL, i.e. http://yourwordpresssite.com/?set_lang=de_DE which will force the interface language to German if you have the German language files installed. Uncomment the echo&#8217;s and you will see the language selection confirmed.</p>
<p>If all is working well the WordPress interface language will now switch to the browser language of your visitors.</p>
<p>Note that this will only change the language of the built in WordPress interface in the frontend or backend. Your content language will not change, you need to create a <a href="http://www.catswhocode.com/blog/how-to-make-a-translatable-wordpress-theme" target="_blank">translation system</a> for your content using portable object files, or alternatively use the Google translation tool.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/wordpress-multi-language-support/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Magento &#8211; How to remove Quantity input box and Delete button for Free cart items</title>
		<link>https://blog.gaiterjones.com/magento-how-to-remove-quantity-input-box-and-delete-button-for-free-cart-items/</link>
					<comments>https://blog.gaiterjones.com/magento-how-to-remove-quantity-input-box-and-delete-button-for-free-cart-items/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Mon, 08 Aug 2011 13:09:23 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Buy One Get One Free]]></category>
		<category><![CDATA[Magento]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=510</guid>

					<description><![CDATA[For Magento 1.4.x  + BuyXGetYFree items are added and removed automatically by the extension cartcontroller code. To prevent customers from manually deleting free products from the cart we can change...<a class="more-link" href="https://blog.gaiterjones.com/magento-how-to-remove-quantity-input-box-and-delete-button-for-free-cart-items/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<h1>For Magento 1.4.x  +</h1>
<p><a title="FREE Magento Extension Buy One Get One Free" href="https://blog.gaiterjones.com/free-magento-extension-buy-one-get-one-free-discounted/">BuyXGetYFree </a>items are added and removed automatically by the extension cartcontroller code. To prevent customers from manually deleting free products from the cart we can change the template to remove the delete button and input qty box for items in the cart with a Zero value.</p>
<p>This code is based on the default Magento theme template.</p>
<p><strong>Remove Delete Button</strong></p>
<p>Open the following template file for editing:</p>
<p><em>app/design/frontend/base/YOURTHEME/template/checkout/cart/item/default.phtml</em></p>
<p>Search for “<strong>Remove item</strong>” in the default theme appears on line <strong>243</strong>.</p>
<p>Replace</p>
<pre class="brush:xml">&lt;td class="a-center"&gt;&lt;a href="&lt;?php echo $this-&gt;getDeleteUrl() ?&gt;" title="&lt;?php echo $this-&gt;__('Remove item')?&gt;" class="btn-remove btn-remove2"&gt;&lt;?php echo $this-&gt;__('Remove item')?&gt;&lt;/a&gt;&lt;/td&gt;</pre>
<p>With</p>
<pre class="brush:xml">&lt;?php if ($_item-&gt;getCalculationPrice()=='0'): ?&gt;
&lt;td class="a-center"&gt;&lt;/td&gt;
&lt;?php else: ?&gt;
&lt;td class="a-center"&gt;&lt;a href="&lt;?php echo $this-&gt;getDeleteUrl()?&gt;" title="&lt;?php echo $this-&gt;__('Remove item')?&gt;" class="btn-remove btn-remove2"&gt;&lt;?php echo $this-&gt;__('Remove item')?&gt;&lt;/a&gt;&lt;/td&gt;
 &lt;?php endif; ?&gt;</pre>
<p><strong>Remove Qty input Box</strong></p>
<p>Search for “<strong>input-text qty</strong>”, in the default theme appears on line <strong>156</strong>.</p>
<p>Replace</p>
<pre class="brush:xml">&lt;input name="cart[&lt;?php echo $_item-&gt;getId() ?&gt;][qty]" value="&lt;?php echo $this-&gt;getQty() ?&gt;" size="4" title="&lt;?php echo $this-&gt;__('Qty') ?&gt;" class="input-text qty" maxlength="12" /&gt;</pre>
<p>With</p>
<pre class="brush:xml">&lt;?php if ($_item-&gt;getCalculationPrice()=='0'): ?&gt;
&lt;?php echo $this-&gt;getQty() ?&gt;
&lt;?php else: ?&gt;
&lt;input name="cart[&lt;?php echo $_item-&gt;getId() ?&gt;][qty]" value="&lt;?php echo $this-&gt;getQty() ?&gt;" size="4" title="&lt;?php echo $this-&gt;__('Qty') ?&gt;" class="input-text qty" maxlength="12" /&gt;
&lt;?php endif; ?&gt;</pre>
<p>Refresh cache, and reload cart to test, free items should no longer have a delete button or input quantity box.</p>
<figure id="attachment_511" aria-describedby="caption-attachment-511" style="width: 620px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/08/buyxgetyfree-cart-edit.jpg"><img loading="lazy" decoding="async" class="size-large wp-image-511" title="Remove delete button and quantity input box for free cart items" src="https://blog.gaiterjones.com/wp-content/uploads/2011/08/buyxgetyfree-cart-edit-620x410.jpg" alt="Remove delete button and quantity input box for free cart items" width="620" height="410" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/08/buyxgetyfree-cart-edit-620x410.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2011/08/buyxgetyfree-cart-edit-440x291.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/08/buyxgetyfree-cart-edit.jpg 937w" sizes="(max-width: 620px) 100vw, 620px" /></a><figcaption id="caption-attachment-511" class="wp-caption-text">Remove delete button and quantity input box for free cart items</figcaption></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-how-to-remove-quantity-input-box-and-delete-button-for-free-cart-items/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Google Plus One button for Magento Products</title>
		<link>https://blog.gaiterjones.com/google-plus-one-button-for-magento-products/</link>
					<comments>https://blog.gaiterjones.com/google-plus-one-button-for-magento-products/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Fri, 01 Jul 2011 10:18:30 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Google Plus One Button]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Social Media Marketing]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[google plus one button]]></category>
		<category><![CDATA[plus one]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=448</guid>

					<description><![CDATA[Google launched their Plus (+) range of products this week, Google + integrates existing products from Google along with some new social products into a new &#8220;social networking&#8221; service. Obviously...<a class="more-link" href="https://blog.gaiterjones.com/google-plus-one-button-for-magento-products/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/07/Use-the-Google-Plus-one-1-button-on.jpg"><img loading="lazy" decoding="async" class="hang-1-column    alignnone" title="Google Plus one Button for Magento" src="https://blog.gaiterjones.com/wp-content/uploads/2011/07/Use-the-Google-Plus-one-1-button-on.jpg" alt="Google Plus one Button for Magento" width="240" height="218" /></a></p>
<p>Google launched their Plus (+) range of products this week, Google + integrates existing products from Google along with some new social products into a new &#8220;social networking&#8221; service. Obviously Google want to challenge Facebook as a new social networking hub. While Facebook already have a huge user base, it is nothing compared with the number of users interacting with Google on a daily basis.</p>
<p>Interestingly, as Facebook attempts to assimilate the Internet into its own social networking open graph database populated with millions of people, Google , who already have the Internet indexed and cached in its huge databases now want to pull in the millions of people to create a social networking environment built around existing, new products and of course their number one business their search engine.</p>
<p>Enter the Plus One Button</p>
<p>The Google plus one button is to Google searches what the Facebook like button is to web content. Google <a href="http://www.google.com/+1/button/" target="_blank">says </a>&#8220;The +1 button is shorthand for &#8220;this is pretty cool&#8221; or &#8220;you should check this out.&#8221;&#8221;. When you or someone in your Google social circle &#8220;plus one&#8221; something by clicking the plus one button on a site, this information will be used by Google to manipulate/improve Google search results so that when you search for something you will be able to see for example if your friends have already recommended the product returned in the search. If your best buddy likes it, it must be good right? Whether its &#8220;pretty cool&#8221; or not lets wait and see, no doubt Google Plus will be THE next big thing. The plus one button is a clever way for Google to rewarding good web content and personalise search results, as (in theory) only humans will be able to &#8220;Plus One&#8221; something.</p>
<p>I am still getting my head around Google plus one and all of its implications but needless to say if there is a new social media marketing opportunity out there, especially one so tightly integrated with Google search then we need to take advantage of it and enable plus one buttons for our Magento products. Content with a large amount of +1s will get higher rankings in Google’s organic search results, create more visibility for your products and drive more traffic to your site. Google says &#8220;Think of the +1 button as a way for fans of your business to recommend what you offer, for all their friends and contacts to see. By helping searchers see more personal, relevant ads, we believe you’ll see more qualified traffic.&#8221;</p>
<p align="center"><img decoding="async" src="http://services.google.com/fh/files/newsletters/04_annotation.png" alt="" /></p>
<p>Here is a 5 minute fix to add the plus one button to all Magento product pages.</p>
<h2>Adding Plus One</h2>
<p>For Magento 1.4+ stores:</p>
<p>We can place the Google plus one button next to our <a title="Magento Product Social Media Marketing Part 1 – the Facebook Like Button" href="https://blog.gaiterjones.com/magento-social-media-marketing-facebook-like-button/" target="_blank">Facebook Like button</a> with a few lines of code. Locate <em>view.phtml</em> in your theme, it will be located in the <em>default/template/catalog/product </em>folder of your theme.</p>
<pre class="brush:php">&lt;!-- Google Plus One Button BEGIN --&gt;
&lt;div id="google-plusone"&gt;
&lt;script type="text/javascript" src="https://apis.google.com/js/plusone.js"&gt;
{"parsetags": "explicit"},
{"lang": "&lt;?php echo $this-&gt;__('en-GB') ?&gt;"}
&lt;/script&gt;
&lt;g:plusone size="medium" count="false" href="&lt;?php echo trim(Mage::registry('current_product')-&gt;getProductUrl()) ?&gt;"&lt;/g:plusone&gt;
&lt;/div&gt;
&lt;script type="text/javascript"&gt;
gapi.plusone.go("google-plusone");
&lt;/script&gt;
&lt;!-- Google Plus One Button END --&gt;</pre>
<p>If you already have implemented a Facebook Like button, insert the following code below the existing code You can also position the google-plusone DIV wherever you would like the button to appear on the page with CSS.</p>
<p>To translate the locale code correctly add a line to your themes locale file and refresh your cache. For example for a German language store use</p>
<p><strong>&#8220;en-GB&#8221;,&#8221;de&#8221;</strong></p>
<figure id="attachment_450" aria-describedby="caption-attachment-450" style="width: 495px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/07/googleplusonebutton.jpg"><img loading="lazy" decoding="async" class="hang-1-column        " title="Google Plus One Button for Magento" src="https://blog.gaiterjones.com/wp-content/uploads/2011/07/googleplusonebutton.jpg" alt="Google Plus One Button for Magento" width="495" height="293" /></a><figcaption id="caption-attachment-450" class="wp-caption-text">Google Plus One Button for Magento</figcaption></figure>
<p>For Magento 1.4+ make sure you have canonical URLs enabled in admin (see my Facebook Like button <a title="Magento Product Social Media Marketing Part 1 – the Facebook Like Button" href="https://blog.gaiterjones.com/magento-social-media-marketing-facebook-like-button/" target="_blank">post</a> for more info), we have specifed the URL in the Google API code to ensure Google uses the Magento enabled canonical URL. They say that the code will default to look for the canonical tag but better to be safe than sorry &#8211; in my tests it was not always used. The size and appearance of the button can be modified by changing the <em>size </em>and <em>count </em>options. See the Google <a href="http://code.google.com/apis/+1button/" target="_blank">documentation </a>for more details.</p>
<h2>Further Reading</h2>
<p><a href="http://en.wikipedia.org/wiki/Google%2B">http://en.wikipedia.org/wiki/Google%2B</a></p>
<p><a href="http://googleblog.blogspot.com/2011/06/introducing-google-project-real-life.html">http://googleblog.blogspot.com/2011/06/introducing-google-project-real-life.html</a></p>
<p><a href="http://www.ibtimes.com/articles/172678/20110701/google-plus-facebook-killer-google-zynga-android-developers-facebook-losing-users-google-plus-next-b.htm">http://www.ibtimes.com/articles/172678/20110701/google-plus-facebook-killer-google-zynga-android-developers-facebook-losing-users-google-plus-next-b.htm</a></p>
<p><a href="http://www.aaronpeters.nl/blog/google-plus1-button-performance-review">http://www.aaronpeters.nl/blog/google-plus1-button-performance-review</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/google-plus-one-button-for-magento-products/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
