Results 1 to 9 of 9

Fixing the create account page

This is a discussion on Fixing the create account page within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hello, call me dumb or whatever but I have been pulling my hair out over this one for 3 days. ...

      
  1. #1
    New Member
    Join Date
    May 2007
    Posts
    7
    Rep Power
    0


    Unhappy Fixing the create account page

    Hello, call me dumb or whatever but I have been pulling my hair out over this one for 3 days. The create_account.php page asks for the post code before the city, I need it after the state like a normal address for United states. I have tried moving the piece of code to list below state but when I save it and check it I get the following:
    (+ADw-?php echo tep+AF8-draw+AF8-form('create+AF8-account', tep+AF8-href+AF8-link(FILENAME+AF8-CREATE+AF8-ACCOUNT, '', 'SSL'), 'post', 'onSubmit+AD0AIg-return check+AF8-form(create+AF8-account)+ADsAIg-') . tep+AF8-draw+AF8-hidden+AF8-field('action', 'process')+ADs- ?+AD4APA-table border+AD0AIg-0+ACI- width+AD0AIg-100+ACUAIg- cellspacing+AD0AIg-0+ACI- cellpadding+AD0AIg-0+ACIAPg- +ADw-tr+AD4- +ADw-td+AD4APA-table border+AD0AIg-0+ACI- width+AD0AIg-100+ACUAIg- cellspacing+AD0AIg-0+ACI- cellpadding+AD0AIg-0+ACIAPg- +ADw-tr+AD4- +ADw-td class+AD0AIg-pageHeading+ACIAPgA8-?php echo HEADING+AF8-TITLE+ADs- ?+AD4APA-/td+AD4- +ADw-td class+AD0AIg-pageHeading+ACI- align+AD0AIg-right+ACIAPgA8-?php echo tep+AF8-image(DIR+AF8-WS+AF8-IMAGES . 'table+AF8-background+AF8-account.gif', HEADING+AF8-TITLE, HEADING+AF8-IMAGE+AF8-WIDTH, HEADING+AF8-IMAGE+AF8-HEIGHT)+ADs- ?+AD4APA-/td+AD4- +ADw-/tr+AD4- +ADw-/table+AD4APA-/td+AD4- +ADw-/tr+AD4- +ADw-tr+AD4- +ADw-td+AD4APA-?php echo tep+AF8-draw+AF8-separator('pixel+AF8-trans.gif', '100+ACU-', '10')+ADs- ?+AD4APA-/td+AD4- +ADw-/tr+AD4- +ADw-tr+AD4- +ADw-td class+AD0AIg-smallText+ACIAPgA8-br+AD4APA-?php echo sprintf(TEXT+AF8-ORIGIN+AF8-LOGIN, tep+AF8-href+AF8-link(FILENAME+AF8-LOGIN, tep+AF8-get+AF8-all+AF8-get+AF8-params(), 'SSL'))+ADs- ?+AD4APA-/td+AD4- +ADw-/tr+AD4- +ADw-tr+AD4- +ADw-td+AD4APA-?php echo tep+AF8-draw+AF8-separator('pixel+AF8-trans.gif', '100+ACU-', '10')+ADs- ?+AD4APA-/td+AD4- +ADw-/tr+AD4-)

    Please can someone help me?

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: Fixing the create account page

    Post the code segement. You did do SOMETHING royally wrong.

    And which one? The admin or catalog side?

  3. #3
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: Fixing the create account page

    If your working with osCMax - this is what you want to do move the position of the postal/zip code to below the STATE but before the country on the catalog side...

    Copy
    /catalog/templates/fallback/content/create_account.tpl.php
    to
    /catalog/templates/YOUR_TEMPLATE/content/create_account.tpl.php

    Then FIND the following table....

    PHP Code:
                <td><table border="0" cellspacing="2" cellpadding="2">
                  <tr>
                    <td class="main"><?php echo ENTRY_STREET_ADDRESS?></td>
                    <td class="main"><?php echo tep_draw_input_field('street_address') . '&nbsp;' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' ENTRY_STREET_ADDRESS_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    if (ACCOUNT_SUBURB == 'true') {
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_SUBURB?></td>
                    <td class="main"><?php echo tep_draw_input_field('suburb') . '&nbsp;' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' ENTRY_SUBURB_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    }
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_POST_CODE?></td>
                    <td class="main"><?php echo tep_draw_input_field('postcode') . '&nbsp;' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' ENTRY_POST_CODE_TEXT '</span>'''); ?></td>
                  </tr>
                  <tr>
                    <td class="main"><?php echo ENTRY_CITY?></td>
                    <td class="main"><?php echo tep_draw_input_field('city') . '&nbsp;' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' ENTRY_CITY_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    if (ACCOUNT_STATE == 'true') {
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_STATE?></td>
                    <td class="main">
    <?php
    // BOF: MOD - Country-State Selector
            
    $zones_array = array();
             
    $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']);
            }
            if (
    count($zones_array) > 0) {
              echo 
    tep_draw_pull_down_menu('state'$zones_array);
            } else {
              echo 
    tep_draw_input_field('state');
            }
    // EOF: MOD - Country-State Selector
        
    if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="inputRequirement">' ENTRY_STATE_TEXT;
    ?>
                    </td>
                  </tr>
    <?php
      
    }
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_COUNTRY?></td>
                    <?php // +Country-State Selector ?>
                    <td class="main"><?php echo tep_get_country_list('country',$country,'onChange="return refresh_form(create_account);"') . '&nbsp;' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' ENTRY_COUNTRY_TEXT '</span>'''); ?></td>
                    <?php // -Country-State Selector ?>
                  </tr>
                </table></td>
    Change it to:

    PHP Code:
                <td><table border="0" cellspacing="2" cellpadding="2">
                  <tr>
                    <td class="main"><?php echo ENTRY_STREET_ADDRESS?></td>
                    <td class="main"><?php echo tep_draw_input_field('street_address') . '&nbsp;' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' ENTRY_STREET_ADDRESS_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    if (ACCOUNT_SUBURB == 'true') {
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_SUBURB?></td>
                    <td class="main"><?php echo tep_draw_input_field('suburb') . '&nbsp;' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' ENTRY_SUBURB_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    }
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_CITY?></td>
                    <td class="main"><?php echo tep_draw_input_field('city') . '&nbsp;' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' ENTRY_CITY_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    if (ACCOUNT_STATE == 'true') {
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_STATE?></td>
                    <td class="main">
    <?php
    // BOF: MOD - Country-State Selector
            
    $zones_array = array();
             
    $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']);
            }
            if (
    count($zones_array) > 0) {
              echo 
    tep_draw_pull_down_menu('state'$zones_array);
            } else {
              echo 
    tep_draw_input_field('state');
            }
    // EOF: MOD - Country-State Selector
        
    if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<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') . '&nbsp;' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' ENTRY_POST_CODE_TEXT '</span>'''); ?></td>
                  </tr>
                  <tr>
                    <td class="main"><?php echo ENTRY_COUNTRY?></td>
                    <?php // +Country-State Selector ?>
                    <td class="main"><?php echo tep_get_country_list('country',$country,'onChange="return refresh_form(create_account);"') . '&nbsp;' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' ENTRY_COUNTRY_TEXT '</span>'''); ?></td>
                    <?php // -Country-State Selector ?>
                  </tr>
                </table></td>

  4. #4
    New Member
    Join Date
    May 2007
    Posts
    7
    Rep Power
    0


    Default Re: Fixing the create account page

    Thanks a million jpf, this fixed the problem. God I felt stupid-Thanks again

    Quote Originally Posted by jpf View Post
    If your working with osCMax - this is what you want to do move the position of the postal/zip code to below the STATE but before the country on the catalog side...

    Copy
    /catalog/templates/fallback/content/create_account.tpl.php
    to
    /catalog/templates/YOUR_TEMPLATE/content/create_account.tpl.php

    Then FIND the following table....

    PHP Code:
                <td><table border="0" cellspacing="2" cellpadding="2">
                  <tr>
                    <td class="main"><?php echo ENTRY_STREET_ADDRESS?></td>
                    <td class="main"><?php echo tep_draw_input_field('street_address') . '&nbsp;' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' ENTRY_STREET_ADDRESS_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    if (ACCOUNT_SUBURB == 'true') {
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_SUBURB?></td>
                    <td class="main"><?php echo tep_draw_input_field('suburb') . '&nbsp;' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' ENTRY_SUBURB_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    }
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_POST_CODE?></td>
                    <td class="main"><?php echo tep_draw_input_field('postcode') . '&nbsp;' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' ENTRY_POST_CODE_TEXT '</span>'''); ?></td>
                  </tr>
                  <tr>
                    <td class="main"><?php echo ENTRY_CITY?></td>
                    <td class="main"><?php echo tep_draw_input_field('city') . '&nbsp;' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' ENTRY_CITY_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    if (ACCOUNT_STATE == 'true') {
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_STATE?></td>
                    <td class="main">
    <?php
    // BOF: MOD - Country-State Selector
            
    $zones_array = array();
             
    $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']);
            }
            if (
    count($zones_array) > 0) {
              echo 
    tep_draw_pull_down_menu('state'$zones_array);
            } else {
              echo 
    tep_draw_input_field('state');
            }
    // EOF: MOD - Country-State Selector
        
    if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="inputRequirement">' ENTRY_STATE_TEXT;
    ?>
                    </td>
                  </tr>
    <?php
      
    }
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_COUNTRY?></td>
                    <?php // +Country-State Selector ?>
                    <td class="main"><?php echo tep_get_country_list('country',$country,'onChange="return refresh_form(create_account);"') . '&nbsp;' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' ENTRY_COUNTRY_TEXT '</span>'''); ?></td>
                    <?php // -Country-State Selector ?>
                  </tr>
                </table></td>
    Change it to:

    PHP Code:
                <td><table border="0" cellspacing="2" cellpadding="2">
                  <tr>
                    <td class="main"><?php echo ENTRY_STREET_ADDRESS?></td>
                    <td class="main"><?php echo tep_draw_input_field('street_address') . '&nbsp;' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' ENTRY_STREET_ADDRESS_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    if (ACCOUNT_SUBURB == 'true') {
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_SUBURB?></td>
                    <td class="main"><?php echo tep_draw_input_field('suburb') . '&nbsp;' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' ENTRY_SUBURB_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    }
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_CITY?></td>
                    <td class="main"><?php echo tep_draw_input_field('city') . '&nbsp;' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' ENTRY_CITY_TEXT '</span>'''); ?></td>
                  </tr>
    <?php
      
    if (ACCOUNT_STATE == 'true') {
    ?>
                  <tr>
                    <td class="main"><?php echo ENTRY_STATE?></td>
                    <td class="main">
    <?php
    // BOF: MOD - Country-State Selector
            
    $zones_array = array();
             
    $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']);
            }
            if (
    count($zones_array) > 0) {
              echo 
    tep_draw_pull_down_menu('state'$zones_array);
            } else {
              echo 
    tep_draw_input_field('state');
            }
    // EOF: MOD - Country-State Selector
        
    if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<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') . '&nbsp;' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' ENTRY_POST_CODE_TEXT '</span>'''); ?></td>
                  </tr>
                  <tr>
                    <td class="main"><?php echo ENTRY_COUNTRY?></td>
                    <?php // +Country-State Selector ?>
                    <td class="main"><?php echo tep_get_country_list('country',$country,'onChange="return refresh_form(create_account);"') . '&nbsp;' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' ENTRY_COUNTRY_TEXT '</span>'''); ?></td>
                    <?php // -Country-State Selector ?>
                  </tr>
                </table></td>

  5. #5
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: Fixing the create account page

    To really give thanks - click on the THANKS button that is listed in my reply! (beside the big "Was this post helpful to you? Click the Thanks! button instead of posting a 'thank you' reply"

  6. #6
    Member
    Join Date
    Mar 2007
    Posts
    36
    Rep Power
    0


    Default Re: Fixing the create account page

    Hi,

    Just curious, does this not also have to be changed on the admin side if you wanted to add orders manually? If so, how would that be done?

    Thanks
    Mike

  7. #7
    New Member
    Join Date
    May 2007
    Posts
    7
    Rep Power
    0


    Lightbulb Re: Fixing the create account page

    in oscmax look for the file

    admin/includes/modules/account_details.php

    look for the following piece of code:

    <tr>
    <td class="main">&nbsp;<?php echo ENTRY_POST_CODE; ?></td>
    <td class="main">&nbsp;
    <?php
    if ($is_read_only) {
    echo $account['entry_postcode'];
    } elseif ($error) {
    if ($entry_post_code_error) {
    echo tep_draw_input_field('postcode') . '&nbsp;' . ENTRY_POST_CODE_ERROR;
    } else {
    echo $postcode . tep_draw_hidden_field('postcode');
    }
    } else {
    echo tep_draw_input_field('postcode', $account['entry_postcode']) . '&nbsp;' . ENTRY_POST_CODE_TEXT;
    }
    ?></td>
    </tr>

    in mine it is lines 273-289-cut that piece of code and move it so it looks like the following code:

    <tr>
    <td class="main">&nbsp;<?php echo ENTRY_CITY; ?></td>
    <td class="main">&nbsp;
    <?php
    if ($is_read_only) {
    echo $account['entry_city'];
    } elseif ($error) {
    if ($entry_city_error) {
    echo tep_draw_input_field('city') . '&nbsp;' . ENTRY_CITY_ERROR;
    } else {
    echo $city . tep_draw_hidden_field('city');
    }
    } else {
    echo tep_draw_input_field('city', $account['entry_city']) . '&nbsp;' . ENTRY_CITY_TEXT;
    }
    ?></td>
    </tr>
    <?php
    if (ACCOUNT_STATE == 'true') {
    ?>
    <tr>
    <td class="main">&nbsp;<?php echo ENTRY_STATE; ?></td>
    <td class="main">&nbsp;
    <?php
    $state = sbs_get_zone_name($country, $zone_id);
    if ($is_read_only) {
    echo sbs_get_zone_name($account['entry_country_id'], $account['entry_zone_id']);
    } elseif ($error) {
    if ($entry_state_error) {
    if ($entry_state_has_zones) {
    $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) . '&nbsp;' . ENTRY_STATE_ERROR;
    } else {
    echo tep_draw_input_field('state') . '&nbsp;' . ENTRY_STATE_ERROR;
    }
    } else {
    echo $state . tep_draw_hidden_field('zone_id') . tep_draw_hidden_field('state');
    }
    } else {
    echo tep_draw_input_field('state', sbs_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state'])) . '&nbsp;' . ENTRY_STATE_TEXT;
    }
    ?></td>
    </tr>
    <?php
    }
    ?>
    <tr>
    <td class="main">&nbsp;<?php echo ENTRY_POST_CODE; ?></td>
    <td class="main">&nbsp;
    <?php
    if ($is_read_only) {
    echo $account['entry_postcode'];
    } elseif ($error) {
    if ($entry_post_code_error) {
    echo tep_draw_input_field('postcode') . '&nbsp;' . ENTRY_POST_CODE_ERROR;
    } else {
    echo $postcode . tep_draw_hidden_field('postcode');
    }
    } else {
    echo tep_draw_input_field('postcode', $account['entry_postcode']) . '&nbsp;' . ENTRY_POST_CODE_TEXT;
    }
    ?></td>
    </tr>

    on mine it all starts at line 273 and ends at 339.

    Hope this helps you

    a1net822

  8. #8
    Member
    Join Date
    Mar 2007
    Posts
    36
    Rep Power
    0


    Default Re: Fixing the create account page

    Great! Thanks for posting. This would not cause a conflict with the database would it?

    Thanks
    Mike

  9. #9
    New Member
    Join Date
    May 2007
    Posts
    7
    Rep Power
    0


    Smile Re: Fixing the create account page

    It works great on my end, heres a screen shot.

    Attached Images Attached Images
    Last edited by a1net822; 05-27-2007 at 09:58 PM.

Similar Threads

  1. Combined login and create account page
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 04-05-2007, 04:01 PM
  2. State list missing on Create Account Page
    By zTech in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 09-13-2004, 09:15 AM
  3. Why can't create a new account ?
    By kellycog in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 06-29-2004, 10:58 AM
  4. Create Account,Checkout,My Account, Language Pictures probs!
    By Mikey in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 03-08-2004, 11:20 PM
  5. login or create account as the home page with hiden catalog
    By kamel in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 11-17-2003, 07:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •