Products     Magento Extension     PCI-Shopping-Carts     Templates       CRELoaded     WordPress Modules     osCommerce Modules       osCommerce Addons       osCommerce Features       osCommerce Management       Payment Modules     CRELoaded Modules       CRE Loaded Addons       CRE Loaded Features       CRE Loaded Management       Payment Modules       CRELoaded Services
Free Stuff
Customization
Templates
Compare Products
You have no items to compare.
Affiliate Info
Affiliate Program FAQ
Affiliate Log In
Recent Orders
Hot Keywords: Order Notification, Order Search, Coupon, Flash Board, Compare, Floating Message, Tracking, Moneris, RSS, Visitor Filter

  Edit any customer address in administration

The following osCommerce contribution is a free Opensource code originated from official osCommerce website and provided for your reference only, you may download the original contribution file(s) and install it on your own; or you may request a Paid Installation Service from Agents Of Power; Agents Of Power does the "AS IS" installation on your website, we do not guarantee it will work properly on your website. Extra Paid service is available for repairing the problem from the original contribution or from your website.
Modification :

Du 11 Jul 2009
Du 7 Sep 2009

Ajout :

de la langue française

Full package

Screenshot visible à : http://www.oscommerce-screenshots.com/edit-customer-address-administration-p-448.html
This is not a complete file.

Bug in v1.2, in case 'confirmaddressdelete':

CHANGE LINE
$check_default_query = tep_db_query("select customers_default_address_id as defid from " . TABLE_CUSTOMERS . " where c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");
TO
$check_default_query = tep_db_query("select customers_default_address_id as defid from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");
this is not a complete file.

to change customer default address from the admin side

in admin/customers.php

ADD


if(isset($HTTP_POST_VARS['setdefault'])) $sql_data_array['customers_default_address_id'] = $default_address_id;

ABOVE THE LINE

if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $customers_gender;




AND ADD

<tr>

<td class="main" align="right"><input type="checkbox" name="setdefault" value="set"></td>

<td class="main">Set as a default address</td>

</tr>


BELOW THE LINE

<tr>

<td class="main"><?php echo ENTRY_COUNTRY; ?></td>

<td class="main"><?php

if ($error == true) {

if ($entry_country_error == true) {

echo tep_draw_pull_down_menu('entry_country_id', tep_get_countries(), $cInfo->entry_country_id) . '&nbsp;' . ENTRY_COUNTRY_ERROR;

} else {

echo tep_get_country_name($cInfo->entry_country_id) . tep_draw_hidden_field('entry_country_id');

}

} else {

echo tep_draw_pull_down_menu('entry_country_id', tep_get_countries(), $cInfo->entry_country_id);

}

?></td>

</tr>
Purpose:
This contribution allows you to edit in adminstration ANY address for a customer instead of just their default address.

v1.2: Some instructions and Fixes added
Files for vanilla installation or file comparing added.
Spanish translation added.

Full Package
Someone discovered that my original contribution broke if an invalid entry (such as not enough characters in a name) was made during address entry and the update process reloaded the information for the address with the invalid fields editable. The revised instructions attached here fix the problem.

For those that have already installed this contribution the fix is quite simple as detailed below.

1) Immediately before the code you added in step 2d add the following line:

<?php if ($action != 'update') { /*only display if no update entry error*/ ?>

2) Immediately after the code you added in step 2d add the following line:

<?php } ?>

3) Replace EVERY instance of address_firstname with entry_firstname. This is true whether it occurs as part of a variable name or inside quotes. There should be a total of 13 replacements made.

4) Replace EVERY instance of address_lastname with entry_lastname. Again this is true whether it occurs as part of a variable name or inside quotes and once again there should be a total of 13 replacements made.

Steps 3 and 4 of the correction allow the variable reload to work properly.
I thought it strange that osCommerce allows the site adminstrator to edit the default address for any customer but does not allow them to edit any other address that customers may have in their address book. This contribution allows you to edit any address for any customer. You may also delete any address EXCEPT the default customer address so if, like us, you have customers that enter duplicate addresses in their address book you can delete the extra addresses.
   Posted on: 10/22/2008     See contribution details Request Installation with Paid service