user877718
user877718

Reputation: 11

How to link into a cart outside of magento that was built with the cart api's

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.

Upvotes: 0

Views: 431

Answers (1)

Jona
Jona

Reputation: 359

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!

Upvotes: 0

Related Questions