Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

edit create account


BGSoyCandle

Recommended Posts

I'm in the USA, so the below doesn't make sense on the "Create Account" page. How to I edit it so instead of post code it says zip code, and how do I put it under the State instead of above the city?

 

Your Address

Street Address: *

Suburb:

Post Code: *

City: *

State/Province: *

Country: *

 

Thanks in advance

Joyce

Link to comment
Share on other sites

  • 2 weeks later...

Yes, you rename Post Code to ZIP in includes/languages/english.php

 

You move the order of display by moving the sub-table it's in - located in the lower half of the root level create_account.php page.

 

Vger

Link to comment
Share on other sites

  • 2 weeks later...
Yes, you rename Post Code to ZIP in includes/languages/english.php

 

You move the order of display by moving the sub-table it's in - located in the lower half of the root level create_account.php page.

 

Vger

 

I too am moving the zip code around, and was able to accomplish it just fine on the create_account page, but I also need to move it in the address book. I can't determine how to do this in address_book_process.php which seems to use address_book.php to draw the form. It does not appear to be a standard HTML table like in create_account.php. I'm not sure I am looking in the right place to move this around in the address book. Anyone have any ideas?

 

Thanks,

 

John

Link to comment
Share on other sites

  • 4 weeks later...
Anybody else know how to change this in my address_book_process and also in my order email please?

 

 

I finally found the answer to this. It is not in address_book_process. You can change it in address_book_details.php. You just need to swap the sections for ENTRY_STATE and ENTRY_POST_CODE. Your code should look similar to this when finished:

 

<?php
 if (ACCOUNT_STATE == 'true') {
?>
             <tr>
               <td class="main"><?php echo ENTRY_STATE; ?></td>
               <td class="main">
<?php
   if ($process == true) {
     if ($entry_state_has_zones == true) {
       $zones_array = array();
       $zones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
       $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' 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('state', $zones_array);
     } else {
       $zones_array = array();
       $zones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
       $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " 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('state', $zones_array);
     }
   } else {
       $zones_array = array();
       $zones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
       $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " 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('state', $zones_array);
   }

   if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
               </td>
             </tr>
<?php
 }
?>
         <tr>
           <td class="main"><?php echo ENTRY_POST_CODE; ?></td>
           <td class="main"><?php echo tep_draw_input_field('postcode', $entry['entry_postcode']) . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
         </tr>
          <tr>

 

You also need to change it in checkout_new_address.php. It should look like this:

 

            <tr>
               <td class="main"><?php echo ENTRY_STATE; ?></td>
               <td class="main">
<?php
   if ($process == true) {
     if ($entry_state_has_zones == true) {
       $zones_array = array();
       $zones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
       $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' 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('state', $zones_array);
     } else {
       $zones_array = array();
       $zones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
       $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " 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('state', $zones_array);
     }
   } else {
       $zones_array = array();
       $zones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
       $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " 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('state', $zones_array);
   }

   if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
               </td>
             </tr>
               <tr>
   <td class="main"><?php echo ENTRY_POST_CODE; ?></td>
   <td class="main"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
 </tr>

 

 

I think that covers all the places where this occurs. Hope this helps! :thumbsup:

 

John

Link to comment
Share on other sites

These edits all seem to be fine for the inputting display layout.

But i notice that when any dumped data is called back to the various pages it shows the postcode in the old order format.

 

address_book.php

checkout_shipping.php

checkout_payment.php

checkout_confirmation.php

(anywhere the address is dynamically 'called' to the page // also in admin)

 

--------------

CITY

POSTCODE

STATE

COUNTRY

-----------------

 

Is suspect it is something to do with the way that

$sendto = $customer_default_address_id;

and associated address variables are formed.

 

Unless it just requires the order of the fields in the DB to be swapped around ?

 

The other thing is that the order email that gets set out, and any packing slips, invoices to print out in the admin, also have this incorrect format for the address.

 

Anyone have any ideas how to fix that ?

 

I noticed an address format table in the DB, but as yet didnt find anything that appeared to access it via the admin panel.. i probably overlooked the reference though.

 

Thank you in advance for any help ;)

Link to comment
Share on other sites

Helping myself here :lol:

 

Yep.. easy fix for this, although it's not as obvious as i would have liked it to be.

 

So : dependant on your country... lets take the U.K for example

 

go to location/taxes

then countries

select UK

 

change its address format to 2 !

 

That should mean the postcode is not stuck in the middle of the address label ;-)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...