Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. OfferID IncompatibleOfferID Active(Y/N)
  2. ----------------------------------------------
  3. 1 13 Y
  4. 1 22 Y
  5. 2 21 N
  6.  
  7. public function _prepareCollection()
  8. {
  9. $items = Mage::getModel('offer/offer')->getCollection();
  10.  
  11. $this->setCollection($items);
  12. }
  13.  
  14. /** @var Varien_Data_Form $form */
  15. $form = new Varien_Data_Form(array(
  16. 'id' => 'edit_form',
  17. 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
  18. 'method' => 'post',
  19. 'enctype' => 'multipart/form-data',
  20. ));
  21.  
  22. /** ETC ETC **/
  23.  
  24. $promoFieldset = $form->addFieldset('related_promo', array(
  25. 'legend' => Mage::helper('offer')->__('Promozioni'))
  26. );
  27.  
  28. $relatedProdsGrid = $this
  29. ->getLayout()
  30. ->createBlock('offer/adminhtml_compatibleoffer_edit_offer_grid')
  31. ;
  32.  
  33. $promoFieldset->addElement($relatedProdsGrid);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement