0

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.

1

May be you'd better develop it inside magento, say as a new block at the cms page + custom controller?

So you can use $quote object inside your controller?

  • That's probably what I'll be doing. – sparecycle Aug 8 '14 at 14:48
  • Glad that answer was helpful, accept it if it is useful ) – Amasty Aug 8 '14 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.