Downloadbutton remains available after payment and download file.
Hello,
I think there is a small issue in the file tpl_modules_downloads.php :
Because after downloading a file (set to 1 time download) I could still download the file until I refresh the screen.
I didn't want this so I changed line 66 in: includes/templates/template_default/templates/tpl_modules_downloads.php
from:
<td class="downloadButton centeredContent"><?php echo ($file['is_downloadable']) ? '<a href="' . $file['link_url'] .
'" download="' . $file['filename'] . '">' . zen_image_button(BUTTON_IMAGE_DOWNLOAD, BUTTON_DOWNLOAD_ALT) . '</a>' : ' '; ?>
</td> to:
<td class="downloadButton centeredContent" onclick="location.reload()"><?php echo ($file['is_downloadable']) ? '<a href="' . $file['link_url'] .
' " download="' . $file['filename'] . '">' . zen_image_button(BUTTON_IMAGE_DOWNLOAD, BUTTON_DOWNLOAD_ALT) . '</a>' : ' '; ?>
</td>
After this change, everything will be updated immediately.
Dirk
Grass does not grow faster by pulling it
Zen Cart version 1.5.8a, PHP version 7.4.33
Bookmarks