I currently have a website where users can design their products, then check out. Checking out redirects to the main Magento website, where the product is added to their cart (the custom product exists in our Catalog with custom options). However, I'm not able to update the cart after redirecting from the external site. It redirects to the cart, but the item is not listed in the cart.
As I understand it, I need to pass information to Magento from the external site, where Magento can then take this information and add the product to the cart. I'm not sure how or where to send this information, though.
I have tried adding through URL by redirecting an HTTP form, as in:
$cart_url = "site.com/checkout/cart/add/product=" . $product_id . "&qty=1"; <form method="post" name="cart_form" action="<?php echo $cart_url; ?>"> <input> product id</input> <input> custom option 1</input> .... </form>
However this doesn't seem to update the cart. Looking around on the net has shown that this no longer works in Magento 1.8+, and I'll need to create either an Observer or other Controller.
How do I create an observer in Magento that I can pass the form data from an external site to in order to add to the cart? I'm fairly new to Magento, so I'm not entirely sure how to link the bits together.