インターネット、WEBサイトの設置運用サービス

2019/09

15

HOME > プログラム変更履歴 > アドレスフォーマット変更 > customers.php

customers.php

admin/customers.php

お客様の姓、名前の表示順序変更

697行目あたり

<tr>
<th scope="col"><?php echo TABLE_HEADING_LASTNAME; ?></th>
<th scope="col"><?php echo TABLE_HEADING_FIRSTNAME; ?></th>
<th class="text-right" scope="col"><?php echo TABLE_HEADING_ACCOUNT_CREATED; ?></th>
<th class="text-right" scope="col"><?php echo TABLE_HEADING_ACTION; ?></th>
</tr>

738行目あたり

お客様の姓、名前の表示順序変更

<!-- お客様の姓。名前の表示順序変更 -->
<td class="dataTableContent"><?php echo $customers['customers_lastname']; ?></td>
<td class="dataTableContent"><?php echo $customers['customers_firstname']; ?></td>
<td class="dataTableContent" align="right"><?php echo tep_date_short($info['date_account_created']); ?></td>
<td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($customers['customers_id'] == $cInfo->customers_id)) { echo '<i class="fa fa-chevron-circle-right" aria-hidden="true"></i>'; } else { echo '<a href="' . tep_href_link('customers.php', tep_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']) . '">' . '<i class="fa fa-info-circle" aria-hidden="true"></i>' . '</a>'; } ?>&nbsp;</td>

785行目あたり

 ヘディングのお客様名の表示を入れ替える

/*  ヘディングのお客様名の表示を入れ替える */
if (isset($cInfo) && is_object($cInfo)) {
$heading[] = array('text' => '<strong>' . $cInfo->customers_lastname . ' ' . $cInfo->customers_firstname . '</strong>');
$contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT, 'document', tep_href_link('customers.php', tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit'), null, null, 'secondary') . ' ' . tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link('customers.php', tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm'), null, null, 'danger') . ' ' . tep_draw_button(IMAGE_ORDERS, 'cart', tep_href_link('orders.php', 'cID=' . $cInfo->customers_id), null, null, 'info') . ' ' . tep_draw_button(IMAGE_EMAIL, 'mail-closed', tep_href_link('mail.php', 'customer=' . $cInfo->customers_email_address)));
$contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_CREATED . ' ' . tep_date_short($cInfo->date_account_created));
$contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->date_account_last_modified));
$contents[] = array('text' => '<br />' . TEXT_INFO_DATE_LAST_LOGON . ' ' . tep_date_short($cInfo->date_last_logon));
$contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
$contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
$contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
}

参考画像:

 

 358行目から  日本式の名前、住所の表記順序に入れ替える

<?php
if (ACCOUNT_GENDER == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_GENDER; ?></td>
<td class="main">
<?php
if ($error == true) {
if ($entry_gender_error == true) {
echo tep_draw_bs_radio_field('customers_gender', 'm', false, $cInfo->customers_gender,MALE,'') . tep_draw_bs_radio_field('customers_gender', 'f', false, $cInfo->customers_gender, FEMALE,''). '&nbsp;' . ENTRY_GENDER_ERROR;
} else {
echo ($cInfo->customers_gender == 'm') ? MALE : FEMALE;
echo tep_draw_hidden_field('customers_gender');
}
} else {
echo tep_draw_bs_radio_field('customers_gender', 'm', false, $cInfo->customers_gender,MALE,''). tep_draw_bs_radio_field('customers_gender', 'f', false, $cInfo->customers_gender, FEMALE,'');
}
?></td>
</tr>
<?php
}
?>
<tr> <--! 氏名 姓名 -->
<td class="main"><?php echo ENTRY_LAST_NAME; ?></td>
<td class="main">
<?php
if ($error == true) {
if ($entry_lastname_error == true) {
echo tep_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"') . '&nbsp;' . ENTRY_LAST_NAME_ERROR;
} else {
echo $cInfo->customers_lastname . tep_draw_hidden_field('customers_lastname');
}
} else {
echo tep_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"', true);
}
?>
</td>
</tr>
<tr> <--! 氏名 名前 -->
<td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
<td class="main">
<?php
if ($error == true) {
if ($entry_firstname_error == true) {
echo tep_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"') . '&nbsp;' . ENTRY_FIRST_NAME_ERROR;
} else {
echo $cInfo->customers_firstname . tep_draw_hidden_field('customers_firstname');
}
} else {
echo tep_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"', true);
}
?>

</td>
</tr>
<?php
if (ACCOUNT_DOB == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
<td class="main">
<?php
if ($error == true) {
if ($entry_date_of_birth_error == true) {
echo tep_draw_input_field('customers_dob', tep_date_short($cInfo->customers_dob), 'maxlength="10"') . '&nbsp;' . ENTRY_DATE_OF_BIRTH_ERROR;
} else {
echo $cInfo->customers_dob . tep_draw_hidden_field('customers_dob');
}
} else {
echo tep_draw_input_field('customers_dob', tep_date_short($cInfo->customers_dob), 'maxlength="10" id="customers_dob"', true);
}
?>
<script type="text/javascript">
$('#customers_dob').datepicker({
dateFormat: 'yy-mm-dd'
});
</script>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
<td class="main">
<?php
if ($error == true) {
if ($entry_email_address_error == true) {
echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR;
} elseif ($entry_email_address_check_error == true) {
echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR;
} elseif ($entry_email_address_exists == true) {
echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS;
} else {
echo $customers_email_address . tep_draw_hidden_field('customers_email_address');
}
} else {
echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"', true);
}
?></td>
</tr>

<?php
if (ACCOUNT_COMPANY == 'true') {
?>

<tr>
<td colspan="2" class="formAreaTitle"><?php echo CATEGORY_COMPANY; ?></td>
</tr>
<tr>

<td class="main"><?php echo ENTRY_COMPANY; ?></td>
<td class="main">
<?php
if ($error == true) {
echo $cInfo->entry_company . tep_draw_hidden_field('entry_company');
} else {
echo tep_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="32"');
}
?></td>

</tr>
<?php
}
?>

<tr>
<td colspan="2" class="formAreaTitle"><?php echo CATEGORY_ADDRESS; ?></td>
</tr>
<tr>

<tr> <--! 郵便番号 -->
<td class="main"><?php echo ENTRY_POST_CODE; ?></td>
<td class="main">
<?php
if ($error == true) {
if ($entry_post_code_error == true) {
echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"') . '&nbsp;' . ENTRY_POST_CODE_ERROR;
} else {
echo $cInfo->entry_postcode . tep_draw_hidden_field('entry_postcode');
}
} else {
echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"', true);
}
?>
</td>
</tr>
<?php
if (ACCOUNT_STATE == 'true') {
?>
<tr> <--! 都道府県 -->
<td class="main"><?php echo ENTRY_STATE; ?></td>
<td class="main">
<?php
$entry_state = tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state);
if ($error == true) {
if ($entry_state_error == true) {
if ($entry_state_has_zones == true) {
$zones_array = array();
$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($cInfo->entry_country_id) . "' order by zone_name");
while ($zones_values = tep_db_fetch_array($zones_query)) {
$zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
}
echo tep_draw_pull_down_menu('entry_state', $zones_array) . '&nbsp;' . ENTRY_STATE_ERROR;
} else {
echo tep_draw_input_field('entry_state', tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)) . '&nbsp;' . ENTRY_STATE_ERROR;
}
} else {
echo $entry_state . tep_draw_hidden_field('entry_zone_id') . tep_draw_hidden_field('entry_state');
}
} else {
echo tep_draw_input_field('entry_state', tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state));
}

?></td>
</tr>
<?php
}
?>
<tr> <--! 市区町村 -->
<td class="main"><?php echo ENTRY_CITY; ?></td>
<td class="main">
<?php
if ($error == true) {
if ($entry_city_error == true) {
echo tep_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"') . '&nbsp;' . ENTRY_CITY_ERROR;
} else {
echo $cInfo->entry_city . tep_draw_hidden_field('entry_city');
}
} else {
echo tep_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"', true);
}
?></td>
</tr>

 <--! 町名番地 -->

<td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
<td class="main">
<?php
if ($error == true) {
if ($entry_street_address_error == true) {
echo tep_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"') . '&nbsp;' . ENTRY_STREET_ADDRESS_ERROR;
} else {
echo $cInfo->entry_street_address . tep_draw_hidden_field('entry_street_address');
}
} else {
echo tep_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"', true);
}
?></td>
</tr>
<?php
if (ACCOUNT_SUBURB == 'true') {
?>
<tr> <--! ビル・建物名 -->
<td class="main"><?php echo ENTRY_SUBURB; ?></td>
<td class="main">
<?php
if ($error == true) {
echo $cInfo->entry_suburb . tep_draw_hidden_field('entry_suburb');
} else {
echo tep_draw_input_field('entry_suburb', $cInfo->entry_suburb, 'maxlength="32"');
}
?></td>
</tr>
<?php
}
?>

 参考画像: