<?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>James Kemp</title>
	<atom:link href="http://jckemp.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jckemp.com</link>
	<description>Magento, PHP &#38; WordPress Developer, UK</description>
	<lastBuildDate>Fri, 03 May 2013 15:54:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to Check if a Magento Category Exists by ID</title>
		<link>http://jckemp.com/notes/quick-tips/how-to-check-if-a-magento-category-exists-by-id/</link>
		<comments>http://jckemp.com/notes/quick-tips/how-to-check-if-a-magento-category-exists-by-id/#comments</comments>
		<pubDate>Wed, 03 Apr 2013 16:31:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://jckemp.com/?p=266</guid>
		<description><![CDATA[<p>I needed a quick and easy script to check if a category ID existed in Magento, and if it did I wanted to run some code using that categories data. For some reason Magento returns a category object when loaded by ID, even if that category doesn&#8217;t exist; I added a simple check to see [...]</p><p>The post <a href="http://jckemp.com/notes/quick-tips/how-to-check-if-a-magento-category-exists-by-id/">How to Check if a Magento Category Exists by ID</a> appeared first on <a href="http://jckemp.com">James Kemp</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I needed a quick and easy script to check if a category ID existed in Magento, and if it did I wanted to run some code using that categories data. For some reason Magento returns a category object when loaded by ID, even if that category doesn&#8217;t exist; I added a simple check to see if a URL path had been set, as I figured any category I&#8217;ve added will have this set.</p>
<h2>The Code</h2>
<pre class="brush: php; title: ; notranslate">$catid = 4;
$_category = Mage::getModel('catalog/category')-&gt;load($catid);

if($_category-&gt;getUrlPath() !== NULL) {

// Your code here

}</pre>
<p>The post <a href="http://jckemp.com/notes/quick-tips/how-to-check-if-a-magento-category-exists-by-id/">How to Check if a Magento Category Exists by ID</a> appeared first on <a href="http://jckemp.com">James Kemp</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jckemp.com/notes/quick-tips/how-to-check-if-a-magento-category-exists-by-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Import EventBrite User Events into WordPress</title>
		<link>http://jckemp.com/notes/scripts/import-eventbrite-user-events-into-wordpress/</link>
		<comments>http://jckemp.com/notes/scripts/import-eventbrite-user-events-into-wordpress/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 10:51:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://jckemp.com/?p=252</guid>
		<description><![CDATA[<p>I wrote a function for a project I was working on that allowed me to import EventBrite events from a particular user into WordPress. The function can be added to your functions.php and run using a transient or cron. There are a few settings towards the top of the function that you can update/manipulate. This [...]</p><p>The post <a href="http://jckemp.com/notes/scripts/import-eventbrite-user-events-into-wordpress/">Import EventBrite User Events into WordPress</a> appeared first on <a href="http://jckemp.com">James Kemp</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I wrote a function for a project I was working on that allowed me to import EventBrite events from a particular user into WordPress. The function can be added to your functions.php and run using a transient or cron. There are a few settings towards the top of the function that you can update/manipulate.</p>
<p>This particular script utilises custom fields created by <a title="Advanced Custom Fields" href="http://www.advancedcustomfields.com/" target="_blank">Advanced Custom Fields</a>. As such it isn&#8217;t a plug-and-play function, it will require some customisation, but it&#8217;s a good place to get started.</p>
<p>The data is saved to a post where you see the update_field function in use, for example:</p>
<pre class="brush: php; title: ; notranslate">update_field('field_63', $eventid, $existingid);</pre>
<h2>Download the Script</h2>
<p>Anyway, you can grab the script here: <a title="Import EventBrite Events into WordPress" href="https://bitbucket.org/jamesckemp/wordpress-import-eventbrite-events" target="_blank">https://bitbucket.org/jamesckemp/wordpress-import-eventbrite-events</a></p>
<p>The post <a href="http://jckemp.com/notes/scripts/import-eventbrite-user-events-into-wordpress/">Import EventBrite User Events into WordPress</a> appeared first on <a href="http://jckemp.com">James Kemp</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jckemp.com/notes/scripts/import-eventbrite-user-events-into-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Platførm</title>
		<link>http://jckemp.com/notes/musings/platform/</link>
		<comments>http://jckemp.com/notes/musings/platform/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 12:34:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://jckemp.com/?p=240</guid>
		<description><![CDATA[<p>My colleague, Jay Pick, and I have decided to create an umbrella to work under. Platførm will be a place for us to house the projects that we work on as a team. To go along with the new name, we&#8217;ve also found a lovely new office to work from, based in the heart of England. We&#8217;re [...]</p><p>The post <a href="http://jckemp.com/notes/musings/platform/">Platførm</a> appeared first on <a href="http://jckemp.com">James Kemp</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>My colleague, <a title="Web Designer" href="http://www.jaypick.me" target="_blank">Jay Pick</a>, and I have decided to create an umbrella to work under. Platførm will be a place for us to house the projects that we work on as a team. To go along with the new name, we&#8217;ve also found a lovely new office to work from, based in the heart of England.</p>
<p><a href="http://www.madebyplatform.com" target="_blank"><img class="aligncenter size-full wp-image-242" alt="Platform - Creative Web Design" src="http://jckemp.com/wp-content/uploads/2013/03/platform.png" width="400" height="300" /></a></p>
<p>We&#8217;re both very excited by this new prospect and are looking forward to some great new projects, all of which we can proudly say are <a title="Platførm - Creative Web Design" href="http://www.madebyplatform.com" target="_blank">made by Platførm</a>!</p>
<p>The post <a href="http://jckemp.com/notes/musings/platform/">Platførm</a> appeared first on <a href="http://jckemp.com">James Kemp</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jckemp.com/notes/musings/platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Git with BitBucket and Coda 2</title>
		<link>http://jckemp.com/notes/quick-tips/setting-up-git-with-bitbucket-and-coda-2/</link>
		<comments>http://jckemp.com/notes/quick-tips/setting-up-git-with-bitbucket-and-coda-2/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 10:08:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick Tips]]></category>

		<guid isPermaLink="false">http://jckemp.com/?p=221</guid>
		<description><![CDATA[<p>This is more for my own reference, but thought it may be useful to others as well. Below I am going to explain, in step-by-step instructions, how to get a Coda 2 site set up on BitBucket. There are two scenarios you may face when setting up Git on Coda 2; you have just started [...]</p><p>The post <a href="http://jckemp.com/notes/quick-tips/setting-up-git-with-bitbucket-and-coda-2/">Setting up Git with BitBucket and Coda 2</a> appeared first on <a href="http://jckemp.com">James Kemp</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This is more for my own reference, but thought it may be useful to others as well. Below I am going to explain, in step-by-step instructions, how to get a <a title="Coda 2" href="http://panic.com/coda/" target="_blank">Coda 2</a> site set up on <a title="BitBucket" href="https://bitbucket.org/" target="_blank">BitBucket</a>.</p>
<p>There are two scenarios you may face when setting up Git on Coda 2; you have just started a project, so your project folder is empty, or, you have already slaved away creating your code, and your project folder is packed full of the stuff.</p>
<p>Anyway, let&#8217;s get started. I&#8217;m going to assume that you already have git installed on your mac, you&#8217;re familiar with using Coda 2, and you have a basic knowledge of BitBucket.</p>
<h2>Setting up with an Empty Local Project Folder</h2>
<ol>
<li><span style="line-height: 13px;">Create an empty local folder. I use <a title="Mamp" href="http://www.mamp.info/en/index.html" target="_blank">Mamp</a>, so mine are within the <strong>htdocs</strong> folder.</span></li>
<li>Create an empty repository on BitBucket. No point me explaining how to do this, when BitBucket have a great <a title="Create a Repo on BitBucket" href="https://confluence.atlassian.com/display/BITBUCKET/Creating+a+Repository" target="_blank">knowledge base.</a></li>
<li>Set up a <strong>Site</strong> in Coda 2.
<ul>
<li>Enter a <strong>Name</strong> for you site.</li>
<li>Choose the<strong> Local Root</strong>.</li>
</ul>
</li>
<li>Click the <strong>Source</strong> tab.</li>
<li>Click <strong>Clone Git Repository&#8230;</strong></li>
<li>In your new repository on BitBucket, click the <strong>Clone</strong> button at the top of the page. We need the URL part of that, which should look something like <strong>https://username@bitbucket.org/username/your-repo.git</strong></li>
<li>Paste the URL into the <strong>Repositiory URL</strong> field.</li>
<li>Enter your BitBucket password into the <strong>Password</strong> field.</li>
<li>Click <strong>Clone</strong>.</li>
<li>Click <strong>Save</strong>.</li>
<li>Double click your new site to open it in Coda 2.</li>
<li>To get started we just need to commit 1 file to BitBucket. Open the <strong>File Browser </strong>in Coda 2 and make sure you are looking at your Local root. Right click and choose <strong>New File</strong>. Name your file <strong>README.md</strong>. We can use a blank file for now, unless you want to put anything in it &#8211; it can always be deleted later. This file is meant to describe your repository.</li>
<li>In the Coda 2 sidebar, click the <strong>Home</strong> icon. We need to open the <strong>SCM</strong> tab (I dragged this into the toolbar above for easier access).</li>
<li>When the SCM tab is open, you should see your README.md file there, with an <strong>Add</strong> button beside it. Click <strong>Add</strong> and when it changes, click <strong>Commit</strong>.</li>
<li>Enter a Commit message, for example: &#8220;Initial Commit&#8221;.</li>
<li>Navigate to <strong>File &gt; New Tab &gt; New Terminal Tab</strong>.</li>
<li>Choose Connect <strong>to Localhost</strong> and click <strong>Connect</strong>.</li>
<li>Now open the terminal tab again. Type the following:
<pre class="brush: plain; title: ; notranslate">git push -u origin master</pre>
<p>and press enter. You may be prompted to enter your BitBucket password again.</li>
<li>Once complete, restart Coda 2. Now any changes you make should be &#8220;pushable&#8221; via the SCM tab, and you can also pull from there as well!</li>
</ol>
<h2>Setting up with a Local Folder Full of Code</h2>
<ol>
<li>Create an empty repository on BitBucket. No point me explaining how to do this, when BitBucket have a great <a title="Create a Repo on BitBucket" href="https://confluence.atlassian.com/display/BITBUCKET/Creating+a+Repository" target="_blank">knowledge base.</a></li>
<li>In Coda 2, right click on your site and choose <strong>Edit</strong>.</li>
<li>Click the <strong>Source</strong> tab.</li>
<li>Click <strong>Initiate Empty Git Repository&#8230;</strong></li>
<li>Click <strong>Save</strong>.</li>
<li>Open your site in Coda 2.</li>
<li>In the Coda 2 sidebar, click the <strong>Home</strong> icon. We need to open the <strong>SCM</strong> tab (I dragged this into the toolbar above for easier access).</li>
<li>Click <strong>Add</strong> next to all relevant files until <strong>Commit</strong> is displayed next to everything.</li>
<li>Select all the files, right click and choose <strong>Commit All</strong>.</li>
<li>Enter a Commit message, for example: &#8220;Initial Commit&#8221;.</li>
<li>Navigate to <strong>File &gt; New Tab &gt; New Terminal Tab</strong>.</li>
<li>Choose Connect <strong>to Localhost</strong> and click <strong>Connect</strong>.</li>
<li>Type the following commands:
<pre class="brush: plain; title: ; notranslate">git remote add origin https://username@bitbucket.org/username/your-repo.git
git push -u origin --all</pre>
<p><strong>Note:</strong> you will need to change <em>username</em> to your BitBucket username and <em>your-repo</em> to your repository name/slug.</li>
<li>Once complete, restart Coda 2. Now any changes you make should be &#8220;pushable&#8221; via the SCM tab, and you can also pull from there as well!</li>
</ol>
<h2>Bonus: Tagging the Current Version on BitBucket</h2>
<p>Tagging is pretty straight forward:</p>
<ol>
<li><span style="line-height: 13px;">In Coda 2, navigate to <strong>File &gt; New Tab &gt; New Terminal Tab</strong>.<br />
</span></li>
<li>Enter the following:
<pre class="brush: plain; title: ; notranslate">git tag -a v1.4 -m 'version 1.4'
git push --tags</pre>
<p>where <em>v1.4</em> is the tag you&#8217;d like to use and <em>&#8216;version 1.4&#8242;</em> is the message to go along with your tag. This is known as an annotated tag.</li>
</ol>
<h2>Another Bonus: Tag a Specific Commit</h2>
<ol>
<li>In Coda 2, navigate to <strong>File &gt; New Tab &gt; New Terminal Tab</strong>.</li>
<li><span style="line-height: 13px;"><span style="line-height: 13px;">Enter the following:<br />
</span></span>
<pre class="brush: plain; title: ; notranslate">git tag -a v1.2 4e2f4dc -m &quot;Tagging version 1.2&quot;
git push --tags</pre>
</li>
</ol>
<p>The post <a href="http://jckemp.com/notes/quick-tips/setting-up-git-with-bitbucket-and-coda-2/">Setting up Git with BitBucket and Coda 2</a> appeared first on <a href="http://jckemp.com">James Kemp</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jckemp.com/notes/quick-tips/setting-up-git-with-bitbucket-and-coda-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
