Are you sure you need to update the super attributes of the configurable product?
I don't think so, since it is very possible to do the same using our extension simple product pricing.
Many of our clients are already using it they haven't touched the super attribute pricing.
check out Simple Product Pricing Extension for more info.
I don't think so, since it is very possible to do the same using our extension simple product pricing.
Many of our clients are already using it they haven't touched the super attribute pricing.
check out Simple Product Pricing Extension for more info.
I have received a request from one of my clients (he bought this extenstion How to Import Configurable Products into Magento From Google Spreadsheet) asking me to modify the importer script.
Here is the request:
“When I import a configurable product, I want to add a column (or multiple columns) to the CSV file in which I tell the importer the price for each super attribute. ”
Here is how we have implemented it :
Add a new column called super_attributes
and add something like this:
config_attributes : color,size
super_attributes : 5.20,10.2|2.21,3.22
add the following code snippet after $product->save (); the one before return true;
//SUPER ATTRIBUTES if (! empty ( $importData ['super_attributes'] )) { $super_attributes = explode('|',$importData["super_attributes"]); $product = Mage::getModel('catalog/product'); $productid = $product->getIdBySku($importData ['sku']); $product = Mage::getSingleton("catalog/Product")->load($productid); if ($data = $product->getTypeInstance()->getConfigurableAttributesAsArray(($product))) { $counter = 0; foreach ($data as $attributeData) { $id = isset($attributeData['id']) ? $attributeData['id'] : null; for($j=0; $j < sizeof($attributeData['values']) ; $j++ ) { $attributes = explode(',',$super_attributes[$counter]); $attributeData['values'][$j]['pricing_value'] = $attributes[$j]; } $attribute = Mage::getModel('catalog/product_type_configurable_attribute') ->setData($attributeData) ->setId($id) ->setStoreId($product->getStoreId()) ->setProductId($productid) ->save(); $counter ++; } } }