2

i am adding the form field through the observer but cannot able to post form field on mass action below my code

public function render(Varien_Object $row)
{

    $orderdata=Mage::getModel('sales/order')->load($row->getEntityId());

        $value .='Carrier:';
        $value .='<select name="carrier'.$row->getEntityId().'">';
        $options=$this->getCarrierOption();
        foreach ($options as $option) {
            $value .='<option value="'.$option['value'].'">'.$option['label'].'</option>';
        }
        $value .='</select>';
    return $value.$valyee;
    }
}  

any help will be appreciated.

1
  • This approach is wrong, you cannot post from the grid area because there is no form in grid area for posting the form fields, form fields must be in between <form></form> tags. Commented May 4, 2015 at 8:02

2 Answers 2

1

This approach is wrong, you cannot post from the grid area because there is no form in grid area for posting the form fields, form fields must be in between tags.

Try something like this.

<form method="post" id="sales_order_grid_massaction-form" action="">
    <select class="required-entry select absolute-advice local-validation" id="sales_order_grid_massaction-select">
<option value="order">Order</option>
</select>
</form>

you can see in my code all fields are come under form tag so you should do like this.

2
  • thank but i already figure this out Commented May 4, 2015 at 9:46
  • Ok no problem i gave answer but it was converted in to comment then i gave new answer with code example. Commented May 4, 2015 at 9:47
0

rather than using an Observer why don't you create a module. You could override the collection class and display the carrier type for each order and mass actions will work. You could try with the references from the following sites to help you out
https://inchoo.net/magento/how-to-extend-magento-order-grid/

http://www.demacmedia.com/magento-commerce/mini-tutorial-adding-column-to-orders-grid-in-magento-backend/

hope that helps!

1
  • i thin you don't understand my question. i am asking about input field value in mass action. Commented May 4, 2015 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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