Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customising osCommerce (additional utility)


jamesr19

Recommended Posts

Posted

Hi, I am trying to create a system that allows me to generate licenses for a product after a user has purchased it. All of my user-side worki is complete, and it works perfectly, but i am stuggling a bit with the admin license managing section. To create the page, i used the customers.php as a template file (i copy & pasted, then edited) to for my new page (licenses.php)

Below is the current code for the page ( i have removed the editing/updating bit because i hav'nt had time to play with it yet.)

 

<?php
/*

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 $error = false;
 $processed = false;

 if (tep_not_null($action)) {
   switch ($action) {
     case 'update':
     break;
     case 'deleteconfirm':
       $licenses_id = tep_db_prepare_input($HTTP_GET_VARS['cID']);

       tep_db_query("delete from " . TABLE_SITE_KEYS . " where license_id = '" . (int)$licenses_id . "'");

       tep_redirect(tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action'))));
       break;
     default:
       $license_ids_query = tep_db_query("select c.customers_id, c.customers_lastname, c.customers_firstname, l.license_id, l.orders_id, l.license_server, l.license_key, l.license_type, l.license_date_edited, op.products_name from " . TABLE_CUSTOMERS . " c, " . TABLE_SITE_KEYS . " l, " . TABLE_ORDERS_PRODUCTS . " op where c.customers_id = l.customers_id and op.orders_products_id = l.orders_products_id and l.license_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");
       $license_ids = tep_db_fetch_array($license_ids_query);
       $cInfo = new objectInfo($license_ids);
   }
 }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
<?php
 # edit/update starts here!
 if ($action == 'edit' || $action == 'update') {
?>
<?php
 }
?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
 if ($action == 'edit' || $action == 'update') {
   $newsletter_array = array(array('id' => '1', 'text' => ENTRY_NEWSLETTER_YES),
                             array('id' => '0', 'text' => ENTRY_NEWSLETTER_NO));
?>
<?php
 } else {
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr><?php echo tep_draw_form('search', FILENAME_LICENSES, '', 'get'); ?>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
           <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); ?></td>
         </form></tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr class="dataTableHeadingRow">
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMER; ?></td>
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SERVER; ?></td>
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_KEY; ?></td>
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_TYPE; ?></td>
               <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
             </tr>
<?php
   $search = '';
   if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) {
     $keywords = tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['search']));
     $search = "and l.license_server like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_lastname '%" . $keywords . "%'";
   }
   $licenses_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, l.license_id, l.license_server, l.license_key, l.license_type from " . TABLE_CUSTOMERS . " c, " . TABLE_SITE_KEYS . " l where c.customers_id = l.customers_id " . $search . " order by c.customers_lastname, c.customers_firstname";
   $licenses_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $licenses_query_raw, $licenses_query_numrows);
   $licenses_query = tep_db_query($licenses_query_raw);
   while ($licenses = tep_db_fetch_array($licenses_query)) {
/*
     if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $customers['customers_id']))) && !isset($cInfo)) {
       $country_query = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$customers['entry_country_id'] . "'");
       $country = tep_db_fetch_array($country_query);

       $reviews_query = tep_db_query("select count(*) as number_of_reviews from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers['customers_id'] . "'");
       $reviews = tep_db_fetch_array($reviews_query);

       $customer_info = array_merge($country, $info, $reviews);

       $cInfo_array = array_merge($customers, $customer_info);
       $cInfo = new objectInfo($cInfo_array);
     }*/

     if (isset($cInfo) && is_object($cInfo) && ($licenses['license_id_id'] == $cInfo->license_id)) {
       echo '          <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->license_id . '&action=edit') . '\'">' . "\n";
     } else {
       echo '          <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID')) . 'cID=' . $licenses['license_id']) . '\'">' . "\n";
     }
?>
               <td class="dataTableContent"><?php echo $licenses['customers_lastname'] . ', ' . $licenses['customers_firstname']; ?></td>
               <td class="dataTableContent"><?php echo $licenses['license_server']; ?></td>
               <td class="dataTableContent"><?php echo $licenses['license_key']; ?></td>
               <td class="dataTableContent"><?php echo $licenses['license_type']; ?></td>
               <td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($licenses['license_id'] == $cInfo->license_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID')) . 'cID=' . $licenses['license_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
             </tr>
<?php
   }
?>
             <tr>
               <td colspan="4"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td class="smallText" valign="top"><?php echo $licenses_split->display_count($licenses_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_LICENSES); ?></td>
                   <td class="smallText" align="right"><?php echo $licenses_split->display_links($licenses_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y', 'cID'))); ?></td>
                 </tr>
<?php
   if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) {
?>
                 <tr>
                   <td align="right" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_LICENSES) . '">' . tep_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>
                 </tr>
<?php
   }
?>
               </table></td>
             </tr>
           </table></td>
<?php
 $heading = array();
 $contents = array();

 switch ($action) {
   case 'confirm':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_LICENSE . '</b>');

     $contents = array('form' => tep_draw_form('customers', FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->license_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_DELETE_INTRO . '<br><br><b>' . $cInfo->license_key . '-' . $cInfo->license_server . '</b>');
     $contents[] = array('text' => '<br>' . TEXT_INFO_CUSTOMER . ' ' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname);
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
   default:
     if (isset($cInfo) && is_object($cInfo)) {
       $heading[] = array('text' => '<b>' . $cInfo->license_key . '-' . $cInfo->license_server . '</b>');

       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a>');
       $contents[] = array('text' => '<br>' . TEXT_INFO_CUSTOMER . ' ' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname);
       $contents[] = array('text' => '<br>' . TEXT_INFO_SERVER . ' ' . tep_date_short($cInfo->license_server));
       $contents[] = array('text' => '<br>' . TEXT_INFO_KEY . ' '  . tep_date_short($cInfo->license_key));
       $contents[] = array('text' => '<br>' . TEXT_INFO_TYPE . ' ' . $cInfo->license_type);
       $contents[] = array('text' => '<br>' . TEXT_DATE_MODIFIED . ' ' . tep_date_short($cInfo->license_date_edited));
     }
     break;
 }

 if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
   echo '            <td width="25%" valign="top">' . "\n";

   $box = new box;
   echo $box->infoBox($heading, $contents);

   echo '            </td>' . "\n";
 }
?>
         </tr>
       </table></td>
     </tr>
<?php
 }
?>
   </table></td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

The problem!:

The problem i have is that when i enter the page, it does not display the box on the right side that contains all of the details of the selected license. Even if i go to 'licenses.php?cID=1' , it still does not display the box, but if i go to 'licenses.php?cID=1&action=confirm' it displays the box with the confirmation content. When I click the delete button, i don't have any problems, and it deletes it perfectly.

 

 

I was also wondering whether anyone knows if someone has released an addon/contribution that checks that a paypal payment has actually been recieved before the customer has the ability to download a file (this is if they have scipped the payment section of the checkout process).

 

 

 

Many thanks,

James

Posted
Hi, I am trying to create a system that allows me to generate licenses for a product after a user has purchased it. All of my user-side worki is complete, and it works perfectly, but i am stuggling a bit with the admin license managing section. To create the page, i used the customers.php as a template file (i copy & pasted, then edited) to for my new page (licenses.php)

Below is the current code for the page ( i have removed the editing/updating bit because i hav'nt had time to play with it yet.)

 

<?php
/*

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 $error = false;
 $processed = false;

 if (tep_not_null($action)) {
   switch ($action) {
     case 'update':
     break;
     case 'deleteconfirm':
       $licenses_id = tep_db_prepare_input($HTTP_GET_VARS['cID']);

       tep_db_query("delete from " . TABLE_SITE_KEYS . " where license_id = '" . (int)$licenses_id . "'");

       tep_redirect(tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action'))));
       break;
     default:
       $license_ids_query = tep_db_query("select c.customers_id, c.customers_lastname, c.customers_firstname, l.license_id, l.orders_id, l.license_server, l.license_key, l.license_type, l.license_date_edited, op.products_name from " . TABLE_CUSTOMERS . " c, " . TABLE_SITE_KEYS . " l, " . TABLE_ORDERS_PRODUCTS . " op where c.customers_id = l.customers_id and op.orders_products_id = l.orders_products_id and l.license_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");
       $license_ids = tep_db_fetch_array($license_ids_query);
       $cInfo = new objectInfo($license_ids);
   }
 }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
<?php
 # edit/update starts here!
 if ($action == 'edit' || $action == 'update') {
?>
<?php
 }
?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
 if ($action == 'edit' || $action == 'update') {
   $newsletter_array = array(array('id' => '1', 'text' => ENTRY_NEWSLETTER_YES),
                             array('id' => '0', 'text' => ENTRY_NEWSLETTER_NO));
?>
<?php
 } else {
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr><?php echo tep_draw_form('search', FILENAME_LICENSES, '', 'get'); ?>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
           <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); ?></td>
         </form></tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr class="dataTableHeadingRow">
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMER; ?></td>
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SERVER; ?></td>
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_KEY; ?></td>
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_TYPE; ?></td>
               <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
             </tr>
<?php
   $search = '';
   if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) {
     $keywords = tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['search']));
     $search = "and l.license_server like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_lastname '%" . $keywords . "%'";
   }
   $licenses_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, l.license_id, l.license_server, l.license_key, l.license_type from " . TABLE_CUSTOMERS . " c, " . TABLE_SITE_KEYS . " l where c.customers_id = l.customers_id " . $search . " order by c.customers_lastname, c.customers_firstname";
   $licenses_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $licenses_query_raw, $licenses_query_numrows);
   $licenses_query = tep_db_query($licenses_query_raw);
   while ($licenses = tep_db_fetch_array($licenses_query)) {
/*
     if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $customers['customers_id']))) && !isset($cInfo)) {
       $country_query = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$customers['entry_country_id'] . "'");
       $country = tep_db_fetch_array($country_query);

       $reviews_query = tep_db_query("select count(*) as number_of_reviews from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers['customers_id'] . "'");
       $reviews = tep_db_fetch_array($reviews_query);

       $customer_info = array_merge($country, $info, $reviews);

       $cInfo_array = array_merge($customers, $customer_info);
       $cInfo = new objectInfo($cInfo_array);
     }*/

     if (isset($cInfo) && is_object($cInfo) && ($licenses['license_id_id'] == $cInfo->license_id)) {
       echo '          <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->license_id . '&action=edit') . '\'">' . "\n";
     } else {
       echo '          <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID')) . 'cID=' . $licenses['license_id']) . '\'">' . "\n";
     }
?>
               <td class="dataTableContent"><?php echo $licenses['customers_lastname'] . ', ' . $licenses['customers_firstname']; ?></td>
               <td class="dataTableContent"><?php echo $licenses['license_server']; ?></td>
               <td class="dataTableContent"><?php echo $licenses['license_key']; ?></td>
               <td class="dataTableContent"><?php echo $licenses['license_type']; ?></td>
               <td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($licenses['license_id'] == $cInfo->license_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID')) . 'cID=' . $licenses['license_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
             </tr>
<?php
   }
?>
             <tr>
               <td colspan="4"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td class="smallText" valign="top"><?php echo $licenses_split->display_count($licenses_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_LICENSES); ?></td>
                   <td class="smallText" align="right"><?php echo $licenses_split->display_links($licenses_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y', 'cID'))); ?></td>
                 </tr>
<?php
   if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) {
?>
                 <tr>
                   <td align="right" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_LICENSES) . '">' . tep_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>
                 </tr>
<?php
   }
?>
               </table></td>
             </tr>
           </table></td>
<?php
 $heading = array();
 $contents = array();

 switch ($action) {
   case 'confirm':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_LICENSE . '</b>');

     $contents = array('form' => tep_draw_form('customers', FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->license_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_DELETE_INTRO . '<br><br><b>' . $cInfo->license_key . '-' . $cInfo->license_server . '</b>');
     $contents[] = array('text' => '<br>' . TEXT_INFO_CUSTOMER . ' ' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname);
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
   default:
     if (isset($cInfo) && is_object($cInfo)) {
       $heading[] = array('text' => '<b>' . $cInfo->license_key . '-' . $cInfo->license_server . '</b>');

       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_LICENSES, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a>');
       $contents[] = array('text' => '<br>' . TEXT_INFO_CUSTOMER . ' ' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname);
       $contents[] = array('text' => '<br>' . TEXT_INFO_SERVER . ' ' . tep_date_short($cInfo->license_server));
       $contents[] = array('text' => '<br>' . TEXT_INFO_KEY . ' '  . tep_date_short($cInfo->license_key));
       $contents[] = array('text' => '<br>' . TEXT_INFO_TYPE . ' ' . $cInfo->license_type);
       $contents[] = array('text' => '<br>' . TEXT_DATE_MODIFIED . ' ' . tep_date_short($cInfo->license_date_edited));
     }
     break;
 }

 if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
   echo '            <td width="25%" valign="top">' . "\n";

   $box = new box;
   echo $box->infoBox($heading, $contents);

   echo '            </td>' . "\n";
 }
?>
         </tr>
       </table></td>
     </tr>
<?php
 }
?>
   </table></td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

The problem!:

The problem i have is that when i enter the page, it does not display the box on the right side that contains all of the details of the selected license. Even if i go to 'licenses.php?cID=1' , it still does not display the box, but if i go to 'licenses.php?cID=1&action=confirm' it displays the box with the confirmation content. When I click the delete button, i don't have any problems, and it deletes it perfectly.

I was also wondering whether anyone knows if someone has released an addon/contribution that checks that a paypal payment has actually been recieved before the customer has the ability to download a file (this is if they have scipped the payment section of the checkout process).

Many thanks,

James

Not that I am aware.

 

However, it seems that download controller is used by people that have downloadable content.

Posted
Not that I am aware.

 

However, it seems that download controller is used by people that have downloadable content.

Ok.

Yes, when checkout is complete, the license is added to the database, and the customer is given a link to download the installation files.(the white space deviding my 2 questions in the previous post were not displayed for some reason)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...