Google Answers Logo
View Question
 
Q: OsCommerc - States Do Not Show ( No Answer,   0 Comments )
Question  
Subject: OsCommerc - States Do Not Show
Category: Computers > Programming
Asked by: icklebit-ga
List Price: $10.00
Posted: 23 Feb 2006 18:09 PST
Expires: 23 Feb 2006 20:16 PST
Question ID: 700195
I have installed oscommerce and  for some reason the state input field
does not show on the accoutn sign up field. I have tried everything I
can think of with no solution.

Is there a particular setting for state in put field to show.

Here is the example page > 
http://oconnellit.com/catalog/create_account.php?language=en

I will have further paid questions if this gets a successful answer.

Request for Question Clarification by sublime1-ga on 23 Feb 2006 18:52 PST
icklebit...

I'm not conversant with oscommerce, but I took a look at the
source code for the example page.

It seems that you are missing the 'state' input in the source
code for the page. What's there is:

check_input("city", 3, "Your City must contain a minimum of
 3 characters.");

check_select("country", "", "You must select a country from
 the Countries pull down menu.");


and later:

class="inputRequirement">*</span></td>
</tr>
<tr>
<td class="main">City:</td>
<td class="main"><input type="text" name="city">&nbsp;<span
class="inputRequirement">*</span></td>
</tr>

<tr>
<td class="main">Country:</td>
<td class="main"><select name="country"><option value=""
 SELECTED>Please Select</option>


It seems to me that you need to add State in, perhaps as
follows:

check_input("city", 3, "Your City must contain a minimum of
 3 characters.");
check_input("state", 3, "Your State must contain a minimum of
 3 characters.");
check_select("country", "", "You must select a country from
 the Countries pull down menu.");

and:

class="inputRequirement">*</span></td>
</tr>
<tr>
<td class="main">City:</td>
<td class="main"><input type="text" name="city">&nbsp;<span
class="inputRequirement">*</span></td>
</tr>
<tr>
<td class="main">State:</td>
<td class="main"><input type="text" name="state">&nbsp;<span 
class="inputRequirement">*</span></td>
</tr>
<tr>
<td class="main">Country:</td>
<td class="main"><select name="country"><option value=""
 SELECTED>Please Select</option>

I've made some changes to the spacing in order to accommodate
GA's page formatting, but that should give you the general idea
of what I'm suggesting.

If the oscommerce is supposed to create the source code for you
automatically, based on selections you make, perhaps there's a
glitch in the software. There may be no way to fix the software,
so you may have to work around it with html editing.

Let me know where this takes you, or what else you might need...

sublime1-ga

Clarification of Question by icklebit-ga on 23 Feb 2006 20:09 PST
Hi,

Thanks for your interest. 

There is actually a state field in the php code  ( I will post below).

This probably requires someone with os commerce experiance. Please
feel free to try based upon the code though.

Code for create_account.php page 

Begin Code>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

<?php

/*

  $Id: address_book.php,v 1.58 2003/06/09 23:03:52 hpdl Exp $



  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com



  Copyright (c) 2003 osCommerce



  Released under the GNU General Public License

*/



  require('includes/application_top.php');



  if (!tep_session_is_registered('customer_id')) {

    $navigation->set_snapshot();

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

  }



  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADDRESS_BOOK);



  $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

  $breadcrumb->add(NAVBAR_TITLE_2,
tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo
CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER :
HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="javascript"><!--

function rowOverEffect(object) {

  if (object.className == 'moduleRow') object.className = 'moduleRowOver';

}



function rowOutEffect(object) {

  if (object.className == 'moduleRowOver') object.className = 'moduleRow';

}

//--></script>

</head>

<body >

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->



<!-- body //-->

<table border="0" width="100%" >

  <tr>

        <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table
border="0" width="<?php echo BOX_WIDTH; ?>"  id="ColumnLeft">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

    </table></td>

<!-- body_text //-->

    <td width="100%" valign="top"><table border="0" width="100%"
cellspacing="0" cellpadding="0">

      <tr>

        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">

          <tr>

            <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

            <td class="pageHeading" align="right"><?php echo
tep_image(DIR_WS_IMAGES . 'table_background_address_book.gif',
HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

          </tr>

        </table></td>

      </tr>

      <tr>

        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

      </tr>

<?php

  if ($messageStack->size('addressbook') > 0) {

?>

      <tr>

        <td><?php echo $messageStack->output('addressbook'); ?></td>

      </tr>

      <tr>

        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

      </tr>

<?php

  }

?>

      <tr>

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

      </tr>

      <tr>

        <td><table border="0" width="100%" cellspacing="0"
cellpadding="0" class="infoBox">

          <tr class="infoBoxContents">

            <td><table border="0" width="100%" >

              <tr>

                <td><?php echo tep_draw_separator('pixel_trans.gif',
'10', '1'); ?></td>

                <td class="main" width="50%" valign="top"><?php echo
PRIMARY_ADDRESS_DESCRIPTION; ?></td>

                <td align="right" width="50%" valign="top"><table border="0" >

                  <tr>

                    <td class="main" align="center"
valign="top"><b><?php echo PRIMARY_ADDRESS_TITLE; ?></b><br><?php echo
tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>

                    <td><?php echo
tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                    <td class="main" valign="top"><?php echo
tep_address_label($customer_id, $customer_default_address_id, true, '
', '<br>'); ?></td>

                    <td><?php echo
tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                  </tr>

                </table></td>

              </tr>

            </table></td>

          </tr>

        </table></td>

      </tr>

      <tr>

        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

      </tr>

      <tr>

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

      </tr>

      <tr>

        <td><table border="0" width="100%" cellspacing="0"
cellpadding="0" class="infoBox">

          <tr class="infoBoxContents">

            <td><table border="0" width="100%" >

<?php

  $addresses_query = tep_db_query("select address_book_id,
entry_firstname as firstname, entry_lastname as lastname,
entry_company as company, entry_street_address as street_address,
entry_suburb as suburb, entry_city as city, entry_postcode as
postcode, entry_state as state, entry_zone_id as zone_id,
entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where
customers_id = '" . (int)$customer_id . "' order by firstname,
lastname");

  while ($addresses = tep_db_fetch_array($addresses_query)) {

    $format_id = tep_get_address_format_id($addresses['country_id']);

?>

              <tr>

                <td><?php echo tep_draw_separator('pixel_trans.gif',
'10', '1'); ?></td>

                <td><table border="0" width="100%" >

                  <tr class="moduleRow"
onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)"
onClick="document.location.href='<?php echo
tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' .
$addresses['address_book_id'], 'SSL'); ?>'">

                    <td class="main"><b><?php echo
tep_output_string_protected($addresses['firstname'] . ' ' .
$addresses['lastname']); ?></b><?php if ($addresses['address_book_id']
== $customer_default_address_id) echo '&nbsp;<small><i>' .
PRIMARY_ADDRESS . '</i></small>'; ?></td>

                    <td class="main" align="right"><?php echo '<a
href="' . tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' .
$addresses['address_book_id'], 'SSL') . '">' .
tep_image_button('small_edit.gif', SMALL_IMAGE_BUTTON_EDIT) . '</a> <a
href="' . tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' .
$addresses['address_book_id'], 'SSL') . '">' .
tep_image_button('small_delete.gif', SMALL_IMAGE_BUTTON_DELETE) .
'</a>'; ?></td>

                  </tr>

                  <tr>

                    <td colspan="2"><table border="0" >

                      <tr>

                        <td width="10"><?php echo
tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                        <td class="main"><?php echo
tep_address_format($format_id, $addresses, true, ' ', '<br>'); ?></td>

                        <td width="10"><?php echo
tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                      </tr>

                    </table></td>

                  </tr>

                </table></td>

                <td><?php echo tep_draw_separator('pixel_trans.gif',
'10', '1'); ?></td>

              </tr>

<?php

  }

?>

            </table></td>

          </tr>

        </table></td>

      </tr>

      <tr>

        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

      </tr>

      <tr>

        <td><table border="0" width="100%" cellspacing="0"
cellpadding="0" class="infoBox">

          <tr class="infoBoxContents">

            <td><table border="0" width="100%" >

              <tr>

                <td width="10"><?php echo
tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                <td class="smallText"><?php echo '<a href="' .
tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' .
tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>';
?></td>

<?php

  if (tep_count_customer_address_book_entries() < MAX_ADDRESS_BOOK_ENTRIES) {

?>

                <td class="smallText" align="right"><?php echo '<a
href="' . tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, '', 'SSL') .
'">' . tep_image_button('button_add_address.gif',
IMAGE_BUTTON_ADD_ADDRESS) . '</a>'; ?></td>

<?php

  }

?>

                <td width="10"><?php echo
tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

              </tr>

            </table></td>

          </tr>

        </table></td>

      </tr>

      <tr>

        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

      </tr>

      <tr>

        <td class="smallText"><?php echo sprintf(TEXT_MAXIMUM_ENTRIES,
MAX_ADDRESS_BOOK_ENTRIES); ?></td>

      </tr>

    </table></td>

<!-- body_text_eof //-->



  </tr>

</table>

<!-- body_eof //-->



<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
End Code
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy