Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

display customer_id in account.php


dahui

Recommended Posts

I think the question is pretty clear by topic ;)

 

this is what I have:

accoun.php

 

<!-- body_text //-->
   </td>
 </tr>
</table>
<div class="positionmid_right_main">
<table border="0" width="98%" cellspacing="0" cellpadding="0"><tr>
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 $customer_info_query = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$HTTP_GET_VARS['customers_id'] . "'");

 if ($messageStack->size('account') > 0) {
 
?>
     <tr>
       <td><?php echo $messageStack->output('account'); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }

 if (tep_count_customer_orders() > 0) {
?>
     <tr>
       <td><table border="0" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b>Hier finden Sie eine Übersicht über alle Ihre Bestellungen     </b><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . tep_image_button('button_history.gif', OVERVIEW_SHOW_ALL_ORDERS) . '</a>'; ?></td>
         </tr>
       </table></td>
     </tr>

     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo MY_ACCOUNT_TITLE; ?></b>   Kundennummer:  
           
           <?php 
           echo $customer_info_query['customer_id']; 
           
           ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>

 

but my php skills aren't the bestas you can see

 

any help?

 

I thought I could call the customers id with

$customer_info_query = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$HTTP_GET_VARS['customers_id'] . "'");

 

tried than to display it with

<?php

echo $customer_info_query['customer_id'];

 

?>

but it diddnt work :(

beeing logged in it should be possible to echo it somehow

 

thx for yr input

dahui

Link to comment
Share on other sites

you need a query and then you compare with the $customer_id global var.

$customer_info = tep_db_fetch_array($check_customer_query);
echo $customer_info['customer_id'];

and when you compare:

$customer_info_query = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$customer_id . "'");

Link to comment
Share on other sites

hallo enigma and thx alot for having an eye on my prob :)

 

i am not that experienced and all my php knowledge is autodidactic by trial and error

 

I played arround but do not get it to work, I see what the code you provide does,

 

first build a db query, compare i with global and echo it, whereever I do place the codesnipplets it doesnt display the customer id

 

could you push me bit more where to put the sniplets than I may understand

 

thx dahui

 

 

you need a query and then you compare with the $customer_id global var.

$customer_info = tep_db_fetch_array($check_customer_query);
echo $customer_info['customer_id'];

and when you compare:

$customer_info_query = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$customer_id . "'");

Link to comment
Share on other sites

whatever I do I get a

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/elflein-kosmetik.de/httpsdocs/includes/functions/database.php on line 99

 

dahui

Link to comment
Share on other sites

So first you build your query and compare it so you get the correct customer id

$customer_info_query = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$customer_id . "'");

without the "where" comparison you get all customers

then when you want to display

 

$customer_info = tep_db_fetch_array($check_customer_query);
echo $customer_info['customer_id'];

you now you setup the array that fetches the various sql fields and in this particular case the customer id so its the array you echo and not the query. If you need to have other fields from the customer table you just add them after the "select" with comas.

Link to comment
Share on other sites

I am surely nerving with this, sorry :(

 

so my account.php starts like

/*
 $Id: account.php,v 1.61 2003/06/09 23:03:52 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/


 require('includes/application_top.php');
 
 $customer_info_query = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$customer_id . "'");
 $customer_info = tep_db_fetch_array($check_customer_query);
 
 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
?>

 

and the in the body I call

 

<table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"  width="50%" >
                   
           <b><?php echo MY_ACCOUNT_TITLE; ?></b>
           </td>
           <td align="right" width="50%" class="smalltext">Kunden-Nr.: <b><?php echo $customer_info['customer_id'];?></b>  
           </td>
         
         
         </tr>
       </table>

 

result:

 

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/elflein-kosmetik.de/httpsdocs/includes/functions/database.php on line 99

 

:o

 

dahui

Link to comment
Share on other sites

  function tep_db_fetch_array($db_query) {
   return mysql_fetch_array($db_query, MYSQL_ASSOC);

 

is the part of the database php

 

as it works for the other fetches there must be s.th with ths code you provided me??

 

dahui

Link to comment
Share on other sites

this line that does the fetch

 

$customer_info = tep_db_fetch_array($check_customer_query);

 

move it after the check for the registered session

 

because the $custoner_id isnt set until the login is through

Link to comment
Share on other sites

<?php
/*
 $Id: account.php,v 1.61 2003/06/09 23:03:52 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/


 require('includes/application_top.php');
 
 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }
 
 $customer_info_query = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$customer_id . "'");
 $customer_info = tep_db_fetch_array($check_customer_query);  

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
?>

 

oh my god arghhhhhhhhhhhhh

doe not work either

 

still same error

 

dahui

 

man thx to investigate so much in me

Link to comment
Share on other sites

<?php
/*
 $Id: account.php,v 1.61 2003/06/09 23:03:52 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/


 require('includes/application_top.php');
 
 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }
 
 $customer_info_query = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$customer_id . "'");
 $customer_info = tep_db_fetch_array($customer_info_query); 

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
?>

 

now you will kick my ass for sure :(

same error

 

dahui

Link to comment
Share on other sites

  $newsletter_query = tep_db_query("select customers_newsletter from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
 $newsletter = tep_db_fetch_array($newsletter_query);

 

is a standard osc quesry from account_newsletter.php

 

cannot see the differnce ????

 

 

dahui

Link to comment
Share on other sites

I give it a try here is the complete account.php

 

<?php
/*
 $Id: account.php,v 1.61 2003/06/09 23:03:52 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/


 require('includes/application_top.php');
 
 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }
 
 $customer_info_query = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$customer_id . "'");
 $customer_info = tep_db_fetch_array($customer_info_query); 

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->

<!-- body_text //-->
   </td>
 </tr>
</table>
<div class="positionmid_right_main">
<table border="0" width="98%" cellspacing="0" cellpadding="0"><tr>
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 if ($messageStack->size('account') > 0) {
?>
     <tr>
       <td><?php echo $messageStack->output('account'); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }

 if (tep_count_customer_orders() > 0) {
?>
     <tr>
       <td><table border="0" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b>Hier finden Sie eine Übersicht über alle Ihre Bestellungen     </b><?php echo '<a href="'. tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . tep_image_button('button_history.gif', OVERVIEW_SHOW_ALL_ORDERS) . '</a>'; ?></td>
         </tr>
       </table></td>
     </tr>

     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"  width="50%" >
                   
           <b><?php echo MY_ACCOUNT_TITLE; ?></b>
           </td>
           <td align="right" width="50%" class="smalltext">Kunden-Nr.: <b><?php echo $customer_info['customer_id'];?></b>  
           </td>
         
         
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_personal.gif'); ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . MY_ACCOUNT_INFORMATION . '</a>'; ?></td>
                 </tr>
                 <tr>
                   <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . MY_ACCOUNT_ADDRESS_BOOK . '</a>'; ?></td>
                 </tr>
                 <tr>
                   <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL') . '">' . MY_ACCOUNT_PASSWORD . '</a>'; ?></td>
                 </tr>
               </table></td>
               <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo MY_ORDERS_TITLE; ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_orders.gif'); ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . MY_ORDERS_VIEW . '</a>'; ?></td>
                 </tr>
               </table></td>
               <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo EMAIL_NOTIFICATIONS_TITLE; ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_notifications.gif'); ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '">' . EMAIL_NOTIFICATIONS_PRODUCTS . '</a>'; ?></td>
                 </tr>
               </table></td>
               <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
   </table>
   </td>
 </tr>
</table>

</div>
<!-- body_eof //-->

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

Link to comment
Share on other sites

give me a minute I'll try it here

 

man you got all the time you want/need

you see I am about to finish beta and go into alpha-testing with a dedicated group of users. I know that at least 2 of them will say:"where can I see my customer ID?"

 

thx so much but strange isn't it, now that you gave me the direction, I did as ususal and searched over al files, thats when I found the string from account_newsletter.php and compareing it should work <_<

 

dahui

Link to comment
Share on other sites

must be something else mike. I even changed the query to print names, ids seems ok here.

 

here is with what I tried:

  require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);

if (!tep_session_is_registered('customer_id')) {
  $navigation->set_snapshot();
  tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}

$customer_info_query = tep_db_query("select customers_id, customers_firstname from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$customer_id . "'");
$customer_info = tep_db_fetch_array($customer_info_query);

Link to comment
Share on other sites

it is so strange as other files doing the same work, eg when I sen the order to customer in checkout_process.php there issimilar and with the code below I dsplay cutomer id in email

 

// lets start with the email confirmation

 $email_order = "Hallo " . $order->customer['firstname'] . " " . $order->customer['lastname'] . "\n\nIhre Bestellung ist wie folgt in unserem System eingegangen:\n" .
                EMAIL_SEPARATOR . "\n" .
                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
                EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
 if ($order->info['comments']) {
   $email_order .= EMAIL_TEXT_COMMENTS_HEADLINE . "\n\n" . tep_db_output($order->info['comments']) . "\n\n";
 }
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
                 EMAIL_SEPARATOR . "\n" .
                 $products_ordered .
                 EMAIL_SEPARATOR . "\n";

 for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
   $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
 }

 if ($order->content_type != 'virtual') {
   $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
                   EMAIL_SEPARATOR . "\n" .
                   tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
 }

 $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
                 EMAIL_SEPARATOR . "\n" .
                 tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
 if (is_object($$payment)) {
   $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
                   EMAIL_SEPARATOR . "\n";
   $payment_class = $$payment;
   $email_order .= $payment_class->title . "\n\n";
   if ($payment_class->email_footer) {
     $email_order .= $payment_class->email_footer . "\n";
     $email_order .= "KdNr: " . $customer_id . " / " . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . " / v." . strftime(DATE_FORMAT_SHORT) . "\n\n";
     $email_order .= $payment_class->email_footer2 . "\n";
   }
 }
 tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'],  EMAIL_TEXT_SUBJECT . ' - '  . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id , $email_order, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);

Link to comment
Share on other sites

ok I tried this file and works just test it with your shop

<?php
/*
$Id: privacy.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/
 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);


 if (!tep_session_is_registered('customer_id')) {
    $navigation->set_snapshot();
    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}

$customer_info_query = tep_db_query("select customers_id, customers_firstname from " . TABLE_CUSTOMERS . " where customers_id = '". (int)$customer_id . "'");
$customer_info = tep_db_fetch_array($customer_info_query); 

?>

<!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>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- 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="2" cellpadding="2">
<!-- 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="0">
      <tr>
      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    </tr>
    <tr>
      <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
          <td width="100%" class="main">Customer ID:<b><?php echo $customer_info['customers_id'];?></b></td>
</tr>
</td></table>
<!-- body_text_eof //-->
  <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
  </table></td>
</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'); ?>

Link to comment
Share on other sites

maybe solved. not sure if my approach is right

 

i did not build query and make fetch, i simply adress/call the customers id with

 

<table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"  width="50%" >

           <b><?php echo MY_ACCOUNT_TITLE; ?></b>
           </td>
           <td align="right" width="50%" class="smalltext">Kunden-Nr.: <b><?php echo (int)$customer_id;?></b>  
           </td>


         </tr>
       </table>

 

and it workz. we are loged in so the (int)$customer_id can be used. am I creating problemsdoing it that way?

 

tried switching customer and seems to do the job

 

dahui

Link to comment
Share on other sites

yes of course it will work. Gee man I usually setup queries as I am thinking to extend them in some way in the future.

 

But since a global exists and you only gonna need the id part why you would need a query whatsoever :blink:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...