0

enter image description here

In image the problem while adding cart value to order insert, link will be make blank but in my cart item has E-book and Print Book type link. how can i add in order table also. suggest me?

$_product = Mage::getModel('catalog/product')->load($product->getProductId());
$rowTotal = $product->getPrice() * $product->getQty();   
$orderItem = Mage::getModel('sales/order_item')  
->setStoreId($storeId)   
->setQuoteItemId(0)  
->setQuoteParentItemId(NULL)  
->setProductId($product->getProductId())  
->setProductType($_product->getTypeId())  
->setQtyBackordered(NULL)   
->setTotalQtyOrdered($product->getQty())  
->setQtyOrdered($product->getQty())   
->setName($_product->getName())  
->setSku($_product->getSku())  
->setPrice($product->getPrice())  
->setBasePrice($product->getPrice())  
->setOriginalPrice($product->getPrice())  
->setRowTotal($rowTotal)  
->setBaseRowTotal($rowTotal);  
2

You don't have to add it yourself; it should work out of the box. Here is a screenshot of my test environment;

So there aren't any actual links, but you can see a list of the products that have been purchased and how many times they are downloaded / how many times they can be downloaded (U = Unlimited).

The problem could be at multiple points. Start by looking at app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/name.phtml

On line 56, you'll find

<?php foreach ($this->getLinks()->getPurchasedItems() as $_link): ?>

The fetching of these links is done in Mage_Downloadable_Block_Adminhtml_Sales_Items_Column_Downloadable_Name

You'll see there it fetches the data from the tables downloadable_link_purchased and downloadable_link_purchased_item.

I suggest start looking in those tables to see whether there are even rows available for your order ID.

If there are, I think an extension in your shop might be trying to rewrite a part of this section and failing. Try disabling extensions that have something to do with the order grid and/or downloadable items.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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