Is there any RESTful API to add product to cart in Magento? I know it can be done using SOAP/XML but I am looking for solution using RESTful/JSON.
Thanks in advance
2015 - If you are looking for an answer like me, with Magento 2.0 this is now possible.
http://devdocs.magento.com/swagger/index.html
POST /V1/carts/{cartId}/items
Look for quoteCartItemRepositoryV1. There is a post method to add product to the cart.
right now we can just view the information using RESTful API like retrieve the inventory, orders, products, customers list and information.
Yes, you can extend the functionality of the api to add product to cart.
Related
I am having very specific task that needs to be implemented. I have to import specific orders from one OpenCart shop to another WooCommerce shop. The reason we're doing this is because in the woocommerce shop there are some functionalities that we don't want to implement on the OC and we just want to use the WooCommerce.
One of the options i thought about was to get the orders from the database directly / they are using the same server so that's easy to access /, but I run into an issue trying to pass the Shipping method ( because it comes from the checkout and shows a form in the backend that we need ).
So I am thinking of another way to simulate the process through the WooCommerce REST API, but I am not sure from where to start.. Have someone worked on similar thing, I would appreciate if I get some guidance.
Thanks in advance!!
I am building a custom tool where the user can play around with the product (customize parts and add colors) and then go ahead and buy. I have so far built this in PHP but would like to integrate it with my Magento store. Is there a way I can connect this to Magento so that the product can be passed through Add to Cart etc?
Thanks.
Magento already has a support for this.
Check the configurable products, or the Custom options tab in the product admin edit page. You can also use bundle products.
If none of these fit your needs then you may want to rephrase your question and explain what exactly do you need.
I am building a custom front end to Magento, where users selects the products they want to purchase outside of Magento. But then use Magento for the rest.
I already use the product api's to pull the product_id/sku/name/price out. So I have a list of product_id’s ready for purchase.
I will use the api's for creating and building a shopping cart.
My question is…
Once I populate a shopping cart using the apis and have the shoppingcart_id, how do I redirect the user directly into that shopping cart page in Magento?
Thanks for any help or suggestions.
Redirecting is easy. This is how you can do it in Magento 1.5. Note that you need to be running within a controller action in order for this to work properly.
$this->_redirect('checkout/cart');
If you want to direct the user to the checkout page, try something like the following:
$this->_redirect('checkout/onepage/');
Hope this helps!
I am building a web application which allows visitors of a site to custom-build a product, and then add that custom-built item to their shopping cart in order to purchase it. For instance, I might build a car with the following customizations:
Alloy wheels
Leather seats
Red
I've searched around looking for a solution to my problem, but have yet to come across anything very helpful. I am using CS-Cart as my shopping cart solution.
What I need to know is how I might programmatically add this custom-built item to a user's shopping cart. Does CS-Cart provide an API for doing something like this? If not, does anyone have any suggestions on how I might achieve my goal? I basically just need to add a generic "custom build" item to the user's cart with the customizations they made somehow attached to this item.
I've been taking a look at CS-Cart and this question came up.
From reading through the CS-Cart API documentation, it looks like CS-Cart's API is more of a plugin framework than an actual web service. In other words, I believe you can write code to modify CS-Cart (or programmatically update shopping cart items) but this code needs to be written as a plugin into CS-Cart rather than simply as an API call from your third-party webapp.
So I think you have two solutions:
Build a CS-Cart plugin which has a mini-API to take your custom item from your webapp and add it into the shopping cart through CS-Cart
If you literally just need to add the item into the shopping cart, and your webapp and CS-Cart are on the same server, you may be able to skirt around CS-Cart and get your webapp to literally just add the item into CS-Cart's shopping cart PHP session
I hope this helps - I'm not mega-familiar with CS-Cart so if there are any factual errors in this I apologise.
Is it possible to add bundled products with Magento API? If not, is there any other way to add a bundled product?
Yes there is way around, which I myself have been playing with for some time. Please see this post (Programmatically add Bundle Products in Magento, using the SKU / ID of Simple Items) to get a starting point of how to proceed.
I have used simple way to add Bundle Products, not by using Web Services. However, I think the latter is still possible.