Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default HOW TO INTEGRATE FEC(Fat Easy Checkout) with CAPTCHA module?

    Hello everyone and welcome to my modest contribution,

    FEC is great isnt it!

    Get it here

    http://www.zen-cart.com/index.php?ma...+easy+checkout

    It offers many neat and necessary features one of them being Easy Sign up and login.

    I also like the CAPTCHA module

    Get it here

    http://www.zen-cart.com/index.php?ma...roducts_id=325

    But what about making both work together on the account creation/login page?

    They dont work together out the box, if fact they dont really get along.

    All I did was merged the files and I would like to share with you how to do this so that you dont have to have the hassle of reinventing the wheel.

    As far as I know there is no such contribution if you know of such please let me know.

    Ok down to work...


    Download and install both add-ons follow the instructions carefully and make sure that the files go EXACTLY where they supposed to.

    on FEC you will see a "classic" subfolders change that to your MY_TEMPLATE name.

    first we need to fix CAPTCHA because it doesnt work out the box for the account creation page even with the zen cart defaults.

    Go to /include/modules/MY_TEMPLATE/create_account.php

    Change this code:

    PHP Code:
    <?php
    if (strstr($_SERVER['REQUEST_URI'],'create_account') && CREATE_ACCOUNT_VALIDATION == 'true' || strstr($_SERVER['REQUEST_URI'],'login') && LOGIN_VALIDATION == 'true') { 
    ?>
    to this

    PHP Code:
    <?php
    if (strstr($_SERVER['REQUEST_URI'],'create_account') && CREATE_ACCOUNT_VALIDATION == 'true' || strstr($_SERVER['REQUEST_URI'],'login') && CREATE_ACCOUNT_VALIDATION == 'true') { 
    ?>
    ALSO find this code

    PHP Code:
    $password zen_db_prepare_input($_POST['password']);
      
    $confirmation zen_db_prepare_input($_POST['confirmation']); 
    Insert JUST AFTER IT this code

    PHP Code:
    if (ACCOUNT_VALIDATION == 'true' && CREATE_ACCOUNT_VALIDATION == 'true') {
        
    $antirobotreg zen_db_prepare_input($_POST['antirobotreg']);
      }
      
    $error false
    AND ALSO find this code

    PHP Code:
     if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_PASSWORD_ERROR);
      } elseif (
    $password != $confirmation) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_PASSWORD_ERROR_NOT_MATCHING);
      } 
    Insert JUST BEFORE IT this code

    PHP Code:
      if (ACCOUNT_VALIDATION == 'true' && CREATE_ACCOUNT_VALIDATION == 'true') {
      
    $sql "SELECT * FROM " TABLE_ANTI_ROBOT_REGISTRATION " WHERE session_id = '" zen_session_id() . "' LIMIT 1";
      if( !
    $result $db->Execute($sql) ) {
        
    $error true;
        
    $entry_antirobotreg_error true;
        
    $text_antirobotreg_error ERROR_VALIDATION_1;
        
    $messageStack->add('create_account'ERROR_VALIDATION_1);
        } else {
        
    $entry_antirobotreg_error false;
        
    $antirobotrow $db->Execute($sql);
            if (( 
    strtolower($_POST['antirobotreg']) != $antirobotrow->fields['reg_key'] ) or ($antirobotrow->fields['reg_key'] =='')) {
            
    $error true;
            
    $entry_antirobotreg_error true;
            
    $text_antirobotreg_error ERROR_VALIDATION_2;
            
    $messageStack->add('create_account'ERROR_VALIDATION_2);
            } else {
                    
    $sql "DELETE FROM " TABLE_ANTI_ROBOT_REGISTRATION " WHERE session_id = '" zen_session_id() . "'";
                    if( !
    $result $db->Execute($sql) )
                    {
                                    
    $error true;
                                    
    $entry_antirobotreg_error true;
                                    
    $text_antirobotreg_error ERROR_VALIDATION_3;
                                   
    $messageStack->add('create_account'ERROR_VALIDATION_3);
                                    } else {
                                    
    $sql "OPTIMIZE TABLE " TABLE_ANTI_ROBOT_REGISTRATION "";
                                            if( !
    $result $db->Execute($sql) )
                                                    {
                                                    
    $error true;
                                                    
    $entry_antirobotreg_error true;
                                                    
    $text_antirobotreg_error ERROR_VALIDATION_4;
                                                    
    $messageStack->add('create_account'ERROR_VALIDATION_4);
                                                    } else {
                                                    
    $entry_antirobotreg_error false;
                                     }
                                    }
                        }
      }

        if (
    strlen($antirobotreg) <> ENTRY_VALIDATION_LENGTH) {
            
    $error true;
            
    $entry_antirobotreg_error true;
            } else {
            
    $entry_antirobotreg_error false;
        }

    Finally find

    PHP Code:
    if ($error == true) {
        
    // hook notifier class
        
    $zco_notifier->notify('NOTIFY_FAILURE_DURING_CREATE_ACCOUNT');
        
    // redirect back to login page
        
    zen_redirect(zen_href_link(FILENAME_LOGIN'''SSL'));
      } else {
        
    $sql_data_array = array('customers_firstname' => $firstname,
                                
    'customers_lastname' => $lastname,
                                
    'customers_email_address' => $email_address,
                                
    'customers_nick' => $nick,
                                
    'customers_telephone' => $telephone,
                                
    'customers_fax' => $fax,
                                
    'customers_newsletter' => (int)$newsletter,
                                
    'customers_email_format' => $email_format,
                                
    'customers_default_address_id' => 0,
                                
    'customers_password' => zen_encrypt_password($password),
                                
    'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION
        
    ); 
    Change to:

    PHP Code:
     if ($error == true) {
        
    // hook notifier class
        
    $zco_notifier->notify('NOTIFY_FAILURE_DURING_CREATE_ACCOUNT');
        } else {
        
    $sql_data_array = array('customers_firstname' => $firstname,
                                
    'customers_lastname' => $lastname,
                                
    'customers_email_address' => $email_address,
                                
    'customers_nick' => $nick,
                                
    'customers_telephone' => $telephone,
                                
    'customers_fax' => $fax,
                                
    'customers_newsletter' => (int)$newsletter,
                                
    'customers_email_format' => $email_format,
                                
    'customers_default_address_id' => 0,
                                
    'customers_password' => zen_encrypt_password($password),
                                
    'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION
        
    ); 
    Thats that with the modules files!

    Now go to your template files

    /includes/templates/MY_TEMPLATE/templates/tpl_modules_create_account.php

    Find this code:

    PHP Code:
    <?php echo zen_draw_radio_field('email_format''HTML', ($email_format == 'HTML' true false),'id="email-format-html"') . '<label class="radioButtonLabel" for="email-format-html">' ENTRY_EMAIL_HTML_DISPLAY '</label>' .  zen_draw_radio_field('email_format''TEXT', ($email_format == 'TEXT' true false), 'id="email-format-text"') . '<label class="radioButtonLabel" for="email-format-text">' ENTRY_EMAIL_TEXT_DISPLAY '</label>'?>

    <br class="clearBoth" />

    </fieldset>
    INSERT RIGHT AFTER IT:

    PHP Code:
    <?php
    if (ACCOUNT_VALIDATION == 'true') {
    ?>

    <?php
    if (strstr($_SERVER['REQUEST_URI'],'create_account') && CREATE_ACCOUNT_VALIDATION == 'true' || strstr($_SERVER['REQUEST_URI'],'login') && CREATE_ACCOUNT_VALIDATION == 'true') { 
    ?>

    <?php
      
    if ($is_read_only == false || (strstr($_SERVER['REQUEST_URI'],'create_account')) || (strstr($_SERVER['REQUEST_URI'],'login'))) {
        
    $sql "DELETE FROM " TABLE_ANTI_ROBOT_REGISTRATION " WHERE timestamp < '" . (time() - 3600) . "' OR session_id = '" zen_session_id() . "'";
        if( !
    $result $db->Execute($sql) ) { die('Could not delete validation key'); }
        
    $reg_key generate_captcha_code();
        
    $sql "INSERT INTO "TABLE_ANTI_ROBOT_REGISTRATION " VALUES ('" zen_session_id() . "', '" $reg_key "', '" time() . "')";
        if( !
    $result $db->Execute($sql) ) { die('Could not check registration information'); }
    ?>

    <fieldset>
    <legend><?php echo CATEGORY_ANTIROBOTREG?></legend>
    <label class="inputLabel" for="antirobotreg"><?php echo ENTRY_ANTIROBOTREG ?></label>

    <?php
    $validation_images 
    '';
    for(
    $i 0$i ENTRY_VALIDATION_LENGTH$i++)
        {
        
    $parse_image 'validation/validation_' $reg_key{$i} . '.gif';
        
    $parse_image_alt $reg_key{$i};
        
    $validation_images .= zen_image(DIR_WS_IMAGES $parse_image$parse_image_alt);
        }
        echo 
    '<div class="centered">';
        echo 
    $validation_images '<br />';
        echo 
    '</div>';
    ?>

    <?php echo zen_draw_input_field('antirobotreg','''id="antirobotreg"') . (zen_not_null(ENTRY_ANTIROBOTREG) ? '<span class="alert">' ENTRY_ANTIROBOTREG_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <?php
        
    }
    ?>

    <?php
        
    }
    ?>

    <?php
        
    }
    ?>
    THATS IT! youre done!
    Silver Jewellery

    RESPECT to the Zen Cart Team, I'm PERFECTLY Zenned!

  2. #2
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default Re: HOW TO INTEGRATE FEC(Fat Easy Checkout) with CAPTCHA module

    You might also need to copy the "define" statements from includes/languages/english/extra_definitions/anti_reg_english.php to
    includes/languages/english/extra_definitions/MY_TEMPLATE/create_account.php

    but im not absolutely sure that is necessary....

    I also removed the original CAPTCHA references in the FEC files but again I dont think that makes a difference.

    Alternatively you may wish to just copy across my

    /includes/templates/MY_TEMPLATE/templates/tpl_modules_create_account.php

    and my

    /include/modules/MY_TEMPLATE/create_account.php

    So here they are in that order:

    PHP Code:
    <?php

    /**

     * Page Template

     *

     * Loaded automatically by index.php?main_page=create_account.<br />

     * Displays Create Account form.

     *

     * @package templateSystem

     * @copyright Copyright 2007 Numinix Technology http://www.numinix.com
     * @copyright Copyright 2003-2006 Zen Cart Development Team

     * @copyright Portions Copyright 2003 osCommerce

     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

     * @version $Id: tpl_modules_create_account.php 82 2009-08-05 03:33:26Z numinix $

     */

    ?>



    <?php if ($messageStack->size('create_account') > 0) echo $messageStack->output('create_account'); ?>

    <div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION?></div>

    <br class="clearBoth" />



    <?php

      
    if (DISPLAY_PRIVACY_CONDITIONS == 'true') {

    ?>

    <fieldset>

    <legend><?php echo TABLE_HEADING_PRIVACY_CONDITIONS?></legend>

    <div class="information"><?php echo TEXT_PRIVACY_CONDITIONS_DESCRIPTION;?></div>

    <?php echo zen_draw_checkbox_field('privacy_conditions''1'false'id="privacy"');?>

    <label class="checkboxLabel" for="privacy"><?php echo TEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>

    </fieldset>

    <?php

      
    }

    ?>



    <?php

      
    if (ACCOUNT_COMPANY == 'true') {

    ?>

    <fieldset>

    <legend><?php echo CATEGORY_COMPANY?></legend>
    <br class="clearBoth"/>
    <label class="inputLabel" for="company"><?php echo ENTRY_COMPANY?></label>

    <?php echo zen_draw_input_field('company'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_company''40') . ' id="company"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' ENTRY_COMPANY_TEXT '</span>'''); ?>

    </fieldset>

    <?php

      
    }

    ?>



    <fieldset>

    <legend><?php echo TABLE_HEADING_BILLING_ADDRESS?></legend>
    <br class="clearBoth"/>
    <?php

      
    if (ACCOUNT_GENDER == 'true') {

    ?>

    <?php echo zen_draw_radio_field('gender''m''''id="gender-male"') . '<label class="radioButtonLabel" for="gender-male">' MALE '</label>' zen_draw_radio_field('gender''f''''id="gender-female"') . '<label class="radioButtonLabel" for="gender-female">' FEMALE '</label>' . (zen_not_null(ENTRY_GENDER_TEXT) ? '<span class="alert">' ENTRY_GENDER_TEXT '</span>'''); ?>

    <br class="clearBoth" />

    <?php

      
    }

    ?>



    <label class="inputLabel" for="firstname"><?php echo ENTRY_FIRST_NAME?></label>

    <?php echo zen_draw_input_field('firstname'''zen_set_field_length(TABLE_CUSTOMERS'customers_firstname''40') . ' id="firstname"') . (zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">' ENTRY_FIRST_NAME_TEXT '</span>'''); ?>

    <br class="clearBoth" />



    <label class="inputLabel" for="lastname"><?php echo ENTRY_LAST_NAME?></label>

    <?php echo zen_draw_input_field('lastname'''zen_set_field_length(TABLE_CUSTOMERS'customers_lastname''40') . ' id="lastname"') . (zen_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="alert">' ENTRY_LAST_NAME_TEXT '</span>'''); ?>

    <br class="clearBoth" />



    <label class="inputLabel" for="street-address"><?php echo ENTRY_STREET_ADDRESS?></label>

      <?php echo zen_draw_input_field('street_address'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_street_address''40') . ' id="street-address"') . (zen_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="alert">' ENTRY_STREET_ADDRESS_TEXT '</span>'''); ?>

    <br class="clearBoth" />



    <?php

      
    if (ACCOUNT_SUBURB == 'true') {

    ?>

    <label class="inputLabel" for="suburb"><?php echo ENTRY_SUBURB?></label>

    <?php echo zen_draw_input_field('suburb'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_suburb''40') . ' id="suburb"') . (zen_not_null(ENTRY_SUBURB_TEXT) ? '<span class="alert">' ENTRY_SUBURB_TEXT '</span>'''); ?>

    <br class="clearBoth" />

    <?php

      
    }

    ?>



    <label class="inputLabel" for="city"><?php echo ENTRY_CITY?></label>

    <?php echo zen_draw_input_field('city'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_city''40') . ' id="city"') . (zen_not_null(ENTRY_CITY_TEXT) ? '<span class="alert">' ENTRY_CITY_TEXT '</span>'''); ?>

    <br class="clearBoth" />

    <?php
      
    if ($disable_country == true) {
        
    $addclass "hiddenField";
      }
    ?>
    <div class="<?php echo $addclass?>">
    <label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY?></label>
    <?php echo zen_get_country_list('zone_country_id'$selected_country'id="country" ' . ($flag_show_pulldown_states == true 'onchange="update_zone(this.form);"' '')) . (zen_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="alert">' ENTRY_COUNTRY_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    </div>
    <?php

      
    if (ACCOUNT_STATE == 'true') {

        if (
    $flag_show_pulldown_states == true) {

    ?>

    <label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE?></label>

    <?php

          
    echo zen_draw_pull_down_menu('zone_id'zen_prepare_country_zones_pull_down($selected_country), $zone_id'id="stateZone"');

          if (
    zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert">' ENTRY_STATE_TEXT '</span>'

        }

    ?>



    <?php if ($flag_show_pulldown_states == true) { ?>

    <br class="clearBoth" id="stBreak" />

    <?php ?>

    <label class="inputLabel" for="state" id="stateLabel"><?php echo $state_field_label?></label>

    <?php

        
    echo zen_draw_input_field('state'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_state''40') . ' id="state"');

        if (
    zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert" id="stText">' ENTRY_STATE_TEXT '</span>';

        if (
    $flag_show_pulldown_states == false) {

          echo 
    zen_draw_hidden_field('zone_id'$zone_name' ');

        }

    ?>

    <br class="clearBoth" />

    <?php

      
    }

    ?>



    <label class="inputLabel" for="postcode"><?php echo ENTRY_POST_CODE?></label>

    <?php echo zen_draw_input_field('postcode'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_postcode''40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' ENTRY_POST_CODE_TEXT '</span>'''); ?>

    <br class="clearBoth" />
    <?php if (enable_shippingAddressCheckbox()) { ?>
    <?php 
    echo zen_draw_checkbox_field('shippingAddress''1'$shippingAddress'id="shippingAddress-checkbox"') . '<label style="" class="checkboxLabel" for="shippingAddress-checkbox">' ENTRY_COPYBILLING '</label>' . (zen_not_null(ENTRY_COPYBILLING_TEXT) ? '<span class="alert">' ENTRY_COPYBILLING_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php ?>
    </fieldset>

    <!-- begin shipping box -->
    <!-- //for future releases -->
    <?php if(enable_shippingAddressCheckbox()) { ?>
    <fieldset id="shippingField" class="sidebysidefields">
    <legend><?php echo TABLE_HEADING_SHIPPING_ADDRESS?></legend>
    <br class="clearBoth" />
    <?php
      
    if (ACCOUNT_GENDER == 'true') {
    ?>
    <?php 
    echo zen_draw_radio_field('gender_shipping''m''''id="gender-male_shipping"') . '<label class="radioButtonLabel" for="gender-male">' MALE '</label>' zen_draw_radio_field('gender_shipping''f''''id="gender-female_shipping"') . '<label class="radioButtonLabel" for="gender-female">' FEMALE '</label>' . (zen_not_null(ENTRY_GENDER_TEXT) ? '<span class="alert">' ENTRY_GENDER_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <label class="inputLabel" for="firstname_shipping"><?php echo ENTRY_FIRST_NAME?></label>
    <?php echo zen_draw_input_field('firstname_shipping'''zen_set_field_length(TABLE_CUSTOMERS'customers_firstname''40') . ' id="firstname_shipping"') . (zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">' ENTRY_FIRST_NAME_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="lastname_shipping"><?php echo ENTRY_LAST_NAME?></label>
    <?php echo zen_draw_input_field('lastname_shipping'''zen_set_field_length(TABLE_CUSTOMERS'customers_lastname''40') . ' id="lastname_shipping"') . (zen_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="alert">' ENTRY_LAST_NAME_TEXT '</span>'''); ?>
    <br class="clearBoth" />


    <?php
      
    if (ACCOUNT_COMPANY == 'true') {
    ?>
    <label class="inputLabel" for="company_shipping"><?php echo ENTRY_COMPANY?></label>
    <?php echo zen_draw_input_field('company_shipping'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_company''40') . ' id="company_shipping"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' ENTRY_COMPANY_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <label class="inputLabel" for="street-address_shipping"><?php echo ENTRY_STREET_ADDRESS?></label>
      <?php echo zen_draw_input_field('street_address_shipping'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_street_address''40') . ' id="street-address_shipping"') . (zen_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="alert">' ENTRY_STREET_ADDRESS_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <?php
      
    if (ACCOUNT_SUBURB == 'true') {
    ?>
    <label class="inputLabel" for="suburb_shipping"><?php echo ENTRY_SUBURB?></label>
    <?php echo zen_draw_input_field('suburb_shipping'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_suburb''40') . ' id="suburb_shipping"') . (zen_not_null(ENTRY_SUBURB_TEXT) ? '<span class="alert">' ENTRY_SUBURB_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <label class="inputLabel" for="city_shipping"><?php echo ENTRY_CITY?></label>
    <?php echo zen_draw_input_field('city_shipping'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_city''40') . ' id="city_shipping"') . (zen_not_null(ENTRY_CITY_TEXT) ? '<span class="alert">' ENTRY_CITY_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php
      
    if ($disable_country == true) {
        
    $addclass "hiddenField";
      }
    ?>
    <div class="<?php echo $addclass?>">
    <label class="inputLabel" for="country_shipping"><?php echo ENTRY_COUNTRY?></label>
    <?php echo zen_get_country_list('zone_country_id_shipping'$selected_country_shipping'id="country_shipping" ' . ($flag_show_pulldown_states_shipping == true 'onchange="update_zone_shipping(this.form);"' '')) . (zen_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="alert">' ENTRY_COUNTRY_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    </div>

    <?php
      
    if (ACCOUNT_STATE == 'true') {
        if (
    $flag_show_pulldown_states_shipping == true) {
    ?>
    <label class="inputLabel" for="stateZone_shipping" id="zoneLabel"><?php echo ENTRY_STATE?></label>
    <?php
          
    echo zen_draw_pull_down_menu('zone_id_shipping'zen_prepare_country_zones_pull_down($selected_country_shipping), $zone_id_shipping'id="stateZone_shipping"');
          if (
    zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert">' ENTRY_STATE_TEXT '</span>'
        }
    ?>

    <?php if ($flag_show_pulldown_states_shipping == true) { ?>
    <br class="clearBoth" id="stBreakShipping" />
    <?php ?>
    <label class="inputLabel" for="state_shipping" id="stateLabelShipping"><?php echo $state_field_label_shipping?></label>
    <?php
        
    echo zen_draw_input_field('state_shipping'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_state''40') . ' id="state_shipping"');
        if (
    zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert" id="stTextShipping">' ENTRY_STATE_TEXT '</span>';
        if (
    $flag_show_pulldown_states_shipping == false) {
          echo 
    zen_draw_hidden_field('zone_id_shipping'$zone_name_shipping' ');
        }
    ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <label class="inputLabel" for="postcode_shipping"><?php echo ENTRY_POST_CODE?></label>
    <?php echo zen_draw_input_field('postcode_shipping'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_postcode''40') . ' id="postcode_shipping"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' ENTRY_POST_CODE_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    </fieldset>
    <?php ?>
    <!-- eof shipping -->



    <?php if (ACCOUNT_TELEPHONE == 'true' || ACCOUNT_FAX_NUMBER == 'true') { ?>
    <fieldset>

    <legend><?php echo TABLE_HEADING_PHONE_FAX_DETAILS?></legend>

    <?php if (ACCOUNT_TELEPHONE == 'true') { ?>
    <br class="clearBoth"/>
    <label class="inputLabel" for="telephone"><?php echo ENTRY_TELEPHONE_NUMBER?></label>

    <?php echo zen_draw_input_field('telephone'''zen_set_field_length(TABLE_CUSTOMERS'customers_telephone''40') . ' id="telephone"') . (zen_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="alert">' ENTRY_TELEPHONE_NUMBER_TEXT '</span>'''); ?>

    <?php ?>

    <?php

      
    if (ACCOUNT_FAX_NUMBER == 'true') {

    ?>

    <br class="clearBoth" />

    <label class="inputLabel" for="fax"><?php echo ENTRY_FAX_NUMBER?></label>

    <?php echo zen_draw_input_field('fax''''id="fax"') . (zen_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="alert">' ENTRY_FAX_NUMBER_TEXT '</span>'''); ?>

    <?php

      
    }

    ?>

    </fieldset>
    <?php ?>



    <?php

      
    if (ACCOUNT_DOB == 'true') {

    ?>

    <fieldset>

    <legend><?php echo TABLE_HEADING_DATE_OF_BIRTH?></legend>
    <br class="clearBoth"/>
    <label class="inputLabel" for="dob"><?php echo ENTRY_DATE_OF_BIRTH?></label>

    <?php echo zen_draw_input_field('dob','''id="dob"') . (zen_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="alert">' ENTRY_DATE_OF_BIRTH_TEXT '</span>'''); ?>

    <br class="clearBoth" />

    </fieldset>

    <?php

      
    }

    ?>



    <fieldset>

    <legend><?php echo TABLE_HEADING_LOGIN_DETAILS?></legend>
    <br class="clearBoth"/>
    <label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL_ADDRESS?></label>

    <?php echo zen_draw_input_field('email_address'''zen_set_field_length(TABLE_CUSTOMERS'customers_email_address''40') . ' id="email-address"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="alert">' ENTRY_EMAIL_ADDRESS_TEXT '</span>'''); ?>

    <br class="clearBoth" />

    <?php if (FEC_CONFIRM_EMAIL == 'true') { ?>
      <label class="inputLabel" for="email-address-confirm"><?php echo ENTRY_EMAIL_ADDRESS_CONFIRM?></label>
      <?php echo zen_draw_input_field('email_address_confirm'''zen_set_field_length(TABLE_CUSTOMERS'customers_email_address''40') . ' id="email-address-confirm"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="alert">' ENTRY_EMAIL_ADDRESS_TEXT '</span>'''); ?>
      <br class="clearBoth" />   
    <?php ?>


    <?php

      
    if ($phpBB->phpBB['installed'] == true) {

    ?>

    <label class="inputLabel" for="nickname"><?php echo ENTRY_NICK?></label>

    <?php echo zen_draw_input_field('nick','','id="nickname"') . (zen_not_null(ENTRY_NICK_TEXT) ? '<span class="alert">' ENTRY_NICK_TEXT '</span>'''); ?>

    <br class="clearBoth" />

    <?php

      
    }

    ?>



    <label class="inputLabel" for="password-new"><?php echo ENTRY_PASSWORD?></label>

    <?php echo zen_draw_password_field('password'''zen_set_field_length(TABLE_CUSTOMERS'customers_password''20') . ' id="password-new"') . (zen_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="alert">' ENTRY_PASSWORD_TEXT '</span>'''); ?>

    <br class="clearBoth" />



    <label class="inputLabel" for="password-confirm"><?php echo ENTRY_PASSWORD_CONFIRMATION?></label>

    <?php echo zen_draw_password_field('confirmation'''zen_set_field_length(TABLE_CUSTOMERS'customers_password''20') . ' id="password-confirm"') . (zen_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="alert">' ENTRY_PASSWORD_CONFIRMATION_TEXT '</span>'''); ?>

    <br class="clearBoth" />

    </fieldset>



    <fieldset>

    <legend><?php echo ENTRY_EMAIL_PREFERENCE?></legend>
    <br class="clearBoth"/>
    <?php

      
    if (ACCOUNT_NEWSLETTER_STATUS != 0) {

    ?>

    <?php echo zen_draw_checkbox_field('newsletter''1'$newsletter'id="newsletter-checkbox"') . '<label class="checkboxLabel" for="newsletter-checkbox">' ENTRY_NEWSLETTER '</label>' . (zen_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="alert">' ENTRY_NEWSLETTER_TEXT '</span>'''); ?>

    <br class="clearBoth" />

    <?php ?>



    <?php echo zen_draw_radio_field('email_format''HTML', ($email_format == 'HTML' true false),'id="email-format-html"') . '<label class="radioButtonLabel" for="email-format-html">' ENTRY_EMAIL_HTML_DISPLAY '</label>' .  zen_draw_radio_field('email_format''TEXT', ($email_format == 'TEXT' true false), 'id="email-format-text"') . '<label class="radioButtonLabel" for="email-format-text">' ENTRY_EMAIL_TEXT_DISPLAY '</label>'?>

    <br class="clearBoth" />

    </fieldset>








    <?php
    if (ACCOUNT_VALIDATION == 'true') {
    ?>

    <?php
    if (strstr($_SERVER['REQUEST_URI'],'create_account') && CREATE_ACCOUNT_VALIDATION == 'true' || strstr($_SERVER['REQUEST_URI'],'login') && CREATE_ACCOUNT_VALIDATION == 'true') { 
    ?>

    <?php
      
    if ($is_read_only == false || (strstr($_SERVER['REQUEST_URI'],'create_account')) || (strstr($_SERVER['REQUEST_URI'],'login'))) {
        
    $sql "DELETE FROM " TABLE_ANTI_ROBOT_REGISTRATION " WHERE timestamp < '" . (time() - 3600) . "' OR session_id = '" zen_session_id() . "'";
        if( !
    $result $db->Execute($sql) ) { die('Could not delete validation key'); }
        
    $reg_key generate_captcha_code();
        
    $sql "INSERT INTO "TABLE_ANTI_ROBOT_REGISTRATION " VALUES ('" zen_session_id() . "', '" $reg_key "', '" time() . "')";
        if( !
    $result $db->Execute($sql) ) { die('Could not check registration information'); }
    ?>

    <fieldset>
    <legend><?php echo CATEGORY_ANTIROBOTREG?></legend>
    <label class="inputLabel" for="antirobotreg"><?php echo ENTRY_ANTIROBOTREG ?></label>

    <?php
    $validation_images 
    '';
    for(
    $i 0$i ENTRY_VALIDATION_LENGTH$i++)
        {
        
    $parse_image 'validation/validation_' $reg_key{$i} . '.gif';
        
    $parse_image_alt $reg_key{$i};
        
    $validation_images .= zen_image(DIR_WS_IMAGES $parse_image$parse_image_alt);
        }
        echo 
    '<div class="centered">';
        echo 
    $validation_images '<br />';
        echo 
    '</div>';
    ?>

    <?php echo zen_draw_input_field('antirobotreg','''id="antirobotreg"') . (zen_not_null(ENTRY_ANTIROBOTREG) ? '<span class="alert">' ENTRY_ANTIROBOTREG_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <?php
        
    }
    ?>

    <?php
        
    }
    ?>

    <?php
        
    }
    ?>












    <?php

      
    if (CUSTOMERS_REFERRAL_STATUS == 2) {

    ?>

    <fieldset>



    <legend><?php echo TABLE_HEADING_REFERRAL_DETAILS?></legend>
    <br class="clearBoth"/>
    <label class="inputLabel" for="customers_referral"><?php echo ENTRY_CUSTOMERS_REFERRAL?></label>

    <?php echo zen_draw_input_field('customers_referral'''zen_set_field_length(TABLE_CUSTOMERS'customers_referral''15') . ' id="customers_referral"'); ?>

    <br class="clearBoth" />

    </fieldset>

    <?php ?>
    Silver Jewellery

    RESPECT to the Zen Cart Team, I'm PERFECTLY Zenned!

  3. #3
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default Re: HOW TO INTEGRATE FEC(Fat Easy Checkout) with CAPTCHA module

    And the modules file:


    PHP Code:
    <?php
    /**
     * create_account header_php.php
     *
     * @package modules
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: create_account.php 106 2010-03-14 20:55:15Z numinix $
     */
    // This should be first line of the script:
    $zco_notifier->notify('NOTIFY_MODULE_START_CREATE_ACCOUNT');

    if (!
    defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }

    /**
     * Set some defaults
     */
      
    $process false;
      
    $zone_name '';
      
    $entry_state_has_zones '';
      
    $error_state_input false;
      
    $state '';
      
    $zone_id 0;
      
    $error false;
      
    $email_format = (ACCOUNT_EMAIL_PREFERENCE == '1' 'HTML' 'TEXT');
      
    $newsletter = (ACCOUNT_NEWSLETTER_STATUS == '1' false true);
      
      
    $process_shipping false;
      
    $zone_name_shipping '';
      
    $entry_state_has_zones_shipping '';
      
    $error_state_input_shipping false;
      
    $state_shipping '';
      
    $zone_id_shipping 0;

    /**
     * Process form contents
     */
    if (isset($_POST['action']) && ($_POST['action'] == 'process')) {
      
    $process true;

      if (
    ACCOUNT_GENDER == 'true') {
        if (isset(
    $_POST['gender'])) {
          
    $gender zen_db_prepare_input($_POST['gender']);
        } else {
          
    $gender false;
        }
      }

      if (isset(
    $_POST['email_format'])) {
        
    $email_format zen_db_prepare_input($_POST['email_format']);
      }

      if (
    ACCOUNT_COMPANY == 'true'$company zen_db_prepare_input($_POST['company']);
      
    $firstname zen_db_prepare_input($_POST['firstname']);
      
    $lastname zen_db_prepare_input($_POST['lastname']);
      
    $nick zen_db_prepare_input($_POST['nick']);
      if (
    ACCOUNT_DOB == 'true'$dob = (empty($_POST['dob']) ? zen_db_prepare_input('0001-01-01 00:00:00') : zen_db_prepare_input($_POST['dob']));
      
    $email_address zen_db_prepare_input($_POST['email_address']);
      
    $street_address zen_db_prepare_input($_POST['street_address']);
      if (
    ACCOUNT_SUBURB == 'true'$suburb zen_db_prepare_input($_POST['suburb']);
      
    $postcode zen_db_prepare_input($_POST['postcode']);
      
    $city zen_db_prepare_input($_POST['city']);
      if (
    ACCOUNT_STATE == 'true') {
        
    $state zen_db_prepare_input($_POST['state']);
        if (isset(
    $_POST['zone_id'])) {
          
    $zone_id zen_db_prepare_input($_POST['zone_id']);
        } else {
          
    $zone_id false;
        }
      }
      
    $country zen_db_prepare_input($_POST['zone_country_id']);
      
      if (
    ACCOUNT_TELEPHONE == 'true') {
        
    $telephone zen_db_prepare_input($_POST['telephone']);
      }

    $fax zen_db_prepare_input($_POST['fax']);
      
    $customers_authorization CUSTOMERS_APPROVAL_AUTHORIZATION;
      
    $customers_referral zen_db_prepare_input($_POST['customers_referral']);

      if (isset(
    $_POST['newsletter'])) {
        
    $newsletter zen_db_prepare_input($_POST['newsletter']);
      }

    $password zen_db_prepare_input($_POST['password']);
      
    $confirmation zen_db_prepare_input($_POST['confirmation']);
      
     if (
    ACCOUNT_VALIDATION == 'true' && CREATE_ACCOUNT_VALIDATION == 'true') {
        
    $antirobotreg zen_db_prepare_input($_POST['antirobotreg']);
      }
      
    $error false;

      

      if (
    DISPLAY_PRIVACY_CONDITIONS == 'true') {
        if (!isset(
    $_POST['privacy_conditions']) || ($_POST['privacy_conditions'] != '1')) {
          
    $error true;
          
    $messageStack->add_session('login'ERROR_PRIVACY_STATEMENT_NOT_ACCEPTED'error');
        }
      }

      if (
    ACCOUNT_GENDER == 'true') {
        if ( (
    $gender != 'm') && ($gender != 'f') ) {
          
    $error true;
          
    $messageStack->add_session('login'ENTRY_GENDER_ERROR);
        }
      }

      if (
    strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_FIRST_NAME_ERROR);
      }

      if (
    strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_LAST_NAME_ERROR);
      }

      if (
    ACCOUNT_DOB == 'true') {
        if (
    ENTRY_DOB_MIN_LENGTH or !empty($_POST['dob'])) {
          if (
    substr_count($dob,'/') > || checkdate((int)substr(zen_date_raw($dob), 42), (int)substr(zen_date_raw($dob), 62), (int)substr(zen_date_raw($dob), 04)) == false) {
            
    $error true;
            
    $messageStack->add_session('login'ENTRY_DATE_OF_BIRTH_ERROR);
          }
        }
      }

      if (
    ACCOUNT_COMPANY == 'true') {
        if ((int)
    ENTRY_COMPANY_MIN_LENGTH && strlen($company) < ENTRY_COMPANY_MIN_LENGTH) {
          
    $error true;
          
    $messageStack->add_session('login'ENTRY_COMPANY_ERROR);
        }
      }


      if (
    strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_EMAIL_ADDRESS_ERROR);
      } elseif (
    zen_validate_email($email_address) == false) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
      } else {
        
    $check_email_query "select count(*) as total
                                from " 
    TABLE_CUSTOMERS "
                                where customers_email_address = '" 
    zen_db_input($email_address) . "'
                                and COWOA_account != 1"
    ;
        
    $check_email $db->Execute($check_email_query);

        if (
    $check_email->fields['total'] > 0) {
          
    $error true;
          
    $messageStack->add_session('login'ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
        }
      }

      if (
    $phpBB->phpBB['installed'] == true) {
        if (
    strlen($nick) < ENTRY_NICK_MIN_LENGTH)  {
          
    $error true;
          
    $messageStack->add_session('login'ENTRY_NICK_LENGTH_ERROR);
        } else {
          
    // check Zen Cart for duplicate nickname
          
    $check_nick_query "select * from " TABLE_CUSTOMERS  "
                               where customers_nick = '" 
    $nick "'";
          
    $check_nick $db->Execute($check_nick_query);
          if (
    $check_nick->RecordCount() > ) {
            
    $error true;
            
    $messageStack->add_session('login'ENTRY_NICK_DUPLICATE_ERROR);
          }
          
    // check phpBB for duplicate nickname
          
    if ($phpBB->phpbb_check_for_duplicate_nick($nick) == 'already_exists' ) {
            
    $error true;
            
    $messageStack->add_session('login'ENTRY_NICK_DUPLICATE_ERROR ' (phpBB)');
          }
        }
      }

      if (
    strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_STREET_ADDRESS_ERROR);
      }
      
      
    // BEGIN PO Box Ban 1/1
      
    if (defined('PO_BOX_ERROR')) {
        if ( 
    preg_match('/PO BOX/si'$street_address) ) {
          
    $error true;
          
    $messageStack->add_session('login'PO_BOX_ERROR);
        } else if ( 
    preg_match('/POBOX/si'$street_address) ) {
          
    $error true;
          
    $messageStack->add_session('login'PO_BOX_ERROR);
        } else if ( 
    preg_match('/P\.O\./si'$street_address) ) {
          
    $error true;
          
    $messageStack->add_session('login'PO_BOX_ERROR);
        } else if ( 
    preg_match('/P\.O/si'$street_address) ) {
          
    $error true;
          
    $messageStack->add_session('login'PO_BOX_ERROR);
        } else if ( 
    preg_match('/PO\./si'$street_address) ) {
          
    $error true;
          
    $messageStack->add_session('login'PO_BOX_ERROR);
        }
      }
      
    // END PO Box Ban 1/1

      
    if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_CITY_ERROR);
      }

      if (
    ACCOUNT_STATE == 'true') {
        
    $check_query "SELECT count(*) AS total
                        FROM " 
    TABLE_ZONES "
                        WHERE zone_country_id = :zoneCountryID"
    ;
        
    $check_query $db->bindVars($check_query':zoneCountryID'$country'integer');
        
    $check $db->Execute($check_query);
        
    $entry_state_has_zones = ($check->fields['total'] > 0);
        if (
    $entry_state_has_zones == true) {
          
    $zone_query "SELECT distinct zone_id, zone_name, zone_code
                         FROM " 
    TABLE_ZONES "
                         WHERE zone_country_id = :zoneCountryID
                         AND " 
    .
                         ((
    trim($state) != '' && $zone_id == 0) ? "(upper(zone_name) like ':zoneState%' OR upper(zone_code) like '%:zoneState%') OR " "") .
                        
    "zone_id = :zoneID
                         ORDER BY zone_code ASC, zone_name"
    ;

          
    $zone_query $db->bindVars($zone_query':zoneCountryID'$country'integer');
          
    $zone_query $db->bindVars($zone_query':zoneState'strtoupper($state), 'noquotestring');
          
    $zone_query $db->bindVars($zone_query':zoneID'$zone_id'integer');
          
    $zone $db->Execute($zone_query);

          
    //look for an exact match on zone ISO code
          
    $found_exact_iso_match = ($zone->RecordCount() == 1);
          if (
    $zone->RecordCount() > 1) {
            while (!
    $zone->EOF && !$found_exact_iso_match) {
              if (
    strtoupper($zone->fields['zone_code']) == strtoupper($state) ) {
                
    $found_exact_iso_match true;
                continue;
              }
              
    $zone->MoveNext();
            }
          }

          if (
    $found_exact_iso_match) {
            
    $zone_id $zone->fields['zone_id'];
            
    $zone_name $zone->fields['zone_name'];
          } else {
            
    $error true;
            
    $error_state_input true;
            
    $messageStack->add_session('login'ENTRY_STATE_ERROR_SELECT);
          }
        } else {
          if (
    strlen($state) < ENTRY_STATE_MIN_LENGTH) {
            
    $error true;
            
    $error_state_input true;
            
    $messageStack->add_session('login'ENTRY_STATE_ERROR);
          }
        }
      }

      if (
    strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_POST_CODE_ERROR);
      }

      if ( (
    is_numeric($country) == false) || ($country 1) ) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_COUNTRY_ERROR);
      }

      if (
    ACCOUNT_TELEPHONE == 'true') {
        if (
    strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
          
    $error true;
          
    $messageStack->add_session('login'ENTRY_TELEPHONE_NUMBER_ERROR);
        }
      }
      
      
    // confirm email address modification
      
    if (FEC_CONFIRM_EMAIL == 'true') {
        
    $email_address_confirm zen_db_prepare_input($_POST['email_address_confirm']);
        if (
    $email_address != $email_address_confirm) {
          
    $error true;
          
    $messageStack->add_session('login'ENTRY_EMAIL_ADDRESS_CONFIRM_ERROR);
        }
      }

      if (
    ACCOUNT_VALIDATION == 'true' && CREATE_ACCOUNT_VALIDATION == 'true') {
      
    $sql "SELECT * FROM " TABLE_ANTI_ROBOT_REGISTRATION " WHERE session_id = '" zen_session_id() . "' LIMIT 1";
      if( !
    $result $db->Execute($sql) ) {
        
    $error true;
        
    $entry_antirobotreg_error true;
        
    $text_antirobotreg_error ERROR_VALIDATION_1;
        
    $messageStack->add('create_account'ERROR_VALIDATION_1);
        } else {
        
    $entry_antirobotreg_error false;
        
    $antirobotrow $db->Execute($sql);
            if (( 
    strtolower($_POST['antirobotreg']) != $antirobotrow->fields['reg_key'] ) or ($antirobotrow->fields['reg_key'] =='')) {
            
    $error true;
            
    $entry_antirobotreg_error true;
            
    $text_antirobotreg_error ERROR_VALIDATION_2;
            
    $messageStack->add('create_account'ERROR_VALIDATION_2);
            } else {
                    
    $sql "DELETE FROM " TABLE_ANTI_ROBOT_REGISTRATION " WHERE session_id = '" zen_session_id() . "'";
                    if( !
    $result $db->Execute($sql) )
                    {
                                    
    $error true;
                                    
    $entry_antirobotreg_error true;
                                    
    $text_antirobotreg_error ERROR_VALIDATION_3;
                                   
    $messageStack->add('create_account'ERROR_VALIDATION_3);
                                    } else {
                                    
    $sql "OPTIMIZE TABLE " TABLE_ANTI_ROBOT_REGISTRATION "";
                                            if( !
    $result $db->Execute($sql) )
                                                    {
                                                    
    $error true;
                                                    
    $entry_antirobotreg_error true;
                                                    
    $text_antirobotreg_error ERROR_VALIDATION_4;
                                                    
    $messageStack->add('create_account'ERROR_VALIDATION_4);
                                                    } else {
                                                    
    $entry_antirobotreg_error false;
                                     }
                                    }
                        }
      }

        if (
    strlen($antirobotreg) <> ENTRY_VALIDATION_LENGTH) {
            
    $error true;
            
    $entry_antirobotreg_error true;
            } else {
            
    $entry_antirobotreg_error false;
        }
    }

      if (
    strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_PASSWORD_ERROR);
      } elseif (
    $password != $confirmation) {
        
    $error true;
        
    $messageStack->add_session('login'ENTRY_PASSWORD_ERROR_NOT_MATCHING);
      }

    // begin shipping
        
    if ($_GET['main_page'] != "create_account" && enable_shippingAddress()) {
          
    $process_shipping true;
          if (
    ACCOUNT_GENDER == 'true'$gender_shipping zen_db_prepare_input($_POST['gender_shipping']);
          if (
    ACCOUNT_COMPANY == 'true'$company_shipping zen_db_prepare_input($_POST['company_shipping']);
          
    $firstname_shipping zen_db_prepare_input($_POST['firstname_shipping']);
          
    $lastname_shipping zen_db_prepare_input($_POST['lastname_shipping']);
          
    $street_address_shipping zen_db_prepare_input($_POST['street_address_shipping']);
          if (
    ACCOUNT_SUBURB == 'true'$suburb_shipping zen_db_prepare_input($_POST['suburb_shipping']);
          
    $postcode_shipping zen_db_prepare_input($_POST['postcode_shipping']);
          
    $city_shipping zen_db_prepare_input($_POST['city_shipping']);
          if (
    ACCOUNT_STATE == 'true') {
            
    $state_shipping zen_db_prepare_input($_POST['state_shipping']);
            if (isset(
    $_POST['zone_id_shipping'])) {
              
    $zone_id_shipping zen_db_prepare_input($_POST['zone_id_shipping']);
            } else {
              
    $zone_id_shipping false;
            }
          }
          
    $country_shipping zen_db_prepare_input($_POST['zone_country_id_shipping']);
      
    //echo ' I SEE: country=' . $country . '&nbsp;&nbsp;&nbsp;state=' . $state . '&nbsp;&nbsp;&nbsp;zone_id=' . $zone_id;
          
    if (ACCOUNT_GENDER == 'true') {
            if ( (
    $gender_shipping != 'm') && ($gender_shipping != 'f') ) {
              
    $error true;
              
    $messageStack->add_session('login'ENTRY_GENDER_ERROR);
            }
          }

          if (
    strlen($firstname_shipping) < ENTRY_FIRST_NAME_MIN_LENGTH) {
            
    $error true;
            
    $messageStack->add_session('login'ENTRY_FIRST_NAME_ERROR);
          }

          if (
    strlen($lastname_shipping) < ENTRY_LAST_NAME_MIN_LENGTH) {
            
    $error true;
            
    $messageStack->add_session('login'ENTRY_LAST_NAME_ERROR);
          }

          if (
    strlen($street_address_shipping) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
            
    $error true;
            
    $messageStack->add_session('login'ENTRY_STREET_ADDRESS_ERROR);
          }

          if (
    strlen($city_shipping) < ENTRY_CITY_MIN_LENGTH) {
            
    $error true;
            
    $messageStack->add_session('login'ENTRY_CITY_ERROR);
          }
          
          
    // BEGIN PO Box Ban 1/1
          
    if (defined('PO_BOX_ERROR')) {
            if ( 
    preg_match('/PO BOX/si'$street_address_shipping) ) {
              
    $error true;
              
    $messageStack->add_session('login'PO_BOX_ERROR);
            } else if ( 
    preg_match('/POBOX/si'$street_address_shipping) ) {
              
    $error true;
              
    $messageStack->add_session('login'PO_BOX_ERROR);
            } else if ( 
    preg_match('/P\.O\./si'$street_address_shipping) ) {
              
    $error true;
              
    $messageStack->add_session('login'PO_BOX_ERROR);
            } else if ( 
    preg_match('/P\.O/si'$street_address_shipping) ) {
              
    $error true;
              
    $messageStack->add_session('login'PO_BOX_ERROR);
            } else if ( 
    preg_match('/PO\./si'$street_address_shipping) ) {
              
    $error true;
              
    $messageStack->add_session('login'PO_BOX_ERROR);
            }
          }
    CONTINUED ON NEXT POST>>>
    Silver Jewellery

    RESPECT to the Zen Cart Team, I'm PERFECTLY Zenned!

  4. #4
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default Re: HOW TO INTEGRATE FEC(Fat Easy Checkout) with CAPTCHA module

    <<<<<<CONTINUED FROM PREVIOUS POST
    PHP Code:
      // END PO Box Ban 1/1

          
    if (ACCOUNT_STATE == 'true') {
            
    $check_query "SELECT count(*) AS total
                            FROM " 
    TABLE_ZONES "
                            WHERE zone_country_id = :zoneCountryID"
    ;
            
    $check_query $db->bindVars($check_query':zoneCountryID'$country_shipping'integer');
            
    $check $db->Execute($check_query);
            
    $entry_state_has_zones_shipping = ($check->fields['total'] > 0);
            if (
    $entry_state_has_zones_shipping == true) {
              
    $zone_query "SELECT distinct zone_id, zone_name, zone_code
                             FROM " 
    TABLE_ZONES "
                             WHERE zone_country_id = :zoneCountryID
                             AND " 

                           ((
    trim($state_shipping) != '' && $zone_id_shipping == 0) ? "(upper(zone_name) like ':zoneState%' OR upper(zone_code) like '%:zoneState%') OR " "") .
                            
    "zone_id = :zoneID
                             ORDER BY zone_code ASC, zone_name"
    ;

              
    $zone_query $db->bindVars($zone_query':zoneCountryID'$country_shipping'integer');
              
    $zone_query $db->bindVars($zone_query':zoneState'strtoupper($state_shipping), 'noquotestring');
              
    $zone_query $db->bindVars($zone_query':zoneID'$zone_id_shipping'integer');
              
    $zone_shipping $db->Execute($zone_query);

              
    //look for an exact match on zone ISO code
              
    $found_exact_iso_match_shipping = ($zone->RecordCount() == 1);
              if (
    $zone_shipping->RecordCount() > 1) {
                while (!
    $zone_shipping->EOF && !$found_exact_iso_match_shipping) {
                  if (
    strtoupper($zone->fields['zone_code']) == strtoupper($state_shipping) ) {
                    
    $found_exact_iso_match_shipping true;
                    continue;
                  }
                  
    $zone_shipping->MoveNext();
                }
              }

              if (
    $found_exact_iso_match_shipping) {
                
    $zone_id_shipping $zone_shipping->fields['zone_id'];
                
    $zone_name_shipping $zone_shipping->fields['zone_name'];
              } else {
                
    $error true;
                
    $error_state_input_shipping true;
                
    $messageStack->add_session('login'ENTRY_STATE_ERROR_SELECT);
              }
            } else {
              if (
    strlen($state_shipping) < ENTRY_STATE_MIN_LENGTH) {
                
    $error true;
                
    $error_state_input_shipping true;
                
    $messageStack->add_session('login'ENTRY_STATE_ERROR);
              }
            }
          }

          if (
    strlen($postcode_shipping) < ENTRY_POSTCODE_MIN_LENGTH) {
            
    $error true;
            
    $messageStack->add_session('login'ENTRY_POST_CODE_ERROR);
          }

          if ( (
    is_numeric($country_shipping) == false) || ($country_shipping 1) ) {
            
    $error true;
            
    $messageStack->add_session('login'ENTRY_COUNTRY_ERROR);
          }
        }
    // end shipping  

      
    if ($error == true) {
        
    // hook notifier class
        
    $zco_notifier->notify('NOTIFY_FAILURE_DURING_CREATE_ACCOUNT');
        
      } else {
        
    $sql_data_array = array('customers_firstname' => $firstname,
                                
    'customers_lastname' => $lastname,
                                
    'customers_email_address' => $email_address,
                                
    'customers_nick' => $nick,
                                
    'customers_telephone' => $telephone,
                                
    'customers_fax' => $fax,
                                
    'customers_newsletter' => (int)$newsletter,
                                
    'customers_email_format' => $email_format,
                                
    'customers_default_address_id' => 0,
                                
    'customers_password' => zen_encrypt_password($password),
                                
    'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION
        
    );

        if ((
    CUSTOMERS_REFERRAL_STATUS == '2' and $customers_referral != '')) $sql_data_array['customers_referral'] = $customers_referral;
        if (
    ACCOUNT_GENDER == 'true'$sql_data_array['customers_gender'] = $gender;
        if (
    ACCOUNT_DOB == 'true'$sql_data_array['customers_dob'] = (empty($_POST['dob']) || $dob_entered == '0001-01-01 00:00:00' zen_db_prepare_input('0001-01-01 00:00:00') : zen_date_raw($_POST['dob']));

        
    zen_db_perform(TABLE_CUSTOMERS$sql_data_array);

        
    $_SESSION['customer_id'] = $db->Insert_ID();

        
    $zco_notifier->notify('NOTIFY_MODULE_CREATE_ACCOUNT_ADDED_CUSTOMER_RECORD'array_merge(array('customer_id' => $_SESSION['customer_id']), $sql_data_array));

        
    $sql_data_array = array('customers_id' => $_SESSION['customer_id'],
                                
    'entry_firstname' => $firstname,
                                
    'entry_lastname' => $lastname,
                                
    'entry_street_address' => $street_address,
                                
    'entry_postcode' => $postcode,
                                
    'entry_city' => $city,
                                
    'entry_country_id' => $country);

        if (
    ACCOUNT_GENDER == 'true'$sql_data_array['entry_gender'] = $gender;
        if (
    ACCOUNT_COMPANY == 'true'$sql_data_array['entry_company'] = $company;
        if (
    ACCOUNT_SUBURB == 'true'$sql_data_array['entry_suburb'] = $suburb;
        if (
    ACCOUNT_STATE == 'true') {
          if (
    $zone_id 0) {
            
    $sql_data_array['entry_zone_id'] = $zone_id;
            
    $sql_data_array['entry_state'] = '';
          } else {
            
    $sql_data_array['entry_zone_id'] = '0';
            
    $sql_data_array['entry_state'] = $state;
          }
        }

        
    zen_db_perform(TABLE_ADDRESS_BOOK$sql_data_array);

        
    $address_id $db->Insert_ID();

        
    $zco_notifier->notify('NOTIFY_MODULE_CREATE_ACCOUNT_ADDED_ADDRESS_BOOK_RECORD'array_merge(array('address_id' => $address_id), $sql_data_array));

        
    $sql "update " TABLE_CUSTOMERS "
                  set customers_default_address_id = '" 
    . (int)$address_id "'
                  where customers_id = '" 
    . (int)$_SESSION['customer_id'] . "'";

        
    $db->Execute($sql);
        
    // shipping address
        
    if ($_GET['main_page'] != "create_account" && enable_shippingAddress()) {
          
    // create shipping address
          
    $sql_data_array = array(array('fieldName'=>'customers_id''value'=>$_SESSION['customer_id'], 'type'=>'integer'),
                                  array(
    'fieldName'=>'entry_firstname''value'=>$firstname_shipping'type'=>'string'),
                                  array(
    'fieldName'=>'entry_lastname','value'=>$lastname_shipping'type'=>'string'),
                                  array(
    'fieldName'=>'entry_street_address','value'=>$street_address_shipping'type'=>'string'),
                                  array(
    'fieldName'=>'entry_postcode''value'=>$postcode_shipping'type'=>'string'),
                                  array(
    'fieldName'=>'entry_city''value'=>$city_shipping'type'=>'string'),
                                  array(
    'fieldName'=>'entry_country_id''value'=>$country_shipping'type'=>'integer')
          );

          if (
    ACCOUNT_GENDER == 'true'$sql_data_array[] = array('fieldName'=>'entry_gender''value'=>$gender_shipping'type'=>'enum:m|f');
          if (
    ACCOUNT_COMPANY == 'true'$sql_data_array[] = array('fieldName'=>'entry_company''value'=>$company_shipping'type'=>'string');
          if (
    ACCOUNT_SUBURB == 'true'$sql_data_array[] = array('fieldName'=>'entry_suburb''value'=>$suburb_shipping'type'=>'string');
          if (
    ACCOUNT_STATE == 'true') {
            if (
    $zone_id_shipping 0) {
              
    $sql_data_array[] = array('fieldName'=>'entry_zone_id''value'=>$zone_id_shipping'type'=>'integer');
              
    $sql_data_array[] = array('fieldName'=>'entry_state''value'=>'''type'=>'string');
            } else {
              
    $sql_data_array[] = array('fieldName'=>'entry_zone_id''value'=>0'type'=>'integer');
              
    $sql_data_array[] = array('fieldName'=>'entry_state''value'=>$state_shipping'type'=>'string');
            }
          }
          
    $db->perform(TABLE_ADDRESS_BOOK$sql_data_array);
          
    $_SESSION['sendto'] = $db->Insert_ID();
        } else {
          
    // FEC MODIFICATION
          
    $_SESSION['sendto'] = $_SESSION['cart_address_id'] = (int)$address_id;
        }
        
    $_SESSION['shipping'] = ''
        
    $sql "insert into " TABLE_CUSTOMERS_INFO "
                              (customers_info_id, customers_info_number_of_logons,
                               customers_info_date_account_created)
                  values ('" 
    . (int)$_SESSION['customer_id'] . "', '0', now())";

        
    $db->Execute($sql);
        
    // BEGIN newsletter_subscribe mod 1/1
    // If a newsletter only account exists we update the info,
    // but keep the subscription active, and give them a message that to
    // change they should do so on their account page (after creation).
        
    if(defined('NEWSONLY_SUBSCRIPTION_ENABLED') && (NEWSONLY_SUBSCRIPTION_ENABLED=='true')) {
          
    $check_subscribers_query "select count(*) as total from " TABLE_SUBSCRIBERS "
                        where email_address = '" 
    zen_db_input($email_address) . "' ";
          
    $check_subscribers $db->Execute($check_subscribers_query);
          if (
    $check_subscribers->fields['total'] > 0) {
            
    $sql "UPDATE " TABLE_SUBSCRIBERS " SET
                    customers_id = '" 
    . (int)$_SESSION['customer_id'] . "',
                    email_format = '" 
    zen_db_input($email_format) . "',
                    confirmed = '1' 
                    WHERE email_address = '" 
    zen_db_input($email_address) . "' ";
            
    $db->Execute($sql);
            
    $messageStack->add_session('login'SUBSCRIBE_MERGED_NEWSONLY_ACCT);
          } else {
            if (!empty(
    $newsletter)) {
              
    $sql "INSERT INTO " TABLE_SUBSCRIBERS 
                      (customers_id, email_address, email_format, confirmed, subscribed_date)
                      VALUES ('" 
    . (int)$_SESSION['customer_id'] . "', '" zen_db_input($email_address) . "', '" zen_db_input($email_format) . "', '1', now())";
              
    $db->Execute($sql);
            }
          }
        }
    // END newsletter_subscribe mod 1/1

        // phpBB create account
        
    if ($phpBB->phpBB['installed'] == true) {
          
    $phpBB->phpbb_create_account($nick$password$email_address);
        }
        
    // End phppBB create account

        
    if (SESSION_RECREATE == 'True') {
          
    zen_session_recreate();
        }

        
    $_SESSION['customer_first_name'] = $firstname;
        
    $_SESSION['customer_default_address_id'] = $address_id;
        
    $_SESSION['customer_country_id'] = $country;
        
    $_SESSION['customer_zone_id'] = $zone_id;
        
    $_SESSION['customers_authorization'] = $customers_authorization;

        
    // restore cart contents
        
    $_SESSION['cart']->restore_contents();

        
    // hook notifier class
        
    $zco_notifier->notify('NOTIFY_LOGIN_SUCCESS_VIA_CREATE_ACCOUNT');

        
    // build the message content
        
    $name $firstname ' ' $lastname;

        if (
    ACCOUNT_GENDER == 'true') {
          if (
    $gender == 'm') {
            
    $email_text sprintf(EMAIL_GREET_MR$lastname);
          } else {
            
    $email_text sprintf(EMAIL_GREET_MS$lastname);
          }
        } else {
          
    $email_text sprintf(EMAIL_GREET_NONE$firstname);
        }
        
    $html_msg['EMAIL_GREETING'] = str_replace('\n','',$email_text);
        
    $html_msg['EMAIL_FIRST_NAME'] = $firstname;
        
    $html_msg['EMAIL_LAST_NAME']  = $lastname;

        
    // initial welcome
        
    $email_text .=  EMAIL_WELCOME;
        
    $html_msg['EMAIL_WELCOME'] = str_replace('\n','',EMAIL_WELCOME);

        if (
    NEW_SIGNUP_DISCOUNT_COUPON != '' and NEW_SIGNUP_DISCOUNT_COUPON != '0') {
          
    $coupon_id NEW_SIGNUP_DISCOUNT_COUPON;
          
    $coupon $db->Execute("select * from " TABLE_COUPONS " where coupon_id = '" $coupon_id "'");
          
    $coupon_desc $db->Execute("select coupon_description from " TABLE_COUPONS_DESCRIPTION " where coupon_id = '" $coupon_id "' and language_id = '" $_SESSION['languages_id'] . "'");
          
    $db->Execute("insert into " TABLE_COUPON_EMAIL_TRACK " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" $coupon_id ."', '0', 'Admin', '" $email_address "', now() )");

          
    $text_coupon_help sprintf(TEXT_COUPON_HELP_DATEzen_date_short($coupon->fields['coupon_start_date']),zen_date_short($coupon->fields['coupon_expire_date']));

          
    // if on, add in Discount Coupon explanation
          //        $email_text .= EMAIL_COUPON_INCENTIVE_HEADER .
          
    $email_text .= "\n" EMAIL_COUPON_INCENTIVE_HEADER .
          (!empty(
    $coupon_desc->fields['coupon_description']) ? $coupon_desc->fields['coupon_description'] . "\n\n" '') . $text_coupon_help  "\n\n" .
          
    strip_tags(sprintf(EMAIL_COUPON_REDEEM' ' $coupon->fields['coupon_code'])) . EMAIL_SEPARATOR;

          
    $html_msg['COUPON_TEXT_VOUCHER_IS'] = EMAIL_COUPON_INCENTIVE_HEADER ;
          
    $html_msg['COUPON_DESCRIPTION']     = (!empty($coupon_desc->fields['coupon_description']) ? '<strong>' $coupon_desc->fields['coupon_description'] . '</strong>' '');
          
    $html_msg['COUPON_TEXT_TO_REDEEM']  = str_replace("\n"''sprintf(EMAIL_COUPON_REDEEM''));
          
    $html_msg['COUPON_CODE']  = $coupon->fields['coupon_code'] . $text_coupon_help;
        } 
    //endif coupon

        
    if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT 0) {
          
    $coupon_code zen_create_coupon_code();
          
    $insert_query $db->Execute("insert into " TABLE_COUPONS " (coupon_code, coupon_type, coupon_amount, date_created) values ('" $coupon_code "', 'G', '" NEW_SIGNUP_GIFT_VOUCHER_AMOUNT "', now())");
          
    $insert_id $db->Insert_ID();
          
    $db->Execute("insert into " TABLE_COUPON_EMAIL_TRACK " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" $insert_id ."', '0', 'Admin', '" $email_address "', now() )");

          
    // if on, add in GV explanation
          
    $email_text .= "\n\n" sprintf(EMAIL_GV_INCENTIVE_HEADER$currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) .
          
    sprintf(EMAIL_GV_REDEEM$coupon_code) .
          
    EMAIL_GV_LINK zen_href_link(FILENAME_GV_REDEEM'gv_no=' $coupon_code'NONSSL'false) . "\n\n" .
          
    EMAIL_GV_LINK_OTHER EMAIL_SEPARATOR;
          
    $html_msg['GV_WORTH'] = str_replace('\n','',sprintf(EMAIL_GV_INCENTIVE_HEADER$currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) );
          
    $html_msg['GV_REDEEM'] = str_replace('\n','',str_replace('\n\n','<br />',sprintf(EMAIL_GV_REDEEM'<strong>' $coupon_code '</strong>')));
          
    $html_msg['GV_CODE_NUM'] = $coupon_code;
          
    $html_msg['GV_CODE_URL'] = str_replace('\n','',EMAIL_GV_LINK '<a href="' zen_href_link(FILENAME_GV_REDEEM'gv_no=' $coupon_code'NONSSL'false) . '">' TEXT_GV_NAME ': ' $coupon_code '</a>');
          
    $html_msg['GV_LINK_OTHER'] = EMAIL_GV_LINK_OTHER;
        } 
    // endif voucher

        // add in regular email welcome text
        
    $email_text .= "\n\n" EMAIL_TEXT EMAIL_CONTACT EMAIL_GV_CLOSURE;

        
    $html_msg['EMAIL_MESSAGE_HTML']  = str_replace('\n','',EMAIL_TEXT);
        
    $html_msg['EMAIL_CONTACT_OWNER'] = str_replace('\n','',EMAIL_CONTACT);
        
    $html_msg['EMAIL_CLOSURE']       = nl2br(EMAIL_GV_CLOSURE);

        
    // include create-account-specific disclaimer
        
    $email_text .= "\n\n" sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMERSTORE_OWNER_EMAIL_ADDRESS). "\n\n";
        
    $html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER'<a href="mailto:' STORE_OWNER_EMAIL_ADDRESS '">'STORE_OWNER_EMAIL_ADDRESS .' </a>');

        
    //send welcome email
        
    zen_mail($name$email_addressEMAIL_SUBJECT$email_textSTORE_NAMEEMAIL_FROM$html_msg'welcome');

        
    // send additional emails
        
    if (SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_STATUS == '1' and SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO !='') {
          if (
    $_SESSION['customer_id']) {
            
    $account_query "select customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax
                                from " 
    TABLE_CUSTOMERS "
                                where customers_id = '" 
    . (int)$_SESSION['customer_id'] . "'";

            
    $account $db->Execute($account_query);
          }

          
    $extra_info=email_collect_extra_info($name,$email_address$account->fields['customers_firstname'] . ' ' $account->fields['customers_lastname'], $account->fields['customers_email_address'], $account->fields['customers_telephone'], $account->fields['customers_fax']);
          
    $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
          
    zen_mail(''SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TOSEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT ' ' EMAIL_SUBJECT,
          
    $email_text $extra_info['TEXT'], STORE_NAMEEMAIL_FROM$html_msg'welcome_extra');
        } 
    //endif send extra emails

        
    zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS'''SSL'));

      } 
    //endif !error
    }


    /*
     * Set flags for template use:
     */
      
    $selected_country = (isset($_POST['zone_country_id']) && $_POST['zone_country_id'] != '') ? $country SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;
      
    $selected_country_shipping = (isset($_POST['zone_country_id_shipping']) && $_POST['zone_country_id_shipping'] != '') ? $country_shipping SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;  
      
    $flag_show_pulldown_states = ((($process == true || $entry_state_has_zones == true) && $zone_name == '') || ACCOUNT_STATE_DRAW_INITIAL_DROPDOWN == 'true' || $error_state_input) ? true false;
      
    $flag_show_pulldown_states_shipping = ((($process_shipping == true || $entry_state_has_zones_shipping == true) && $zone_name_shipping == '') || ACCOUNT_STATE_DRAW_INITIAL_DROPDOWN == 'true' || $error_state_input_shipping) ? true false;
      
    $state = ($flag_show_pulldown_states) ? ($state == '' '&nbsp;' $state) : $zone_name;
      
    $state_shipping = ($flag_show_pulldown_states_shipping) ? ($state_shipping == '' '&nbsp;' $state_shipping) : $zone_name_shipping;
      
    $state_field_label = ($flag_show_pulldown_states) ? '' ENTRY_STATE;
      
    $state_field_label_shipping = ($flag_show_pulldown_states_shipping) ? '' ENTRY_STATE;

    // This should be last line of the script:
    $zco_notifier->notify('NOTIFY_MODULE_END_CREATE_ACCOUNT');
    ?> 

    Im really new to all this and I shock myself sometimes with the things I manage to figure out.

    This is all FULLY TESTED and WORKING please let me know if u face any issues I will try to support this to the best of my ability.


    Silver Jewellery

    RESPECT to the Zen Cart Team, I'm PERFECTLY Zenned!

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: HOW TO INTEGRATE FEC(Fat Easy Checkout) with CAPTCHA module?

    Well lookie lookie lookie.. Well done.. and extra KUDOS for your use of the forum codes to enclose the php code..

    XXXOOO!!!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  6. #6
    Join Date
    Aug 2010
    Posts
    8
    Plugin Contributions
    0

    Default Re: HOW TO INTEGRATE FEC(Fat Easy Checkout) with CAPTCHA module?

    Wow, that is exactly what I was looking for. I am planning to implement this asap. Do you mind sending me a link to your site to see this in action?

    Currently I am struggling with the FEC module on its own - it works great but doesnt give the opportunity to enter the company name at the account creation/login page. So one would have to untick 'billing and shipping addresses are the same' to be able to enter it - and then on checkout change the default billing address to what you have entered before as shipping address. This is a mere workaround and should be changed - though I have no idea on how this is done. Since you have so carefully merged these two mods I suppose you might have more of an idea than me. Are you experiencing the same issues here? If you dont mind you can have a look at q065sb.at/shop to see what I mean.

    I will report back on your contribution as soon as I have successfully installed CAPTCHA along with my allready working FEC (with the exception of the problem described above).

    Thanks for your time and effort,
    lg Stevie

  7. #7
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default Re: HOW TO INTEGRATE FEC(Fat Easy Checkout) with CAPTCHA module?

    Hi!

    You are most welcome. I'm really not all that knowledgeable just damn stubborn till it works.

    You can click on the silver jewellery link in my signature to view the site. Its not 100% complete but all the checkout functions should work fine.

    Good Luck!
    Silver Jewellery

    RESPECT to the Zen Cart Team, I'm PERFECTLY Zenned!

 

 

Similar Threads

  1. Question about Fast & Easy Checkout (FEC)
    By tcarden in forum General Questions
    Replies: 2
    Last Post: 2 Aug 2013, 04:02 AM
  2. Problem with express checkout and FEC Module
    By Ms_X in forum PayPal Express Checkout support
    Replies: 1
    Last Post: 23 Jan 2011, 04:47 AM
  3. COWOA to Fase And Easy Checkout (FEC)
    By jaishem in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 1 Nov 2010, 02:57 PM
  4. How to config "Checkout Without Account" with FEC?
    By xcbw in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 10 Jul 2010, 09:08 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR