I'm trying to make a php files, to apply coupon code to shipping cart. I explain. We have a mobile-commerce application, and wanna add coupon code. Creating them on magento, adding rules, date, products, there is no problem here, but when customer have choose products, they enter the coupon code in a text field. My php files take the code they enter, and the shopping card Id (if there is one ? ) with a GET method, check if the coupon can be apply (rules, date, products, obviously ask magento "Can he does it ?"), and if magento says "yes", return the final price, or reduction (return like '5%' or '543$'), or return "error" if the coupon is not validate.
I try to look some code here : http://inchoo.net/ecommerce/magento/programming-magento/programmatically-create-apply-and-delete-shopping-cart-price-rule-in-magento/ also look at the magento's documentation, but not abble to finally find what I wanna do.
I don't really know where to start, every helps are welcome =)
EDIT: I'm actually here :
$couponCode = $_GET['couponCode']; $shoppingCartId = $_GET['shoppingCartId']; $result = $proxy->call($session, "cart_coupon.add", array($shoppingCartId, $couponCode));
but I don't know what to do with my result, (what can I return).