php - Magento - Get custom form field value from product page -


i have magento shop in client wants sell personalized gift items. example pencil customer's girlfriend name.

in product page managed show in form product_addtocart_form fields one:

<input type="text" value="" id="gift_name" name="gift_name">

now have observer when user checkout (checkout_type_onepage_save_order_after) should custom field value can't figure out how.

i tried mage::app()->getfrontcontroller()->getrequest()->getparam('gift_name'); didn't work out.

i think parameter being passed form quantity, how can retrieve it?

you can use below code parameter url in observer function

$request    = $observer->getevent()->getdata('front')->getrequest();     $parameter  = $request->yourparametername; 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -