Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Downloads settings question

    You could do this by customizing the code in:
    /includes/modules/pages/account_history_info/header_php.php

    with the code in RED:
    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";
    and, using your templates and overrides, customize the code for:
    /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>
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  2. #2
    Join Date
    Jun 2009
    Posts
    55
    Plugin Contributions
    0

    Default Re: Downloads settings question

    Thank you very much Linda for this impressive help. I didn't want to wait a day longer to thank you. I still don't know how is going to work, since I'm preparing a test site for the first time, I'll keep you updated with the progress. Once again thank you very much.

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Downloads settings question

    You are most welcome ... keep us posted ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Downloads Orders Status Settings - An EZ Solution!
    By vivaknievel in forum Managing Customers and Orders
    Replies: 5
    Last Post: 3 Aug 2007, 09:16 PM
  2. Downloads - Don't Forget Apache Settings
    By kosuke in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 11 Nov 2005, 06:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg