Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Attribute values…???  Also, is there an easy way to add products directly to the MySQL tables..?? 
 
angelleye
Member
 
Avatar
Total Posts:  45
Joined:  2009-02-09
Kansas City, MO
 

I was able to follow the documentation for adding a simple product via SOAP successfully (and I’m falling even more in love with Magento every step of the way, I might add) and I see that I also call product_attribute.list to see all of the fields I can pass for a given attribute set when creating a new product.  I’m a little confused about how I know exactly what types of values to pass, though.  For example, the Visibility field.  Do I just use the same exact values I see in the drop down of the admin panel when adding/viewing a product manually?  Would sending a value of ‘Catalog, Search’ work??  Where do I find all of the actual values I can send?

Also, is there a list of database fields that you’d need to update if you wanted to add products directly?  The API is great, but some of my clients are using FileMaker to store all of their product data.  With FileMaker I can attach MySQL tables and exchange data between FM and MySQL with ease.  I’d just need to know exactly what fields need to get involved when I create a new product.

Any information would be greatly appreciated.  Thanks!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
angelleye
Member
 
Avatar
Total Posts:  45
Joined:  2009-02-09
Kansas City, MO
 

Ah, well, I see the product_attribute.options call, however, I’m attempting the following without any success..

$attribute_options $magento -> call($session_id'product_attribute.options', array('attribute_id' => 526));

I got 526 from calling product_attribute.list and looking at the ID’s that came back.  526 is the ID I have for Visibility (from sample data).  When I pass that into product_attribute.options like I’ve shown above, though, it’s returning an empty array.

 
Magento Community Magento Community
Magento Community
Magento Community
 
angelleye
Member
 
Avatar
Total Posts:  45
Joined:  2009-02-09
Kansas City, MO
 

Ok, I tried ID 272, which is color, and it did indeed return values for options.  So apparently I was just thinking about options incorrectly.  I was thinking it would return information about the field like what types of values I could pass into it in general.

Basically, I’m stuck at the values.  I added a product via the API with nothing but name, websites, description, price.  It worked, but of course a lot more information needs to be filled in order for it to go live on the site and function accordingly.

I was able to call product_attribute_set.list, grab a set ID, and then call attribute.list to see all of the fields that I can include, however, I can’t seem to figure out what values need to go in them without a whole bunch of trial and error. 

For example, for status, do I send Enabled, enabled, ENABLED, any of those, something completely different?  What about for Visibility?

 
Magento Community Magento Community
Magento Community
Magento Community
 
avintel
Sr. Member
 
Total Posts:  147
Joined:  2008-05-15
Southern California
 

i am really desperate to import attributes, categories, products through any other way then inputing one at a time through magento admin.  I have created a thread to centralize the import attribute and category directions so if you have anything to contribute to this thread, can you contribute to the following thread as well? thanks.

http://www.magentocommerce.com/boards/viewthread/36443/

 
Magento Community Magento Community
Magento Community
Magento Community
 
avintel
Sr. Member
 
Total Posts:  147
Joined:  2008-05-15
Southern California
 

what is SOAP?

 
Magento Community Magento Community
Magento Community
Magento Community
 
angelleye
Member
 
Avatar
Total Posts:  45
Joined:  2009-02-09
Kansas City, MO
 

SOAP is a method of working with web services that’s based on XML.  It’s very similar to XMLRPC in Magento.  The sample code I posted in a previous response is an example of a SOAP call to the Magneto API.  It loads all of the attribute options for the given attribute ID into the variable $attribute_options as an array which can then be parsed accordingly.

The problem is they don’t seem to have any methods in the API for creating attributes or attribute sets.  Only pulling current data.  Same with orders which is driving me crazy.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top