<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Setting default options for configurable products</title>
	<atom:link href="http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/feed/" rel="self" type="application/rss+xml" />
	<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/</link>
	<description>Taking a run up at the world of Magento</description>
	<lastBuildDate>Thu, 24 May 2012 00:52:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Robbie Smith</title>
		<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/#comment-279</link>
		<dc:creator><![CDATA[Robbie Smith]]></dc:creator>
		<pubDate>Wed, 20 Jul 2011 16:53:08 +0000</pubDate>
		<guid isPermaLink="false">http://maglife.co.uk/?p=87#comment-279</guid>
		<description><![CDATA[Yes. error checking on spConfig did the trick for me on IE 8. IE 9 apparently does not inhibit this behavior.]]></description>
		<content:encoded><![CDATA[<p>Yes. error checking on spConfig did the trick for me on IE 8. IE 9 apparently does not inhibit this behavior.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quentin</title>
		<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/#comment-262</link>
		<dc:creator><![CDATA[Quentin]]></dc:creator>
		<pubDate>Thu, 07 Apr 2011 09:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://maglife.co.uk/?p=87#comment-262</guid>
		<description><![CDATA[Where paste this code ? configurable.phtml ?
Thank&#039;s a lot]]></description>
		<content:encoded><![CDATA[<p>Where paste this code ? configurable.phtml ?<br />
Thank&#8217;s a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luka</title>
		<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/#comment-261</link>
		<dc:creator><![CDATA[Luka]]></dc:creator>
		<pubDate>Tue, 05 Apr 2011 15:56:06 +0000</pubDate>
		<guid isPermaLink="false">http://maglife.co.uk/?p=87#comment-261</guid>
		<description><![CDATA[ok. i found. and it works !
thanks a lot!]]></description>
		<content:encoded><![CDATA[<p>ok. i found. and it works !<br />
thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias Hoffmann</title>
		<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/#comment-260</link>
		<dc:creator><![CDATA[Tobias Hoffmann]]></dc:creator>
		<pubDate>Tue, 05 Apr 2011 15:55:23 +0000</pubDate>
		<guid isPermaLink="false">http://maglife.co.uk/?p=87#comment-260</guid>
		<description><![CDATA[Replace

if (!spConfig) {
return;
}

with it.]]></description>
		<content:encoded><![CDATA[<p>Replace</p>
<p>if (!spConfig) {<br />
return;<br />
}</p>
<p>with it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luka</title>
		<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/#comment-259</link>
		<dc:creator><![CDATA[Luka]]></dc:creator>
		<pubDate>Tue, 05 Apr 2011 15:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://maglife.co.uk/?p=87#comment-259</guid>
		<description><![CDATA[but where paste this code ?]]></description>
		<content:encoded><![CDATA[<p>but where paste this code ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias Hoffmann</title>
		<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/#comment-258</link>
		<dc:creator><![CDATA[Tobias Hoffmann]]></dc:creator>
		<pubDate>Tue, 05 Apr 2011 15:04:08 +0000</pubDate>
		<guid isPermaLink="false">http://maglife.co.uk/?p=87#comment-258</guid>
		<description><![CDATA[Sorry Luka, I don&#039;t have a solution for custom options (yet); but it should be quite similiar. You can avoid the &quot;spConfig is not defined&quot; error by testing if it exists:

if  ((typeof spConfig ==  &#039;undefined&#039;) &#124;&#124; !spConfig) {
   return;
}]]></description>
		<content:encoded><![CDATA[<p>Sorry Luka, I don&#8217;t have a solution for custom options (yet); but it should be quite similiar. You can avoid the &#8220;spConfig is not defined&#8221; error by testing if it exists:</p>
<p>if  ((typeof spConfig ==  &#8216;undefined&#8217;) || !spConfig) {<br />
   return;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luka</title>
		<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/#comment-257</link>
		<dc:creator><![CDATA[Luka]]></dc:creator>
		<pubDate>Tue, 05 Apr 2011 14:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://maglife.co.uk/?p=87#comment-257</guid>
		<description><![CDATA[Tobias work great with Configurable
but simple products with custom options
in IE show error (and firebug shows it too)

spConfig is not defined

can you help ?
i have in my store simple and configurable products...]]></description>
		<content:encoded><![CDATA[<p>Tobias work great with Configurable<br />
but simple products with custom options<br />
in IE show error (and firebug shows it too)</p>
<p>spConfig is not defined</p>
<p>can you help ?<br />
i have in my store simple and configurable products&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias Hoffmann</title>
		<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/#comment-256</link>
		<dc:creator><![CDATA[Tobias Hoffmann]]></dc:creator>
		<pubDate>Thu, 31 Mar 2011 13:32:32 +0000</pubDate>
		<guid isPermaLink="false">http://maglife.co.uk/?p=87#comment-256</guid>
		<description><![CDATA[Correction to my post above:
replace
document.maxPreselectedAttributeOptionCount = 2;
with
window.maxPreselectedAttributeOptionCount = 2;]]></description>
		<content:encoded><![CDATA[<p>Correction to my post above:<br />
replace<br />
document.maxPreselectedAttributeOptionCount = 2;<br />
with<br />
window.maxPreselectedAttributeOptionCount = 2;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias Hoffmann</title>
		<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/#comment-255</link>
		<dc:creator><![CDATA[Tobias Hoffmann]]></dc:creator>
		<pubDate>Thu, 31 Mar 2011 13:26:05 +0000</pubDate>
		<guid isPermaLink="false">http://maglife.co.uk/?p=87#comment-255</guid>
		<description><![CDATA[Hi Jose, I modified your script a bit and this is what I came up with. It seems to work fine.

// simulate firing a DOM event
if (typeof fireEvent !== &#039;function&#039;) {
    document.fireEvent = document.createEventObject ? // IE
        function(element, event) {
            var evt = document.createEventObject();
            return element.fireEvent(&#039;on&#039; + event, evt);
        } : // FX
        function(element, event) {
            var evt = document.createEvent(&#039;HTMLEvents&#039;);
            evt.initEvent(event, true, true); // event type, bubbling, cancelable
            return !element.dispatchEvent(evt);
        };
}

// preselect the 1st option of the 1st-maxPreselectedAttributeOptionCount&#039;th configurable attribute
document.maxPreselectedAttributeOptionCount = 2;
Event.observe(window, &#039;load&#039;, function() {
    if (!spConfig) {
        return;
    }
    for (var i = 0; i &lt; Math.min(maxPreselectedAttributeOptionCount, spConfig.settings.length); ++i) {
        var attr = spConfig.settings[i];
        attr.selectedIndex = 1;
        Event.observe(attr, &#039;change&#039;, Prototype.emptyFunction);
        fireEvent(attr, &#039;change&#039;);
    }
});]]></description>
		<content:encoded><![CDATA[<p>Hi Jose, I modified your script a bit and this is what I came up with. It seems to work fine.</p>
<p>// simulate firing a DOM event<br />
if (typeof fireEvent !== &#8216;function&#8217;) {<br />
    document.fireEvent = document.createEventObject ? // IE<br />
        function(element, event) {<br />
            var evt = document.createEventObject();<br />
            return element.fireEvent(&#8216;on&#8217; + event, evt);<br />
        } : // FX<br />
        function(element, event) {<br />
            var evt = document.createEvent(&#8216;HTMLEvents&#8217;);<br />
            evt.initEvent(event, true, true); // event type, bubbling, cancelable<br />
            return !element.dispatchEvent(evt);<br />
        };<br />
}</p>
<p>// preselect the 1st option of the 1st-maxPreselectedAttributeOptionCount&#8217;th configurable attribute<br />
document.maxPreselectedAttributeOptionCount = 2;<br />
Event.observe(window, &#8216;load&#8217;, function() {<br />
    if (!spConfig) {<br />
        return;<br />
    }<br />
    for (var i = 0; i &lt; Math.min(maxPreselectedAttributeOptionCount, spConfig.settings.length); ++i) {<br />
        var attr = spConfig.settings[i];<br />
        attr.selectedIndex = 1;<br />
        Event.observe(attr, &#039;change&#039;, Prototype.emptyFunction);<br />
        fireEvent(attr, &#039;change&#039;);<br />
    }<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luka</title>
		<link>http://maglife.co.uk/2009/06/24/setting-default-options-for-configurable-products/#comment-254</link>
		<dc:creator><![CDATA[Luka]]></dc:creator>
		<pubDate>Fri, 18 Mar 2011 15:09:54 +0000</pubDate>
		<guid isPermaLink="false">http://maglife.co.uk/?p=87#comment-254</guid>
		<description><![CDATA[and what about configurable products ? simple works ok, but configurable didnt refresh second option...]]></description>
		<content:encoded><![CDATA[<p>and what about configurable products ? simple works ok, but configurable didnt refresh second option&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

