Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Three-and-a-half Questions


Khemikal

Recommended Posts

Ok,

 

I've done pretty well so far in getting a working shopping cart working. I've been able to make some changes simply by reading and following directions. However, what I am trying to do next, I haven't been able to find nor have I successfully searched for so I hope someone can give me some direction.

 

When a new user registers an account, how would I go about: Making a 2nd address line or small box to enter in an apartment number?

 

Also, how can I change Postal Code to say Zip Code and place it under City and not before?

 

My other question is, how is it possible to select an item for your shopping cart and once you enter it, have you jump back to the main products page?

 

Thank you in advance for help or suggestions.

 

Khem

Link to comment
Share on other sites

Also, how can I change Postal Code to say Zip Code and place it under City and not before?

open the file account_details.php in catalog-dir/includes/modules/ and

change the code from around line 216 until it looks like this:

          <tr>

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

           <td class="main"> 

<?php

 if ($is_read_only) {

   echo $account['entry_city'];

 } elseif ($error) {

   if ($entry_city_error) {

     echo tep_draw_input_field('city') . ' ' . ENTRY_CITY_ERROR;

   } else {

     echo $city . tep_draw_hidden_field('city');

   }

 } else {

   echo tep_draw_input_field('city', $account['entry_city']) . ' ' . ENTRY_CITY_TEXT;

 }

?></td>

         </tr>

         <tr>

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

           <td class="main"> 

<?php

 if ($is_read_only) {

   echo $account['entry_postcode'];

 } elseif ($error) {

   if ($entry_post_code_error) {

     echo tep_draw_input_field('postcode') . ' ' . ENTRY_POST_CODE_ERROR;

   } else {

     echo $postcode . tep_draw_hidden_field('postcode');

   }

 } else {

   echo tep_draw_input_field('postcode', $account['entry_postcode']) . ' ' . ENTRY_POST_CODE_TEXT;

 }

?></td>

         </tr>

 

and the text is defined in catalog-dir/includes/languages/english.php around line 196.

Link to comment
Share on other sites

Thanks for pointing this out. Here's the code if you want the order to be

 

City

State

Zip Code

 

          <tr>

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

           <td class="main"> 

<?php

 if ($is_read_only == true) {

   echo $account['entry_city'];

 } elseif ($error) {

   if ($entry_city_error == true) {

     echo tep_draw_input_field('city') . ' ' . ENTRY_CITY_ERROR;

   } else {

     echo $city . tep_draw_hidden_field('city');

   }

 } else {

   echo tep_draw_input_field('city', $account['entry_city']) . ' ' . ENTRY_CITY_TEXT;

 }

?></td>

         </tr>

 <?php

 if (ACCOUNT_STATE == 'true') {

?>

         <tr>

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

           <td class="main"> 

<?php

   $state = tep_get_zone_name($country, $zone_id, $state);

   if ($is_read_only == true) {

     echo tep_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state']);

   } elseif ($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($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) . ' ' . ENTRY_STATE_ERROR;

       } else {

         echo tep_draw_input_field('state') . ' ' . ENTRY_STATE_ERROR;

       }

     } else {

       echo $state . tep_draw_hidden_field('zone_id') . tep_draw_hidden_field('state');

     }

   } else {

     echo tep_draw_input_field('state', tep_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state'])) . ' ' . ENTRY_STATE_TEXT;

   }

?></td>

         </tr>

   <tr>

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

           <td class="main"> 

<?php

 if ($is_read_only == true) {

   echo $account['entry_postcode'];

 } elseif ($error) {

   if ($entry_post_code_error == true) {

     echo tep_draw_input_field('postcode') . ' ' . ENTRY_POST_CODE_ERROR;

   } else {

     echo $postcode . tep_draw_hidden_field('postcode');

   }

 } else {

   echo tep_draw_input_field('postcode', $account['entry_postcode']) . ' ' . ENTRY_POST_CODE_TEXT;

 }

?></td>

         </tr>

 

Steve

Link to comment
Share on other sites

  • 5 months later...

Also, how can I change Postal Code to say Zip Code and place it under City and not before?

open the file account_details.php in catalog-dir/includes/modules/ and

change the code from around line 216 until it looks like this:

 

and the text is defined in catalog-dir/includes/languages/english.php around line 196.

I want to make this change but am unable to find the mentioned file. I've searched my complete shop and could not find an account_details file. I also searched on some of the keywords mentioned and found them present in the three files mentioned below but the rest of the code shown is not present in those files.

create_account.php

address_book_details.php

checkout_new_address.php

 

I'm wondering if this change is intended for an older version of OSC than I have.

Does anyone know what file I need to edit to accomplish this?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...