<?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>My Quick Fix</title>
	<atom:link href="http://myquickfix.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://myquickfix.co.uk</link>
	<description>Quick fixes for little problems...</description>
	<lastBuildDate>Thu, 16 Feb 2012 14:57:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>phpMyAdmin Fatal Error with imageftbbox() after clicking &#8216;Profiling&#8217; checkbox</title>
		<link>http://myquickfix.co.uk/2012/02/phpmyadmin-fatal-error-with-imageftbbox-after-clicking-profiling-checkbox/</link>
		<comments>http://myquickfix.co.uk/2012/02/phpmyadmin-fatal-error-with-imageftbbox-after-clicking-profiling-checkbox/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 14:56:23 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=227</guid>
		<description><![CDATA[Problem: I accidentally clicked the &#8216;Profiling&#8217; textbox in the Browse view of phpMyAdmin (see image below) and it immediately redirected the page and spat the following error: Fatal error: Call to undefined function imageftbbox&#40;&#41; in /Users/&#91;whatever&#93;/Sites/phpmyadmin/libraries/chart/pChart/pChart.class on line 1118 From that point forward PMA was useless in any browse view. Reinstallation didn&#8217;t fix it either. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I accidentally clicked the &#8216;Profiling&#8217; textbox in the Browse view of phpMyAdmin (see image below) and it immediately redirected the page and spat the following error:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Fatal error<span style="color: #339933;">:</span> Call to undefined <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #990000;">imageftbbox</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> in <span style="color: #339933;">/</span>Users<span style="color: #339933;">/</span><span style="color: #009900;">&#91;</span>whatever<span style="color: #009900;">&#93;</span><span style="color: #339933;">/</span>Sites<span style="color: #339933;">/</span>phpmyadmin<span style="color: #339933;">/</span>libraries<span style="color: #339933;">/</span>chart<span style="color: #339933;">/</span>pChart<span style="color: #339933;">/</span>pChart<span style="color: #339933;">.</span><span style="color: #000000; font-weight: bold;">class</span> on line <span style="color: #cc66cc;">1118</span></pre></div></div>

<p>From that point forward PMA was useless in any browse view. Reinstallation didn&#8217;t fix it either. The problem occurred because my PHP installation wasn&#8217;t compiled with Freetype support. Great&#8230; I don&#8217;t even want that, I just want PMA to work about in 5 mins time.<br />
<img class="alignnone size-full wp-image-230" style="border: 1px solid #999;" title="pma-profile-1" src="http://myquickfix.co.uk/wp-content/uploads/2012/02/pma-profile-1.png" alt="PhpMyAdmin profiling checkbox" width="230" height="100" /></p>
<p><strong>Fix:</strong> Turns out that clicking the box saves some data in a session cookie. Deleting the cookie named phpMyAdmin fixed the problem for me. If you use Firefox, Chrome or Safari this is easily done in Developer Tools / Element Inspector. If you use IE, get off my site!</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/02/phpmyadmin-fatal-error-with-imageftbbox-after-clicking-profiling-checkbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fabia 1 vRS windscreen wipers and not working as expected&#8230;</title>
		<link>http://myquickfix.co.uk/2012/02/fabia-1-vrs-windscreen-wipers-and-not-working-as-expected/</link>
		<comments>http://myquickfix.co.uk/2012/02/fabia-1-vrs-windscreen-wipers-and-not-working-as-expected/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 16:11:06 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Skoda Fabia vRS]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=225</guid>
		<description><![CDATA[Problem: My front windscreen wipers stopped working yesterday. Oddly when trying to use the momentary front windscreen wash, the REAR wiper worked. Fix: Replace fuse 21.. simple but effective.]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> My front windscreen wipers stopped working yesterday. Oddly when trying to use the momentary front windscreen wash, the REAR wiper worked.</p>
<p><strong>Fix:</strong> Replace fuse 21.. simple but effective.</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/02/fabia-1-vrs-windscreen-wipers-and-not-working-as-expected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove Links menu item in WordPress</title>
		<link>http://myquickfix.co.uk/2012/01/remove-links-menu-item-in-wordpress/</link>
		<comments>http://myquickfix.co.uk/2012/01/remove-links-menu-item-in-wordpress/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 11:45:43 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=220</guid>
		<description><![CDATA[Problem: I&#8217;m customising a WP install for a client, adding some Custom Post Types and wotnot, and they aren&#8217;t going to have any need for the Links thing. Fix: Adding this to your theme&#8217;s (or child-theme&#8217;s) functions.php removes the page and the menu link: function nuke_menu_items&#40;&#41;&#123; remove_menu_page&#40; 'link-manager.php'&#41;; //remove_menu_page( 'upload.php'); //remove other items etc etc [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I&#8217;m customising a WP install for a client, adding some Custom Post Types and wotnot, and they aren&#8217;t going to have any need for the Links thing.</p>
<p><strong>Fix:</strong> Adding this to your theme&#8217;s (or child-theme&#8217;s) functions.php removes the page and the menu link:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> nuke_menu_items<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
remove_menu_page<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'link-manager.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//remove_menu_page( 'upload.php'); //remove other items etc etc</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'nuke_menu_items'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">999</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/01/remove-links-menu-item-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cheap &amp; simple fix for a leaking fermenting bin (homebrew)</title>
		<link>http://myquickfix.co.uk/2012/01/cheap-simple-fix-for-a-leaking-fermenting-bin-homebrew/</link>
		<comments>http://myquickfix.co.uk/2012/01/cheap-simple-fix-for-a-leaking-fermenting-bin-homebrew/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 16:50:02 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Home Brewing]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=218</guid>
		<description><![CDATA[Problem: I&#8217;ve just put a brew on using some cheap equipment from an online retailer. The lid of the fermenting bin is loose fitting so the beer is gassing around the lid or through the airlock grommet and not through the airlock / bubbler itself. This is not really a problem while the Krausen is [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I&#8217;ve just put a brew on using some cheap equipment from an online retailer. The lid of the fermenting bin is loose fitting so the beer is gassing around the lid or through the airlock grommet and not through the airlock / bubbler itself. This is not really a problem while the <a href="http://en.wikipedia.org/wiki/Krausen" title="Krausen Wikipedia article">Krausen</a> is building and lots of gas is being produced, but can be a problem when things slow down, and air gets in. </p>
<p><strong>Lid Fix:</strong> The loose lid can be fixed by liberally applying <a href="http://en.wikipedia.org/wiki/Petroleum_jelly" title="Petroleum Jelly wikipedia article">Petroleum Jelly</a> around the lid. Vaseline the company make Petroleum jelly readily available in chemists and supermarkets, and it&#8217;s commonly used on babies apparently for some reason or other (no idea).</p>
<p><strong>Baggy Grommet Fix:</strong> Place some PVC tape around the bottom tube of the airlock where it passes through the grommet. Use about 5-8CM of tape to start with, wrapped on in a cone moving towards the top of the trap so that it gets thicker. Then when the trap is re-inserted into the grommet, it will expand the rubber more and make a better seal.</p>
<p><strong>Note:</strong> This has only been a problem with cheap kit that uses rubber grommets and press on lids. Better fermenting bins have screw tops and large rubber bungs to place the airtrap in.</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/01/cheap-simple-fix-for-a-leaking-fermenting-bin-homebrew/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Searching between dates in GMail</title>
		<link>http://myquickfix.co.uk/2012/01/searching-between-dates-in-gmail/</link>
		<comments>http://myquickfix.co.uk/2012/01/searching-between-dates-in-gmail/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 10:36:01 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Google Apps]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=213</guid>
		<description><![CDATA[Problem: I&#8217;m doing my tax return And need to frequently look for emails sent and received in the 2010/11 tax year. Fix: Gmail is really powerful when the text search box is used. There are various advanced search operators but the ones that help here are &#8216;before:&#8217; and &#8216;after:&#8217;. When twinned with &#8216;from:&#8217; or &#8216;to:&#8217; it returns [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I&#8217;m doing my tax return <img src='http://myquickfix.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  And need to frequently look for emails sent and received in the 2010/11 tax year.</p>
<p><strong>Fix:</strong> Gmail is really powerful when the text search box is used. There are various advanced search operators but the ones that help here are &#8216;before:&#8217; and &#8216;after:&#8217;. When twinned with &#8216;from:&#8217; or &#8216;to:&#8217; it returns exactly what you want.</p>
<p><strong>Examples:</strong><br />
A certain date range:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">after:2010/03/31 before:2011/04/01</pre></div></div>

<p>The phrase &#8220;invoice&#8221; in a certain date range:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">after:2010/03/31 before:2011/04/01 invoice</pre></div></div>

<p>From an individual in a range:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">after:2010/03/31 before:2011/04/01 from:wave@thesea.com</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/01/searching-between-dates-in-gmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding category depth tag to Shopp 1.1.*</title>
		<link>http://myquickfix.co.uk/2012/01/adding-category-depth-tag-to-shopp-1-1/</link>
		<comments>http://myquickfix.co.uk/2012/01/adding-category-depth-tag-to-shopp-1-1/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 17:14:08 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Shopp Plugin]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=206</guid>
		<description><![CDATA[Problem: I needed to display sub categories of a category in category.php but only one level deep. Using: &#60;?php if&#40;shopp&#40;'category','hascategories'&#41;&#41;: ?&#62; &#60;?php while&#40;shopp&#40;'category','subcategories'&#41;&#41;: ?&#62; //display stuff &#60;?php endwhile; ?&#62; &#60;?php endif; ?&#62; &#8230;displays all subcast AND their subcats. Fix: I decided to add a new tag, called shopp(&#8216;subcategory&#8217;, &#8216;depth&#8217;) that would return the category depth. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I needed to display sub categories of a category in category.php but only one level deep. Using:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'hascategories'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'subcategories'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    //display stuff
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>&#8230;displays all subcast AND their subcats.</p>
<p><strong>Fix:</strong> I decided to add a new tag, called shopp(&#8216;subcategory&#8217;, &#8216;depth&#8217;) that would return the category depth. That way in the loop above this would show only immediate children:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'hascategories'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'subcategories'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
    <span style="color: #000088;">$depth</span> <span style="color: #339933;">=</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'depth'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'return=true'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$depth</span><span style="color: #339933;">!=</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
      <span style="color: #b1b100;">continue</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   //else display stuff
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>Adding the new tag:</strong> Open the theme&#8217;s functions.php file and add this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'shopp_tag_category_depth'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'return_cat_depth'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'shopp_tag_subcategory_depth'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'return_cat_depth'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> return_cat_depth<span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">,</span> <span style="color: #000088;">$options</span><span style="color: #339933;">,</span> <span style="color: #000088;">$Category</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #b1b100;">return</span> <span style="color: #000088;">$Category</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">depth</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>&#8230;once that&#8217;s added, shopp(&#8216;subcategory&#8217;, &#8216;depth&#8217;) can be used anywhere in the Shopp templates.</p>
<p><strong>Note:</strong> In Shopp 1.2 the hook is created differently. Thanks to Jon Davies for pointing out that the hook would now be shopp_themeapi_{object name}_{property} and defined in defined in shopp/api/theme.php.</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/01/adding-category-depth-tag-to-shopp-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting subcategory totals [shopp(&#039;subcategory&#039;,&#039;total&#039;)] to work in Shopp Plugin 1.1.*</title>
		<link>http://myquickfix.co.uk/2012/01/getting-subcategory-totals-working-in-shopp/</link>
		<comments>http://myquickfix.co.uk/2012/01/getting-subcategory-totals-working-in-shopp/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 17:01:53 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Shopp Plugin]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=201</guid>
		<description><![CDATA[Problem: Pulling the total number of products from a subcat in Shopp doesn&#8217;t seem to work out the box. For example, this code WON&#8217;T return the total even though the correct tag shopp(&#8216;subcategory&#8217;,'total&#8217;) is used: &#60;?php while&#40;shopp&#40;'category','subcategories'&#41;&#41;: ?&#62; &#60;?php shopp&#40;'subcategory','name'&#41;; ?&#62; (&#60;?php shopp&#40;'subcategory','total'&#41;; ?&#62;) &#60;?php endwhile; ?&#62; Fix: For the products to be countable, the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> Pulling the total number of products from a subcat in Shopp doesn&#8217;t seem to work out the box. For example, this code WON&#8217;T return the total even though the correct tag <a href="http://docs.shopplugin.net/Category_Tags#total">shopp(&#8216;subcategory&#8217;,'total&#8217;)</a> is used:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'subcategories'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> (<span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'total'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>)
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>Fix:</strong> For the products to be countable, the &#8216;<a href="http://docs.shopplugin.net/Category_Tags#has-products">hasproducts</a>&#8216; tag has to be called with the &#8216;load&#8217; option like so:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'subcategories'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'hasproducts'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'load=prices,images'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> (<span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'total'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>)
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>Note:</strong> The docs refer to &#8216;category&#8217; tags. Each category tag has an ideantical subcategory tag. For example <?php shopp('category','name'); ?> and <?php shopp('subcategory','name'); ?> both work when used in the correct context.</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/01/getting-subcategory-totals-working-in-shopp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove prices from Variation drop-downs in Shopp WordPress plugin</title>
		<link>http://myquickfix.co.uk/2011/12/remove-prices-from-variation-drop-downs-in-shopp-wordpress-plugin/</link>
		<comments>http://myquickfix.co.uk/2011/12/remove-prices-from-variation-drop-downs-in-shopp-wordpress-plugin/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 18:56:03 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Shopp Plugin]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=194</guid>
		<description><![CDATA[Problem: In Shopp (1.1.9) the default variations drop-down list shows prices. This isn&#8217;t always desired. This is the default usage: &#60;ul class=&#34;variations&#34;&#62; &#60;?php shopp&#40;'product', 'variations', 'mode=multiple&#38;label=true&#38;defaults=Select an option&#38;before_menu=&#60;li&#62;&#38;after_menu=&#60;/li&#62;'&#41;; ?&#62; &#60;/ul&#62; And this outputs a list that shows options as &#8220;Option Label (price)&#8221;. Fix: The code above can be replaced with this code to manually create [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> In Shopp (1.1.9) the default variations drop-down list shows prices. This isn&#8217;t always desired. This is the default usage:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;ul class=&quot;variations&quot;&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'product'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'variations'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'mode=multiple&amp;label=true&amp;defaults=Select an option&amp;before_menu=&lt;li&gt;&amp;after_menu=&lt;/li&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></div></div>

<p>And this outputs a list that shows options as &#8220;Option Label (price)&#8221;.</p>
<p><strong>Fix:</strong> The code above can be replaced with this code to manually create the same thing, giving complete control over output:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;ul class=&quot;variations&quot;&gt;
    &lt;li&gt;
    &lt;label for=&quot;options-1&quot;&gt;Quantity&lt;/label&gt;
    &lt;select name=&quot;products[<span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'product'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>][options][]&quot; class=&quot;category-catalog product<span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'product'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> options&quot; id=&quot;options-1&quot;&gt;
    &lt;option value=&quot;&quot;&gt;Select an option&lt;/option&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
        <span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'product'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'variations'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        &lt;option value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'product'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'variation'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'label'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/option&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/select&gt;
    &lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

<p>The $i;$i++ was a bit of a work-around as I couldn&#8217;t get it to work with variation ID, so if you know a better way, please tell us below!</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2011/12/remove-prices-from-variation-drop-downs-in-shopp-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Capture last viewed category in product view in Shopp Plugin for WordPress</title>
		<link>http://myquickfix.co.uk/2011/11/capture-last-viewed-category-in-product-view-in-shopp-plugin-for-wordpress/</link>
		<comments>http://myquickfix.co.uk/2011/11/capture-last-viewed-category-in-product-view-in-shopp-plugin-for-wordpress/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 20:38:51 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Shopp Plugin]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=190</guid>
		<description><![CDATA[Problem: I&#8217;m using the Shopp 1.1.9 ecommerce plugin for WordPress, and my client wanted to display specific background images while showing certain products. Shopp is very complete, but one thing that is missing in the current version &#8216;out of the box&#8217; is the ability to pull the &#8216;last viewed&#8217; category name when viewing a product. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I&#8217;m using the <a href="https://shopplugin.net/" title="Shopp Plugin homepage" target="_blank">Shopp 1.1.9</a> ecommerce plugin for WordPress, and my client wanted to display specific background images while showing certain products. Shopp is very complete, but one thing that is missing in the current version &#8216;out of the box&#8217; is the ability to pull the &#8216;last viewed&#8217; category name when viewing a product. Obviously a product can belong to more than one cat, so it can&#8217;t know which one to display&#8230;</p>
<p><strong>Fix:</strong> There is however a breadcrumb template tag that stores the category name that a user us currently viewing, so that if they then click on a product, the hierarchical parent category can be displayed in the breadcrumb.</p>
<p>This functionality can be used in a new custom tag. Jon Davis the lead developer of Shopp helped me a lot today as I was barking up the wrong tree going about it the wrong way.</p>
<p>Add this to your theme&#8217;s functions.php:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'shopp_tag_catalog_lastcat'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'get_last_cat'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> get_last_cat <span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">,</span><span style="color: #000088;">$options</span><span style="color: #339933;">,</span><span style="color: #000088;">$Object</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$Storefront</span> <span style="color: #339933;">=</span> ShoppStorefront<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">===</span> <span style="color: #000088;">$Storefront</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$category</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$Storefront</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">breadcrumb</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$category</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Then anywhere in your Shopp templates you can do this to return the category part of the current breadcrumb e.g &#8220;Smalls&#8221; in Home > Smalls > Purple Pants :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//echo it out straight away..</span>
shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'lastcat'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// return it for use..</span>
<span style="color: #000088;">$lastcat</span> <span style="color: #339933;">=</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'lastcat'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'return=true'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Hope that helps someone, props go to JD for getting it working!</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2011/11/capture-last-viewed-category-in-product-view-in-shopp-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Notice: unserialize() [function.unserialize]: Error at offset then?</title>
		<link>http://myquickfix.co.uk/2011/11/what-is-notice-unserialize-function-unserialize-error-at-offset-then/</link>
		<comments>http://myquickfix.co.uk/2011/11/what-is-notice-unserialize-function-unserialize-error-at-offset-then/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 19:59:22 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=188</guid>
		<description><![CDATA[Problem: While doing some Shopp Plugin support work earlier, one customer was getting this error&#8230; Notice: unserialize() [function.unserialize]: Error at offset 111 of 118 bytes in /home/maxwell4/public_html/main/wp-content/plugins/shopp/core/model/Settings.php on line 228 &#8230;she had done a &#8216;find and replace&#8217; in a SQL DB dump to change her domain name, boogered it up accidentally, and needed an explanation. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> While doing some <a href="http://shopplugin.net" title="Shopp WordPress Plugin homepage " target="_blank">Shopp Plugin</a> support work earlier, one customer was getting this error&#8230;</p>
<p><em>Notice: unserialize() [function.unserialize]: Error at offset 111 of 118 bytes in /home/maxwell4/public_html/main/wp-content/plugins/shopp/core/model/Settings.php on line 228</em></p>
<p>&#8230;she had done a &#8216;find and replace&#8217; in a SQL DB dump to change her domain name, boogered it up accidentally, and needed an explanation. The answer I gave applies any time that error occurs in PHP, so i thought it was worth posting here!</p>
<p><strong>Reason:</strong> Arrays are often <a href="http://php.net/manual/en/function.serialize.php" title="PHP Serialize function docs" target="_blank">serialized</a> so that they can be stored in a database text field. If you change the data within a serialized array, without changing the character count, you will get the error above.</p>
<p>For example, try this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$thing</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'one'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'two'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #990000;">serialize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$thing</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>This will echo out the following: <em>a:2:{i:0;s:3:&#8221;one&#8221;;i:1;s:3:&#8221;two&#8221;;}</em><br />
Now&#8230; if you stored that in a database, you could then retrieve it later and <a href="http://www.php.net/manual/en/function.unserialize.php" title="PHP Unserialize function reference " target="_blank">unserialize()</a> it to get your array back. wohoo!</p>
<p>In that serialized data, s:3:&#8221;one&#8221; means that the first element in the array is a string, and that it&#8217;s 3 characters long. Now.. if you manually changed &#8220;one&#8221; to &#8220;otherone&#8221; like this a:2:{i:0;s:3:&#8221;otherone&#8221;;i:1;s:3:&#8221;two&#8221;;} then when you ran it through unserialize() to retrieve your array, you would get the error were talking about.</p>
<p><strong>Fix:</strong> To correct this you would need to update the string length also like so: a:2:{i:0;s:8:&#8221;otherone&#8221;;i:1;s:3:&#8221;two&#8221;;} because &#8220;otherone&#8221; is actually 8 characters long. See? Good!</p>
<p>Any questions, please leave a message below.</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2011/11/what-is-notice-unserialize-function-unserialize-error-at-offset-then/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

