Magento Forum

Page 3 of 3
My Magento Import & Product Management Classes
 
seanbro
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2009-03-30
 
milenasecret - 29 January 2010 02:13 AM

Could anyone plese tell me how to import values for the multiple select attribute which I have created.
The attribute code is ‘availabe_in_colors’.
I have tried using:

$product = new Mage_Catalog_Model_Product();

$product->setData(’availabe_in_colors’, array(17,18));
and
$product->setavailabe_in_colors(array(17,18));
and
$product->setavailabe_in_colors(array(’17’,’18’));

and many other versions of this code and
nothing worked.

Thank you.

The method name should not have underscores and should be converted to camel case.
For example, this:
$product->setavailabe_in_colors(array(17,18));

Should be rewritten like this:
$product->setAvailabeInColors(array(17,18));

This is assuming “availabe” is not supposed to be “available.” Also, you must assign the product to an attribute set that contains your custom attribute.

 
Magento Community Magento Community
Magento Community
Magento Community
 
edwin_magento
Jr. Member
 
Total Posts:  24
Joined:  2010-02-24
 

Hi,
I want to make changes on add product in back end but i couldn’t find the file
that generating add product and the file that validating the fields.

Is there any way to fill Name field automatically
for example i have tow attributes , and i would like to combine them and put on name field!!?

name = attribute1+attribute2
and my attribute1 is a drop down list

thanks a lot for your attention

 
Magento Community Magento Community
Magento Community
Magento Community
 
banifou
Jr. Member
 
Total Posts:  6
Joined:  2011-06-13
 

Hello ,
I’m pretty new to Magento and I’m using the latest stable version 1.5.1.
Is there a newer version of the script of Blakew? That would be great!

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 3 of 3