RE: Proposal Discussion: My Account

winterradio <[email protected]>
Newsgroups gmane.comp.web.oscommerce.devel
Message-ID <2a74528c23d9697494098c0260827f89@osCommerce-Forums>
This message was sent from: Development
http://forums.oscommerce.com/viewtopic.php?p=170748#170748
----------------------------------------------------------------

I've managed to narrow down all problems except displaying the default address during the checkout process.

Related to the following:

THE DATABASE QUERY

[code]// if no shipping destination address was selected, use the customers own address as default
  if (!tep_session_is_registered('sendto')) {
    tep_session_register('sendto');
    $sendto = $customer_default_address_id;
  } else {
// verify the selected shipping address
    $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "' and address_book_id = '" . $sendto . "'");
    $check_address = tep_db_fetch_array($check_address_query);

    if ($check_address['total'] != '1') {
      $sendto = $customer_default_address_id;
      if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
    }
  }[/code]

CALLING THE ADDRESS

[code]<?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?>[/code]

Any suggestions?[/code]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.