Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009
    Posts
    413
    Plugin Contributions
    0

    Default Place 'Create Customer Profile' Above PayPal Express on Login Page??

    I recently installed the PayPal Express payment module on my Zen Cart. The first thing I noticed was that the PayPal express checkout option was above the stores default 'Create Customer Profile' option. I want to change this so that the 'Create Customer Profile' option is the first option, with the Paypal Express option underneath. I have tracked down the relevant code (/includes/templates/mytemplate/templates/tpl_login_default.php) and have been playing with all day but can't seem to get it right... here it is:

    PHP Code:
    <?php if ( USE_SPLIT_LOGIN_MODE == 'True' || $ec_button_enabled) { ?>
    <!--BOF PPEC split login- DO NOT REMOVE-->
    <fieldset class="floatingBox back">
    <legend><?php echo HEADING_NEW_CUSTOMER_SPLIT?></legend>
    <?php // ** BEGIN PAYPAL EXPRESS CHECKOUT ** ?>
    <?php 
    if ($ec_button_enabled) { ?>
    <div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION_SPLIT?></div>

      <div class="center"><?php require(DIR_FS_CATALOG DIR_WS_MODULES 'payment/paypal/tpl_ec_button.php'); ?></div>
    <hr />
    <?php echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_DIVIDER?>
    <?php 
    ?>
    <?php 
    // ** END PAYPAL EXPRESS CHECKOUT ** ?>
    <div class="information"><?php echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_SPLIT?></div>

    <?php echo zen_draw_form('create'zen_href_link(FILENAME_CREATE_ACCOUNT'''SSL')); ?>
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CREATE_ACCOUNTBUTTON_CREATE_ACCOUNT_ALT); ?></div>
    </form>
    </fieldset>
    If anyone could help me out with this that would be great.
    Thanks

  2. #2
    Join Date
    May 2009
    Posts
    413
    Plugin Contributions
    0

    Default Re: Place 'Create Customer Profile' Above PayPal Express on Login Page??

    I think I might of made my previous question a bit over complicated....

    Basically all I'm trying to do is alter the code in /includes/templates/mytemplate/templates/tpl_login_default.php so that the 'Create a Customer Profile' option is ABOVE the PayPal express button/option.

    Thanks.

  3. #3
    Join Date
    May 2009
    Posts
    413
    Plugin Contributions
    0

    Default Re: Place 'Create Customer Profile' Above PayPal Express on Login Page??

    Ok so I think I have nearly worked it out (see the Whole tpl_login_default.php file below below), but I have one small problem, for some reason when I click on the google checkout button from the login page for some reason I just get sent to index.php?main_page=create_account

    PHP Code:
    <?php
    /**
     * Page Template
     *
     * @package templateSystem
     * @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: tpl_login_default.php 5926 2007-02-28 18:15:39Z drbyte $
     */
    ?>
    <div class="centerColumn" id="loginDefault">

    <h1 id="loginDefaultHeading"><?php echo HEADING_TITLE?></h1>

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


    <?php if ( USE_SPLIT_LOGIN_MODE == 'True' || $ec_button_enabled) { ?>
    <!--BOF PPEC split login- DO NOT REMOVE-->
    <fieldset class="floatingBox back">
    <legend><?php echo HEADING_NEW_CUSTOMER_SPLIT?></legend>
    <div class="information"><?php echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_SPLIT?></div>

    <?php echo zen_draw_form('create'zen_href_link(FILENAME_CREATE_ACCOUNT'''SSL')); ?>
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CREATE_ACCOUNTBUTTON_CREATE_ACCOUNT_ALT); ?></div>
    <?php // ** BEGIN PAYPAL EXPRESS AND GOOGLE CHECKOUT ** ?>
    <?php 
    if ($ec_button_enabled) { ?>
    <br class="clearBoth" />
    <hr />
    <?php echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_DIVIDER?>
    <div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION_SPLIT?></div>

      <div class="buttonRow back"><?php require(DIR_FS_CATALOG DIR_WS_MODULES 'payment/paypal/tpl_ec_button.php'); ?></div>
      <div class="buttonRow forward"><?php include(DIR_WS_MODULES 'show_google_components.php'); ?></div>
     <?php ?>
    <?php 
    // ** END PAYPAL EXPRESS AND GOOGLE CHECKOUT ** ?>
    </form>
    </fieldset>

    <fieldset class="floatingBox forward">
    <legend><?php echo HEADING_RETURNING_CUSTOMER_SPLIT?></legend>
    <div class="information"><?php echo TEXT_RETURNING_CUSTOMER_SPLIT?></div>

    <?php echo zen_draw_form('login'zen_href_link(FILENAME_LOGIN'action=process''SSL')); ?>
    <label class="inputLabel" for="login-email-address"><?php echo ENTRY_EMAIL_ADDRESS?></label>
    <?php echo zen_draw_input_field('email_address''''size="18" id="login-email-address"'); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="login-password"><?php echo ENTRY_PASSWORD?></label>
    <?php echo zen_draw_password_field('password''''size="18" id="login-password"'); ?>
    <?php 
    echo zen_draw_hidden_field('securityToken'$_SESSION['securityToken']); ?>
    <br class="clearBoth" />

    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_LOGINBUTTON_LOGIN_ALT); ?></div>
    <div class="buttonRow back important"><?php echo '<a href="' zen_href_link(FILENAME_PASSWORD_FORGOTTEN'''SSL') . '">' TEXT_PASSWORD_FORGOTTEN '</a>'?></div>
    </form>
    </fieldset>
    <br class="clearBoth" />
    <!--EOF PPEC split login- DO NOT REMOVE-->
    <?php } else { ?>
    <!--BOF normal login-->
    <?php
      
    if ($_SESSION['cart']->count_contents() > 0) {
    ?>
    <div class="advisory"><?php echo TEXT_VISITORS_CART?></div>
    <?php
      
    }
    ?>
    <?php 
    echo zen_draw_form('login'zen_href_link(FILENAME_LOGIN'action=process''SSL')); ?>
    <fieldset>
    <legend><?php echo HEADING_RETURNING_CUSTOMER?></legend>

    <label class="inputLabel" for="login-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="login-email-address"'); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="login-password"><?php echo ENTRY_PASSWORD?></label>
    <?php echo zen_draw_password_field('password'''zen_set_field_length(TABLE_CUSTOMERS'customers_password') . ' id="login-password"'); ?>
    <br class="clearBoth" />
    <?php echo zen_draw_hidden_field('securityToken'$_SESSION['securityToken']); ?>
    </fieldset>

    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_LOGINBUTTON_LOGIN_ALT); ?></div>
    <div class="buttonRow back important"><?php echo '<a href="' zen_href_link(FILENAME_PASSWORD_FORGOTTEN'''SSL') . '">' TEXT_PASSWORD_FORGOTTEN '</a>'?></div>
    </form>
    <br class="clearBoth" />
     <?php
      
    // ** GOOGLE CHECKOUT **
        
    include(DIR_WS_MODULES 'show_google_components.php');  
      
    // ** END GOOGLE CHECKOUT **
     
    ?>

    <?php echo zen_draw_form('create_account'zen_href_link(FILENAME_CREATE_ACCOUNT'''SSL'), 'post''onsubmit="return check_form(create_account);"') . zen_draw_hidden_field('action''process') . zen_draw_hidden_field('email_pref_html''email_format'); ?>
    <fieldset>
    <legend><?php echo HEADING_NEW_CUSTOMER?></legend>

    <div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION?></div>

    <?php require($template->get_template_dir('tpl_modules_create_account.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_create_account.php'); ?>

    </fieldset>

    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SUBMITBUTTON_SUBMIT_ALT); ?></div>
    </form>
    <!--EOF normal login-->
    <?php ?>
    </div>
    I think it has something to do with the if statements being in the wrong posistion.

    Any Ideas what I'm doing wrong anyone??

    Thanks

 

 

Similar Threads

  1. v151 Customer Forced to Create Account or Login With PayPal
    By margecc in forum PayPal Express Checkout support
    Replies: 4
    Last Post: 20 Apr 2015, 09:00 PM
  2. v139h Customer Profile Creation after purchasing via PayPal Express
    By AvaAdorn in forum Managing Customers and Orders
    Replies: 16
    Last Post: 11 Dec 2012, 11:56 AM
  3. Create Customer Profile Blank Page
    By CindyM22 in forum General Questions
    Replies: 1
    Last Post: 22 Jul 2009, 04:41 PM
  4. Paypal Express / New Profile
    By myfriendogri in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 3 May 2009, 09:24 PM
  5. How can I remove the New Customer Profile Form from the Login Page?
    By jaxbakers in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 7 Oct 2006, 06:27 PM

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