Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I delete STATE FIELD pull down box


WickedCoolers

Recommended Posts

I am trying to get rid of the pull down box for STATE. I have managed to do it for customers but not in my Admin section. I am editing Admin/customers.php. Below is the org code around line 354.

 

    if (ACCOUNT_STATE == 'true') {

?>

         <tr>

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

           <td class="main"><?php echo tep_draw_pull_down_menu('entry_zone_id', tep_prepare_country_zones_pull_down($cInfo->entry_country_id), $cInfo->entry_zone_id, 'onChange="resetStateText(this.form);"'); ?></td>

         </tr>

         <tr>

           <td class="main"> </td>

           <td class="main"><?php echo tep_draw_input_field('entry_state', $cInfo->entry_state, 'maxlength="32" onChange="resetZoneSelected(this.form);"'); ?></td>

         </tr>

 

This is the new code below:

<tr>

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

           <td class="main"><?php echo tep_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"', true); ?></td>

         </tr>

         <tr>

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

           <td class="main"><?php echo tep_draw_input_field('entry_state', $cInfo->entry_state, 'maxlength="32"', true); ?></td>

         </tr>

<tr>

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

           <td class="main"><?php echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"', true); ?></td>

         </tr>

         <tr>

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

           <td class="main"><?php echo tep_draw_pull_down_menu('entry_country_id', tep_get_countries(), $cInfo->entry_country_id, 'onChange="update_zone(this.form);"'); ?></td>

         </tr>

 

I have placed the state field between city and postcode and I have deleted the pull down box code but when I load admin I get a parse error on line 414 which is only } else {

 

anyone know what I am doing wrong or how to do it right???

The hardest thing in life is watching someone you love, love someone else.

Link to comment
Share on other sites

It looks like you took out

    if (ACCOUNT_STATE == 'true') {

Thus, the } in }else{ doesn't have a matching {. You can fix this by deleting the entire block of code, starting with } else { and ending with a }. The } will have the same indentation (leading spaces) as the if and the } else {. Alternately, you could put the if back in so there would be a {.

 

Hth,

Matt

Link to comment
Share on other sites

Btw, line 414 may not be where the } you want is. It might be (in fact, as I think about it, probably is) somewhere higher in the file, closer to where you are making your changes.

 

Hth,

Matt

Link to comment
Share on other sites

Thanks for the reply, I managed to fix it, what I had done was leave an extra <php which was related to the block of code that I had removed. It all works now although your suggestion might be a more tidy solution :-)

 

Just out of interest, do you know how to edit the order email as I copy the customers address from the email to my sales worksheet but it lists the address in a really silly way, it puts the postcode on the same line as the street and before the city which is not good for printing labels :-)

The hardest thing in life is watching someone you love, love someone else.

Link to comment
Share on other sites

It's built in checkout_process.php, you should be able to just move variables around. tep_mail actually sends the mail.

 

Hth,

Matt

Link to comment
Share on other sites

Excellent, thanks.

 

One last thing you could maybe help me with. I am trying to create a contact us page similar the the original contact_us.php, I am trying to link it to a gif pic so that people will be sent to the form when they click the image. I have duplicated the php file and renamed it but I am having problems trying to get it to send the email to a address of my choice and not just the address stored in store config in admin, any ideas??

The hardest thing in life is watching someone you love, love someone else.

Link to comment
Share on other sites

Did you change the first two parameters in

tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);

Hth,

Matt

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...