Skip Checkout in Magento for a downloadable product

前端 未结 3 1054
后悔当初
后悔当初 2020-12-03 05:56

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

3条回答
  •  天命终不由人
    2020-12-03 06:34

    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 " $item->getLinkHash(),
                '_secure'   => true,
                '_nosid'    => true
            )) . "'>Download";
        }
    }
    

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

    Hope that helps. Thanks, Joe

提交回复
热议问题