开发者

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 Magent开发者_StackOverflow社区o?

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜