Magento News

 

How to get Post Data from Magento’s Onepage Checkout?

in order to add a customers comment field in the Magento Checkout, I added a text field in the appropriate template file and added the comment to the order using an observer like this:

        $comment = strip_tags(Mage::app()->getRequest()->getParam('cpOrderComment'));  

        if(!empty($comment)){
           $observer->getEvent()->getOrder()->setCustomerNote($_comments);
        }

This worked perfectly using the OnestepCheckout extension, however it does not work with Magento’s Onepage Checkout. The “getParam(‘cpOrderComment’)” is always empty and now I not sure how to get the value of my text field.

Any ideas would be greatly appreciated!

How to get Post Data from Magento’s Onepage Checkout?

Possibly Related Posts:


 

Leave a Reply