I'm pre-generating coupon codes to be distributed to 3rd party promotional sites (such as Living Social). They will sell these coupon codes (which we will call voucher codes) at a discount or in bulk. The customer receives the coupon and comes to my site to redeem. Instead of going to the main page, there is a page setup specifically for redemption. A static form outside of Magento that I ultimately want to have verify the voucher and then send them to a shopping cart that has the item loaded and ready for checking.
I've figured out how to pass coupon data from the redemption form to Magento's shopping cart: www.website.com/&coupon=voucher2014
I would like to tap into Magento's database from that static page if possible. I was thinking when the user inputs their code and hits submit that it first checks Magento's database THEN proceeds to a populated checkout with the matching voucher/item. I believe you need to tap into Mage_SalesRule_Model_Coupon and the Mage_SalesRule_Model_Mysql4_Coupon model in order to query the Magento DB outside of Magento. Does anyone have a better method on how to query that model/db? Thanks.