customer反馈PriceFeedback增加查看产品链接和发邮件修改

由于发邮件已修改,这里显示增加产品链接

修改

app/code/community/Magazento/Priceproposal/Block/Admin/Item

下的grid.php

    public function getRowUrl($row) {
    //    return $this->getUrl('*/*/edit', array('item_id' => $row->getId()));
    
    	(int)$iid=$row->getId();
    	//由返回edit的链接改为返回product的url 2012-4-14
    	return Mage::getModel('priceproposal/item')->getProductUrl($iid);
    	
   }

修改

app/code/community/Magazento/Priceproposal/Block/Admin/Item/Grid/Renderer

下的Action.php增加一个editaction

$actions[] = array(
	        	'url' => $this->getUrl('*/*/edit', array('item_id' => $row->getId())),
	        	'caption' => Mage::helper('priceproposal')->__('Edit&email')
	         );

修改

app/code/community/Magazento/Priceproposal/Model

下的Item.php 增加function getProductUrl

	public function getProductUrl($item_id) {
	    $productData = Mage::getModel('priceproposal/item')->load($item_id)->getData();
	    $productId = $productData['product_id'];
	    $productSource = Mage::getModel('catalog/product');
	    $pdata = $productSource->load($productId)->getData();
	    $pUrlPath = '/'.$pdata['url_key'].'.html';
	    return $pUrlPath;
	}






你可能感兴趣的:(发邮件,产品链接,customer反馈,PriceFeedback)