<?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>Magento Archives - gj</title>
	<atom:link href="https://blog.gaiterjones.com/tag/magento/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.gaiterjones.com/tag/magento/</link>
	<description>gaiterjones</description>
	<lastBuildDate>Tue, 15 May 2018 10:11:22 +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>Preparing Magento for the General Data Protection Regulation (GDPR)</title>
		<link>https://blog.gaiterjones.com/preparing-magento-for-the-general-data-protection-regulation-gdpr/</link>
					<comments>https://blog.gaiterjones.com/preparing-magento-for-the-general-data-protection-regulation-gdpr/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Tue, 15 May 2018 09:47:03 +0000</pubDate>
				<category><![CDATA[GDPR]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[data protection]]></category>
		<category><![CDATA[gdpr]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1889</guid>

					<description><![CDATA[For small businesses in the EU data protection may not be a top priority but the new General Data Protection Regulation (GDPR) has been around since 2016 and will finally...<a class="more-link" href="https://blog.gaiterjones.com/preparing-magento-for-the-general-data-protection-regulation-gdpr/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>For small businesses in the EU data protection may not be a top priority but the new General Data Protection Regulation (GDPR) has been around since 2016 and will finally come into effect on the <strong>25th May 2018</strong>. If you run a Magento eCommerce store here are some compliance issues you may what to consider implementing.</p>
<h1>Move tracking code to Google Tag Manager</h1>
<p>Visitors must give positive consent before their data is used. If you are tracking customer visits with third party tools such as Google Analytics, or customer service modules the user needs to &#8220;opt in&#8221; and give positive consent to permit you to use his data. By using Google Tag Manager you can load all your custom html and javascript tracking code after the user provides consent. Google Tag Manager applies your third party tacking code to all pages making it easier to implement changes.</p>
<h1>Add a cookie consent toolbar</h1>
<p>The GDPR wants you to clearly state what personal data if any you are storing or sharing with third parties. You need to add a cookie consent toolbar to your Magento site that clearly states how and why you use cookies, which third party tracking tools you use and how you share visitor data with third parties. Visitors must give positive consent to this policy &#8211; it is no longer acceptable to say that consent is implied by using the website, users must actively provide consent and your backend logic must implement this. Give visitors as much information as possible and link the cookie consent toolbar to your Data Protection (Privacy) Policy.</p>
<h1>Allow individuals to remove or anonymise data</h1>
<p>You need to be able to provide assurance that admin staff or customers can remove personal data stored in your Magento store on request.</p>
<h1>Allow individuals to opt out from subscriptions</h1>
<p>Make sure your opt-out (and opt-in) to newsletter subscriptions is working.</p>
<h1>Perform Security Testing</h1>
<p>Use the Magento Security scan or Mage Report to provide assurance that your Magento installation is up to date and patched against known security vulnerabilities.</p>
<h1>Update your Data Protection (Privacy) Policy</h1>
<p>Make sure your Data Protection Policy is up to date and available from every page of your Magento site.</p>
<h1>Data Access</h1>
<p>Individuals have the right to ask you of all their personal data and this needs to be a full copy of all data held in Magento. Make sure you are able to fulfill such a request, the GDPR states that this information should be made a available, without charge, within 30 days of the request.</p>
<h1>Create a Compliance Document</h1>
<p>You need to be able to demonstrate a diligent and earnest effort to comply with the GDPR. Create a compliance document that shows how you are meeting the GDPR requirements, the document should include</p>
<ul>
<li>A compliance audit
<ul>
<li>List the steps you have taken to comply with the GDPR</li>
</ul>
</li>
<li>Information audit
<ul>
<li>Audit your systems and clearly state where personal data is stored
<ul>
<li>is it internet facing?</li>
<li>is it shared with third parties?</li>
<li>how is it secured?</li>
<li>Where is it physically stored, servers, pc&#8217;s etc.</li>
</ul>
</li>
</ul>
</li>
<li>Data Protection Policy
<ul>
<li>Include your policy documents</li>
</ul>
</li>
</ul>
<h1>Magento GDPR Compliance Module</h1>
<p>A quick Google for GDPR modules for Magento 1.x and 2.x show there are a few solutions available and most are not free. Two free modules are available</p>
<p>Magento 1 <a href="https://marketplace.magento.com/zero1-zero1-gdpr.html">https://marketplace.magento.com/zero1-zero1-gdpr.html</a></p>
<p>Magento 2 <a href="https://github.com/AdFabConnect/magento2gdpr">https://github.com/AdFabConnect/magento2gdpr</a></p>
<p>I don&#8217;t yet have a live Magento 2 store so have not tested the Magento 2 module. I installed the Zero1 module and found it to contain a couple of bugs which made it unuseable, it appears to be bait to encourage you to purchase the commercial version. The module is fairly simple providing you with a frontend Cookie Consent toolbar, a frontend customer account deletion/anonymisation button and a backend method for anonymising customer data. I took this code and enhanced it with an existing cookie toolbar I had previously developed and the module is free to test and use at <a href="https://github.com/gaiterjones/magento1-gdpr">https://github.com/gaiterjones/magento1-gdpr</a></p>
<p style="text-align: left;">Install the module with modman using modman clone https://github.com/gaiterjones/magento1-gdpr</p>
<p>You will see a new menu item called GDPR in the Configuration -&gt; Customers section.</p>
<p>&nbsp;</p>
<figure id="attachment_1898" aria-describedby="caption-attachment-1898" style="width: 457px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" src="https://blog.gaiterjones.com/wp-content/uploads/2018/05/gdpr_module_1.jpg" alt="Magento 1 GDPR Module" width="457" height="468" class=" wp-image-1898" /><figcaption id="caption-attachment-1898" class="wp-caption-text">Magento 1 GDPR Module</figcaption></figure>
<p>Adding your Google Tag Manager ID enables the Google Tag Manager code which will insert any tags you have configured into your Magento site.</p>
<p>Enabling the customer account deletion and anonymisation will provide you with two new admin buttons when you view customer information</p>
<figure id="attachment_1899" aria-describedby="caption-attachment-1899" style="width: 600px" class="wp-caption aligncenter"><img decoding="async" src="https://blog.gaiterjones.com/wp-content/uploads/2018/05/gdpr_module_2.jpg" alt="Delete Customer and Anonymise Data" width="600" height="93" class="size-full wp-image-1899" /><figcaption id="caption-attachment-1899" class="wp-caption-text">Backend Delete Customer and Anonymise Data</figcaption></figure>
<p>&nbsp;</p>
<figure id="attachment_1905" aria-describedby="caption-attachment-1905" style="width: 600px" class="wp-caption aligncenter"><img decoding="async" src="https://blog.gaiterjones.com/wp-content/uploads/2018/05/gdpr_module_4.jpg" alt="Magento Customer Account Delete" width="600" height="119" class="size-full wp-image-1905" /><figcaption id="caption-attachment-1905" class="wp-caption-text">Magento Customer Account Frontend Delete Option</figcaption></figure>
<p>This enables admin staff to delete and anonymise customer and order data and send a confirmation email. In debug mode both these buttons can be tested for functionality. A similar button is activated in the frontend Customer Account section allowing customers to close their account and anonymise their data. You will be notified by email when a customer closes their account.</p>
<p>Debug mode lets you test the module without actually deleting anything, specifically the confirmation emails and notices sent by the module.</p>
<p>You change the look of the Cooke Policy consent bar skin choosing between light or dark skins and you can customise the consent bar text further as you wish.</p>
<figure id="attachment_1900" aria-describedby="caption-attachment-1900" style="width: 600px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" src="https://blog.gaiterjones.com/wp-content/uploads/2018/05/gdpr_module_3.jpg" alt="GDPR Magneto Cookie Consent Toolbar" width="600" height="76" class="size-full wp-image-1900" /><figcaption id="caption-attachment-1900" class="wp-caption-text">GDPR Magento Cookie Consent Toolbar</figcaption></figure>
<p>You can see the consent bar working at <a href="http://magento1.gaiterjones.com">http://magento1.gaiterjones.com</a></p>
<h1>Seek advice</h1>
<p>Compliance with these new regulations is important, if you are unsure where to begin with GDPR compliance seek professional advice!</p>
<p>The information presented here is a summary of my own personal findings and thoughts on how to improve Magento 1 GDPR compliance and no guarantee whatsoever is provided that the information presented here will ensure GDPR compliance! Use the Magento module at your own risk &#8211; be sure to test it first on your development site.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/preparing-magento-for-the-general-data-protection-regulation-gdpr/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Magento REDIS : system, session and full page cache management solution</title>
		<link>https://blog.gaiterjones.com/magento-redis-system-session-and-full-page-cache-management-solution/</link>
					<comments>https://blog.gaiterjones.com/magento-redis-system-session-and-full-page-cache-management-solution/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Fri, 19 Jun 2015 10:44:22 +0000</pubDate>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento Cache Management]]></category>
		<category><![CDATA[Magento Optimisation]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[cache]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1308</guid>

					<description><![CDATA[In computing, active data is often cached to shorten data access times, reduce latency and improve input/output (I/O). Because almost all application workload is dependent upon I/O operations, caching is...<a class="more-link" href="https://blog.gaiterjones.com/magento-redis-system-session-and-full-page-cache-management-solution/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>In computing, active data is often cached to shorten data access times, reduce latency and improve input/output (I/O). Because almost all application workload is dependent upon I/O operations, caching is used to improve application performance.</p>
<p>Magento is a very data and database intensive application. By enabling the Magento system cache you will instantly see an improvement in response times as Magento starts to cache database queries and system data. The default cache storage code uses the file system, i.e. Magento saves cache data to disk. Whilst this will certainly improve Magento responsiveness there are other cache storage options available that are much faster and there are additional types of data we can also cache to improve the overall responsiveness and speed of a Magento CE application.</p>
<h1>memcache and redis</h1>
<p>For most computer systems the fastest data storage medium is the physical memory, using memory as cache storage results in very quick data access times and Magento can get it&#8217;s data much quicker. For CE users with a small to medium sized shop there are two free popular open source memory caching systems, <a href="http://memcached.org/" target="_blank">Memcache </a>and <a href="http://redis.io/" target="_blank">Redis</a>. I have <a href="https://blog.gaiterjones.com/live-data-logging-with-memcache/" target="_blank">used Memcache in many different applications</a> for fast access to relatively non volatile (i.e. cached) data objects.</p>
<p>In a PHP environment memcache is easy to install and easy to use. It also works out of the box with Magento simply by configuring memcache as a storage option within the cache settings of the magento local.xml file. Redis was relatively new to me and is a slightly more advanced key-value cache and object store, it can be thought of as a simple memory resident database.</p>
<p>There are a lot of discussions as to the pros and cons of <a href="http://www.infoworld.com/article/2825890/application-development/why-redis-beats-memcached-for-caching.html" target="_blank">memcache vs redis</a> and for a complete Magento CE cache solution I would recommend using redis as it provides the best caching solution for Magento CE system, session and full page caches.</p>
<h1>what to cache</h1>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1309" src="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen.jpg" alt="magento-cache-storage-management-screen" width="800" height="315" srcset="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen.jpg 800w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen-440x173.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen-620x244.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen-760x299.jpg 760w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen-550x217.jpg 550w" sizes="(max-width: 800px) 100vw, 800px" /></p>
<p>When you go to the Magento -&gt; System -&gt; Cache Management screen as shown above you will see the available cache storage management options for your Magento installation. Magento has a default built in cache management system that when enabled caches <strong>system</strong> data such as configuration, layouts, blocks, translations etc.</p>
<p>We can also use redis to create a fast Magento CE caching system for <strong>session</strong> and full page (<strong>fpc</strong>) data too.</p>
<figure id="attachment_1310" aria-describedby="caption-attachment-1310" style="width: 575px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-1310" src="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-management-solution-redis.jpg" alt="Magento cache management solution with redis" width="575" height="534" /><figcaption id="caption-attachment-1310" class="wp-caption-text">Magento cache management solution with redis</figcaption></figure>
<p>This blog will look at how to install and configure a system, session and full page cache management solution for Magento CE v1.7.0.0 or greater using redis on Ubuntu 14.04 LTS.</p>
<h1>Install redis for Magento CE on Ubuntu 14.04</h1>
<p>Installing redis on Ubuntu is dead easy, simply use the following two apt commands to install the server and php5 code. At the time of writing this will install redis v2.8.4.</p>
<pre class="brush: plain; title: ; notranslate">
apt-get install redis-server
apt-get install php5-redis
</pre>
<p>The redis server will install and start an instance with it&#8217;s default configuration listening on TCP port <em>6379</em>. Check the server is running by typing <em>redis-cli ping</em> at the command prompt, you should get a satisfying <em>PONG</em> back.</p>
<p>We want to enable three Magento cache types : <strong>system</strong>, <strong>session</strong> and <strong>fpc</strong> (full page cache), whilst all three cache types could use one redis storage instance there are some issues where it is<a href="http://colin.mollenhour.com/2013/08/14/re-using-redis-as-a-cache-backend-in-magento/" target="_blank"> safer to give each cache type it&#8217;s own redis storage instance</a>. This also allows us to specifically <a href="http://fbrnc.net/blog/2013/02/redis-optimization">configure redis options for each cache type</a>, for example we can configure volatile session data to be redis persistent.</p>
<p>Ideally we want to configure three redis instances per Magento CE installation or shop :</p>
<ol>
<li><strong>system</strong> &#8211; redis port 6379</li>
<li><strong>session</strong> &#8211; redis port 6380</li>
<li><strong>fpc</strong> &#8211; redis port 6381</li>
</ol>
<h1>Configure multiple redis instances for Magento on Ubuntu 14.04</h1>
<p>To configure multiple redis instances that will start at system startup we need to replace the default redis-server init script in /etc/init.d with the script below courtesy of <a href="http://www.robofirm.com/2014/04/setting-up-multiple-redis-instances-on-a-single-magento-server/" target="_blank">robofirm</a>.</p>
<span class="collapseomatic collapse" id="id65fc23e5e7bf8"  tabindex="0" title="Show redis-server multiple instance init script"    >Show redis-server multiple instance init script</span><div id="target-id65fc23e5e7bf8" class="collapseomatic_content ">
[bash]
#!/bin/bash<br />
### BEGIN INIT INFO<br />
# Provides:             redis-server<br />
# Required-Start:       $syslog $remote_fs<br />
# Required-Stop:        $syslog $remote_fs<br />
# Should-Start:         $local_fs<br />
# Should-Stop:          $local_fs<br />
# Default-Start:        2 3 4 5<br />
# Default-Stop:         0 1 6<br />
# Short-Description:    redis-server &#8211; Persistent key-value db<br />
# Description:          redis-server &#8211; Persistent key-value db<br />
### END INIT INFO</p>
<p>if [ -n &quot;$2&quot; ]
then<br />
NAME=$2</p>
<p>PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin<br />
DAEMON=/usr/bin/redis-server<br />
DAEMON_ARGS=/etc/redis/servers/$NAME.conf<br />
DESC=redis-server</p>
<p>RUNDIR=/var/run/redis<br />
PIDFILE=$RUNDIR/$NAME.pid</p>
<p>test -x $DAEMON || exit 0</p>
<p>set -e</p>
<p>case &quot;$1&quot; in<br />
  start)<br />
        echo -n &quot;Starting $DESC: &quot;<br />
        mkdir -p $RUNDIR<br />
        touch $PIDFILE<br />
        chown redis:redis $RUNDIR $PIDFILE<br />
        chmod 755 $RUNDIR<br />
        if start-stop-daemon &#8211;start &#8211;quiet &#8211;umask 007 &#8211;pidfile $PIDFILE &#8211;chuid redis:redis &#8211;exec $DAEMON &#8212; $DAEMON_ARGS<br />
        then<br />
                echo &quot;$NAME.&quot;<br />
        else<br />
                echo &quot;failed&quot;<br />
        fi<br />
        ;;<br />
  stop)<br />
        echo -n &quot;Stopping $DESC: &quot;<br />
        if start-stop-daemon &#8211;stop &#8211;retry forever/QUIT/1 &#8211;quiet &#8211;oknodo &#8211;pidfile $PIDFILE &#8211;exec $DAEMON<br />
        then<br />
                echo &quot;$NAME.&quot;<br />
        else<br />
                echo &quot;failed&quot;<br />
        fi<br />
        rm -f $PIDFILE<br />
        ;;</p>
<p>  restart|force-reload)<br />
        ${0} stop $2<br />
        ${0} start $2<br />
        ;;</p>
<p>  status)<br />
        echo -n &quot;$DESC is &quot;<br />
        if start-stop-daemon &#8211;stop &#8211;quiet &#8211;signal 0 &#8211;name ${NAME} &#8211;pidfile ${PIDFILE}<br />
        then<br />
                echo &quot;running&quot;<br />
        else<br />
                echo &quot;not running&quot;<br />
                exit 1<br />
        fi<br />
        ;;</p>
<p>  *)<br />
        echo &quot;Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}&quot; &gt;&amp;2<br />
        exit 1<br />
        ;;<br />
esac</p>
<p>else</p>
<p>FILES=/etc/redis/servers/*<br />
for f in $FILES<br />
do<br />
SERVERNAME=$(sed &#8216;s|/etc/redis/servers/||g&#8217; &lt;&lt;&lt; $f)<br />
SERVERNAME=$(sed &#8216;s|.conf||g&#8217; &lt;&lt;&lt; $SERVERNAME)<br />
/etc/init.d/redis-server &quot;$1&quot; &quot;$SERVERNAME&quot;<br />
done</p>
<p>fi</p>
<p>exit 0<br />
[/bash]
</div>
<p>Stop the redis server, change into the /etc/init.d folder and make a backup copy of the redis-server init script, then empty the original script, edit it and paste in the multi instance script from above.</p>
<pre class="brush: plain; title: ; notranslate">
service redis-server stop
cd /etc/init.d
cp redis-server redis-server.old
&gt; redis-server
nano redis-server
</pre>
<p>The redis config files are saved in /etc/redis. We want to create a config file for each redis server cache storage instance in a new folder called servers.</p>
<pre class="brush: plain; title: ; notranslate">
cd /etc/redis
mkdir servers
cp redis.conf ./servers/server1.conf
cp redis.conf ./servers/server2.conf
cp redis.conf ./servers/server3.conf
</pre>
<p>Now we have three configuration files for our three caches :</p>
<ol>
<li>server1.conf &#8211; system (redis port 6379)</li>
<li>server2.conf &#8211; session (redis port 6380)</li>
<li>server3.conf &#8211; fpc (redis port 6381)</li>
</ol>
<p>We need to edit each configuration file and configure the redis settings for each cache. There is a lot of configuration information in the default redis.conf file most of it relating to options that are commented out and not required. The most important settings are the TCP port numbers used for each instance, the process id, log file name and persistence data.</p>
<p>Redis can be configured to automatically save (or persist) cached data to disk, this is really useful for volatile cache data, i.e. data you do not want to lose. Essentially redis saves a dump of the cache data regularly to disk (in /var/lib/redis) so that if the redis instance crashes or the server is restarted the cached data is not lost. This is great for cached Magento session data, we want this data in fast cache storage but we do not want to lose the data unlike system and full page cache data where we don&#8217;t really care if the data is lost &#8211; it will just be cached again.</p>
<p>Below are three example config files for the three cache types, you can configure your instances with these settings, or use the info to customise the default config files created in the /servers folder. You must at least make the tcp port numbers and pids unique.</p>
<span class="collapseomatic collapse" id="id65fc23e5e7c58"  tabindex="0" title="instance1 - server1.conf SYSTEM"    >instance1 - server1.conf SYSTEM</span><div id="target-id65fc23e5e7c58" class="collapseomatic_content ">
[text]
# Redis configuration<br />
# SERVER 1 SHOP01<br />
# MAGENTO SHOP01 DATA</p>
<p>maxmemory 1gb<br />
maxmemory-policy volatile-lru</p>
<p>daemonize yes</p>
<p>port 6379<br />
pidfile /var/run/redis/redis-server1.pid<br />
logfile /var/log/redis/redis-server1.log<br />
dbfilename redis-server1-dump.rdb<br />
dir /var/lib/redis<br />
bind 127.0.0.1<br />
timeout 0<br />
tcp-keepalive 0</p>
<p>loglevel notice<br />
databases 16</p>
<p>################################ SNAPSHOTTING  ################################<br />
# SAVE DATA to DISK<br />
#save 900 1<br />
#save 300 10<br />
#save 60 10000</p>
<p>stop-writes-on-bgsave-error yes<br />
rdbcompression yes<br />
rdbchecksum yes</p>
<p># replication<br />
repl-disable-tcp-nodelay no<br />
slave-priority 100</p>
<p>appendonly no<br />
appendfilename &quot;appendonly.aof&quot;<br />
# appendfsync always<br />
appendfsync everysec<br />
no-appendfsync-on-rewrite no<br />
auto-aof-rewrite-percentage 100<br />
auto-aof-rewrite-min-size 64mb<br />
lua-time-limit 5000<br />
slowlog-log-slower-than 10000<br />
slowlog-max-len 128</p>
<p>notify-keyspace-events &quot;&quot;</p>
<p>############################### ADVANCED CONFIG ###############################</p>
<p># Hashes are encoded using a memory efficient data structure when they have a<br />
# small number of entries, and the biggest entry does not exceed a given<br />
# threshold. These thresholds can be configured using the following directives.<br />
hash-max-ziplist-entries 512<br />
hash-max-ziplist-value 64</p>
<p># Similarly to hashes, small lists are also encoded in a special way in order<br />
# to save a lot of space. The special representation is only used when<br />
# you are under the following limits:<br />
list-max-ziplist-entries 512<br />
list-max-ziplist-value 64</p>
<p># Sets have a special encoding in just one case: when a set is composed<br />
# of just strings that happens to be integers in radix 10 in the range<br />
# of 64 bit signed integers.<br />
# The following configuration setting sets the limit in the size of the<br />
# set in order to use this special memory saving encoding.<br />
set-max-intset-entries 512</p>
<p># Similarly to hashes and lists, sorted sets are also specially encoded in<br />
# order to save a lot of space. This encoding is only used when the length and<br />
# elements of a sorted set are below the following limits:<br />
zset-max-ziplist-entries 128<br />
zset-max-ziplist-value 64</p>
<p># Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in<br />
# order to help rehashing the main Redis hash table (the one mapping top-level<br />
# keys to values). The hash table implementation Redis uses (see dict.c)<br />
# performs a lazy rehashing: the more operation you run into a hash table<br />
# that is rehashing, the more rehashing &quot;steps&quot; are performed, so if the<br />
# server is idle the rehashing is never complete and some more memory is used<br />
# by the hash table.<br />
#<br />
# The default is to use this millisecond 10 times every second in order to<br />
# active rehashing the main dictionaries, freeing memory when possible.<br />
#<br />
# If unsure:<br />
# use &quot;activerehashing no&quot; if you have hard latency requirements and it is<br />
# not a good thing in your environment that Redis can reply form time to time<br />
# to queries with 2 milliseconds delay.<br />
#<br />
# use &quot;activerehashing yes&quot; if you don&#8217;t have such hard requirements but<br />
# want to free memory asap when possible.<br />
activerehashing yes</p>
<p># The client output buffer limits can be used to force disconnection of clients<br />
# that are not reading data from the server fast enough for some reason (a<br />
# common reason is that a Pub/Sub client can&#8217;t consume messages as fast as the<br />
# publisher can produce them).<br />
#<br />
# The limit can be set differently for the three different classes of clients:<br />
#<br />
# normal -&gt; normal clients<br />
# slave  -&gt; slave clients and MONITOR clients<br />
# pubsub -&gt; clients subscribed to at least one pubsub channel or pattern<br />
#<br />
# The syntax of every client-output-buffer-limit directive is the following:<br />
#<br />
# client-output-buffer-limit &lt;class&gt; &lt;hard limit&gt; &lt;soft limit&gt; &lt;soft seconds&gt;<br />
#<br />
# A client is immediately disconnected once the hard limit is reached, or if<br />
# the soft limit is reached and remains reached for the specified number of<br />
# seconds (continuously).<br />
# So for instance if the hard limit is 32 megabytes and the soft limit is<br />
# 16 megabytes / 10 seconds, the client will get disconnected immediately<br />
# if the size of the output buffers reach 32 megabytes, but will also get<br />
# disconnected if the client reaches 16 megabytes and continuously overcomes<br />
# the limit for 10 seconds.<br />
#<br />
# By default normal clients are not limited because they don&#8217;t receive data<br />
# without asking (in a push way), but just after a request, so only<br />
# asynchronous clients may create a scenario where data is requested faster<br />
# than it can read.<br />
#<br />
# Instead there is a default limit for pubsub and slave clients, since<br />
# subscribers and slaves receive data in a push fashion.<br />
#<br />
# Both the hard or the soft limit can be disabled by setting them to zero.<br />
client-output-buffer-limit normal 0 0 0<br />
client-output-buffer-limit slave 256mb 64mb 60<br />
client-output-buffer-limit pubsub 32mb 8mb 60</p>
<p># Redis calls an internal function to perform many background tasks, like<br />
# closing connections of clients in timeout, purging expired keys that are<br />
# never requested, and so forth.<br />
#<br />
# Not all tasks are performed with the same frequency, but Redis checks for<br />
# tasks to perform accordingly to the specified &quot;hz&quot; value.<br />
#<br />
# By default &quot;hz&quot; is set to 10. Raising the value will use more CPU when<br />
# Redis is idle, but at the same time will make Redis more responsive when<br />
# there are many keys expiring at the same time, and timeouts may be<br />
# handled with more precision.<br />
#<br />
# The range is between 1 and 500, however a value over 100 is usually not<br />
# a good idea. Most users should use the default of 10 and raise this up to<br />
# 100 only in environments where very low latency is required.<br />
hz 10</p>
<p># When a child rewrites the AOF file, if the following option is enabled<br />
# the file will be fsync-ed every 32 MB of data generated. This is useful<br />
# in order to commit the file to the disk more incrementally and avoid<br />
# big latency spikes.<br />
aof-rewrite-incremental-fsync yes<br />
[/text]
</div>
<span class="collapseomatic collapse" id="id65fc23e5e7c88"  tabindex="0" title="instance2 - server2.conf SESSION"    >instance2 - server2.conf SESSION</span><div id="target-id65fc23e5e7c88" class="collapseomatic_content ">
[text]
# Redis configuration<br />
# SERVER 2 SHOP01<br />
# MAGENTO SHOP01 SESSIONS</p>
<p>maxmemory 1gb<br />
maxmemory-policy volatile-lru</p>
<p>daemonize yes</p>
<p>port 6380<br />
pidfile /var/run/redis/redis-server2.pid<br />
logfile /var/log/redis/redis-server2.log<br />
dbfilename redis-server2-dump.rdb<br />
dir /var/lib/redis<br />
bind 127.0.0.1<br />
timeout 0<br />
tcp-keepalive 0</p>
<p>loglevel notice<br />
databases 16</p>
<p>################################ SNAPSHOTTING  ################################<br />
# SAVE DATA to DISK<br />
save 900 1<br />
save 300 10<br />
save 60 10000</p>
<p>stop-writes-on-bgsave-error yes<br />
rdbcompression yes<br />
rdbchecksum yes</p>
<p># replication<br />
repl-disable-tcp-nodelay no<br />
slave-priority 100</p>
<p>appendonly no<br />
appendfilename &quot;appendonly.aof&quot;<br />
# appendfsync always<br />
appendfsync everysec<br />
no-appendfsync-on-rewrite no<br />
auto-aof-rewrite-percentage 100<br />
auto-aof-rewrite-min-size 64mb<br />
lua-time-limit 5000<br />
slowlog-log-slower-than 10000<br />
slowlog-max-len 128</p>
<p>notify-keyspace-events &quot;&quot;</p>
<p>############################### ADVANCED CONFIG ###############################</p>
<p># Hashes are encoded using a memory efficient data structure when they have a<br />
# small number of entries, and the biggest entry does not exceed a given<br />
# threshold. These thresholds can be configured using the following directives.<br />
hash-max-ziplist-entries 512<br />
hash-max-ziplist-value 64</p>
<p># Similarly to hashes, small lists are also encoded in a special way in order<br />
# to save a lot of space. The special representation is only used when<br />
# you are under the following limits:<br />
list-max-ziplist-entries 512<br />
list-max-ziplist-value 64</p>
<p># Sets have a special encoding in just one case: when a set is composed<br />
# of just strings that happens to be integers in radix 10 in the range<br />
# of 64 bit signed integers.<br />
# The following configuration setting sets the limit in the size of the<br />
# set in order to use this special memory saving encoding.<br />
set-max-intset-entries 512</p>
<p># Similarly to hashes and lists, sorted sets are also specially encoded in<br />
# order to save a lot of space. This encoding is only used when the length and<br />
# elements of a sorted set are below the following limits:<br />
zset-max-ziplist-entries 128<br />
zset-max-ziplist-value 64</p>
<p># Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in<br />
# order to help rehashing the main Redis hash table (the one mapping top-level<br />
# keys to values). The hash table implementation Redis uses (see dict.c)<br />
# performs a lazy rehashing: the more operation you run into a hash table<br />
# that is rehashing, the more rehashing &quot;steps&quot; are performed, so if the<br />
# server is idle the rehashing is never complete and some more memory is used<br />
# by the hash table.<br />
#<br />
# The default is to use this millisecond 10 times every second in order to<br />
# active rehashing the main dictionaries, freeing memory when possible.<br />
#<br />
# If unsure:<br />
# use &quot;activerehashing no&quot; if you have hard latency requirements and it is<br />
# not a good thing in your environment that Redis can reply form time to time<br />
# to queries with 2 milliseconds delay.<br />
#<br />
# use &quot;activerehashing yes&quot; if you don&#8217;t have such hard requirements but<br />
# want to free memory asap when possible.<br />
activerehashing yes</p>
<p># The client output buffer limits can be used to force disconnection of clients<br />
# that are not reading data from the server fast enough for some reason (a<br />
# common reason is that a Pub/Sub client can&#8217;t consume messages as fast as the<br />
# publisher can produce them).<br />
#<br />
# The limit can be set differently for the three different classes of clients:<br />
#<br />
# normal -&gt; normal clients<br />
# slave  -&gt; slave clients and MONITOR clients<br />
# pubsub -&gt; clients subscribed to at least one pubsub channel or pattern<br />
#<br />
# The syntax of every client-output-buffer-limit directive is the following:<br />
#<br />
# client-output-buffer-limit &lt;class&gt; &lt;hard limit&gt; &lt;soft limit&gt; &lt;soft seconds&gt;<br />
#<br />
# A client is immediately disconnected once the hard limit is reached, or if<br />
# the soft limit is reached and remains reached for the specified number of<br />
# seconds (continuously).<br />
# So for instance if the hard limit is 32 megabytes and the soft limit is<br />
# 16 megabytes / 10 seconds, the client will get disconnected immediately<br />
# if the size of the output buffers reach 32 megabytes, but will also get<br />
# disconnected if the client reaches 16 megabytes and continuously overcomes<br />
# the limit for 10 seconds.<br />
#<br />
# By default normal clients are not limited because they don&#8217;t receive data<br />
# without asking (in a push way), but just after a request, so only<br />
# asynchronous clients may create a scenario where data is requested faster<br />
# than it can read.<br />
#<br />
# Instead there is a default limit for pubsub and slave clients, since<br />
# subscribers and slaves receive data in a push fashion.<br />
#<br />
# Both the hard or the soft limit can be disabled by setting them to zero.<br />
client-output-buffer-limit normal 0 0 0<br />
client-output-buffer-limit slave 256mb 64mb 60<br />
client-output-buffer-limit pubsub 32mb 8mb 60</p>
<p># Redis calls an internal function to perform many background tasks, like<br />
# closing connections of clients in timeout, purging expired keys that are<br />
# never requested, and so forth.<br />
#<br />
# Not all tasks are performed with the same frequency, but Redis checks for<br />
# tasks to perform accordingly to the specified &quot;hz&quot; value.<br />
#<br />
# By default &quot;hz&quot; is set to 10. Raising the value will use more CPU when<br />
# Redis is idle, but at the same time will make Redis more responsive when<br />
# there are many keys expiring at the same time, and timeouts may be<br />
# handled with more precision.<br />
#<br />
# The range is between 1 and 500, however a value over 100 is usually not<br />
# a good idea. Most users should use the default of 10 and raise this up to<br />
# 100 only in environments where very low latency is required.<br />
hz 10</p>
<p># When a child rewrites the AOF file, if the following option is enabled<br />
# the file will be fsync-ed every 32 MB of data generated. This is useful<br />
# in order to commit the file to the disk more incrementally and avoid<br />
# big latency spikes.<br />
aof-rewrite-incremental-fsync yes<br />
[/text]
</div>
<span class="collapseomatic collapse" id="id65fc23e5e7cbd"  tabindex="0" title="instance3 - server3.conf FPC"    >instance3 - server3.conf FPC</span><div id="target-id65fc23e5e7cbd" class="collapseomatic_content ">
[text]
# Redis configuration<br />
# SERVER 3 SHOP01<br />
# MAGENTO SHOP01 FPC</p>
<p>maxmemory 1gb<br />
maxmemory-policy volatile-lru</p>
<p>daemonize yes</p>
<p>port 6381<br />
pidfile /var/run/redis/redis-server3.pid<br />
logfile /var/log/redis/redis-server3.log<br />
dbfilename redis-server3-dump.rdb<br />
dir /var/lib/redis<br />
bind 127.0.0.1<br />
timeout 0<br />
tcp-keepalive 0</p>
<p>loglevel notice<br />
databases 16</p>
<p>################################ SNAPSHOTTING  ################################<br />
# SAVE DATA to DISK<br />
#save 900 1<br />
#save 300 10<br />
#save 60 10000</p>
<p>stop-writes-on-bgsave-error yes<br />
rdbcompression yes<br />
rdbchecksum yes</p>
<p># replication<br />
repl-disable-tcp-nodelay no<br />
slave-priority 100</p>
<p>appendonly no<br />
appendfilename &quot;appendonly.aof&quot;<br />
# appendfsync always<br />
appendfsync everysec<br />
no-appendfsync-on-rewrite no<br />
auto-aof-rewrite-percentage 100<br />
auto-aof-rewrite-min-size 64mb<br />
lua-time-limit 5000<br />
slowlog-log-slower-than 10000<br />
slowlog-max-len 128</p>
<p>notify-keyspace-events &quot;&quot;</p>
<p>############################### ADVANCED CONFIG ###############################</p>
<p># Hashes are encoded using a memory efficient data structure when they have a<br />
# small number of entries, and the biggest entry does not exceed a given<br />
# threshold. These thresholds can be configured using the following directives.<br />
hash-max-ziplist-entries 512<br />
hash-max-ziplist-value 64</p>
<p># Similarly to hashes, small lists are also encoded in a special way in order<br />
# to save a lot of space. The special representation is only used when<br />
# you are under the following limits:<br />
list-max-ziplist-entries 512<br />
list-max-ziplist-value 64</p>
<p># Sets have a special encoding in just one case: when a set is composed<br />
# of just strings that happens to be integers in radix 10 in the range<br />
# of 64 bit signed integers.<br />
# The following configuration setting sets the limit in the size of the<br />
# set in order to use this special memory saving encoding.<br />
set-max-intset-entries 512</p>
<p># Similarly to hashes and lists, sorted sets are also specially encoded in<br />
# order to save a lot of space. This encoding is only used when the length and<br />
# elements of a sorted set are below the following limits:<br />
zset-max-ziplist-entries 128<br />
zset-max-ziplist-value 64</p>
<p># Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in<br />
# order to help rehashing the main Redis hash table (the one mapping top-level<br />
# keys to values). The hash table implementation Redis uses (see dict.c)<br />
# performs a lazy rehashing: the more operation you run into a hash table<br />
# that is rehashing, the more rehashing &quot;steps&quot; are performed, so if the<br />
# server is idle the rehashing is never complete and some more memory is used<br />
# by the hash table.<br />
#<br />
# The default is to use this millisecond 10 times every second in order to<br />
# active rehashing the main dictionaries, freeing memory when possible.<br />
#<br />
# If unsure:<br />
# use &quot;activerehashing no&quot; if you have hard latency requirements and it is<br />
# not a good thing in your environment that Redis can reply form time to time<br />
# to queries with 2 milliseconds delay.<br />
#<br />
# use &quot;activerehashing yes&quot; if you don&#8217;t have such hard requirements but<br />
# want to free memory asap when possible.<br />
activerehashing yes</p>
<p># The client output buffer limits can be used to force disconnection of clients<br />
# that are not reading data from the server fast enough for some reason (a<br />
# common reason is that a Pub/Sub client can&#8217;t consume messages as fast as the<br />
# publisher can produce them).<br />
#<br />
# The limit can be set differently for the three different classes of clients:<br />
#<br />
# normal -&gt; normal clients<br />
# slave  -&gt; slave clients and MONITOR clients<br />
# pubsub -&gt; clients subscribed to at least one pubsub channel or pattern<br />
#<br />
# The syntax of every client-output-buffer-limit directive is the following:<br />
#<br />
# client-output-buffer-limit &lt;class&gt; &lt;hard limit&gt; &lt;soft limit&gt; &lt;soft seconds&gt;<br />
#<br />
# A client is immediately disconnected once the hard limit is reached, or if<br />
# the soft limit is reached and remains reached for the specified number of<br />
# seconds (continuously).<br />
# So for instance if the hard limit is 32 megabytes and the soft limit is<br />
# 16 megabytes / 10 seconds, the client will get disconnected immediately<br />
# if the size of the output buffers reach 32 megabytes, but will also get<br />
# disconnected if the client reaches 16 megabytes and continuously overcomes<br />
# the limit for 10 seconds.<br />
#<br />
# By default normal clients are not limited because they don&#8217;t receive data<br />
# without asking (in a push way), but just after a request, so only<br />
# asynchronous clients may create a scenario where data is requested faster<br />
# than it can read.<br />
#<br />
# Instead there is a default limit for pubsub and slave clients, since<br />
# subscribers and slaves receive data in a push fashion.<br />
#<br />
# Both the hard or the soft limit can be disabled by setting them to zero.<br />
client-output-buffer-limit normal 0 0 0<br />
client-output-buffer-limit slave 256mb 64mb 60<br />
client-output-buffer-limit pubsub 32mb 8mb 60</p>
<p># Redis calls an internal function to perform many background tasks, like<br />
# closing connections of clients in timeout, purging expired keys that are<br />
# never requested, and so forth.<br />
#<br />
# Not all tasks are performed with the same frequency, but Redis checks for<br />
# tasks to perform accordingly to the specified &quot;hz&quot; value.<br />
#<br />
# By default &quot;hz&quot; is set to 10. Raising the value will use more CPU when<br />
# Redis is idle, but at the same time will make Redis more responsive when<br />
# there are many keys expiring at the same time, and timeouts may be<br />
# handled with more precision.<br />
#<br />
# The range is between 1 and 500, however a value over 100 is usually not<br />
# a good idea. Most users should use the default of 10 and raise this up to<br />
# 100 only in environments where very low latency is required.<br />
hz 10</p>
<p># When a child rewrites the AOF file, if the following option is enabled<br />
# the file will be fsync-ed every 32 MB of data generated. This is useful<br />
# in order to commit the file to the disk more incrementally and avoid<br />
# big latency spikes.<br />
aof-rewrite-incremental-fsync yes<br />
[/text]
</div>
<p>Now we can start the three redis server instances with</p>
<pre class="brush: plain; title: ; notranslate">
service redis-server start
</pre>
<h1>Install and configure redis Magento backend system cache Cm_Cache_Backend_Redis</h1>
<p>Support for redis as a Magento system cache started life as a Magento community project. Meet <a href="http://colin.mollenhour.com/" target="_blank">Colin Mollenhour</a> who appears to be the main genius behind the modules developed to use redis as a Magento/Zend cache storage system (as well as the mighty <a href="https://github.com/colinmollenhour/modman" target="_blank">modman</a>). Such was the popularity of Colin&#8217;s backend system cache module it was included as part of the Magento core distribution as of Magento CE version 1.8.0.0. You will find Mage_Cache_Backend_Redis declared in lib/Mage/Cache/Backend/Redis.php which since version 1.8.0.0 extends Colin&#8217;s Cm_Cache_Backend_Redis in lib/Cm/Cache/Backend/Redis.</p>
<p>You can find the source code to the Cm_Cache_Backend_Redis backend system cache redis module as well as support information <a href="https://github.com/colinmollenhour/Cm_Cache_Backend_Redis" target="_blank">here</a>. I asked Colin what his recommendation was for updating Cm_Cache_Backend_Redis and his answer was  &#8216; <strong>I definitely recommend the latest master from github for all versions of Magento</strong>.&#8217; So you need to be running Magento CE vesion 1.7.0.0 or newer and should install the latest vesion of Cm_Cache_Backend_Redis from the <a href="https://github.com/colinmollenhour/Cm_Cache_Backend_Redis" target="_blank">github</a>.</p>
<figure id="attachment_1322" aria-describedby="caption-attachment-1322" style="width: 440px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-1322 size-medium" src="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-management-solution-version-support1-440x289.jpg" alt="" width="440" height="289" srcset="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-management-solution-version-support1-440x289.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-management-solution-version-support1-620x407.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-management-solution-version-support1-760x499.jpg 760w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-management-solution-version-support1-550x361.jpg 550w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-management-solution-version-support1.jpg 800w" sizes="(max-width: 440px) 100vw, 440px" /><figcaption id="caption-attachment-1322" class="wp-caption-text">Magento cache management system redis support</figcaption></figure>
<p>&nbsp;</p>
<h2>Install Cm_Cache_Backend_Redis with modman</h2>
<p>You can install Cm_Cache_Backend_Redis by simply cloning/downloading the git source and then copying the files into your Magento root folder. However a much better way of installing this code (and all community modules for Magento) is to use <a href="https://github.com/colinmollenhour/modman">modman</a>, the module manager also created by Colin Mollenhour. I was a bit apprehensive about modman at first as I didn&#8217;t fully understand how it was working and did not want to lose control over where magento module files were installed but once you are familiar with it, it really does make module installation and management a hell of a lot easier.</p>
<h3>Install modman</h3>
<p>If you have never used modman before install it from the command line, it is a script file that will require execution permissions.</p>
<pre class="brush: plain; title: ; notranslate">
bash &lt; &lt;(curl -s -L https://raw.github.com/colinmollenhour/modman/master/modman-installer)
Done. Modman installed in /root/bin/modman
mv /root/bin/modman /home/myapps/
export PATH=/home/myapps:$PATH
</pre>
<p>Modman lets you store all your Magento module code in one location independant of your actual Magento installation. This is useful as it lets you manage and control your module code seperately from Magentos core code and folder structure, this makes installing, testing, updating and removing modules much easier. Modman works by creating symlinks within the Magento application to the real module files in a .modman folder. Before using modman make sure you enable &#8220;Allow Symlinks&#8221; (found under System &gt; Configuration &gt; Advanced &gt; Developer -&gt; Template Settings).</p>
<p>Once you have installed the modman script you need to determine where modman will be initialised and your modman folder will be installed. I recommend you initialise modman in a folder outwith your Magento installation. For example if Magento is installed in <em>/home/www/magento</em> initialise modman in <em>/home/www</em> then create a .basedir file to tell modman where the Magento application is installed relative to the .modman folder i.e. <em>magento</em></p>
<pre class="brush: plain; title: ; notranslate">
cd /home/www
modman init
Initialized Module Manager at /home/www
cd .modman
echo magento &gt; .basedir
cd ../magento
</pre>
<p>&nbsp;</p>
<p>Now you have modman installed and initialised and can install any Magento module that supports modman.</p>
<p>To install Cm_Cache_Backend_Redis make sure you are in your Magento application folder and enter</p>
<pre class="brush: plain; title: ; notranslate">
modman clone git://github.com/colinmollenhour/Cm_Cache_Backend_Redis.git
</pre>
<span class="collapseomatic collapse" id="id65fc23e5e7cfe"  tabindex="0" title="Cloning into &#039;Cm_Cache_Backend_Redis&#039;..."    >Cloning into 'Cm_Cache_Backend_Redis'...</span><div id="target-id65fc23e5e7cfe" class="collapseomatic_content ">
remote: Counting objects: 671, done.<br />
remote: Total 671 (delta 0), reused 0 (delta 0), pack-reused 671<br />
Receiving objects: 100% (671/671), 125.21 KiB | 0 bytes/s, done.<br />
Resolving deltas: 100% (213/213), done.<br />
Checking connectivity&#8230; done.<br />
Submodule &#8216;lib/Credis&#8217; (https://github.com/colinmollenhour/credis.git) registered for path &#8216;lib/Credis&#8217;<br />
Cloning into &#8216;lib/Credis&#8217;&#8230;<br />
remote: Counting objects: 696, done.<br />
remote: Total 696 (delta 0), reused 0 (delta 0), pack-reused 696<br />
Receiving objects: 100% (696/696), 186.95 KiB | 0 bytes/s, done.<br />
Resolving deltas: 100% (395/395), done.<br />
Checking connectivity&#8230; done.<br />
Submodule path &#8216;lib/Credis&#8217;: checked out &#8216;e8244e74b354df5a07353acf763996832b1c9928&#8217;<br />
Applied: Cm/Cache/Backend/* app/code/community/Cm/Cache/Backend/Redis.php<br />
WARNING: Removing conflicting directory: /home/www/dev/magento/lib/Credis<br />
Applied: lib/* lib/Credis<br />
Successfully create symlink new module &#8216;Cm_Cache_Backend_Redis&#8217;<br />
</div>
<p>&nbsp;</p>
<p>modman installs Cm_Cache_Backend_Redis and we can now configure the system cache in Magento.</p>
<h2>Configure Magento redis system cache</h2>
<p>To configure Magento to use the Cm_Cache_Backend_Redis module to cache system data we need to edit the Magento /app/etc/local.xml file and within the global tags add backend system cache redis configuration as shown below, note <em>Cm_Cache_Backend_Redis</em> is defined as the backend cache module. Also note the port number we are using for the backend system cache is the port number of our first redis instance <em>6379</em> and the compression method being uses is <em>gzip</em>.</p>
<pre class="brush: plain; highlight: [5,7,16]; title: ; notranslate">
&lt;cache&gt;
	&lt;backend&gt;Cm_Cache_Backend_Redis&lt;/backend&gt;
		 &lt;backend_options&gt;
			&lt;server&gt;127.0.0.1&lt;/server&gt;
			&lt;port&gt;6379&lt;/port&gt;
			&lt;persistent&gt;&lt;/persistent&gt;
			&lt;database&gt;0&lt;/database&gt;
			&lt;password&gt;&lt;/password&gt;
			&lt;force_standalone&gt;0&lt;/force_standalone&gt;
			&lt;connect_retries&gt;1&lt;/connect_retries&gt;
			&lt;read_timeout&gt;10&lt;/read_timeout&gt;
			&lt;automatic_cleaning_factor&gt;0&lt;/automatic_cleaning_factor&gt;
			&lt;compress_data&gt;1&lt;/compress_data&gt;
			&lt;compress_tags&gt;1&lt;/compress_tags&gt;
			&lt;compress_threshold&gt;20480&lt;/compress_threshold&gt;
			&lt;compression_lib&gt;gzip&lt;/compression_lib&gt;
			&lt;use_lua&gt;0&lt;/use_lua&gt;
		 &lt;/backend_options&gt;
  &lt;/cache&gt;
</pre>
<p>&nbsp;</p>
<p>You will notice in the /app/etc folder a<em> local.xml.additional</em> file here you will find other configuration examples including the redis cache config above. Now go to System -&gt; Cache Management in Magento admin and enable/refresh the cache to enable the new configuration. Magento is now using redis server instance 1 (db 0) on tcp port 6379 to cache backend Magento system data.</p>
<h2>Monitor Magento redis system cache</h2>
<p>We want to be sure that everything is working and Magento is actually using redis in the way we want it to. There are a few ways to monitor redis and confirm our configuration is working. The first is via the command line. You can monitor a specific redis instance by telnetting to the redis port on locahost and issuing the <a href="http://redis.io/commands/MONITOR" target="_blank">MONITOR </a>command :</p>
<pre class="brush: plain; title: ; notranslate">
telnet localhost 6379
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
MONITOR
+OK
+1434702244.302408 &#x5B;0 127.0.0.1:50415] &quot;SELECT&quot; &quot;0&quot;
+1434702244.303202 &#x5B;0 127.0.0.1:50415] &quot;HGET&quot; &quot;zc:k:cc4_CORE_CACHE_OPTIONS&quot; &quot;d&quot;
+1434702244.303360 &#x5B;0 127.0.0.1:50415] &quot;HGET&quot; &quot;zc:k:cc4_CONFIG_GLOBAL_LOCK&quot; &quot;d&quot;
+1434702244.303652 &#x5B;0 127.0.0.1:50415] &quot;HGET&quot; &quot;zc:k:cc4_CONFIG_GLOBAL&quot; &quot;d&quot;
+1434702244.328254 &#x5B;0 127.0.0.1:50415] &quot;HGET&quot; &quot;zc:k:cc4_APP_4E4ABDD8DC00C3DACB3C1597944A3B6C&quot; &quot;d&quot;
+1434702244.328821 &#x5B;0 127.0.0.1:50415] &quot;HGET&quot; &quot;zc:k:cc4_STORE_ADMIN_CONFIG_CACHE&quot; &quot;d&quot;
+1434702244.329252 &#x5B;0 127.0.0.1:50415] &quot;HGET&quot; &quot;zc:k:cc4_APP_B1FB6E8F13287C01E5C05063633DDA4C&quot; &quot;d&quot;
+1434702244.329791 &#x5B;0 127.0.0.1:50415] &quot;HGET&quot; &quot;zc:k:cc4_APP_E4D52B98688947405EDE639E947EE03D&quot; &quot;d&quot;
+1434702244.330144 &#x5B;0 127.0.0.1:50415] &quot;HGET&quot; &quot;zc:k:cc4_STORE_DE_CONFIG_CACHE&quot; &quot;d&quot;
+1434702244.330371 &#x5B;0 127.0.0.1:50415] &quot;HGET&quot; &quot;zc:k:cc4_STORE_EN_CONFIG_CACHE&quot; &quot;d&quot;
+1434702244.332765 &#x5B;0 127.0.0.1:50415] &quot;HGET&quot; &quot;zc:k:cc4_CONFIG_GLOBAL_STORES_DE&quot; &quot;d&quot;
QUIT
+OK
Connection closed by foreign host.
</pre>
<p>Here we are connecting to the system cache redis instance on port 6379 and if you browse your Magento site you should see redis cache activity as Magento saves or gets data from the cache. To monitor all redis server activity use <em>redis-cli monitor</em> from the command line. Note that the monitor command consumes a lot of redis resources so don&#8217;t leave it running!</p>
<p>There are two other graphical administration tools we can use to monitor redis activity check out how to install these later in the blog.</p>
<h1>Install and configure redis Magento session cache Cm_RedisSession</h1>
<p><a href="https://github.com/colinmollenhour/Cm_RedisSession" target="_blank">Cm_RedisSession</a> is another module from Colin Mollenhour that enables Magento to use redis as a cache storage system for Magento session data. By default Magento saves session data to the file system in the Magento var/session folder. Each session file is about 4Kb in size and over time the var/session folder can grow quite large if not managed. The second option for session storage in Magento is to use the Magento MySQL database. I have always avoided doing this as I don&#8217;t think session data belongs in the Magento database.</p>
<p>Cm_RedisSession rewrites the Magento db session save code to use redis instead of the database.</p>
<h2>Install Cm_RedisSession with modman</h2>
<p>Again, as with Cm_Cache_Backend_Redis if you are running Magento version 1.8.0.0 or greater Cm_RedisSession is already installed but you should upgrade it to the latest version.</p>
<p>In your Magento application folder install Cm_RedisSession with modman :</p>
<pre class="brush: plain; title: ; notranslate">
modman clone git://github.com/colinmollenhour/Cm_RedisSession.git
</pre>
<span class="collapseomatic collapse" id="id65fc23e5e7d30"  tabindex="0" title="Cloning into &#039;Cm_RedisSession&#039;..."    >Cloning into 'Cm_RedisSession'...</span><div id="target-id65fc23e5e7d30" class="collapseomatic_content ">
[text]
modman clone git://github.com/colinmollenhour/Cm_RedisSession.git<br />
Cloning into &#8216;Cm_RedisSession&#8217;&#8230;<br />
remote: Counting objects: 562, done.<br />
remote: Total 562 (delta 0), reused 0 (delta 0), pack-reused 562<br />
Receiving objects: 100% (562/562), 151.45 KiB | 0 bytes/s, done.<br />
Resolving deltas: 100% (221/221), done.<br />
Checking connectivity&#8230; done.<br />
Submodule &#8216;lib/Credis&#8217; (git://github.com/colinmollenhour/credis.git) registered for path &#8216;lib/Credis&#8217;<br />
Cloning into &#8216;lib/Credis&#8217;&#8230;<br />
remote: Counting objects: 696, done.<br />
remote: Total 696 (delta 0), reused 0 (delta 0), pack-reused 696<br />
Receiving objects: 100% (696/696), 186.95 KiB | 0 bytes/s, done.<br />
Resolving deltas: 100% (395/395), done.<br />
Checking connectivity&#8230; done.<br />
Submodule path &#8216;lib/Credis&#8217;: checked out &#8216;7bd47b61fc3dad28aa881de45c71026256ad27cc&#8217;<br />
WARNING: Removing conflicting directory: /home/www/dev/magento/app/code/community/Cm/RedisSession<br />
 Applied: code                            app/code/community/Cm/RedisSession<br />
WARNING: Removing conflicting regular file: /home/www/dev/magento/app/etc/modules/Cm_RedisSession.xml<br />
 Applied: Cm_RedisSession.xml             app/etc/modules/Cm_RedisSession.xml<br />
WARNING: Removing conflicting symbolic link: /home/www/dev/magento/lib/Credis<br />
 Applied: lib/Credis                      lib/Credis<br />
Successfully create symlink new module &#8216;Cm_RedisSession&#8217;<br />
[/text]
</div>
<p>&nbsp;</p>
<h2>Configure Magento redis session cache</h2>
<p>Again in /app/etc/local.xml.additional you will see a configuration example for the redis session cache, note that the <a href="https://github.com/colinmollenhour/Cm_RedisSession" target="_blank">configuration example from Colin</a> is more complete and that is the one I am using here. Edit your local.xml file and add the configuration below between the <em>global</em> tags. Note that we specify our second redis instance on port 6380 as the session cache, also note Colin&#8217;s module uses the session_save db value normally used to store sessions in MySQL. Cm_RedisSession rewrites this code to use redis, using the db value here also means Magento will fallback (hopefully) to using MySQL to store session data should redis fail.</p>
<pre class="brush: plain; highlight: [1,4,10]; title: ; notranslate">
        &lt;session_save&gt;db&lt;/session_save&gt;
        &lt;redis_session&gt;                       &lt;!-- All options seen here are the defaults --&gt;
            &lt;host&gt;127.0.0.1&lt;/host&gt;            &lt;!-- Specify an absolute path if using a unix socket --&gt;
            &lt;port&gt;6380&lt;/port&gt;
            &lt;password&gt;&lt;/password&gt;             &lt;!-- Specify if your Redis server requires authentication --&gt;
            &lt;timeout&gt;2.5&lt;/timeout&gt;            &lt;!-- This is the Redis connection timeout, not the locking timeout --&gt;
            &lt;persistent&gt;&lt;/persistent&gt;         &lt;!-- Specify unique string to enable persistent connections. E.g.: sess-db0; bugs with phpredis and php-fpm are known: https://github.com/nicolasff/phpredis/issues/70 --&gt;
            &lt;db&gt;0&lt;/db&gt;                        &lt;!-- Redis database number; protection from accidental loss is improved by using a unique DB number for sessions --&gt;
            &lt;compression_threshold&gt;2048&lt;/compression_threshold&gt;  &lt;!-- Set to 0 to disable compression (recommended when suhosin.session.encrypt=on); known bug with strings over 64k: https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/issues/18 --&gt;
            &lt;compression_lib&gt;gzip&lt;/compression_lib&gt;              &lt;!-- gzip, lzf, lz4 or snappy --&gt;
            &lt;log_level&gt;1&lt;/log_level&gt;               &lt;!-- 0 (emergency: system is unusable), 4 (warning; additional information, recommended), 5 (notice: normal but significant condition), 6 (info: informational messages), 7 (debug: the most information for development/testing) --&gt;
            &lt;max_concurrency&gt;6&lt;/max_concurrency&gt;                 &lt;!-- maximum number of processes that can wait for a lock on one session; for large production clusters, set this to at least 10% of the number of PHP processes --&gt;
            &lt;break_after_frontend&gt;5&lt;/break_after_frontend&gt;       &lt;!-- seconds to wait for a session lock in the frontend; not as critical as admin --&gt;
            &lt;break_after_adminhtml&gt;30&lt;/break_after_adminhtml&gt;
            &lt;first_lifetime&gt;600&lt;/first_lifetime&gt;                 &lt;!-- Lifetime of session for non-bots on the first write. 0 to disable --&gt;
            &lt;bot_first_lifetime&gt;60&lt;/bot_first_lifetime&gt;          &lt;!-- Lifetime of session for bots on the first write. 0 to disable --&gt;
            &lt;bot_lifetime&gt;7200&lt;/bot_lifetime&gt;                    &lt;!-- Lifetime of session for bots on subsequent writes. 0 to disable --&gt;
            &lt;disable_locking&gt;0&lt;/disable_locking&gt;                 &lt;!-- Disable session locking entirely. --&gt;
            &lt;min_lifetime&gt;60&lt;/min_lifetime&gt;                      &lt;!-- Set the minimum session lifetime --&gt;
            &lt;max_lifetime&gt;2592000&lt;/max_lifetime&gt;                 &lt;!-- Set the maximum session lifetime --&gt;
        &lt;/redis_session&gt;
</pre>
<p>Refresh your Magento configuration to enable the Magento redis session cache.</p>
<p>Remember that when you change your session cache your existing session data will not be automatically imported. Depending on how important retaining existing session data is you may want to import your session data from the file system or database into redis. This will then maintain all existing session data, i.e. logged in customers will remain logged in, and customer session data will not be lost.</p>
<p>Colin Mollenhour has included a utility to allow you to import your session data. The following commands will put your shop into maintenance mode, to stop the creation of any new sessions, and import session data from the file system. You can find more information on this migration process <a href="https://github.com/colinmollenhour/Cm_RedisSession" target="_blank">here</a>.</p>
<pre class="brush: plain; title: ; notranslate">
touch maintenance.flag   # Enter maintenance mode
sleep 2                  # Allow any running processes to complete
# This will copy sessions into redis and clear the config cache so local.xml changes will take effect
php ../.modman/Cm_RedisSession/migrateSessions.php -y
rm maintenance.flag      # All done, exit maintenance mode
</pre>
<p>If the import script returns an error it means you have not yet configured or enabled the redis session cache in local.xml.</p>
<p>Now that you have imported existing session data you can delete the contents of your Magento var/session folder, this folder should now stay empty.</p>
<h2>Monitor Magento redis session cache</h2>
<p>Again we can confirm the redis session cache is working by monitoring the session cache instance on TCP port 6380. Browse to your Magento site in an incognito browser session to force Magento to create new session data, you will see the session data appear in the monitor window.</p>
<pre class="brush: plain; highlight: [1]; title: ; notranslate">
telnet localhost 6380
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
MONITOR
+OK
+1434705128.835230 &#x5B;0 127.0.0.1:58060] &quot;SELECT&quot; &quot;0&quot;
+1434705128.835387 &#x5B;0 127.0.0.1:58060] &quot;HINCRBY&quot; &quot;sess_8fdjpoeco2panshj38m7d6cd36&quot; &quot;lock&quot; &quot;1&quot;
+1434705128.835523 &#x5B;0 127.0.0.1:58060] &quot;HMGET&quot; &quot;sess_8fdjpoeco2panshj38m7d6cd36&quot; &quot;data&quot; &quot;writes&quot;
+1434705128.835889 &#x5B;0 127.0.0.1:58060] &quot;HMSET&quot; &quot;sess_8fdjpoeco2panshj38m7d6cd36&quot; &quot;pid&quot; &quot;vwelive|30576&quot; &quot;lock&quot; &quot;1&quot;
+1434705128.835939 &#x5B;0 127.0.0.1:58060] &quot;EXPIRE&quot; &quot;sess_8fdjpoeco2panshj38m7d6cd36&quot; &quot;1440&quot;
+1434705129.201090 &#x5B;0 127.0.0.1:58060] &quot;HGET&quot; &quot;sess_8fdjpoeco2panshj38m7d6cd36&quot; &quot;pid&quot;
+1434705129.201434 &#x5B;0 127.0.0.1:58060] &quot;SELECT&quot; &quot;0&quot;
+1434705129.201469 &#x5B;0 127.0.0.1:58060] &quot;HMSET&quot; &quot;sess_8fdjpoeco2panshj38m7d6cd36&quot; &quot;data&quot; &quot;:gz:x\x01\xedVKO\xdc0\x10\xe6\xa7D&gt;A\xc5\xe6\x9dl\xe2\bU\x88C+Q(\x12\xb4\x1c-\x93\xcc\xb2\x86$\x0ev\xb2KK\xf7\xbfw\xecd\xd5\xe5\xd0\xaa\xc7=\xec%\x89\xc7\xf3\xf0|\xdf\x8c'\xa5T\xf0\x8b\xd3\x84\xbei\x1aF\x940\rZ\x0b\xd9\xb2\x15\xafE\xc5{\xa9\x18&gt;9)8\x8d\x8dN\x10P\xa2\xa
QUIT
+OK
Connection closed by foreign host.
</pre>
<h1>Install and configure redis Magento CE full page cache Lesti_Fpc</h1>
<p>Lesti_Fpc is a Magento CE module <a href="https://gordonlesti.com/projects/lestifpc/" target="_blank">developed by Gordon Lesti</a> that enables an internal full page cache. A full page cache is included with Magento Enterprise but for CE users this is perhaps one of the best free full page cache solutions available.</p>
<p>If you are trying to optimising your Magento CE installation a full page cache will instantly improve page loading time and responsiveness. You will want to thoroughly test this module on your development servers to make sure it works with your particular Magento installation and frontend theme. You should read the <a href="https://gordonlesti.com/projects/lestifpc/" target="_blank">support information from Gordon Lesti</a> to familiarise yourself with the way the module works and can be configured.</p>
<p>I was not 100% comfortable with using the module and opted to modify it to only cache pages for users not logged in as I was mainly concerned about improving responsiveness for first time visitors and Google Search / Speed Index.</p>
<p>Like the default Magento system and session caches Lesti_Fpc will use the file system as the default cache storage system but we can also configure it to use redis. The Lesti_Fpc full page cache is one of the main reason I moved from using memcache to redis, Lesti_Fpc can use both, but only with redis can you refresh the full page cache within Magento. With memcache the only way to refresh the cache is to purge the cache storage.</p>
<h2>Install Lesti_Fpc with modman</h2>
<p>From your Magento root folder, use modman to install the Lesti_Fpc module.</p>
<pre class="brush: plain; title: ; notranslate">
modman clone https://github.com/GordonLesti/Lesti_Fpc.git
</pre>
<p>Refresh your Magento configuration and you will see a new cache type listed in the Magento cache storage management admin page.</p>
<figure id="attachment_1342" aria-describedby="caption-attachment-1342" style="width: 735px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-1342" src="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-lesti-fpc-screen-620x114.jpg" alt="Enable Lesti_Fpc" width="735" height="135" srcset="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-lesti-fpc-screen-620x114.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-lesti-fpc-screen-440x81.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-lesti-fpc-screen-760x140.jpg 760w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-lesti-fpc-screen-550x101.jpg 550w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-lesti-fpc-screen.jpg 800w" sizes="(max-width: 735px) 100vw, 735px" /><figcaption id="caption-attachment-1342" class="wp-caption-text">Enable Lesti_Fpc</figcaption></figure>
<p>&nbsp;</p>
<p>To enable Lest_Fpc select the Fpc cache type and then select <em>enable</em> from actions and click submit. This will enable the full page cache which will start caching to the file system in var/cache/.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1309" src="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen.jpg" alt="magento-cache-storage-management-screen" width="800" height="315" srcset="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen.jpg 800w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen-440x173.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen-620x244.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen-760x299.jpg 760w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-cache-storage-management-screen-550x217.jpg 550w" sizes="(max-width: 800px) 100vw, 800px" /></p>
<h2>Configure Lesti_Fpc redis full page cache</h2>
<p>To configure Lesti_Fpc to use redis as the cache storage system locate the fpc.xml.sample symlink in app/etc/. Rename the symlink to fpc.xml and open the file for editing. You will see an example redis cache configuration commented out, uncomment the configuration and edit the port settings to match the port configured on our redis instance 3 for full page cache &#8211; 6381. Note how Lest_Fpc also uses Cm_Cache_Backend_Redis to cache data to redis. <em>Neat huh?</em></p>
<p>&nbsp;</p>
<pre class="brush: plain; highlight: [1,4]; title: ; notranslate">

            &lt;!--backend&gt;Cm_Cache_Backend_Redis&lt;/backend&gt;
            &lt;backend_options&gt;
                &lt;server&gt;127.0.0.1&lt;/server&gt;
                &lt;port&gt;6381&lt;/port&gt;
                &lt;persistent&gt;cache-fpc&lt;/persistent&gt;
                &lt;database&gt;1&lt;/database&gt;
                &lt;password&gt;&lt;/password&gt;
                &lt;force_standalone&gt;1&lt;/force_standalone&gt;
                &lt;connect_retries&gt;1&lt;/connect_retries&gt;
                	&lt;lifetimelimit&gt;86400&lt;/lifetimelimit&gt;
                &lt;read_timeout&gt;10&lt;/read_timeout&gt;
                &lt;compress_data&gt;1&lt;/compress_data&gt;
                &lt;compress_tags&gt;1&lt;/compress_tags&gt;
                &lt;compress_data&gt;gzip&lt;/compress_data&gt;
            &lt;/backend_options--&gt;

</pre>
<p>Refresh the Magento configuration cache to enable the redis cache for Lest_Fpc full page cache data.</p>
<h2>Monitor Lesti_Fpc full page cache</h2>
<p>Again we can confirm that Lest_Fpc is using redis by monitoring our redis instance on port 6381.</p>
<pre class="brush: plain; highlight: [1]; title: ; notranslate">
telnet localhost 6381
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
MONITOR
+OK
+1434708527.473899 &#x5B;0 127.0.0.1:37524] &quot;select&quot; &quot;0&quot;
+1434708528.667508 &#x5B;0 127.0.0.1:37538] &quot;select&quot; &quot;0&quot;
+1434708528.728683 &#x5B;0 127.0.0.1:37538] &quot;hget&quot; &quot;zc:k:cc4_487CA86953D34994D28E9FEA5DCAD22EF836ECD4_PAGE&quot; &quot;d&quot;
+1434708535.892402 &#x5B;0 127.0.0.1:37508] &quot;select&quot; &quot;0&quot;
+1434708542.685102 &#x5B;0 127.0.0.1:37478] &quot;select&quot; &quot;0&quot;
+1434708542.772018 &#x5B;0 127.0.0.1:37478] &quot;hget&quot; &quot;zc:k:cc4_E8F535AA519A6B32EFBB322BAFB4BA86704430AB_PAGE&quot; &quot;d&quot;
+1434708543.253530 &#x5B;0 127.0.0.1:37495] &quot;select&quot; &quot;0&quot;
+1434708546.151371 &#x5B;0 127.0.0.1:37562] &quot;select&quot; &quot;0&quot;
+1434708546.304141 &#x5B;0 127.0.0.1:37562] &quot;hget&quot; &quot;zc:k:cc4_3FA4328F459A7D31B2D5B7BD4C4374494AFF146E_PAGE&quot; &quot;d&quot;
QUIT
+OK
Connection closed by foreign host.
</pre>
<p>You can now also delete the contents of your Magento var/cache/ folder, Magento is no longer caching data to the file system, and when all the caching modules are working correctly this folder will stay empty.</p>
<p><em>Congratulations</em> you now have a fully cached Magento system using a fast input/output redis memory cache.</p>
<h1>Monitoring redis</h1>
<p>There are two admin tools well worth installing to help you monitor redis,</p>
<p>Steve Robbins has developed a <a href="https://github.com/steverobbins/Magento-Redismanager" target="_blank">Magento Redis Manager</a> module that allows you to monitor your redis confguration via a Magento admin page.</p>
<h2>Install Magento Redis Manager</h2>
<p>Install the Magento Redis Manager module from your Magento root folder with modman.</p>
<pre class="brush: plain; title: ; notranslate">
modman clone https://github.com/steverobbins/Magento-Redismanager.git
</pre>
<p>Refresh your Magento configuration cache, log out of admin and back in to view the Magento Redis Manager admin page under System -&gt; Redis Management.</p>
<figure id="attachment_1344" aria-describedby="caption-attachment-1344" style="width: 800px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-1344 size-full" src="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-redis-manager.jpg" alt="Magento Redis Manager" width="800" height="324" srcset="https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-redis-manager.jpg 800w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-redis-manager-440x178.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-redis-manager-620x251.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-redis-manager-760x308.jpg 760w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/magento-redis-manager-550x223.jpg 550w" sizes="(max-width: 800px) 100vw, 800px" /><figcaption id="caption-attachment-1344" class="wp-caption-text">Magento Redis Manager</figcaption></figure>
<p>Here we can clearly see our three redis cache instances and how they are being used by Magento for the System (cache), Fpc and Session cache. Here you can also manually flush individual redis caches if required. You can also completely flush the cache storage from the cache management page.</p>
<p>Another redis administration graphical tool that is very useful is <a href="https://github.com/ErikDubbelboer/phpRedisAdmin" target="_blank">Erik Dubbelboers phpRedisAdmin</a>. This is a php script that lets you monitor redis via your browser.</p>
<h2>Install phpRedisAdmin</h2>
<p>You can install phpRedisAdmin with composer, see the <a href="https://github.com/ErikDubbelboer/phpRedisAdmin" target="_blank">github </a>page for more information.</p>
<figure id="attachment_1345" aria-describedby="caption-attachment-1345" style="width: 800px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-1345 size-full" src="https://blog.gaiterjones.com/wp-content/uploads/2015/06/php-redis-admin.jpg" alt="PHPRedisAdmin" width="800" height="293" srcset="https://blog.gaiterjones.com/wp-content/uploads/2015/06/php-redis-admin.jpg 800w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/php-redis-admin-440x161.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/php-redis-admin-620x227.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/php-redis-admin-760x278.jpg 760w, https://blog.gaiterjones.com/wp-content/uploads/2015/06/php-redis-admin-550x201.jpg 550w" sizes="(max-width: 800px) 100vw, 800px" /><figcaption id="caption-attachment-1345" class="wp-caption-text">PHPRedisAdmin</figcaption></figure>
<p>You need to configure phpRedisAdmin with the names and port numbers of your configured redis instances, then you will see the three instances listed in phpRedisAdmin. phpRedisAdmin also lets you browse the redis data for each cache instance. Note that the last save values above show that the system and fpc caches are not being persisted, or dumped to disk by redis, the volatile session data however is persisted, and regularly saved to disk just as we configured it to.</p>
<h1>Conclusions</h1>
<p>Thanks to the developers of the Magento CE caching modules and redis cache storage system we have a pretty good method of <a href="https://blog.gaiterjones.com/5-ways-to-improve-magento-page-speed/">optimising </a>and improving Magento responsiveness with a cost effective fast caching system. Of course redis configured on a single server will have it&#8217;s limits, but for a small to medium sized ecommerce shop this solution should suffice and you should be able to implement a good caching system and experience good results from caching your Magento data.</p>
<p>You can see this cache system using the config from this blog <a href="http://dev.gaiterjones.com/magento/" target="_blank">running on my dev Magento 1.9.x store.</a></p>
<p>&nbsp;</p>
<h1>Credits</h1>
<ul>
<li>Colin Mollenhour
<ul>
<li>modman</li>
<li>backend and session modules</li>
</ul>
</li>
<li>Gordon Lesti
<ul>
<li>Lesti full page cache</li>
</ul>
</li>
<li>Steve Robbins
<ul>
<li>Magento Redis Manager</li>
</ul>
</li>
<li>Erik Dubbelboer
<ul>
<li>PHP Redis Admin</li>
</ul>
</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-redis-system-session-and-full-page-cache-management-solution/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>5 Ways to Improve Magento Page Speed</title>
		<link>https://blog.gaiterjones.com/5-ways-to-improve-magento-page-speed/</link>
					<comments>https://blog.gaiterjones.com/5-ways-to-improve-magento-page-speed/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Tue, 26 May 2015 15:11:34 +0000</pubDate>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento Optimisation]]></category>
		<category><![CDATA[google page speed insights]]></category>
		<category><![CDATA[magento optimisation]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1293</guid>

					<description><![CDATA[Googles Phantom update recently laid emphasis on having a more mobile friendly website to improve search results on mobile devices. This is great for Magento 1.9 with it&#8217;s responsive theme...<a class="more-link" href="https://blog.gaiterjones.com/5-ways-to-improve-magento-page-speed/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>Googles Phantom update recently laid emphasis on having a more mobile friendly website to improve search results on mobile devices. This is great for Magento 1.9 with it&#8217;s responsive theme design but if your Magento page load speed is slow you may well be penalised by Google.</p>
<h2>Google Page Speed Insights</h2>
<p>The <a href="https://developers.google.com/speed/pagespeed/insights/?" target="_blank">Google Page Speed insights tool</a> gives you a good idea as to how your Magento site is performing according to Google&#8217;s page speed analysis rules. It will rate your page speed for both Desktop and Mobile devices on a scale between 1 and 100, the higher the rating the better. Apart from the general response speed of your server it concentrates on some basic optimisation rules including compression and browser caching.</p>
<p>Google will provide you with some guidance to help you improve your page speed analysis results. The main speed issues all Magento stores are going to suffer from will, despite all your optimisation attempts, probably always eventually come back to your server hardware resources and configuration. The mean time to the first byte delivery for a Magento store will be very dependant on server, database and network resources that may be out of your control (or budget) especially as Magento is already a pretty data intensive beast.</p>
<p>Here are 5 ways to <strong>improve your Magento Google Page Speed insight results</strong>.</p>
<h2>1. Buy a new server / enable full page caching</h2>
<p>Ok, so a new server is probably not going to be an option, but remember if your server is not up to spec for your Magento installation no amount of optimising is going to make your server faster. Full page caching might be an option to help improve server response times.</p>
<h2>2. Enable Apache Compression</h2>
<p>Assuming you are using Apache, make sure compression and the <strong>mod_deflate</strong> module is enabled. mod_deflate is an Apache module which “provides the DEFLATE output filter that allows output from your server to be compressed before being sent to the client over the network.” (from its web). You need to make sure the module is enabled before you try to configure compression. To do this with Ubuntu for example simply enter</p>
<pre class="prettyprint"><code>a2enmod deflate
service apache2 restart</code></pre>
<p>Now take a look at the default Magento .htaccess file in the root of your Magento folder,  Make sure the section with the deflate compression rules is not commented to enable the default compression rules.</p>
<pre class="prettyprint"><code>############################################
## DEFLATE COMPRESSION
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
    AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript application/x-javascript
    #AddOutputFilterByType DEFLATE application/x-httpd-php

    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:pdf|doc)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:avi|mov|mp3|mp4|rm)$ no-gzip dont-vary
</code></pre>
<p>These are the default rules, if you google this subject you will also find suggestions to improve on / customise these rules. Some will also argue that you should move the .htaccess rules to your apache site .conf file.</p>
<h2>3. Enable Browser Cache Rules</h2>
<p>Similar to taking advantage of Apaches compression features, you need to also make sure you are telling visitors what data their browsers can and cannot cache, and for how long. Client side caching rules obviously help considerably to reduce the time required by the browser to fetch data.</p>
<p>The Apache module is called mod_expires. Enable this with</p>
<pre class="prettyprint"><code>a2enmod expires
service apache2 restart</code></pre>
<p>Again look at the default Magento .htaccess rules and make sure the <strong>mod_expires</strong> section is not commented out.</p>
<pre class="prettyprint"><code>
############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires

	ExpiresActive On
	ExpiresDefault "access plus 1 year"


</code></pre>
<h2>4. Optimise images</h2>
<p>The first thing you will see when Google analyses your product pages are suggestions to improve image optimisation. A good Magento store will have a lot of images, and Magento makes a good job of resizing and caching product images for various frontend views.</p>
<p>There are two really good lossless image optimisation tools available that can optimise all your images in seconds with just one command line: <strong>jpegoptim</strong> and <strong>pngcrush</strong>.</p>
<p>These are free utilities that should be available for your flavour of Unix. In ubuntu you can install them with</p>
<pre class="prettyprint"><code>apt-get install jpegoptim
apt-get install pngcrush</code></pre>
<p>First take a backup of your Magento installation, or at least your <em>/media/catalog/product</em> and <em>category</em> folders.</p>
<p>To optimise every single product image open a terminal session and change to your magento<em> media/catalog/product</em> folder. Now execute the following command line</p>
<pre class="prettyprint"><code>find . -type d -exec  sh -c "/usr/bin/jpegoptim --strip-all -t {}/*.jpg" \; | perl -e '@a=&lt;&gt;; $a=join("", @a); @b = $a =~ /%\s+\((\d+)k\)/g; foreach my $n (@b) {$sum = $sum + $n}; print "Total saved ${sum}k\n"' </code></pre>
<p>This will optimise all jpg files in the current folder and all subfolders. The original file will be overwritten and a summary of the compression savings shown at the end. Be sure to reset the permissions of all the image files after running the optimisation as they will have all been reset which can lead to them not being accessible by Apache.</p>
<p>If you have png files you want to optimise the corresponding pngcrush command is</p>
<pre class="prettyprint"><code>for png in `find $1 -iname "*.png"`; do pngcrush -ow "$png"; done</code></pre>
<p>Before you jump in and optimise all your images make sure you have a backup, and I would also do a test optimisation on your production server. Replacing thousands of broken product images is really no fun at all.</p>
<p>&nbsp;</p>
<h2>5. Minify and Optimise JS, CSS and HTML</h2>
<p>The best way to minify and optimise your javascript and style sheet files for Google page insights is to enable the Magento js and css combination feature in admin. I would also recommend installing the <a href="https://blog.gaiterjones.com/5-magento-modules-you-cannot-live-without/">Fooman Speedster Advanced</a> module. I noticed the new RWD theme in Magento 1.9 now supports SASS, this will no doubt help to improve CSS optimisation in the future, if your theme doesn&#8217;t support SCSS then have a look at manually optimising the CSS yourself using online tools. The same goes for javascript, make sure any plugins you install are using minified js files, or try to minify the source yourself using online tools.</p>
<p>I am currently testing a <a href="https://github.com/gaiterjones/magento-minifyhtml" target="_blank">module</a> that uses the well known minify code to minify Magento html output.</p>
<p>Each of these steps will help to improve the page speed insight score, html minification alone increases the rank by 1. When you add all these small improvements together your page speed rank will increase by 5 to 10 points which may well be enough to get you in to the green ranking of 85 and above.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/5-ways-to-improve-magento-page-speed/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Magento Get Customer Feedback, Reviews &#038; Ratings FREE Extension</title>
		<link>https://blog.gaiterjones.com/magento-get-customer-feedback-reviews-ratings-free-extension/</link>
					<comments>https://blog.gaiterjones.com/magento-get-customer-feedback-reviews-ratings-free-extension/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Fri, 25 Nov 2011 10:16:00 +0000</pubDate>
				<category><![CDATA[Free Magento Extensions]]></category>
		<category><![CDATA[Get Customer Feedback]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Ratings]]></category>
		<category><![CDATA[Reviews]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=611</guid>

					<description><![CDATA[Products with good customer ratings and reviews improve Google search results and give customers more buying confidence but how do we encourage customers to complete product reviews? This Magento module...<a class="more-link" href="https://blog.gaiterjones.com/magento-get-customer-feedback-reviews-ratings-free-extension/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>Products with good customer ratings and reviews<a title="Rich Snippet Data for Magento Product Pages Improves Google Search Results" href="https://blog.gaiterjones.com/rich-snippet-data-for-magento-product-pages-improves-google-search-results/"> improve Google search results</a> and give customers more buying confidence but how do we encourage customers to complete product reviews?</p>
<p>This Magento module helps to get more Magento customer product feedback by giving customers the opportunity and incentives to complete reviews and ratings for products they have recently purchased.</p>
<h1><strong>HOW IT WORKS</strong></h1>
<p>The code in the module is called at checkout caching customer information and products ordered. The module then uses the Magento scheduling system to execute code that regularly checks the cached files to create a customised customer feedback email containing direct links to the review pages of the products the customer has ordered.</p>
<p>When configurable parameters, such as order status, or elapsed time since the order was placed are met the email is sent to the customer and the order status updated.</p>
<p>The customer feedback email allows you to directly follow up every customer order and offer incentives to the customer to complete product reviews and ratings. An example email is shown below.</p>
<figure id="attachment_1638" aria-describedby="caption-attachment-1638" style="width: 550px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-1638 size-full" title="Example Magento Get Customer Feedback Email" alt="" src="https://blog.gaiterjones.com/wp-content/uploads/2011/11/get-customer-feedback-2017.jpg" width="550" height="593" /><figcaption id="caption-attachment-1638" class="wp-caption-text">Example Magento Get Customer Feedback Email</figcaption></figure>
<p>&nbsp;</p>
<figure id="attachment_626" aria-describedby="caption-attachment-626" style="width: 367px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/11/getcustomerfeedbackorderstatusl.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-626" title="Customer Feedback Order Status" alt="Customer Feedback Order Status" src="https://blog.gaiterjones.com/wp-content/uploads/2011/11/getcustomerfeedbackorderstatusl.jpg" width="367" height="103" /></a><figcaption id="caption-attachment-626" class="wp-caption-text">Example of updated Magento order status showing customer feedback email has been sent.</figcaption></figure>
<p>&nbsp;</p>
<p>Tested with Magento CE 1.3-1.9.x</p>
<p>GIT &#8211; <a href="https://github.com/gaiterjones/magento-GetCustomerFeedback" target="_blank" rel="noopener noreferrer">https://github.com/gaiterjones/magento-GetCustomerFeedback</a> note &#8211; the latest code will always be available at the git hub for download.</p>
<p>Place an order in my <a title="gaiterjones dev store" href="http://dev.gaiterjones.com/magento" target="_blank" rel="noopener noreferrer">development </a>store to test the customer feedback email yourself.</p>
<p><strong>Updates</strong></p>
<p>This module was originally coded in 2013. I updated it in 2017 with some bug fixes, better translation options and a new responsive email template.<strong style="line-height: 15px; text-transform: uppercase;">INSTALLATION</strong></p>
<p>Prerequisites : PHP5.4+, Working Magento scheduling system, Magento CE 1.x</p>
<p>To install this module:</p>
<p><strong>Modman</strong></p>
<p>modman clone https://github.com/gaiterjones/magento-GetCustomerFeedback.git<strong></strong></p>
<p>Manual</p>
<p>1. Unzip the module and copy the contents of the modules app folder to the app folder of your Magento store installation.</p>
<p><strong>2</strong>. Ensure that the module /cache folder has write permission set to allow the WWW user group write access. The module caches customer and product information in this folder.</p>
<p><strong>3</strong>. Refresh the Magento Store cache</p>
<p><strong>4.</strong> Logout and login back into the admin backend, goto System &#8211; Configuration and locate the configuration settings under <em>My Extensions &#8211; Get Customer Feedback.</em></p>
<p><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/11/getcustomerfeedbackconfig1.jpg"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-617" title="Get Customer Feedback" alt="" src="https://blog.gaiterjones.com/wp-content/uploads/2011/11/getcustomerfeedbackconfig1-440x431.jpg" width="440" height="431" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/11/getcustomerfeedbackconfig1-440x431.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/11/getcustomerfeedbackconfig1-620x608.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2011/11/getcustomerfeedbackconfig1.jpg 634w" sizes="(max-width: 440px) 100vw, 440px" /></a></p>
<h1><strong>CONFIGURATION</strong></h1>
<h3>Email body content:</h3>
<p>Enter the text that will form the main body of the customer email here, this text appears before the product information. You may use HTML.</p>
<p>For example for the offer shown in the example above I used the following HTML, remember you should replace special characters with <a href="http://www.w3schools.com/html/html_entities.asp">html entities</a>.:</p>
<pre class="brush:xml">&lt;p align="center"&gt;&lt;img src="/images/articles/comp_win50.jpg" width="650" height="130" align="middle" /&gt;&lt;/p&gt;
&lt;p align="left"&gt;Thankyou for your recent order, we hope you are very happy with your products. We value your opinion so simply tell us what you think about your purchases and you could win £50 to spend with us.&lt;/p&gt;</pre>
<h3>Email footer content:</h3>
<p>Enter the text that will form the footer of the customer email here, this text appears below the product information. You may use HTML.</p>
<h3>Email subject:</h3>
<p>Enter a custom subject for the feedback email, if left blank subject is <em>&#8220;STORENAME : Your Order # ORDERNUMBER&#8221;.</em></p>
<h3>Leave feedback icon URL:</h3>
<p>To specify your own Get Feedback icon image in the customer feedback email enter the image URL here. If no image url is specified the text &#8220;Leave Feedback&#8221; will be used.</p>
<h3>Send feedback request email :</h3>
<p>Specify when the email should be sent, immediately after the order completion or after a specific period of time to allow the customer time to receive the products and form an opinion. When order status check is set to YES, email will be sent X days after order status is set to complete.</p>
<h3>Check order status: YES/NO</h3>
<p>To only send customer feedback emails when the order status is &#8220;Complete&#8221; set this field to YES.</p>
<h3>Test mode enabled: YES/NO</h3>
<p>In test mode customer feedback emails are sent to the general email address of your store and not to the customer. When you are happy that the emails are formatted correctly set this option to NO and emails will be sent to the customer. Test mode is enabled by default.</p>
<p>To test your email and cron settings rename the test email file in the cache folder to GetCustomerFeedback.emailtest</p>
<p>The module will now send a test email to the general store address every time the cron scheduler runs. Delete or rename this file to stop the test emails.</p>
<h3>Use PHP email</h3>
<p>Send customer feedback emails using the Magento email system or directly via PHP. To BCC feedback emails use PHP email mode.</p>
<p>To test that you are receiving emails from the module rename the file GetCustomerFeedback.emailtestOFF in the cache folder removing the word OFF from the end. The module will send you an email every time the Magento cron.php runs. Note the default cron task is set to once per hour, you can manually change this in the module config files to a shorter period for testing if required. If you receive the test email you know the module cron task is running and email is functioning. Rename the control file again to turn off the test emails.</p>
<h3>URL Tracking tags:</h3>
<p>Specify Google UTM tags here to track traffic generated by customer feedback emails.</p>
<h3>Send alert emails: YES/NO</h3>
<p>The module will send alert emails to the general email address of the store when errors are detected, enable this option during testing and disable afterwards when the module is functioning correctly.</p>
<p><strong>Edit Locale Files for Translations<br />
</strong>In the root folder of the extension is an example locale file named translation_store_id_1.txt this will be used to translate phrases used by the extension that cannot be set in admin. If you have a multi language store a translation file should exist here for each store, i.e. if your store ID 1 is French and store ID2 is German then your translation_store_id_1.txt file should contain English to French translations and you should create a second file called translation_store_id_2.txt containing English to German translations.</p>
<p>&nbsp;</p>
<p><strong style="line-height: 15px; text-transform: uppercase;"><strong><strong><strong>ENABLE MAGENTO SCHEDULING</strong></strong></strong></strong></p>
<p>Magento uses a single file named <strong>cron.php</strong> to execute all its scheduled tasks –  cron.php should be executed regularly to allow configured background tasks in Magento to run and is also used by this module. For example to run cron.php every 5 minutes add the following or similar to your crontab (crontab -e):</p>
<p><em>*/5 * * * * /usr/bin/php -f  /PATH-TO-MAGENTO/cron.php</em></p>
<p>Alternatively for testing you can execute cron.php from your browser by browsing to</p>
<p><em>http://www.yourstore.com/cron.php</em></p>
<p>When you manually execute the cron job you may want to change the configured cron schedule from every hour to every minute by editing the config.xml module file otherwise your manual cron job will only run once per hour.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-get-customer-feedback-reviews-ratings-free-extension/feed/</wfw:commentRss>
			<slash:comments>113</slash:comments>
		
		
			</item>
		<item>
		<title>Rich Snippet Data for Magento Product Pages Improves Google Search Results</title>
		<link>https://blog.gaiterjones.com/rich-snippet-data-for-magento-product-pages-improves-google-search-results/</link>
					<comments>https://blog.gaiterjones.com/rich-snippet-data-for-magento-product-pages-improves-google-search-results/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Fri, 18 Nov 2011 13:34:44 +0000</pubDate>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[META Tags]]></category>
		<category><![CDATA[Rich Snippet Data]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[microformat tags]]></category>
		<category><![CDATA[rich snippet data]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=595</guid>

					<description><![CDATA[&#160; &#160; &#8220;Rich Snippets&#8221; are a standardised markup format used by Google to improve search results by including more specific or &#8220;rich&#8221; information relating to a web page, i.e. for...<a class="more-link" href="https://blog.gaiterjones.com/rich-snippet-data-for-magento-product-pages-improves-google-search-results/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&#8220;<a href="http://www.google.com/support/webmasters/bin/topic.py?topic=21997" target="_blank">Rich Snippets</a>&#8221; are a standardised markup format used by Google to improve search results by including more specific or &#8220;rich&#8221; information relating to a web page, i.e. for product pages, price and ratings info. Google says &#8220;(we try) to present users with the most useful and informative search results. The more information a search result snippet can provide, the easier it is for users to decide whether that page is relevant to their search.&#8221;</p>
<p>By editing Magento product page templates we can include the Rich Snippet markup data readable by Google and improve the organic Google search results for our product pages.</p>
<p>There are various standards available to markup Rich Snippet Data on web pages &#8211; microdata, microformats, RDFa etc. We are going to use the microformat markup, although it does not provide as many options as other formats it does fit more easily into Magentos existing default product page design.</p>
<h2><span class="Apple-style-span" style="font-weight: normal; line-height: 20px; text-transform: none;">This Rich Snippet data will not affect the look of our product page, microformats use the </span><code style="line-height: 20px; text-transform: none;">class</code><span class="Apple-style-span" style="font-weight: normal; line-height: 20px; text-transform: none;"> attribute in HTML tags (often </span><code style="line-height: 20px; text-transform: none;">&lt;span&gt;</code><span class="Apple-style-span" style="font-weight: normal; line-height: 20px; text-transform: none;"> or </span><code style="line-height: 20px; text-transform: none;">&lt;div&gt;</code><span class="Apple-style-span" style="font-weight: normal; line-height: 20px; text-transform: none;">) to assign brief and descriptive names to entities and their properties.</span></h2>
<p>We are going to use simple microformat conventions or entities to markup our product page html so that Google spiders can read Rich data from our product information such as the price, availability or review rating of a product from all our pages.</p>
<p>We will implement two main microformat entities, <strong>hproduct</strong> and <strong>hreview-aggregate</strong> coded within the correct sections of our product page html so that the microformat markup looks something like:</p>
<figure id="attachment_596" aria-describedby="caption-attachment-596" style="width: 244px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="nohang        " title="Rich Snippet product microformat tree" src="https://blog.gaiterjones.com/wp-content/uploads/2011/11/magento-rich-snippet-microformat.jpg" alt="" width="244" height="207" /><figcaption id="caption-attachment-596" class="wp-caption-text">Rich Snippet product microformat tree</figcaption></figure>
<p>&nbsp;</p>
<h1>How to Markup the Default Magento Theme with Rich Snippet Information</h1>
<p>&nbsp;</p>
<p>Lets start with the hproduct microformat tag. This needs to encapsulate the main product information, including product description, image, price etc. If we look at the structure of the default magento product page we can see that the html document division with the product-essential class contains all the product information that we need, so we will add the main hproduct microformat tag here by adding hproduct to the DIV class.</p>
<figure id="attachment_597" aria-describedby="caption-attachment-597" style="width: 440px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/11/magento-product-wrapper-div.jpg"><img loading="lazy" decoding="async" class="nohang        " title="HTML document division containing Magento product information" src="https://blog.gaiterjones.com/wp-content/uploads/2011/11/magento-product-wrapper-div-440x263.jpg" alt="" width="440" height="263" /></a><figcaption id="caption-attachment-597" class="wp-caption-text">HTML document division containing Magento product information</figcaption></figure>
<p>&nbsp;</p>
<h2>hproduct</h2>
<p>Open up your Magento theme template folder, browse to  /template/catalog/product and open up view.phtml for editing. Here you will find the html document division with the class <strong>product-essential</strong>, we simply append the new <strong>hproduct</strong> microformat class to it to add the hproduct rich snippet tag.</p>
<pre class="brush:xml">&lt;div class="product-essential hproduct"&gt;</pre>
<h2>item fn</h2>
<p>Within our microformat markup tree we now want to markup the product item, price and image sections of our Magento product html.</p>
<p>Still looking at view.phtml within the product-essential div we will find the product-name division. Here we will add the<strong> item fn</strong> microformat tags to markup the product name.</p>
<pre class="brush:xml">&lt;div class="product-name item fn"&gt;</pre>
<h2>description</h2>
<p>Within view.phtml we can also add the markup for the microformat description tag. An ideal place for this is the quick overview html division where we can simply append the description tag to the existing DIV class.</p>
<pre class="brush:xml">&lt;div class="std description"&gt;&lt;?php echo $_helper-&gt;productAttribute($_product, nl2br($_product-&gt;getShortDescription()), 'short_description') ?&gt;&lt;/div&gt;</pre>
<h2>price</h2>
<p>To markup the product price open up price.html in the same folder. This template file is responsible for returning product pricing in all areas of the Magento frontend. You will notice that all the pricing document divisions already have the class name <strong>price. </strong>We don&#8217;t need to change anything here. However if you want to include the price-range microformat tag you can include it here by adding it to the divisions with the class name <strong>price-box</strong>.</p>
<h2>image</h2>
<p>To tag the product image navigate to the template/catalog/product/view folder and open up media.phtml for editing. Here you will see the product image html. The product image URL is specified within an IMG tag that has the ID &#8220;image&#8221;. Simply add a new class to the IMG tag with the name <strong>photo fn</strong>.</p>
<pre class="brush:xml">$_img = '&lt;img id="image" class="photo fn" src="'.$this-&gt;helper...</pre>
<h2>hreview-aggregate</h2>
<p>The most effective data we can microformat tag is the product review and rating data which will be displayed in Google search results showing our Magento product rating information. This data is encapsulated within the hreview-aggregate tag.</p>
<p>Navigate to the template/review/helper folder and you will see two files responsible for rendering review and rating html. summary.phtml and summary_short.phtml. Open up summary.phtml for editing.</p>
<p>First we need to add the hreview-aggregate tag to the html division that contains the rating data for the product. Here you will see the DIV with the class name ratings. Append the hreview-aggregate tag to this DIV class name.</p>
<pre class="brush:xml">&lt;div class="ratings hreview-aggregate"&gt;</pre>
<p>Next you will see that Magento already uses a division with a class name of rating. This will confuse Google as the microformat name we want to use is also &#8220;rating&#8221;. However there is a method to work around this using a SPAN class. Edit the existing rating division to include the new SPAN element as show below.</p>
<pre class="brush:xml">            &lt;div class="rating-box"&gt;
                &lt;div class="rating" style="width:&lt;?php echo $this-&gt;getRatingSummary() ?&gt;%"&gt;
					&lt;span class="value-title" title="&lt;?php echo number_format($this-&gt;getRatingSummary() / 20,1); ?&gt;"&gt;&lt;/span&gt;
				&lt;/div&gt;
            &lt;/div&gt;</pre>
<h2>count</h2>
<p>Now we markup the number of reviews the product has received with the <strong>count</strong> tag. Still within summary.phtml we add a SPAN element with the class name count to the existing code.</p>
<pre class="brush:xml">        &lt;p class="rating-links"&gt;
			&lt;a href="&lt;?php echo $this-&gt;getReviewsUrl() ?&gt;"&gt;&lt;span class="count"&gt;&lt;?php echo $this-&gt;getReviewsCount()?&gt;&lt;/span&gt;&lt;?php echo $this-&gt;__(' Review(s)') ?&gt;&lt;/a&gt;
            &lt;span class="separator"&gt;|&lt;/span&gt;
            &lt;a href="&lt;?php echo $this-&gt;getReviewsUrl() ?&gt;#review-form"&gt;&lt;?php echo $this-&gt;__('Add Your Review') ?&gt;&lt;/a&gt;
        &lt;/p&gt;</pre>
<h1>author</h1>
<p>Finally lets consider the author tag. To identify the author of a blog or article, Google checks for a connection between the content page (such as an article), an author page, and a <a href="http://www.google.com/profiles">Google Profile</a>. I am unsure if any real benefit will come from applying the author tag to your product content but for completeness one way to do it is to add the author tag to a link in the footer of your Magento pages. i.e.</p>
<pre class="brush:xml">&lt;p class="author"&gt;&lt;a rel="author" href="http://my.google.profile "&gt;g a i t e r j o n e s&lt;/a&gt; / &lt;?php echo $this-&gt;__('(ver. %s)', Mage::getVersion()) ?&gt;&lt;/p&gt;</pre>
<h1>Testing</h1>
<p>After saving all our edited files, we can check whether our product pages are returning rich snippet data using the <a href="http://www.google.com/webmasters/tools/richsnippets" target="_blank">Google Rich Snippet Testing Tool</a>. Goto the testing page and enter the URL of a product page from your Magento site.</p>
<figure id="attachment_598" aria-describedby="caption-attachment-598" style="width: 440px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/11/rich-snippet-testing-tool-preview.jpg"><img loading="lazy" decoding="async" class="nohang        " title="Google Rich Snippet Testing Tool Magento Product Preview" src="https://blog.gaiterjones.com/wp-content/uploads/2011/11/rich-snippet-testing-tool-preview-440x103.jpg" alt="" width="440" height="103" /></a><figcaption id="caption-attachment-598" class="wp-caption-text">Google Rich Snippet Testing Tool Magento Product Preview</figcaption></figure>
<p>&nbsp;</p>
<p>The rich snippets testing tool will show you all the rich snippet data for your product page including information that comes from non microformat tags such as Meta tags or Facebook Open Graph tags. Make sure you are making best use of these tags too to ensure that Google is gleaning as much useful SEO information from your pages as possible.</p>
<h1> Conclusion</h1>
<p>The main question now is will Google use our Rich Snippet data in search results and how long will it take before the Rich Snippet data shows up* &#8211; SEE UPDATE BELOW!</p>
<p>I am still unsure if Rich Snippet data is being used across all Google search engines and countries at this moment. The data will certainly not show up until your site is spidered, and there is no guarantee it seems that even when Google has your RIch Snippet data if they will use it or not in search results &#8211; Google says &#8220;Note that there is no guarantee that a Rich Snippet will be shown for this page on actual search results.&#8221; The FAQ page which was written in 2010 seems to suggest the use of Rich Snippet Data is limited and suggests that interested users complete an &#8220;<a href="http://www.google.com/support/webmasters/bin/request.py?contact_type=rich_snippets_feedback" target="_blank">interested in Rich Snippets</a>&#8221; form. See the Rich Snippets Google <a href="http://knol.google.com/k/google-rich-snippets-tips-and-tricks#Frequently_Asked_Questions" target="_blank">FAQ </a>for more infomation.</p>
<p>If and when Rich Snippet data is widely used by Google in search results it certainly can&#8217;t do any harm to ensure your Magento product pages are ready!</p>
<p>* <span class="Apple-style-span" style="font-weight: bold; line-height: 15px; text-transform: uppercase;">UPDATE</span></p>
<p>I wrote this blog entry on 18th November 2011 and around the same time implemented rich snippet data in one of my webshops I just performed a Google search for one of our products today (8th December) and the rich snippet product review data is now being shown. So it took approximately three weeks for Google to pick up the new rich snippet data in our Magento products and reflect them in relevant search results.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/rich-snippet-data-for-magento-product-pages-improves-google-search-results/feed/</wfw:commentRss>
			<slash:comments>18</slash:comments>
		
		
			</item>
		<item>
		<title>Magento Automated Social Media Marketing FREE Extension &#8211; Twitter, Facebook</title>
		<link>https://blog.gaiterjones.com/magento-automated-social-media-marketing/</link>
					<comments>https://blog.gaiterjones.com/magento-automated-social-media-marketing/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 11:33:16 +0000</pubDate>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Free Magento Extensions]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[marketing tweets]]></category>
		<category><![CDATA[Social Media Marketing]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[free magento extension]]></category>
		<category><![CDATA[Magento]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=548</guid>

					<description><![CDATA[This Magento module provides an automated social media marketing solution by generating Magento product marketing social media posts to Twitter and Facebook when a customer places an order. How it...<a class="more-link" href="https://blog.gaiterjones.com/magento-automated-social-media-marketing/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="hang-2-column     alignnone" title="Magento Automated Social Media Marketing FREE Extension" src="https://blog.gaiterjones.com/wp-content/uploads/2011/03/buyxgeyfree-box.jpg" alt="Magento Automated Social Media Marketing FREE Extension" width="168" height="168" /><br />
This Magento module provides an automated social media marketing solution by generating Magento product marketing social media posts to Twitter and Facebook when a customer places an order.</p>
<h1><strong>How it Works</strong></h1>
<p>The code in the module is called at checkout and a random product is selected from products in  the customers cart. The information from this random &#8220;Top Seller&#8221; product is used to create a product marketing post, including a headline, short description and short Bit.ly URL to link to the product page. The built in Magento scheduling system is then used to regularly check for new marketing posts and send them to Twitter and Facebook.</p>
<figure id="attachment_17" aria-describedby="caption-attachment-17" style="width: 528px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-17" title="Example automated product marketing tweet" src="https://blog.gaiterjones.com/wp-content/uploads/2010/12/Image12.jpg" alt="Example automated product marketing tweet" width="528" height="102" srcset="https://blog.gaiterjones.com/wp-content/uploads/2010/12/Image12.jpg 528w, https://blog.gaiterjones.com/wp-content/uploads/2010/12/Image12-300x57.jpg 300w" sizes="(max-width: 528px) 100vw, 528px" /><figcaption id="caption-attachment-17" class="wp-caption-text">Example automated product marketing tweet</figcaption></figure>
<p>&nbsp;</p>
<p>To use this module you must enable the Magento scheduling system and will need a Twitter  account, and configured Twitter application, a Facebook account and configured Facebook application and a Bit.ly account, further information for setting these accounts up is detailed below.</p>
<figure id="attachment_565" aria-describedby="caption-attachment-565" style="width: 425px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-565" title="Magento Automated Social Media Marketing Facebook Example" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-6.jpg" alt="Magento Automated Social Media Marketing Facebook Example" width="425" height="136" /><figcaption id="caption-attachment-565" class="wp-caption-text">Example automated Facebook post</figcaption></figure>
<p>&nbsp;</p>
<p>Tested with Magento CE 1.6.1</p>
<p>I am looking for <strong>extension testers</strong>, <a href="https://blog.gaiterjones.com/dev/extension.php?id=2f7ab7ec9e088352b822073749d6e7d0" target="_blank">download BETA version 0.26 (last updated 09-12-2011) of the extension <strong>here</strong></a></p>
<p><strong>Updates</strong></p>
<p>If you use this extension be sure to update to the latest version.</p>
<p>*  0.22 &#8211; First beta release. 15.09.2011<br />
*  0.23 &#8211; Developed Facebook integration and duplicate post control logic. 16.09.2011<br />
* 0.24 &#8211; Improved Facebook posting, added logic to exclude posts for products in specified categories. 19.09.2011<br />
* 0.25 &#8211; Added time range to stop being too <em>spammy</em> by restricting posts to specific hours of the day. 04.11.2011<br />
* 0.26 &#8211; Fixed grouped products not being posted due to hidden child simple products of the parent group product.</p>
<p><strong>Wishlist</strong></p>
<p>Implement logic to control the duplication of product Tweets. Done &#8211; v0.23<br />
Extend to other Social Media platforms, Facebook, etc. Facebook Support in v0.23<br />
Implement hash tags for Twitter.<br />
Add to Cart link in Facebook posts<br />
Add option to use Short or Long description text.</p>
<h1><strong>Installation</strong></h1>
<p>Prerequisites :</p>
<p>Enable Magento scheduling system<br />
Twitter Account<br />
Twitter Application<br />
Facebook Account<br />
Authorised Facebook Application</p>
<p>Bit.ly Account (optional)</p>
<p>To install this extension:</p>
<p><strong>1.</strong> Unzip the module and copy the contents of the modules app folder to the app folder of your Magento store installation.</p>
<p><strong>2</strong>. Ensure that the module /cache and /cache/Bitly folders have write permissions set to allow the WWW user group write access. The module stores the product Tweets and caches the Bit.ly short URLs in this folder.</p>
<p><strong>3</strong>. Refresh the Magento Store cache</p>
<p><strong>4.</strong> Logout and login back into the admin backend, goto System &#8211; Configuration and locate the configuration settings under My Extensions &#8211; Social Media Marketing.</p>
<h1><strong>Configuration</strong></h1>
<p>1. Configure the Twitter, Facebook and Bit.ly account, authorisation and API keys. See below for further information. If you do not want to use the Bit.ly short URL service set the enable option to no.</p>
<p>Twitter is enabled by default, Facebook is disabled by default.</p>
<p>2. Define a headline prefix for the product marketing text, the default if left blank is &#8220;Top Seller:&#8221; To disable this prefix enter NONE. For Facebook you can define the text to use for the post header. Define the &#8220;uniqueness&#8221; value for posts, this value will be used to check for if a product has already been posted in the last X posts, where X is the value you define here. This will help prevent duplicate posts. You can also configure a time range so that Social Media Marketing posts will only be made during the times selected.</p>
<p>3. Configure Google UTM tags for traffic tracking in Google analytics.e.g. ?utm_source=SocialMediaMarketing&amp;utm_medium=Top-Seller&amp;utm_campaign=MyCampaig</p>
<figure id="attachment_608" aria-describedby="caption-attachment-608" style="width: 620px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/09/SocialMediaMarketingUTMTagsMagento.jpg"><img loading="lazy" decoding="async" class="size-large wp-image-608" title="Google Analytics Magento Social Media Marketing Revenue Report" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/SocialMediaMarketingUTMTagsMagento-620x95.jpg" alt="" width="620" height="95" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/09/SocialMediaMarketingUTMTagsMagento-620x95.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/SocialMediaMarketingUTMTagsMagento-440x67.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/SocialMediaMarketingUTMTagsMagento.jpg 1423w" sizes="(max-width: 620px) 100vw, 620px" /></a><figcaption id="caption-attachment-608" class="wp-caption-text">Example Google Analytics Magento Social Media Marketing Revenue Report</figcaption></figure>
<p>&nbsp;</p>
<p>4. Enable email alerts which will help you debug the module during testing.</p>
<p>5. Save the extension configuration settings and test.</p>
<h1><strong>Testing</strong></h1>
<p>Make a test order in your store to test the extension. Upon checkout completion the product marketing information will be written to the modules cache folder. At the next scheduled Magento task execution the text will be posted to Twitter (and Facebook if enabled) and the cached file deleted.</p>
<p>To force the Magento scheduler to run navigate to <strong>http://www.yourwebshop.com/cron.php</strong>. Check your Twitter and Facebook pages to confirm the marketing post has been submitted. Any errors that occur during this process will be emailed to the default store email address if you set email alerts enabled to <em>YES</em> in the configuration.</p>
<figure id="attachment_556" aria-describedby="caption-attachment-556" style="width: 440px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-medium wp-image-556" title="Magento Social Media Marketing - example product tweet" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-4-440x70.jpg" alt="Magento Social Media Marketing - example product tweet" width="440" height="70" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-4-440x70.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-4.jpg 533w" sizes="(max-width: 440px) 100vw, 440px" /><figcaption id="caption-attachment-556" class="wp-caption-text">example product tweet</figcaption></figure>
<h1></h1>
<h1><strong><strong><strong><strong>ENABLE MAGENTO SCHEDULING</strong></strong></strong></strong></h1>
<p>Magento uses a single file named <strong>cron.php</strong> to execute all its scheduled tasks –  cron.php should be executed regularly to allow configured background tasks in Magento to run and is also used by this module to check for marketing information to post. For example to run cron.php every 5 minutes add the following or similar to your crontab (crontab -e):</p>
<p><em>*/5 * * * * /usr/bin/php -f  /PATH-TO-MAGENTO/cron.php</em></p>
<p>Alternatively for testing you can execute cron.php from your browser by browsing to</p>
<p><em>http://www.yourstore.com/cron.php</em></p>
<p>&nbsp;</p>
<h1><strong><strong>TWITTER Configuration<br />
</strong></strong></h1>
<p>Folow the steps below to create a Twitter application that will be used by the module to access your Twitter account and post product marketing Tweets.</p>
<p>1. If you do not already have a Twitter account, create an account at <a href="http://www.tiwtter.com">http://www.tiwtter.com</a></p>
<p>2. Go to <a href="https://dev.twitter.com/">https://dev.twitter.com/</a> and login with your Twitter credentials.</p>
<p>3. Click the Create an App link.</p>
<p>4. Complete the first page of the application form with your application name, description and website address. A Callback URL is not required. Click the &#8220;Create your twitter app&#8221; button to continue.</p>
<figure id="attachment_552" aria-describedby="caption-attachment-552" style="width: 440px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-medium wp-image-552" title="Magento Social Media Marketing - configure a twitter application" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-1-440x271.jpg" alt="Magento Social Media Marketing - configure a twitter application" width="440" height="271" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-1-440x271.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-1-620x382.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-1.jpg 981w" sizes="(max-width: 440px) 100vw, 440px" /><figcaption id="caption-attachment-552" class="wp-caption-text">configure a twitter application</figcaption></figure>
<p>&nbsp;</p>
<p>5. Goto the application settings tab and ensure your application is set to <strong>Read and Write</strong> and click Update Setting to continue.</p>
<figure id="attachment_553" aria-describedby="caption-attachment-553" style="width: 440px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-medium wp-image-553" title="Magento Social Media Marketing - configure a twitter application" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-2-440x151.jpg" alt="Magento Social Media Marketing - configure a twitter application" width="440" height="151" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-2-440x151.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-2-620x213.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-2.jpg 637w" sizes="(max-width: 440px) 100vw, 440px" /><figcaption id="caption-attachment-553" class="wp-caption-text">ensure the application has read write access</figcaption></figure>
<p>&nbsp;</p>
<p>6. Click on the details tab and scroll down to the Create my access Token button, click it to create access tokens for the application. You will see the four main authentication tokens listed CONSUMER KEY, CONSUMER SECRET, ACCESS TOKEN and ACCESS TOKEN SECRET. Ensure that the access tokens have READ and WRITE access.</p>
<p>7. Copy each authentication token into the configuration settings of the module and click save.</p>
<p>If you do not want to use Bit.ly to shorten URLs in the marketing tweets you have the option of enabling t.co shortlinks in the application settings and you can disable Bit.ly in the extension settings.</p>
<p>You can confirm your application is enabled and has access to your Twitter account by going to account settings -&gt; applications in Twitter.</p>
<figure id="attachment_554" aria-describedby="caption-attachment-554" style="width: 440px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-medium wp-image-554" title="Magento Social Media Marketing - configure a twitter application" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-3-440x95.jpg" alt="Magento Social Media Marketing - configure a twitter application" width="440" height="95" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-3-440x95.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-3-620x134.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-3.jpg 633w" sizes="(max-width: 440px) 100vw, 440px" /><figcaption id="caption-attachment-554" class="wp-caption-text">confirm application is enabled</figcaption></figure>
<h1></h1>
<h1>FACEBOOK CONFIGURATION</h1>
<p>Login to Facebook and then browse to</p>
<p><a href="http://developers.facebook.com/">http://developers.facebook.com/</a></p>
<p>Create an application that will be used to post marketing information to your Facebook page, this can be a normal profile page or a Business/Fan page. When complete note the application ID and application secret.</p>
<p>The application must be authorised for your Facebook page to work.</p>
<p>To authorise the application for your page edit the following URL and paste to your browser, replaceing YOURAPIKEY and YOURPAGEID..</p>
<p>facebook.com/connect/prompt_permissions.php?api_key=YOURAPIKEY&amp;v=1.0&amp;next=http://www.facebook.com/connect/login_success.html?xxRESULTTOKENxx&amp;display=popup&amp;ext_perm=publish_stream&amp;enable_profile_selector=1&amp;profile_selector_ids=YOURPAGEID</p>
<h1></h1>
<h1>BIT.LY CONFIGURATION</h1>
<p>To create a Bit.ly account goto <a href="http://bit.ly">http://bit.ly</a> and register an account. Once registered obtain your API key by clicking on Account -&gt; Settings. Configure your bit.ly username and API key in the configuration settings of the extension and save them.Bit.ly is enabled by default in the extension, If you do not want to use bit.ly you can disable it in the configuration settings.</p>
<p>&nbsp;</p>
<p><strong><strong><br />
</strong></strong></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/magento-automated-social-media-marketing/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Use a Magento Coupon for a Free Gift &#8211; Coupon X Get Y Free</title>
		<link>https://blog.gaiterjones.com/use-a-magento-coupon-for-a-free-gift-coupon-x-get-y-free/</link>
					<comments>https://blog.gaiterjones.com/use-a-magento-coupon-for-a-free-gift-coupon-x-get-y-free/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Wed, 20 Jul 2011 14:45:04 +0000</pubDate>
				<category><![CDATA[Coupon]]></category>
		<category><![CDATA[Free Magento Extensions]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Free Gift]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=492</guid>

					<description><![CDATA[My BuyXGetYFree Magento extension has been updated with the ability to use any Magento coupon code to qualify for a free gift. Simply configure a coupon as usual in Magento,...<a class="more-link" href="https://blog.gaiterjones.com/use-a-magento-coupon-for-a-free-gift-coupon-x-get-y-free/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>My <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>Magento extension has been updated with the ability to use any Magento coupon code to qualify for a free gift.</p>
<p>Simply configure a coupon as usual in Magento, set the coupon name i.e. &#8220;MYCOUPON1&#8221; but do not configure any coupon discount information. Then configure the name of the coupon in the Coupon section of the extension, and the ID of the free product, product Y. You should create a new or duplicate an existing product to create a unique product ID for your free gift.</p>
<p>When the customer enters the coupon code, the free product is added to the cart.</p>
<figure id="attachment_493" aria-describedby="caption-attachment-493" style="width: 440px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/07/couponx1.jpg"><img loading="lazy" decoding="async" class="hang-1-column       " title="Use a Magento coupon for a free gift promotion" src="https://blog.gaiterjones.com/wp-content/uploads/2011/07/couponx1-440x254.jpg" alt="Use a Magento coupon for a free gift promotion" width="440" height="254" /></a><figcaption id="caption-attachment-493" class="wp-caption-text">Use a Magento coupon for a free gift promotion</figcaption></figure>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>See the <a title="FREE Magento Extension Buy One Get One Free" href="https://blog.gaiterjones.com/free-magento-extension-buy-one-get-one-free-discounted/">full extension page post</a> for more information and to download. Thanks to Darren for the idea!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/use-a-magento-coupon-for-a-free-gift-coupon-x-get-y-free/feed/</wfw:commentRss>
			<slash:comments>33</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>
		<item>
		<title>Automatic jQuery Translator for Magento</title>
		<link>https://blog.gaiterjones.com/automatic-google-jquery-translator-for-magento/</link>
					<comments>https://blog.gaiterjones.com/automatic-google-jquery-translator-for-magento/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Thu, 26 May 2011 10:21:57 +0000</pubDate>
				<category><![CDATA[Google Translation]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[translator]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=402</guid>

					<description><![CDATA[GOOGLE API DEPRECATED Google announced on the 26th of May 2011 (the day I blogged about this solution!) that the translation API used by the jQuery plugin is now deprecated and will...<a class="more-link" href="https://blog.gaiterjones.com/automatic-google-jquery-translator-for-magento/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<h1>GOOGLE API DEPRECATED</h1>
<p>Google <a href="http://code.google.com/apis/language/translate/overview.html">announced on the 26th of May 2011</a> (the day I blogged about this solution!) that the translation API used by the jQuery plugin is now <em><strong>deprecated </strong></em>and will be <em>shut off completely </em>in December 2011. The author of the jQuery plugin will develop it to use the <a href="http://msdn.microsoft.com/en-us/library/ff512404.aspx">Microsoft translation API</a>. Google are shutting down the API due to &#8220;extensive abuse&#8221; and recommend using the <a title="Magento Google Element Translation Tool Implementation in 5 Minutes" href="https://blog.gaiterjones.com/magento-google-translation-tool-implementation/">Google Translate Element</a>. Whether the Microsoft translation service will be as good as Google we will need to wait and see. The author of the plugin <a href="http://code.google.com/p/jquery-translate/issues/detail?id=70">comments </a>&#8220;&#8230; <em>the Microsoft API provides a method for array translation (just as Google&#8217;s v2 API), which eliminates almost all bugs with this plugin, and will make it a bit faster too. The quality of the translation is not any worse I think, so there&#8217;s <span style="text-decoration: underline;">nothing to worry about.</span></em>&#8221; If you want to implement this solution bear in mind that changes to the plugin will take place at some point and the Google API will certainly stop working in December 2011.</p>
<p>&nbsp;</p>
<h1>Automatic jQuery Translator for Magento</h1>
<p>Having looked at integrating the <a title="Magento Google Element Translation Tool Implementation in 5 Minutes" href="https://blog.gaiterjones.com/magento-google-translation-tool-implementation/">Google element translation tool</a> into Magento to provide a <em>quick fix</em> content translation service I wanted to improve this tool by automatically translating content based on visitor browser language without the visitor having to manually select a language on every page.  <img loading="lazy" decoding="async" class="hang-1-column        alignnone" title="Automatic Google jQuery Translator for Magento" src="https://blog.gaiterjones.com/wp-content/uploads/2011/05/jquery-magento-translator.jpg" alt="Automatic Google jQuery Translator for Magento" width="348" height="158" /> Despite spending a lot of time looking at ways to manipulate the Google element translator code I couldn&#8217;t come up with a good solution until I came across the<a href="http://code.google.com/p/jquery-translate/"> jQuery dynamic google translation plugin</a> which integrates the Google Ajax Language API to jQuery and provides a really flexible and powerful method of dynamically translating content.  Using jQuery and the jQuery translation plugin we can create an automatic language translation service for Magento that detects the visitors browser language and automatically translates every Magento page to that language when it is loaded, or alternatively does the same when a new language is manually selected from the language drop down selector.  This is quite an easy solution to implement but should be thoroughly tested on your development platform as it requires some changes to existing javascript libraries as well as the addition of new jQuery libraries and plugins.  I have included the new jQuery libraries and plugin files required to implement this solution in a <a href="https://blog.gaiterjones.com/dev/extension.php?id=eb4bee963f22f61f7c865960f1359b62">download which you can access here</a>. Download and extract the files, copy them to your Magento installation folder and then follow the instructions below to implement automatic jQuery Google translations in your Magento store.</p>
<p><span style="font-weight: bold; line-height: 15px; text-transform: uppercase;">jQUERY &amp; script.aculo.us<br />
</span>According to <a href="http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/javascript_related/how_to_use_jquery_1.2.6_lastest_with_prototype">this Magento blog post</a> jQuery should have no problems working with other javascript frameworks and should &#8220;<em>work out of the box</em>&#8221; with Magento but doesn&#8217;t due to a conflict with an older version of scriptaculous.The Magento conflict lies with the code in <em>effects.js</em> which we will upgrade to the latest <a href="http://script.aculo.us/downloads">version</a> (<strong>1.9.0</strong> as of <strong>December 23, 2010</strong>).</p>
<h1>jQuery, jQuery Translator plugin and UIBlock plugin</h1>
<p>The other libraries required are the <a href="http://jquery.com/">jQuery library</a> which provides the jQuery framework, the <a href="http://code.google.com/p/jquery-translate/">jQuery Translator plugin</a> which currently integrates with the Google API to do the translations and the <a href="http://jquery.malsup.com/block/">UIblock plugin</a> which I&#8217;ve used to provide a neat way of updating the user interface when translations are taking place. These are included in the <a href="https://blog.gaiterjones.com/dev/extension.php?id=eb4bee963f22f61f7c865960f1359b62">download package</a>.  After copying the new libraries across to the Magento /js folder we need to update the page layout XML in Magento so that the new libraries are loaded. Locate <em>page.xml</em> in the layout folder of your Magento stores theme and open it for editing.</p>
<h1>Installation</h1>
<p>First find the XML that loads the existing scriptaculous <em>effects.js</em> file and modify the line that loads the effects.js library and change it to load the new upgraded version as shown below. Double click the code box and use CTRL C to copy.</p>
<pre class="brush:xml"> &lt;action method="addJs"&gt;&lt;script&gt;scriptaculous/effects-1.9.js&lt;/script&gt;&lt;/action&gt;</pre>
<p>Next we need to add some new XML to tell Magento to use the new jQuery library and plugins, add the following three lines before the existing line of XML that loads the <em>prototype</em> library in page.xml</p>
<pre class="brush:xml">&lt;action method="addJs"&gt;&lt;script&gt;jquery/jquery-1.2.6.noConflict.min.js&lt;/script&gt;&lt;/action&gt;
&lt;action method="addJs"&gt;&lt;script&gt;jquery/jquery.translate-1.4.7.js&lt;/script&gt;&lt;/action&gt;
&lt;action method="addJs"&gt;&lt;script&gt;jquery/jquery.blockUI.js&lt;/script&gt;&lt;/action&gt;</pre>
<p>Save the modified page.xml file.  The dynamic translation jQuery code can be placed in the <em>footer.phtml</em> template file of your Magento theme so that it runs when the page is fully loaded, this file is usually located in the <em>template/page/html </em>folder of your theme. Locate the file, open it for editing and append the following code at the bottom:</p>
<pre class="brush:php">	&lt;?php
	/**
	 * Automatic jquery translator for Magento
	 * blog.gaiterjones.com
	 * v0.3
	 *
	 */
	?&gt;
	&lt;script type="text/javascript"&gt;
	//&lt;![CDATA[
	jQuery(function($){

			var defaultLang = '&lt;?php echo substr(Mage::app()-&gt;getLocale()-&gt;getDefaultLocale(), 0, 2) ?&gt;';

			$('#langSelect').change(function() {
				var pathname = window.location.pathname;
				window.location = pathname + '?translateTo=' + $('#langSelect').val();
				if ($('#langSelect').val() == defaultLang) {
					$.blockUI({
					message: '&lt;h1&gt;Language is being reset to default...&lt;/h1&gt;',
					timeout: 2000
					});
				}
			});

			function doTranslateTo( destLang ){
			$('body').translate(defaultLang, destLang, {
			  not: '.doTranslate',
              start:     function(){   $.blockUI({ message: '&lt;h1&gt;Translating, please wait...&lt;br /&gt;(' + defaultLang + ' &gt; ' + destLang + ')&lt;/h1&gt;' })   },
              complete:  function(){   $.unblockUI()  },
			  error:  	 function(){   $.growlUI('Translation Error', 'An error occured during translation...');   },
			  toggle: true
			});
	}

		&lt;?php

		$defaultLang=substr(Mage::app()-&gt;getLocale()-&gt;getDefaultLocale(), 0, 2); // default store language

		// determine browser langugage
		if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
			// get languages from server header and assign quality rating
			foreach (explode(",", strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE'])) as $accept) {
				if (preg_match("!([a-z-]+)(;q=([0-9.]+))?!", trim($accept), $found)) {
					$langs[] = $found[1];
					$quality[] = (isset($found[3]) ? (float) $found[3] : 1.0);
				}
			}
			// Order the codes by quality
			array_multisort($quality, SORT_NUMERIC, SORT_DESC, $langs);
			$browserLang=substr($langs[0],0,2);

		} else {
			$browserLang=$defaultLang;
		}

		$requestedLang=Mage::app()-&gt;getRequest()-&gt;getParam('translateTo');
		//$requestedLang=$_REQUEST["translateTo"];
		$storeCode=Mage::app()-&gt;getStore()-&gt;getCode(); // store code
		$cookieName=$storeCode. "-". $defaultLang. "-jquery-translateTo"; // derive cookie name

		echo "// defaultlang - ". $defaultLang. "\n";
		echo "// requestedLang - ". $requestedLang. "\n";
		echo "// browserLang - ". $browserLang. "\n";
		echo "// storeCode - ". $storeCode. "\n";
		echo "// cookieName - ". $cookieName. "\n";
		echo "// langfromcookie - ". Mage::getModel('core/cookie')-&gt;get($cookieName). "\n"; 

		if(!empty($requestedLang)) // check for language setting in REQUEST key
		{
			if (strtolower($requestedLang) !== strtolower($defaultLang)) { // translate if requested language != to store default
				if (!empty($requestedLang))
				{
					echo "// translating to requested language from url variable.\n";
					echo "doTranslateTo('". $requestedLang. "');\n"; // Translate and write cookie data
					Mage::getModel('core/cookie')-&gt;set($cookieName, $requestedLang, time()+36000);
				} else {
					echo "// Requested Language not detected.\n";
				}
			} else {
				Mage::getModel('core/cookie')-&gt;set($cookieName, strtolower($defaultLang), time()+36000); // set cookie i.e. keep default lang when default selected
				//Mage::getModel('core/cookie')-&gt;delete($cookieName); // remove cookie i.e. revert to browser lang when default selected

			}
		} else { // check for language data in cookie

			$langFromCookie = Mage::getModel('core/cookie')-&gt;get($cookieName); // read cookie

			if (!empty($langFromCookie))
			{
				if (strtolower($langFromCookie) !== strtolower($defaultLang)) { // translate if language data in cookie != to store default
					echo "// translating to requested language from cookie data.\n";
					echo "doTranslateTo('". $langFromCookie. "')\n";
				} else {
					echo "// cookie requesed language same as store default language - no translation required.\n";
				}
			} else { // no cookie	

				if (strtolower($browserLang) !== strtolower($defaultLang)) { // translate to browser language and set cookie
					if (!empty($browserLang))
					{
						echo "// setting language to browser language.\n";
						echo "doTranslateTo('". $browserLang. "');\n";
						Mage::getModel('core/cookie')-&gt;set($cookieName, strtolower($browserLang), time()+36000); // set cookie
					} else {
						echo "// Browser language not detected.\n";
					}
				} else {
					Mage::getModel('core/cookie')-&gt;set($cookieName, strtolower($browserLang), time()+36000); // set cookie
				}
			}
		}
		?&gt;			

	})
	//]]&gt;
	&lt;/script&gt;</pre>
<p>The code includes two jQuery functions, one that performs the jQuery automatic translation, and the other that monitors the language dropdown box used to manually change the page translation. The PHP code controls the automatic translation of pages based on the visitors browser language, using a cookie to store the visitors language which is subsequently used to translate every visited page to the browser language, or the language selected from the select Language dropdown box which is passed to the script via a URL request variable. Note that the code detects the default locale for the Magento store and uses this as the default language for translations.</p>
<p>To add the dropdown box, locate the <em>languages.phtml</em> file in the <em>template/page/switch</em> folder of your theme. Make a backup of the original file and then edit it to add the Language selector drop down box, replacing the contents of the file with the following code which includes all the languages supported by Google. This file is also included in the download package.</p>
<p>The language dropdown has been updated to show the current language as selected in the drop down list.</p>
<pre class="brush:php">&lt;?php
/**
 * Language switcher for jQuery Automatic Translator for Magento
 * blog.gaiterjones.com
 *
 */

$defaultLang=substr(Mage::app()-&gt;getLocale()-&gt;getDefaultLocale(), 0, 2); // default store language
$storeCode=Mage::app()-&gt;getStore()-&gt;getCode(); // store code
$cookieName=$storeCode. "-". $defaultLang. "-jquery-translateTo"; // derive cookie name
$langFromCookie = Mage::getModel('core/cookie')-&gt;get($cookieName); // read cookie
$requestedLang=Mage::app()-&gt;getRequest()-&gt;getParam('translateTo');

if (!empty($requestedLang))
{
	$languageSelected=$requestedLang;
} else {
	$languageSelected=$langFromCookie;
}

$languagesSelection =
		array(''=&gt;'Select Language',
				substr(Mage::app()-&gt;getLocale()-&gt;getDefaultLocale(), 0, 2)=&gt;'Default Language',
				'af'=&gt;'Afrikaans',
				'sq'=&gt;'Albanian',
				'ar'=&gt;'Arabic',
				'be'=&gt;'Belarusian',
				'bg'=&gt;'Bulgarian',
				'ca'=&gt;'Catalan',
				'zh-CN'=&gt;'Chinese (Simplified)',
				'zh-TW'=&gt;'Chinese (Traditional)',
				'hr'=&gt;'Croatian',
				'cs'=&gt;'Czech',
				'da'=&gt;'Danish',
				'nl'=&gt;'Dutch',
				'et'=&gt;'Estonian',
				'tl'=&gt;'Filipino',
				'fi'=&gt;'Finnish',
				'fr'=&gt;'French',
				'gl'=&gt;'Galician',
				'de'=&gt;'German',
				'el'=&gt;'Greek',
				'ht'=&gt;'Haitian Creole',
				'iw'=&gt;'Hebrew',
				'hi'=&gt;'Hindi',
				'hu'=&gt;'Hungarian',
				'is'=&gt;'Icelandic',
				'id'=&gt;'Indonesian',
				'ga'=&gt;'Irish',
				'it'=&gt;'Italian',
				'ja'=&gt;'Japanese',
				'ko'=&gt;'Korean',
				'lv'=&gt;'Latvian',
				'lt'=&gt;'Lithuanian',
				'mk'=&gt;'Macedonian',
				'ms'=&gt;'Malay',
				'mt'=&gt;'Maltese',
				'no'=&gt;'Norwegian',
				'fa'=&gt;'Persian',
				'pl'=&gt;'Polish',
				'pt'=&gt;'Portuguese',
				'ro'=&gt;'Romanian',
				'ru'=&gt;'Russian',
				'sr'=&gt;'Serbian',
				'sk'=&gt;'Slovak',
				'sl'=&gt;'Slovenian',
				'es'=&gt;'Spanish',
				'sw'=&gt;'Swahili',
				'sv'=&gt;'Swedish',
				'th'=&gt;'Thai',
				'tr'=&gt;'Turkish',
				'uk'=&gt;'Ukrainian',
				'vi'=&gt;'Vietnamese',
				'cy'=&gt;'Welsh',
				'yi'=&gt;'Yiddish');
?&gt;
&lt;div class="form-language"&gt;
	&lt;div class="language-switcher"&gt;
		&lt;select id="langSelect" &gt;
&lt;?php
	foreach($languagesSelection as $langCode=&gt;$LangName)
	{
		if ($languageSelected === $langCode)
		{
			echo '&lt;option selected value="'. $langCode. '"&gt;'. $LangName. '&lt;/option&gt;';
		} else {
			echo '&lt;option value="'. $langCode. '"&gt;'.$LangName. '&lt;/option&gt;';
		}
	}
?&gt;
		&lt;/select&gt;
	&lt;/div&gt;
&lt;/div&gt;</pre>
<p>Save the file and refresh the Magento cache to load the new jQuery libraries and modified template files.</p>
<h1>Testing</h1>
<p>Now refresh your Magento front end and you should see the new language dropdown selector in the header of your page. This is where it appears in the default theme.</p>
<figure id="attachment_405" aria-describedby="caption-attachment-405" style="width: 345px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="hang-1-column        " title="Automatic Google jQuery Translator for Magento" src="https://blog.gaiterjones.com/wp-content/uploads/2011/05/jquery-magento-translator1.jpg" alt="Automatic Google jQuery Translator for Magento" width="345" height="373" /><figcaption id="caption-attachment-405" class="wp-caption-text">Drop down language selector</figcaption></figure>
<p>If your browser language differs from your stores default language then the page should automatically translate. If your browser language is the same as your stores, then perform a manual translation by selecting a language from the select language box. You will notice that a new request variable is appended to the site URL which triggers the dynamic translation. Navigate to other pages which should also become dynamically translated as the code reads the selected language from the cookie file. To turn off the automatic translation select the stores default language from the drop down, or select the second &#8220;default&#8221; option from the language dropdown list.</p>
<figure id="attachment_406" aria-describedby="caption-attachment-406" style="width: 496px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="hang-1-column        " title="Automatic Google jQuery Translator for Magento" src="https://blog.gaiterjones.com/wp-content/uploads/2011/05/jquery-magento-translator2-620x351.jpg" alt="Automatic Google jQuery Translator for Magento" width="496" height="281" /><figcaption id="caption-attachment-406" class="wp-caption-text">User interface is updated during translation using the UIBlock jQuery plugin.</figcaption></figure>
<figure id="attachment_407" aria-describedby="caption-attachment-407" style="width: 620px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/05/jquery-magento-translator3.jpg"><img loading="lazy" decoding="async" class="hang-2-column          " title="Automatic jQuery Google Translation for Magento" src="https://blog.gaiterjones.com/wp-content/uploads/2011/05/jquery-magento-translator3-620x158.jpg" alt="Automatic jQuery Google Translation for Magento" width="620" height="158" /></a><figcaption id="caption-attachment-407" class="wp-caption-text">Manual language selection is passed as a URL request variable and stored as a cookie.</figcaption></figure>
<p>To manually link to a specific language for your site, specifiy the translation request variable in the URL with the two letter language code as shown above. i.e. for a German translation use <strong>http://www.webshop.com/?translateTo=de</strong></p>
<figure id="attachment_423" aria-describedby="caption-attachment-423" style="width: 503px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/05/jquery-magento-translator4.jpg"><img loading="lazy" decoding="async" class="hang-1-column         " title="Automatic jQuery Google Translation for Magento" src="https://blog.gaiterjones.com/wp-content/uploads/2011/05/jquery-magento-translator4.jpg" alt="Automatic jQuery Google Translation for Magento" width="503" height="231" /></a><figcaption id="caption-attachment-423" class="wp-caption-text">Returning to default language turns automatic translations off.</figcaption></figure>
<p>Tested with Magento community editions v1.3.x and 1.5.x  Please provide feedback if you experience any problems, have successfully implemented this solution or if you have any other ideas for further development.</p>
<h1>Resources used in creating this solution</h1>
<p><a href="http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/javascript_related/how_to_use_jquery_1.2.6_lastest_with_prototype">http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/javascript_related/how_to_use_jquery_1.2.6_lastest_with_prototype</a></p>
<p lang="de">h<a href="http://code.google.com/p/jquery-translate/">ttp://code.google.com/p/jquery-translate/</a></p>
<p lang="de"><a href="http://jquery.malsup.com/block/">http://jquery.malsup.com/block/</a></p>
<p lang="de"><a href="http://jsbin.com/ozenu/1007/edit">http://jsbin.com/ozenu/1007/edit</a></p>
<h1 lang="de">Update Links</h1>
<p><a href="http://code.google.com/apis/language/translate/overview.html">http://code.google.com/apis/language/translate/overview.html</a></p>
<p>http://msdn.microsoft.com/en-us/library/ff512404.aspx</p>
<p>&nbsp;</p>
<p lang="de">&nbsp;</p>
<p lang="de">Blogged in <a href="http://www.kempinski.com/de/berlinadlon/Seiten/Welcome.aspx">Berlin</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/automatic-google-jquery-translator-for-magento/feed/</wfw:commentRss>
			<slash:comments>46</slash:comments>
		
		
			</item>
		<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 loading="lazy" 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 loading="lazy" 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>
	</channel>
</rss>
