Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quick help with checkout_process.php


samaceb

Recommended Posts

Posted

I added a new field to the create_account.php page, the field is account number, it goes above company name. I need this to show in the e-mail the store owner receives when an order is placed. It should be just above the company name in the e-mail. The field in the database is customers_account_name

 

Thanks in advance

Posted

You must make some modification in catalog/includes/classes/order.php and catalog/checkout_process.php

and backup the two files before you start.

I. for order.php

1.about line 138,find:

$customer_address_query = tep_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id) where c.customers_id = '" . (int)$customer_id . "' and ab.customers_id = '" . (int)$customer_id . "' and c.customers_default_address_id = ab.address_book_id");

and change to:

$customer_address_query = tep_db_query("select c.customers_account_name,c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id) where c.customers_id = '" . (int)$customer_id . "' and ab.customers_id = '" . (int)$customer_id . "' and c.customers_default_address_id = ab.address_book_id");

and pls make sure the new field is in 'customers' table.

2.about line 184,find:

 'telephone' => $customer_address['customers_telephone'],

and add codes after it:

'account_name' => $customer_address['customers_account_name'],

 

II. for checkout_process.php

1.about line 224,find:

EMAIL_SEPARATOR . "\n" .

add codes after it:

"Account Number: ".$order->customer['account_name']."\n".

 

Done!Try it.

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Posted

Thank you very much, for the quick reply. That was exactly what I needed. I spend a few hours trying to figure it out and with your help I got this working in a few seconds.

 

Best Regards,

 

samaceb

Archived

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

×
×
  • Create New...