What is the issue.
This problem happens in specific scenario.
Usually there is a link on the product name to download the virtual products.
But if you have a virtual product (downloadable product) with a customization fields, then at My Account area, Order History page, the download link will not appear.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh46Dg9_PGq_z2jGKzKxKq9sLN_kQX2FBqbnQV-HpbOu82G-QdGdQBjdH_-bLcCa41d8xHxEN3g1o4wjwHT33CMfu08E0_JOJKYSpoB-Bpi_8LGsuYBIb_UEOtd6oumm3tiUC1FQPdyYjc/s400/prestashop-download-link-issue-at-order-history-my-account.png)
Here is my case:
I have download product (prestashop module), with one required text fields let customer to input store domain name. Before I set the customized field, everything works fine. But once I add the required customized filed, the link disappeared.
How to fix the issue.
To fix this problem, you need to modify the them file
YourStoreRoot/themes/YourStoreTheme/order-detail.tpl
You need to replace one line of code at location in this file as shown with code followed.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht84l15Dou9v27cOJtyl_byW5ekm638rrtpFVzi0o-d-0it7stHD1yCfa35kuSF4uql2KcEYeIrW6qTL3-9J4xrI5Xz-ZYjhL2E1kiGj4L_DwshEPvzov4_oLlt2PEu48UuiWg_UgnrUE/s400/prestashop-download-link-issue-at-order-history-my-account-location.png)
{if $product.download_hash && $invoice}
<a href="{$base_dir}get-file.php?key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}" title="{l s='download this product'}">
<img src="{$img_dir}icon/download_product.gif" class="icon" alt="{l s='Download product'}" />
</a>
<a href="{$base_dir}get-file.php?key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}" title="{l s='download this product'}">
{$product.product_name|escape:'htmlall':'UTF-8'}
</a>
{else}
{$product.product_name|escape:'htmlall':'UTF-8'}
{/if}
Here is screenshot after the problem is fixed.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkmrEetU1PZcG7bbbGKD_7mrQ636rKKVFsf1B99STBIcglnDAp4ZruFyInllTRP-ZRkPFSjHEPHMQ2xs_4TgVilsc9I-nEbqpmD6QEeE2WCt7OHF0eEWSHA9S1_7QOMWTFyGN_6tkT30E/s400/prestashop-download-link-issue-at-order-history-my-account-fxied.png)
1 comment:
THAAAAAAAAANNNNNNKKKKKKS so much !
24 hours I am trying to find a solution!
Post a Comment