<?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/"
		>
<channel>
	<title>Comments on: Getting Configurable Attributes (Super Attributes) of a Configurable Product</title>
	<atom:link href="http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/feed/" rel="self" type="application/rss+xml" />
	<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/</link>
	<description>PHP &#38; Magento Tips and Tutorials</description>
	<lastBuildDate>Thu, 17 May 2012 05:29:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Silverscreen</title>
		<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/#comment-302</link>
		<dc:creator>Silverscreen</dc:creator>
		<pubDate>Thu, 11 Mar 2010 14:24:13 +0000</pubDate>
		<guid isPermaLink="false">http://subesh.com.np/?p=182#comment-302</guid>
		<description>How about deleting some of the super attributes?

This seems even be impossible in the admin after setting it once for the configurable product.</description>
		<content:encoded><![CDATA[<p>How about deleting some of the super attributes?</p>
<p>This seems even be impossible in the admin after setting it once for the configurable product.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Subesh Pokhrel</title>
		<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/#comment-301</link>
		<dc:creator>Subesh Pokhrel</dc:creator>
		<pubDate>Mon, 25 Jan 2010 17:47:04 +0000</pubDate>
		<guid isPermaLink="false">http://subesh.com.np/?p=182#comment-301</guid>
		<description>@Dave... Thanks for the code... if it works :D</description>
		<content:encoded><![CDATA[<p>@Dave&#8230; Thanks for the code&#8230; if it works <img src='http://subesh.com.np/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dave</title>
		<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/#comment-300</link>
		<dc:creator>dave</dc:creator>
		<pubDate>Mon, 25 Jan 2010 16:33:36 +0000</pubDate>
		<guid isPermaLink="false">http://subesh.com.np/?p=182#comment-300</guid>
		<description>Well, thank you for the post regarding Eclipse.  It gave me the courage to try to figure that out again and it is just what I needed!  I&#039;ve figured out how to do the configurable product price updates.  In case anyone else is looking for a way to do that:

	$productid = &#039;2937&#039; ;
	$product = Mage::getSingleton(&#039;catalog/Product&#039;)-&gt;load($productid);

	$configurableAttributeData = $product-&gt;getTypeInstance()-&gt;getConfigurableAttributesAsArray($product) ;

	foreach($configurableAttributeData as $attributeData){

		//	Update super attributes as required

		$id        = isset($attributeData[&#039;id&#039;]) ? $attributeData[&#039;id&#039;] : null;
		Mage::getModel(&#039;catalog/product_type_configurable_attribute&#039;)
			-&gt;setData($attributeData)
			-&gt;setId($id)
			-&gt;setStoreId($product-&gt;getStoreId())
			-&gt;setProductId($productid)
			-&gt;save();
		}</description>
		<content:encoded><![CDATA[<p>Well, thank you for the post regarding Eclipse.  It gave me the courage to try to figure that out again and it is just what I needed!  I&#8217;ve figured out how to do the configurable product price updates.  In case anyone else is looking for a way to do that:</p>
<p>	$productid = &#8217;2937&#8242; ;<br />
	$product = Mage::getSingleton(&#8216;catalog/Product&#8217;)-&gt;load($productid);</p>
<p>	$configurableAttributeData = $product-&gt;getTypeInstance()-&gt;getConfigurableAttributesAsArray($product) ;</p>
<p>	foreach($configurableAttributeData as $attributeData){</p>
<p>		//	Update super attributes as required</p>
<p>		$id        = isset($attributeData['id']) ? $attributeData['id'] : null;<br />
		Mage::getModel(&#8216;catalog/product_type_configurable_attribute&#8217;)<br />
			-&gt;setData($attributeData)<br />
			-&gt;setId($id)<br />
			-&gt;setStoreId($product-&gt;getStoreId())<br />
			-&gt;setProductId($productid)<br />
			-&gt;save();<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dave</title>
		<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/#comment-299</link>
		<dc:creator>dave</dc:creator>
		<pubDate>Thu, 21 Jan 2010 11:51:59 +0000</pubDate>
		<guid isPermaLink="false">http://subesh.com.np/?p=182#comment-299</guid>
		<description>That would go a *long* way to get me out of this problem.  Thank you for taking the time to give this a look.      dave</description>
		<content:encoded><![CDATA[<p>That would go a *long* way to get me out of this problem.  Thank you for taking the time to give this a look.      dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Subesh Pokhrel</title>
		<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/#comment-298</link>
		<dc:creator>Subesh Pokhrel</dc:creator>
		<pubDate>Thu, 21 Jan 2010 06:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://subesh.com.np/?p=182#comment-298</guid>
		<description>Give me some time.. i&#039;ll make another post for this.for creating configurable products programmatically. may be today!</description>
		<content:encoded><![CDATA[<p>Give me some time.. i&#8217;ll make another post for this.for creating configurable products programmatically. may be today!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dave</title>
		<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/#comment-297</link>
		<dc:creator>dave</dc:creator>
		<pubDate>Wed, 20 Jan 2010 17:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://subesh.com.np/?p=182#comment-297</guid>
		<description>Ooops, I guess I was slamming my head first...    ;O)

Right now, I&#039;m trying to automate some pricing updates from an external inventory system.  When I update simple products that are associated with configurable products I need to also update the super attribute&#039;s price.  I have tried this:  (ProductID 2937 is definitely configurable.)

$thisCfgableProd = Mage::getSingleton(&#039;catalog/Product&#039;)-&gt;load(2937) ;
$cfgOptions = $thisCfgableProd-&gt;getTypeInstance(true) ;
$cfgOptionsAttr = $cfgOptions-&gt;getConfigurableAttributesAsArray($thisCfgableProd) ;
foreach ($cfgOptionsAttr as $attribute) {
if(attribIwant) $attribute[&#039;values&#039;][x][&#039;pricing_value&#039;] = 150 ;
Mage::getResourceModel(&#039;catalog/Product_Type_Configurable_Attribute&#039;)-&gt;savePrices($attribute) ;
}

savePrices dies right away doing
Call to a member function getValues() on a non-object in
....  Eav/Mysql4/Product/Type/Configurable/Attribute.php

I&#039;ve been grinding at this for a couple of days now.  I&#039;m just about to update the database directly, but I would like to avoid that if I can.

Any suggestions would be *most* appreciated.

dave</description>
		<content:encoded><![CDATA[<p>Ooops, I guess I was slamming my head first&#8230;    ;O)</p>
<p>Right now, I&#8217;m trying to automate some pricing updates from an external inventory system.  When I update simple products that are associated with configurable products I need to also update the super attribute&#8217;s price.  I have tried this:  (ProductID 2937 is definitely configurable.)</p>
<p>$thisCfgableProd = Mage::getSingleton(&#8216;catalog/Product&#8217;)-&gt;load(2937) ;<br />
$cfgOptions = $thisCfgableProd-&gt;getTypeInstance(true) ;<br />
$cfgOptionsAttr = $cfgOptions-&gt;getConfigurableAttributesAsArray($thisCfgableProd) ;<br />
foreach ($cfgOptionsAttr as $attribute) {<br />
if(attribIwant) $attribute['values'][x]['pricing_value'] = 150 ;<br />
Mage::getResourceModel(&#8216;catalog/Product_Type_Configurable_Attribute&#8217;)-&gt;savePrices($attribute) ;<br />
}</p>
<p>savePrices dies right away doing<br />
Call to a member function getValues() on a non-object in<br />
&#8230;.  Eav/Mysql4/Product/Type/Configurable/Attribute.php</p>
<p>I&#8217;ve been grinding at this for a couple of days now.  I&#8217;m just about to update the database directly, but I would like to avoid that if I can.</p>
<p>Any suggestions would be *most* appreciated.</p>
<p>dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Subesh Pokhrel</title>
		<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/#comment-296</link>
		<dc:creator>Subesh Pokhrel</dc:creator>
		<pubDate>Wed, 20 Jan 2010 10:13:55 +0000</pubDate>
		<guid isPermaLink="false">http://subesh.com.np/?p=182#comment-296</guid>
		<description>I think you tried for bundled product not for configurable product.</description>
		<content:encoded><![CDATA[<p>I think you tried for bundled product not for configurable product.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bhavesh Dave</title>
		<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/#comment-295</link>
		<dc:creator>Bhavesh Dave</dc:creator>
		<pubDate>Wed, 20 Jan 2010 07:24:45 +0000</pubDate>
		<guid isPermaLink="false">http://subesh.com.np/?p=182#comment-295</guid>
		<description>hay i try this code but it give me an error
 &quot;FFatal error: Call to undefined method Mage_Bundle_Model_Product_Type::getConfigurableAttributes() &quot;

how can i solve it...

any idea....</description>
		<content:encoded><![CDATA[<p>hay i try this code but it give me an error<br />
 &#8220;FFatal error: Call to undefined method Mage_Bundle_Model_Product_Type::getConfigurableAttributes() &#8221;</p>
<p>how can i solve it&#8230;</p>
<p>any idea&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Subesh Pokhrel</title>
		<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/#comment-294</link>
		<dc:creator>Subesh Pokhrel</dc:creator>
		<pubDate>Wed, 20 Jan 2010 04:05:15 +0000</pubDate>
		<guid isPermaLink="false">http://subesh.com.np/?p=182#comment-294</guid>
		<description>All you have to do is drill down into the core classes from above and you will get all the functions you want :D Also you will have to work for a while in Magento and &quot;slam&quot; you head into your desk time and again for getting the answer you want! :D</description>
		<content:encoded><![CDATA[<p>All you have to do is drill down into the core classes from above and you will get all the functions you want <img src='http://subesh.com.np/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Also you will have to work for a while in Magento and &#8220;slam&#8221; you head into your desk time and again for getting the answer you want! <img src='http://subesh.com.np/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dave</title>
		<link>http://subesh.com.np/2010/01/configurable-attributes-super-attributes-configurable-product/#comment-293</link>
		<dc:creator>dave</dc:creator>
		<pubDate>Tue, 19 Jan 2010 17:48:04 +0000</pubDate>
		<guid isPermaLink="false">http://subesh.com.np/?p=182#comment-293</guid>
		<description>Hi,  I&#039;m doing my best to customize a magento site and I am *very* interested in finding out how to locate class methods, etc.  How do you find out all of the wonderful method calls that you use?  Where do you look?

dave</description>
		<content:encoded><![CDATA[<p>Hi,  I&#8217;m doing my best to customize a magento site and I am *very* interested in finding out how to locate class methods, etc.  How do you find out all of the wonderful method calls that you use?  Where do you look?</p>
<p>dave</p>
]]></content:encoded>
	</item>
</channel>
</rss>

