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

Stock Update without SOAP
 
DaveClick
Jr. Member
 
Total Posts:  2
Joined:  2010-08-30
 

Hi Guys,

I am currently building an import script to automatically add articles to my shop.
This works fine, so far. The only problem is, that I can\’t update the stock.

I am using the core api ($product = Mage::getModel(\’catalog/product\’);) and I really don\’t want to use soap.
Is there a way to do the stockupdate without soap or direct sql-queries?
I can retrieve the stock with stuff like

$product->getStockItem()->getUseConfigManageStock()
$product->getStockItem()->getQty()

Is there a way?

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

Hi there

You can use the following article for stock/qty updates:
http://www.blog.magepsycho.com/updating-product-qty-in-magento-in-an-easier-faster-way/

(Note: It uses direct SQL queries for faster updates)

 
Magento Community Magento Community
Magento Community
Magento Community
 
DaveClick
Jr. Member
 
Total Posts:  2
Joined:  2010-08-30
 

Thank you, seem’s like I have to use sql queries for now.

But at least it works like a charm smile

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