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

Magento API vs. Mage.php
 
Peter77
Jr. Member
 
Total Posts:  9
Joined:  2010-11-06
 

Hii,

I wanna create my own products from an external db and create magento products.
The first time to import all products and then update the stock every x minutes.

First I created a CSV file to import it ever x minutes. This caused problems for configurable products, for example color:  red but the color attribute didn’t know the value red. Looking for an answer I found a script which could create attributes, the script uses the Mage.php file.

This changed mind, I wanna create a php script using Mage.php to create products and update for example the stock and prices.
Can some tell me where to find more info about the Mage.php file? Class / function references?
Should I create a script using mage.php or need I to learn how to use the API?

I’m looking for the opinion of current users and I wanna know if it’s possible to create attribute values using the API.

Greetz
Peter77

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

Using API (I hope you meant the SOAP service) can be bit slower. What i suggest you to develop a module which deploys the cron job task(Ref: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job). In that task you can use magento way: Mage::getModel(’catalog/product’)->setXXX()....->save().

makes sense?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Peter77
Jr. Member
 
Total Posts:  9
Joined:  2010-11-06
 

Thnx for your reaction.

Do you know where I can find more information about the functions?
Currently I can only use the functions / methods from online examples, but I cant find any class references.

Dunno where I can find some information about that.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

You should consider using magmi (the most active thread on Dataflow forum) or at least give it a try.

it is specially suited for the need you express .
it can create new product instances & also inserts new values on the fly for any select/multiselect attributes.
it has also many other capabilities (and i don’t even speak of the speed).

 
Magento Community Magento Community
Magento Community
Magento Community
 
stevek7b
Jr. Member
 
Total Posts:  13
Joined:  2011-03-27
 

when i installed magmi, it didnt work and it absorbed 90% of dedicated server memory, i had to go and terminate all magmi php processes as it was depleting server memory and i had to terminate magmim before all memory was depleyed. and it didint even work.

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