0

Is it possible to get a cart link from a quote ID create from the magento API. ie I want to add items to the cart using the magento API that would be initiated from a 3rd party website. And when they are ready to check out id have provided them a link to their magento cart.

1
  • I am trying to the same exact thing... Did you ever get this working?
    – embo
    Sep 8 '16 at 15:35
1

Take a look @ http://www.magentocommerce.com/api/soap/checkout/cart/cart.create.html

Returns:

Type    Description
int     ID of the created empty shopping cart

You would have to create your own link and controller to reload the cart. Take a look at Programmatically add items to cart and assign to guest user

8
  • Ya I am using that api call as well as magentocommerce.com/api/soap/checkout/cartProduct/… to add items to the cart. Though with the quote id I get back from the cart create I am trying to create a link to a cart a user could hit in the browser.
    – richv
    Jul 28 '14 at 18:20
  • Will your 3rd party website send an email to the customer? Jul 28 '14 at 18:30
  • All you need is to create a custom module in magento with a controller that will reload (see link above) the quote from the id in your email Jul 28 '14 at 18:32
  • It wont email the customer. would that matter? when they checkout, they'll check out in magento.
    – richv
    Jul 28 '14 at 18:54
  • I looked at that link. In the code: code $id = $this->getRequest()->getParam('quote_id'); $store_id = $this->getRequest()->getParam('store_id'); .... $this->_getSession()->clear(); $this->_getQuote() ->setQuoteId($id) ->setStoreId($store_id) ->setIsActive(true) ->load($id);/code ... in what context is "this" object. ie what type of object is this. "code $this = Mage::app() /code " ??
    – richv
    Jul 28 '14 at 18:58
1

ricv, first, you want to add product using using soap api for third party site:

1.create quote:http://www.magentocommerce.com/api/soap/checkout/cart/cart.create.html

2.add Product in quote:http://www.magentocommerce.com/api/soap/checkout/cartProduct/cart_product.add.html

If,your is register customer ,then Allows you to move products from the current quote to a customer quote.

http://www.magentocommerce.com/api/soap/checkout/cartProduct/cart_product.moveToCustomerQuote.html

1
  • Thank you. I am currently doing steps 1 and 2. Though I am confused on the difference between a quote to a customer quote? And is this necessary to get a link to a shopping cart in magento I can direct users to?
    – richv
    Jul 28 '14 at 20:45
0

Standard cart link for Magento is always the same {site_url}/checkout/cart/, you can create it by using:

Mage::getUrl('checkout/cart/index')

1
  • That would be code written on the server serving the instance of magento. But i dont see the link between the quote id I would get from cart create via a rest call initiated on a 3rd party website to and a new browser session that i could link to.
    – richv
    Jul 28 '14 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.