php - How to make var_dump();die in magento downloadble products -


i want make var_dump();die; obtain model of downloadble product,

i tried add method when admin makes click on upload donwadle information magento\app\design\frontend\rwd\default\template\downloadable\catalog\product\links.phtml in _preparelayout() process doesn't work spected.

 protected function _preparelayout() {     $this->setchild(         'upload_button',         $this->getlayout()->createblock('adminhtml/widget_button')->adddata(array(             'id'      => '',             'label'   => mage::helper('adminhtml')->__('upload files'),             'type'    => 'button',             'onclick' => 'downloadable.massuploadbytype(\'links\');downloadable.massuploadbytype(\'linkssample\')'          ))        );     $links=mage::getmodel('downloadable/link')     ->getcollection()     ->addfieldtofilter('product_id',array('eq'=>$productid));      var_dump($links);die; } 

try use zend_debug:

zend_debug::dump($product->debug()) 

when try var_dump lot of data models, run error or slow down pc. if use zend_debug in place of magento var_dump limit data show not bug computer.

try it!

if method "$links->debug()" throw error use directly:

zend_debug::dump($links) 

font: http://www.atwix.com/magento/debugging-hints/


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -