Transfer Magento API cart to Magento Store session - php

first time with Magento, so sorry if it's a stupid question.
I have a website using the Magento API (get product list, information, and the cart) in python. I saw that the cart has is proper ID and session (it seems). Is there a way to transfer this cart / session in the Magento store ?
I started a new module/controller/action receiving a cart id from the API, but I can't figure it out on how to transfer the products from one to the other without calling the API again, from magneto.
Anyone has a clue ?

I didn't find a way to do it properly. But used a workaround. I'm using the Magento API, inside a Magento controller/action to manually transfer the products. I don't like it, but it's the only way I found.

Related

How to manage cart data with Laravel RESTFUL (Stateless) API

I have an eCommerce platform, I'm working on. I would want to enable visitors (guests) to add items to the cart without logging in first. I'm failing to have a cart identifier that separates guests' cart data. If it was not an API I was going to use Session. I'm failing to think of any best way to handle this scenario.
This is an eCommerce in laravel.

Send cart and user to another website to complete checkout process

One of my client runs a successful store using WooCommerce, and now he wishes to create another WooCommerce site with the exact same products. But since opening a new actual business is a big deal for him, he wish that after the users has placed items in their cart and clicked on "checkout", the user will be redirected to the first ("original") site and choose the shipping option and payment method and complete the checkout process there.
We have thought about it through, from different aspects, and finally the user insist this is the solution he wants to try.
Can it be done? If yes, does anyone know of a simple way to accomplish it? or what should I consider before trying to implement this solution.

How can I have multiple websites all checkout on a common domain?

I need to develop multiple e-commerce websites. Let's call them foobar1.com, foobar2.com and so on. The catch is, when you hit the final checkout button, the checkout process needs to happen at checkout.foobar.com for all domains.
Is this possible, and if so, how could it be done? Session data (that holds cart info) won't be available at the checkout.foobar.com, and neither will cookies.
One way I could get it to work is if I maintain the cart at foobar.com, which means everytime you add an item at foobar-n.com, I will make an API call to foobar.com which will update the cart.
Is there a better way to go about this?
For the sake of not leaving this unanswered:
I implemented the database solution, i.e. when you hit checkout, your cart contents are dumped into a database with a unique id, and you're then sent to checkout on foobar.com?id={uniqid} and cart contents are retrieved. When you successfully complete checkout, the items are removed from the DB. I also ran a nightly cron job that removed items from the DB that were more than 6 hours old (for those who didn't go through the checkout process).

Magento - migrating customer and order history to different store

Is there any possibility to move customer and order data between 2 magento sites?
I have a database which keeps giving wierd issues with the database so I intend to rebuild the site, adding in some extra features at the same time. I cannot loose the order and customer history though (including passwords etc) so Is there a way to do this?
I've got the same problem. I posted a question about this in the magento forum.
If i don't get an satisfying answer, i will write an application that reads and associates the customers and orders and writes both into the new store.
You can do that using the Magento SOAP API.

Create a simple shopping cart in wordpress?

I have a wordpress website, and I want to create a simple web commerce. When I mean simple, it's really simple: Some posts/pages are going to have a custom field named "price". These pages are going to have a link on it, and clicking on it, the user is going to be sent to a simple shopping cart. From the shopping cart, I'm going to create a checkout page, which is mainly a php page that connects to a payment gateway, showing credit cards and such. I'm going to create php files that validates info about these payments after the response from the gateway.
I'm not going to sell "products". I don't need postal offices, no address to deliver something, nothing. It's just a price and a php that receives confirmation from the payment gateway. Think of selling "courses" or something like that. A receipt of the buy is going to be in the database, so the client can reference it later.
So, I think I need to create:
A shopping cart page. This shopping cart can be made using cookies or the database. Which is the best approach?;
A checkout page;
A bunch of scripts to validate a response from the payment gateway;
A simple table that stores all the payments responses, containig price, user_id and such.
Am I forgetting something? What else should I be aware of when trying to create this plugin? I heard that wordpress don't use sessions, so I would need to create one in wordpress just for the carts. Does anyone knows about this issue?
(I don't want to use these complete e-commerce plugins that exist since I don't need all their features.)
I decided to use a cookie approach using $_COOKIE. The values in that cookie are a json_encoded associative array with product information, that is checked in the server with some validation. That way I don't have to mess up with $_SESSION in wordpress that I read is problematic, and the user can have the same shopping cart even if (s)he closes the browser.
One good example of simple e-commerce application is really simple e-commerce.
Just an option, if you are wanting a simple shopping cart (with PayPal integration) and are not wanting to reinvent the wheel, check out Simplecart JS. A javascript, persistent, shopping cart which allows your users to collect items and then proceed to the PayPal portal to complete the purchase.
An easy way to setup an online store is by using the Market theme.
Market is a theme template for Wordpress, that contains a built-in shopping cart system, and product administration tool for easily adding and editing products.
It connects with your Paypal account for processing your customer payments.
If you want to, you can play around with an online demo here:
http://www.markettheme.com/
That way you can try it out before you commit to anything.

Categories