2

I have been trying to give link to download the product image added by user in sales view order's item ordered phtml(currently it shows only product image name). I'm new to magento and have no idea how to do it. But on searching I found the files which prints the item ordered's information which is in

app\design\adminhtml\default\default\template\custom\sales\order\view\items.phtml.

Now I need to add link to product added and I should not be writing code inside core files but by overriding files with my custom files. How to override the core files with my custom files.

Is there any tutorials? I followed this http://sohelrana09.wordpress.com/2011/06/24/how-to-overwrite-sales-view-order-phtml-file-in-magento/

But this didnt affect anything on changing the content inside the custom folder as mentioned in it.

Please help.

1 Answer 1

2

Create a new theme, copy the template, change it. DON'T CHANGE ANY CORE FILES. After that said, you can get the Product from the order item:

$item->getProduct->getTypeId() == Mage_Downloadable_Model_Product_Type::TYPE_DOWNLOADABLE

and if yes you can get the type instance: $type = $item->getProduct()->getTypeInstance() and from there the Links: $type->getLinks()

To have your own template set the package or theme in the backend and then save your files here:

/app/design/<package|default>/<theme|default>/template/custom/sales/order/view/items.phtml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.