I need to add a field in my confirmation message in the block. I have my class here
class PMC_Manutention_Model_Observer extends Mage_Adminhtml_Block_Widget_Form_Container
{
public function adminhtmlWidgetContainerHtmlBefore(Varien_Event_Observer $observer) {
$block = $observer->getEvent()->getBlock();
if ($block instanceof Mage_Adminhtml_Block_Sales_Order_View) {
$order = $block->getOrder();
if($order->hasShipments()){
$message = Mage::helper('sales')->__('Are you sure you want to regenerate the stickers and resend the new tracking number to customer?');
$block->addButton('order_Sticker_bouton', array(
'label' => Mage::helper('sales')->__('Print Sticker'),
'onclick' => "confirmSetLocation('{$message}', '{$this->getPrintStickerUrl($order)}')",
));
}
}
}
I need to add a field like this
$block->addField('nb_sticker', 'text', array(
'name' => 'nb_sticker',
'label' => Mage::helper('sales')->__('nb sticker'),
'title' => Mage::helper('sales')->__('nb sticker'),
'required' => true,
));
any idea how to do that?
thanks for advance
Hi @bakaye
Can you please elaborate what you want to do? Because, the way you are trying to do will not help you add the field.
hi, you can see more detail here: http://magento.stackexchange.com/questions/85185/add-field-to-a-confirmation-block-message/85186?nor...