Magento后台订单页面显示产品url地址 /app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name.php public function getProductUrl() { $productData = $this->getItem()->getData(); $productId = $productData['product_id']; $productSource = Mage::getModel('catalog/product'); $pdata = $productSource->load($productId)->getData(); $pUrlPath = Mage::getUrl($pdata['url_path']); return $pUrlPath; }
第二步:调用此方法 /app/design/adminhtml/default/default/template/sales/items/column/name.phtml <h5 class="title"> <a target="_blank" href="<?php echo rtrim(str_replace("index.php/","",$this->getProductUrl()),"/")?>"> <?php echo $this->htmlEscape($_item->getName()) ?> </a> </h5>
(责任编辑:最模板) |