<?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>Kukks</title>
	<atom:link href="http://kukks.org/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://kukks.org/blog</link>
	<description>a blog about poo and air fresheners</description>
	<lastBuildDate>Tue, 25 Oct 2011 08:54:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Magento Store: Multi Store, Multi Domain, Multi Shitstorm</title>
		<link>http://kukks.org/blog/?p=39&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=magento-store-multi-store-multi-domain-multi-shitstorm</link>
		<comments>http://kukks.org/blog/?p=39#comments</comments>
		<pubDate>Tue, 25 Oct 2011 08:51:25 +0000</pubDate>
		<dc:creator>Kukks</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://kukks.org/blog/?p=39</guid>
		<description><![CDATA[I&#8217;ve been working on adding a corporate section to a magento website lately and realised one thing: I&#8217;m bored. I have 2 domains, one for the corporate website and one for the store. The corporate website will have its own template and catalogue of products but with a &#8220;Email for Quote&#8221; or something along those lines. <a href='http://kukks.org/blog/?p=39'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on adding a corporate section to a magento website lately and realised one thing: I&#8217;m bored.</p>
<p>I have 2 domains, one for the corporate website and one for the store. The corporate website will have its own template and catalogue of products but with a &#8220;Email for Quote&#8221; or something along those lines. The store website will be.. well, a fucking store.</p>
<p>So first you create the stores along with the store views (Magento backend -&gt; System-&gt; Manage Stores), then you go in the configuration page and set up the store view scopes so that each base url is set to the appropriate domain (General-&gt;Web). You should also set &#8220;Add Store Code to URLS&#8221; and &#8220;Auto-Redirect to Base URL&#8221; to Yes on a global scope.</p>
<p>Hopefully at this point you already have each domain pointing to the store(if not you should have 404&#8242;s all over the fucking place)</p>
<p>Now comes editing the index.php of the magento store! This is where the fun starts and where you&#8217;ll start hating upgrading the magento installation</p>
<p>&nbsp;</p>
<p>Find the index.php of the main magento installation.</p>
<p>Somewhere at the bottom you should find somethign like this:</p>
<pre class="php">/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

/* Run store or run website */

$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>and after it there should be something like this:</p>
<pre class="php">
Mage::run($mageRunCode, $mageRunType);
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>so in between put something like this:</p>
<pre class="php">switch($_SERVER['HTTP_HOST']) {
	case 'corporate.com':
        case 'www.corporate.com':
        case 'http://corporate.com':
	case 'http://www.corporate.com':
		$mageRunCode = 'corp';
		$mageRunType = 'store';
	break;
	case 'store.com':
        case 'www.store.com':
        case 'http://store.com':
	case 'http://www.store.com':
		$mageRunCode = 'store';
		$mageRunType = 'store';
	break;
}</pre>
<p>&nbsp;</p>
<p>Obviously you need to modify this to your domains and store codes(which you entered in the manage stores part)</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kukks.org/blog/?feed=rss2&#038;p=39</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Infragistics says No License information found..lolwut</title>
		<link>http://kukks.org/blog/?p=35&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=infragistics-says-no-license-information-found-lolwut</link>
		<comments>http://kukks.org/blog/?p=35#comments</comments>
		<pubDate>Tue, 16 Aug 2011 08:52:14 +0000</pubDate>
		<dc:creator>Kukks</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[infragistics]]></category>
		<category><![CDATA[license]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://kukks.org/blog/?p=35</guid>
		<description><![CDATA[Infragistics is an awesome library, it has all those little things you&#8217;re too lazy to deal with like UI polish and grid exporters. &#160; Exception occurred creating type  'Infragistics.Win.UltraWinTabbedMdi.UltraTabbedMdiManager,  Infragistics2.Win.UltraWinTabbedMdi.v6.3, Version=6.3.20063.53, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: No license information found At the same time, infragistics likes giving you random unexpected reverse-happy endings. I&#8217;ve been greeted with this <a href='http://kukks.org/blog/?p=35'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Infragistics is an awesome library, it has all those little things you&#8217;re too lazy to deal with like UI polish and grid exporters.</p>
<p>&nbsp;</p>
<pre>Exception occurred creating type 
'Infragistics.Win.UltraWinTabbedMdi.UltraTabbedMdiManager, 
Infragistics2.Win.UltraWinTabbedMdi.v6.3, Version=6.3.20063.53,
Culture=neutral,
PublicKeyToken=7dd5c3163f2cd0cb'
System.ComponentModel.LicenseException: No license information found</pre>
<pre></pre>
<p>At the same time, infragistics likes giving you random unexpected reverse-happy endings. I&#8217;ve been greeted with this specific error around 3 times now. Nothing different from what I was doing earlier, just booting up the pc, open visual studio, write some letters in different colors and press run.</p>
<p><strong>The solution!</strong></p>
<p>Something more weird than the random error is the solution to the error. The error shouts at you that it cant find the license information BUT the solution is to find the license.licx in the solution explorer and remove all its content! I have no idea how this works..but it works <img src='http://kukks.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kukks.org/blog/?feed=rss2&#038;p=35</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>In stock, out of stock and screw your backorders!</title>
		<link>http://kukks.org/blog/?p=17&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=in-stock-out-of-stock-and-screw-your-backorders</link>
		<comments>http://kukks.org/blog/?p=17#comments</comments>
		<pubDate>Fri, 29 Jul 2011 13:08:28 +0000</pubDate>
		<dc:creator>Kukks</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[availability]]></category>
		<category><![CDATA[backorder]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[e commerce]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[is_in_stock]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[out of stock]]></category>
		<category><![CDATA[phtml]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[shop]]></category>

		<guid isPermaLink="false">http://kukks.org/blog/?p=17</guid>
		<description><![CDATA[Just to clarify, the title is how magento treats backorders, as if it&#8217;s some third party shit that&#8217;s implemented enough to be in the feature list but to be shitty enough to not be useful. Have you ever tried to use them on magento? For some reason if a product is marked as Out of <a href='http://kukks.org/blog/?p=17'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Just to clarify, the title is how magento treats backorders, as if it&#8217;s some third party shit that&#8217;s implemented enough to be in the feature list but to be shitty enough to not be useful.</p>
<p>Have you ever tried to use them on magento? For some reason if a product is marked as <em>Out of stock</em>, backorders are disabled which kind of defeat the point and my hope for mankind. I guess a workaround for this would be to make the configuration in the backend to set the products to always be in stock even under the quantity of 0, but that then messes with the product alert notices which allow the user to be sent an email when the product is back in stock since they only work when the product is actually out of stock.</p>
<p>So that leaves me with the option of screwing magento over by screwing his wife, err.. the template. Just skip the Is in Stock validation and check yourself with quantity and if backorders are enabled.</p>
<p>Here&#8217;s enough code to make you do something:</p>
<pre class="php">$_product = $this-&gt;getProduct();
$_stockItem = Mage::getModel('cataloginventory/stock_item')-&gt;loadByProduct($_product);
$_qty = (int)$_stockItem-&gt;getQty();
$_backorder = (int)$_stockItem-&gt;getBackorders();
if ($_qty &gt; 0 ) {
	echo("In Stock");
}
elseif($_qty &lt;= 0 &amp; $_backorder = 0){
	echo("out Of Stock");
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://kukks.org/blog/?feed=rss2&#038;p=17</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&lt;br /&gt; Tags everywhere!  Shoo!</title>
		<link>http://kukks.org/blog/?p=4&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tags-everywhere-help</link>
		<comments>http://kukks.org/blog/?p=4#comments</comments>
		<pubDate>Fri, 29 Jul 2011 10:29:00 +0000</pubDate>
		<dc:creator>Kukks</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[$_description]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[description]]></category>
		<category><![CDATA[e commerce]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[nl2br]]></category>
		<category><![CDATA[phtml]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[shop]]></category>
		<category><![CDATA[short description]]></category>
		<category><![CDATA[tinymce]]></category>
		<category><![CDATA[wysiwyg]]></category>

		<guid isPermaLink="false">http://kukks.org/blog/?p=4</guid>
		<description><![CDATA[Recently I discovered this really annoying bug in Magento where the product description would get gang raped by &#60;br /&#62; tags. At first I thought it was the WYSIWYG doing its usual shit code till I realized the tags were being added during run-time(is it even considered run-time for when a page loads for the user? Hmm, maybe I should <a href='http://kukks.org/blog/?p=4'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Recently I discovered this really annoying bug in Magento where the product description would get gang raped by &lt;br /&gt; tags. At first I thought it was the WYSIWYG doing its usual shit code till I realized the tags were being added during run-time(is it even considered run-time for when a page loads for the user? Hmm, maybe I should have just said that..).</p>
<p>Aaanyway, after spamming the magento forums like a hoe, I found out that a certain phtml file was making use of the php function: <a href="http://php.net/manual/en/function.nl2br.php">nl2br()</a> and this is the part where I stared at the screen with a disappointed &#8221;fuck you&#8221; face.</p>
<p>So here&#8217;s the fix, my problem was with the description field of the product page so you&#8217;ll have to look for the file accordingly.</p>
<p>The phtml file you want to edit is usually found around here:<br />
<strong>MagentoInstallation</strong>/app/design/<strong>YOURTHEME</strong>/default/template/catalog/product/view/description.phtml</p>
<p>BUT some extensions you download could override this, for example the quite awesome <a href="http://www.magentocommerce.com/magento-connect/TemplatesMaster/extension/1725/magento-easytabs">EasyTabs extension</a> has its own description.phtml file located(assuming you&#8217;ve configured it correctly for your theme:<br />
/app/design/YOURTHEME/default/template/easytabs/description.phtml</p>
<p>All you have to do is search for the nl2br(<strong>morecodehereprobablyavariable</strong>) and just replace it with the content of the brackets.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kukks.org/blog/?feed=rss2&#038;p=4</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://kukks.org/blog/?p=1&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hello-world</link>
		<comments>http://kukks.org/blog/?p=1#comments</comments>
		<pubDate>Fri, 29 Jul 2011 12:04:59 +0000</pubDate>
		<dc:creator>Kukks</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kukks.org/blog/?p=1</guid>
		<description><![CDATA[Another blog on the internet, am I Steve Jobs now? &#160;]]></description>
			<content:encoded><![CDATA[<p>Another blog on the internet, am I Steve Jobs now?</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kukks.org/blog/?feed=rss2&#038;p=1</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

