views:

446

answers:

2

Hello Magento boffins.

I am using Magento to build an eBooks site. For the release, we plan to have a number of free downloadable books. We were hoping that it would be possible to use the normal Magento 'catalog' functionality to add categories with products underneath. However, since these are free downloadable products, it doesn't really make sense to send users through the checkout when they try to download.

Does anyone know of a way to create a free downloadable product which bypasses the checkout altogether? I have noticed that there is a 'free sample' option for downloadable products, but I would prefer not to use this if I can as I plan to use this field for its intended purpose when I add paid products.

[EDIT] I have noticed that some of you have voted this question down for 'lack of question clarity'. For clarity, I want:

  1. to know if it is possible to create a downloadable product in Magento which doesn't require users to go through the usual checkout process (since it is free)
  2. and which is not the 'Free Sample' field of a downloadable product

Unfortunately I don't think I can ask this any more eloquently. [/EDIT]

A: 

My best blind guess (looking at the blocks and models in Mage_Downloadable) is using the product type instance. So, somewhere in your product templates, you may be able to do this:

// $_product is the current product
$links = $product->getTypeInstance(true)->getLinks();
if(count($links)) {
    foreach($links as $link) {
        print "<a href='". $this->getUrl('downloadable/download/link', array(
            'id'        => $item->getLinkHash(),
            '_secure'   => true,
            '_nosid'    => true
        )) . "'>Download</a>";
    }
}

If not, I hope that at least gets you on the right path.

Hope that helps. Thanks, Joe

Joseph Mastey
Thank you.It looks like one of my colleagues managed to do this with configurable products, but I'm not sure how. If I find out I will post it here.
Aaron Newton
A: 

Have a look at this link. It should solve your problem.

http://www.proxyutza.com/magento-how-to-add-download-links-on-product-page/

Jasim