Creating product programmatically
i have a several XML where the product information is stored. It is a xml feed that my module gets through an API call. I have parsed the xml and got the product information. After i made some research here and there i understood that i need to use these API call..
Where $newproduct is a object array of commerce_product table heading such as sku, title .
My doubt is, i am not able to understand how to create the product attributes from my XML.
After going through the this link
In that link a post from rfay (also a member here) i guess that the product attributes are created with field_attach_submit function and its parameters. But if some one guide me fully then that would be great.
Please note, i am new to drupal 7.