Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help to add costumers email address to checkout_shipping


jbhobro

Recommended Posts

Posted

Hi

 

I am new to this forum and not very skilled at php programming. According to Danish law i need to add the costumer email address to checkout_shipping.php, preferebly just over the costumer name and shipping address in the top right at checkout_shipping.php. I also need to add the costumers email address to checkout_shipping_address.php so that the costumer have the possability to alter thier email address on this page. I have searched at lot for this, but didnt find any usefull information about it, so i hope someone in here will be kind enough to help me with the php code changes and where to put it in the 2 files.

 

My oscommerce version is 2.2 MS2. Thank you very much.

Posted

I do believe that the letter of this directive allows instead for you to place a checkbox in the checkout which says something like "My information is correct, proceed with this order" (in other words a "must agree" type of thing).

 

Please check and confirm.

Posted

I do believe that the letter of this directive allows instead for you to place a checkbox in the checkout which says something like "My information is correct, proceed with this order" (in other words a "must agree" type of thing).

 

Please check and confirm.

 

Thank you for the answer. No, i have a checkbox, but its not enough. The costumer has to be able to see thier email address and change it, during the checkout flow (checkout_shipping.

Posted

Find:

 

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

 

Add below:

 

<br><br>
       <?php
       $account_query = tep_db_query("select customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
       $account = tep_db_fetch_array($account_query);
       echo $account['customers_email_address'] . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">[' . SMALL_IMAGE_BUTTON_EDIT . ']</a>';
       ?>

Posted

Find:

 

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

 

Add below:

 

<br><br>
<?php
$account_query = tep_db_query("select customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
$account = tep_db_fetch_array($account_query);
echo $account['customers_email_address'] . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">[' . SMALL_IMAGE_BUTTON_EDIT . ']</a>';
?>

 

Oh, that is great, thank you very much :) Only need a small change so that the email letter size is the same size as the shipping address. Do i need to put in a class from the stylesheet ?

Posted

Sorry, it was me who put the code outside of the table. The above works perfect, thank you. I will mark this post as solved.

Archived

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

×
×
  • Create New...