Warning: Use of undefined constant wp_cumulus_widget - assumed 'wp_cumulus_widget' (this will throw an Error in a future version of PHP) in /home/blogoptimise/public_html/wp-content/plugins/wp-cumulus/wp-cumulus.php on line 375
Optimise Blog » Add a link to the product on the admin order page
Warning: Use of undefined constant style - assumed 'style' (this will throw an Error in a future version of PHP) in /home/blogoptimise/public_html/wp-content/themes/optimblog/functions.php on line 522

Add a link to the product on the admin order page

Written by billy

Topics: Magento

We recently had a client who asked to have a link added to the magento admin order page so they could easily see what the product was. It requires a core hack so isn’t recommended. If you want to go ahead here’s the code:

Open app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml at look and at ~ line 68 until you find

[php]
<?php echo $this->getColumnHtml($_item, ‘name’) ?>
[/php]

Replace with:

[php]
<?php $_pullProduct = Mage::getModel(‘catalog/product’)->loadByAttribute(‘sku’, $_item->getData(‘sku’)); ?>
<a target="_blank" rel="external" href="<?php echo Mage::getUrl() . $_pullProduct->getData(‘url_path’); ?>"><?php echo $this->getColumnHtml($_item, ‘name’) ?></a>
[/php]

And save. You should now a link to the product in the admin order page.

Leave a Comment Here's Your Chance to Be Heard!