Magento 2 - Transfer cart items from API to web store - magento

I am creating a complex shopping configurator app that allows a user to customize and visualize a product which consists of multiple store items. Once they confirm their purchase, I iterate and add all of the selected products to a guest cart using the .../rest/V1/guest-carts API endpoint.
I would now like to forward the user to the store checkout to continue the purchasing process from the web store, e.g. https://store.url/checkout/cart. Of course, that basket needs to be populated with the items that were added via the API. I've looked through the documentation but not been able to find
anything relevant but I wonder if I can pass over the store_id or the quote_id and the relevant products be inserted accordingly?

Not sure if this is still relevant for you but, I was also working on a similar problem and came across this plugin for Magento 2. Basically what this plugin does is use a customer's token and a quote_id and creates a temporary session on the Magento2 Store and then redirect the user to the checkout page. This was a starting point for me, as I had to customize this plugin further to suit my requirements.
Hope this helps.

Related

Magento Hooks - Will Magento allow me to do this?

I'm going to be starting a E-Commerce project and the client is interested in using Magento. In this project, when a customer adds something to the cart, I'll need to pull them out of the flow, where they'll proceed through a custom wizard-esque area.
They basically design a document using a drag and drop interface. After they finish, that document will be saved as a PDF, and I want them redirected to checkout
So my questions are
Does Magento have hooks available for after an item is added to the
cart ?
If I pull them away to this other section of the site (Wizard
portion), changes they make will potentially add costs to
their cart. Would I still have access to products, prices, and the
cart so that I can continue to modify their cart until they return
to checkout ?
Magento users Event-Observer pattern, where you can hook into virtually any action which is performed and execute your custom code,
Refer to below links,
http://inchoo.net/category/ecommerce/magento/events-observers/
https://gist.github.com/peterjaap/6973324
http://huztechbuzz.wordpress.com/2014/04/26/complete-list-of-all-events-in-magento/
http://www.nicksays.co.uk/magento-events-cheat-sheet-1-7/
So you have to figure out which event you can use and plugin your custom code.
As long as i remember all the cart info ( products/prices ) is stored in the $_SESSION. So you can get all the information from there you need, modify it via your so-called wizzard and udpate the session information after that!
Cheers! :)

Modify an Order via the API prior to Invoicing?

In the default Magento 1.7 install is it possible to modify an order via the API prior to it being invoiced? I know there is no mechanism to do this in the Admin without a module but wasn't sure if the new API connections may allow this to happen.
To clarify, the idea here is someone places an order and then decided that they want to add something else to the order. Ideally I would like to push this change via the API from our other inventory system as our CSRs do not use the Magento interface to handle invoicing or shipment details.
I'm afraid this is not possible with the default Magento API. See the Sales Order API documentation. You may hold or cancel the order but not edit its information.
If you edit an order in the Magento backend and save it, the old order is cancelled and a new order is created. These orders are recognisable by a special number format ("-[versionnumber]" is appended to the order number), see the Managing and Editing Orders documentation.
You may want to mimic this behaviour using the default Magento API.
Get the information from the current order.
Create a new cart, fill it with the corrected information and create a new order for this cart (see the Checkout/Cart API documentation for necessary methods).
Cancel the old order.
It won't be trivial, but it should be possible.

Magento: adding product from frontend form

I have magento demo shop and for example i want registered user to be available to post a product from frontend? Can anyone hook me up with some code showing how to make it? Is it even possible in magento?
It's certainly possible. It actually shouldn't be all that difficult. You're going to create a module, programmatically create an order, and link this page from somewhere. You should be able to hack one together with the following resources:
Programmatically Creating Orders - Inchoo
Creating a Custom Module part 1-8
yes dear it is possible, you have to create a module for that and i think you give to link/tab in customer account page in front side.in account page you provide form of add new product.you have also provide all option like in magento back end. but some customization are required

Magento user uploaded offers

Using Magento i want to create website where user can upload their products to sale, is it possible in magento ?
You can easily create a website to handle that, Magento give you an API that you can easily consume for creating products, etc ...
http://www.magentocommerce.com/wiki/doc/webservices-api/introduction
But, why not just give your users an access to their webshop Administration area?
Its better you to create module for add products by users from their my account area. Check the saveAction in Mage/Adminhtml/Controllers/Catalog/ProductController.php .You may get more idea how to save product.
If you are planning to add only some members to add their products through backend, its better you to create users and assign permissions to add products from backend.

My client can't see any of products - Magento

I am having a weird situation. I worked on a magneto ecommerce website. My friends and I can see the products on the website, but only my client can't see any of them.
I suspected magento cache, so I refreshed and disabled all the caches. My client still can't see all the products. I made him to clear browser cache. It didn't work as well. I also let him use FF or Safari. He still can't see the products.
What is the problem??? I can't try any other things now...
In addition to checking multiple websites, are you logged in or do you have a specific customer group? Magento allows you to show products only to certain customers. Check to make sure that as a logged-out, anonymous user, you can see the products.
Hope that helps,
Joe
Have you configured multiple stores, websites or store views in your Magento instance? Whether or not Magento displays a product depends on a lot of settings, but if one user can, and another user cannot see them, it's most likely related to which store view they are accessing.
The store view Magento is showing isn't always determined by the URL alone, there is also a setting which is stored in the cookie and can be changed via a dropdown (in the default templates anyway).
Stores are configured via System > Manage Stores. If you have multiple rows in there you have multiple store views (or websites or stores).

Resources