Strange problem using cowoa 2.7
Setup:
Zencart 1.55e
Westminster_New latest version for 1.55
cowoa 2.7
With Cowoa Activated when I try to login, When the page is displayed it automatically scrolls down to the Return Customer login section with the cursor automatically in the email address box. If the customer wants to order without an account they must manually go to the top of the page and might not even be aware that this option is available.
To see this go to: http://sashaspetproducts.com/index.php?main_page=login
This is not a browser or cookie problem since I tested it with three different browsers and two different IP addresses.
Anybody got any ideas??
Frank
Log in page has an autofocus on the email line which is why its getting the courser first. You can remove it.
Code:'email_address', '', 'size="18" id="login-email-address" autofocus placeholder="
COWOA is not normally active on the login page if the cart is empty, but show during checkout with a full cart. Basically there’s nothing for COWOA to do when the cart is empty.
Dave
Always forward thinking... Lost my mind!
I wonder if I can swap position of COWOA box to the top of New/Returning Customers Part?
Current:
Wanted To Be:
It seems I found code where the page generated...
It seems thatPHP Code:
<?php
/**
* Page Template
*
* @package templateSystem
* @copyright Copyright 2003-2011 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 18695 2011-05-04 05:24:19Z drbyte $
* @version $Id: Integrated COWOA v2.4 - 2007 - 2013
*/
?>
<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-->
<!-- BOF COWOA 1 of 2 -->
<h3><?php echo TEXT_STANDARD_ACCOUNT_HEADING; ?></h3>
<!-- EOF COWOA 1 of 2 -->
<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_ACCOUNT, BUTTON_CREATE_ACCOUNT_ALT, 'name="registrationButton"'); ?></div>
</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'), 'post', 'id="loginForm"'); ?>
<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"'); ?>
<br class="clearBoth" />
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_LOGIN, BUTTON_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" />
<?php
if ($_SESSION['cart']->count_contents() > 0) { ?>
<!-- BOF COWOA 2 of 2 -->
<?php if (COWOA_STATUS == 'true') { ?>
<h3><?php echo TEXT_COWOA_HEADING; ?></h3>
<fieldset>
<legend><?php echo COWOA_HEADING; ?></legend>
<?php echo TEXT_RATHER_COWOA; ?>
<div class="buttonRow forward">
<?php echo "<a href=\"" . zen_href_link(FILENAME_NO_ACCOUNT, '', 'SSL') . "\">"; ?>
<?php echo zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT); ?></a></div>
<br class="clearBoth" />
</fieldset>
<?php } ?>
<!-- EOF COWOA 2 of 2-->
<?php } ?>
<!--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'), 'post', 'id="loginForm"'); ?>
<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_LOGIN, BUTTON_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 echo zen_draw_form('create_account', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);" id="createAccountForm"') . 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_SUBMIT, BUTTON_SUBMIT_ALT); ?></div>
</form>
<!--EOF normal login-->
<?php } ?>
</div>part is the where the box for COWOA trigger... and it's under the IF statement, since it seems to show only when there is content in cart...PHP Code:
<!-- BOF COWOA 2 of 2 -->
I wonder if I can just move move whole thing up (with IF statement)... to get the appearance I wanted or I have to adjust IF statement blocks around?
-PanZC2020
So I somehow managed to do it, modified on tpl_login_default.php file (in /includes/templates/[TEMPLATE NAME]/templates)
By moving whole block of the COWOA 2 of 2 up... along with the IF statement where it check cart empty or not...
So the file became this way...PHP Code:
<?php
if ($_SESSION['cart']->count_contents() > 0) { ?>
<!-- BOF COWOA 2 of 2 -->
<?php if (COWOA_STATUS == 'true') { ?>
<h3><?php echo TEXT_COWOA_HEADING; ?></h3>
<fieldset>
<legend><?php echo COWOA_HEADING; ?></legend>
<?php echo TEXT_RATHER_COWOA; ?>
<div class="buttonRow forward">
<?php echo "<a href=\"" . zen_href_link(FILENAME_NO_ACCOUNT, '', 'SSL') . "\">"; ?>
<?php echo zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT); ?></a></div>
<br class="clearBoth" />
</fieldset>
<?php } ?>
<!-- EOF COWOA 2 of 2-->
<?php } ?>
I will keep update if there is any problems.PHP Code:
<?php
/**
* Page Template
*
* @package templateSystem
* @copyright Copyright 2003-2011 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 18695 2011-05-04 05:24:19Z drbyte $
* @version $Id: Integrated COWOA v2.4 - 2007 - 2013
*/
?>
<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-->
<?php
if ($_SESSION['cart']->count_contents() > 0) { ?>
<!-- BOF COWOA 2 of 2 -->
<?php if (COWOA_STATUS == 'true') { ?>
<h3><?php echo TEXT_COWOA_HEADING; ?></h3>
<fieldset>
<legend><?php echo COWOA_HEADING; ?></legend>
<?php echo TEXT_RATHER_COWOA; ?>
<div class="buttonRow forward">
<?php echo "<a href=\"" . zen_href_link(FILENAME_NO_ACCOUNT, '', 'SSL') . "\">"; ?>
<?php echo zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT); ?></a></div>
<br class="clearBoth" />
</fieldset>
<?php } ?>
<!-- EOF COWOA 2 of 2-->
<?php } ?>
<!-- BOF COWOA 1 of 2 -->
<h3><?php echo TEXT_STANDARD_ACCOUNT_HEADING; ?></h3>
<!-- EOF COWOA 1 of 2 -->
<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_ACCOUNT, BUTTON_CREATE_ACCOUNT_ALT, 'name="registrationButton"'); ?></div>
</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'), 'post', 'id="loginForm"'); ?>
<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"'); ?>
<br class="clearBoth" />
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_LOGIN, BUTTON_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'), 'post', 'id="loginForm"'); ?>
<fieldset>
<legend><?php echo HEADING_RETURNING_CUSTOMER; ?></legend>
sqqqqq
<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_LOGIN, BUTTON_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 echo zen_draw_form('create_account', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);" id="createAccountForm"') . 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_SUBMIT, BUTTON_SUBMIT_ALT); ?></div>
</form>
<!--EOF normal login-->
<?php } ?>
</div>
-PanZC2020
Dave
Always forward thinking... Lost my mind!
I'm looking for something a bit different, wondering if anyone has done that,
Instead of allowing "guest" checkout (where no account is created) I want to skip the "account creation" step, customer will add to cart, proceed to checkout, will be prompted to enter email and billing/shipping address, when customer completes the order an account will automatically be created using the entered details and perhaps a temporary password emailed to the customer.
TIA!
What your asking is already done in standard COWOA behavior, with the exception that the password is created and encrypted during the database edits.. You would have to capture the password before encryption to email it.
With COWAA, a password field is offered during shipping/billing user info gathering, if password added then account is knowingly created by the customer… standard account behavior. If left blank, then COWOA side creates an account unknowingly by the customer.
Dave
Always forward thinking... Lost my mind!
Bookmarks