Reputation: 1522
I am using Magento-1.7 for client's website, the requirement is that he wants the products from API, Product edit/add etc. are handle by API. We only display the resulted product on our site.
Now problem is that how i add the final product(generated by API) to magento shopping cart.
Explain in detail, i am new in Custom module.
Upvotes: 2
Views: 1138
Reputation: 2945
You must be asking about adding product in cart programatically. If so following is answer:
$cart =Mage::getSingleton('checkout/cart');
$cart->addProduct($product, array('qty'=>$qty));
$cart->save();
Add those code in your Custom Module.
Upvotes: 3
Reputation: 173
You have to use web services under system->config
to link your API.
The API should be programmed to transfer data from the third party system (Your client system) to your magento site database
Upvotes: 0