GiacomoG Posted January 31, 2013 Share Posted January 31, 2013 Hi All, from the product page I need a download link to the virtual product. Looking at the admin theme, inside the virtualproduct.tpl, I saw that the virtual product link is generated using the code below {$product->productDownload->getHtmlLink(false, true)} Now I'd like to use a similar code inside the product.tpl. Any suggestions? Thank you very much, Giacomo Link to comment Share on other sites More sharing options...
GiacomoG Posted February 4, 2013 Author Share Posted February 4, 2013 anyone there? Link to comment Share on other sites More sharing options...
razaro Posted February 4, 2013 Share Posted February 4, 2013 Hi I did modification that enables direct download of free virtual products, check out files here . But thing you maybe only need is overriding class Product <?php class Product extends ProductCore { public function getFreeDownload($product_id) { $id_product_download = (int)ProductDownload::getIdFromIdProduct((int)$product_id); if ($id_product_download){ $download = new ProductDownload((int)$id_product_download); self::$smarty->assign('product_download', $download); } } } And then in product.tpl use {$product_download->filename} Link to comment Share on other sites More sharing options...
GiacomoG Posted February 4, 2013 Author Share Posted February 4, 2013 Wo! Thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts