You could do this by customizing the code in:
/includes/modules/pages/account_history_info/header_php.php
with the code in RED:
and, using your templates and overrides, customize the code for:Code:if (!isset($_GET['order_id']) || (isset($_GET['order_id']) && !is_numeric($_GET['order_id']))) { zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } // bof: reset download if ($_GET['update'] > 0) { global $db; $sql = "UPDATE " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " SET download_maxdays= '" . DOWNLOAD_MAX_DAYS . "', download_count= '" . DOWNLOAD_MAX_COUNT . "' WHERE orders_products_download_id= '" . (int)$_GET['id'] . "'"; $db->Execute($sql); $messageStack->add_session('header', 'Download has been updated, please retry ...', 'caution'); zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$_GET['order_id'], 'SSL')); } // eof: reset download $customer_info_query = "SELECT customers_id FROM " . TABLE_ORDERS . " WHERE orders_id = :ordersID";
/includes/templates/your_templates_dir/templates/tpl_modules_downloads.php
with the code in RED:
Code:<td class="centeredContent"><?php echo ($is_downloadable) ? '<a href="' . zen_href_link(FILENAME_DOWNLOAD, 'order=' . $last_order . '&id=' . $downloads->fields['orders_products_download_id']) . '">' . zen_image_button(BUTTON_IMAGE_DOWNLOAD, BUTTON_DOWNLOAD_ALT) . '</a>' : '<a href="' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $last_order . '&id=' . $downloads->fields['orders_products_download_id'] . '&update=1') . '">' . zen_image_button(BUTTON_IMAGE_DOWNLOAD, BUTTON_DOWNLOAD_ALT) . '</a>'; ?></td>


Reply With Quote
