Forums / All Other Contributions/Addons / COWOA (for ZC v1.5.x)

COWOA (for ZC v1.5.x)

Views: 159,858

Results 141 to 160 of 854
28 Oct 2012, 1:25 PM
#141
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

COWOA (for ZC v1.5.x)

DrByte:

To make COWOA case-insensitive for the "no-account" customers, you could simply edit the header_php.php for the orders_status page and wrap strtolower() around both variables in the comparison done in: ```
if (isset($_POST['query_email_address']) && $customer_info->fields['customers_email_address'] != $_POST['query_email_address']) {

The standard Zen Cart login is case-insensitive ... because the database is case-insensitive -- that's with the _ci is on the end of the database collation.  A collation of utf8_general_ci indicates that database compares are to be case-insensitive.

That said, in a standard Zen Cart installation, if you create an account using the email address of [email protected] there is no problem on the login page using [email protected] ... because the comparison is done via the database lookup.  Changing the order_status page's header_php.php starting at line 24 to the following uses the database comparisons and achieves the same functionality as DrByte's solution:

$customer_info_query = "SELECT customers_email_address, customers_id
FROM " . TABLE_ORDERS . "
WHERE orders_id = :ordersID
AND customers_email_address = :emailAddress";

$customer_info_query = $db->bindVars($customer_info_query, ':ordersID', $_POST['order_id'], 'integer');
$customer_info_query = $db->bindVars($customer_info_query, ':emailAddress', $_POST['query_email_address'], 'string');
$customer_info = $db->Execute($customer_info_query);

if ($customer_info->EOF) {
$errorNoMatch=TRUE;
} else {
...


P.S. Off-subject, but when I did a fresh install of COWOA on a fresh install of Zen Cart 1.5.1, the define TEXT_CHECKOUT_LOGOFF_CUSTOMER appears to be missing from the orders_status page.
28 Oct 2012, 3:06 PM
#142
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: COWOA (for ZC v1.5.x)

Hello there,
Just installed this mod, it works very well. I just have two design issues that may be specific to me, that I have been tearing my out trying to figure out lol.

  1. If you use Checkout Without Account, the Newsletter Subscribe area does not have a tickbox, it just forces html or text instead of being optional. Normal create account is fine

  2. Checkout Payment - step 2. The discount coupon, reward and payment method boxes appear without white background, above the Order Steps and order total boxes, which has the Continue Checkout button above the Order Steps. The next page has the same issue also, but the Checkout Shipping page looks perfect.

It is all very strange. I completely gutted a FEAC checkout install, SQL aswell. Pretty sure I have removed all traces of it, and overwritten checkout page files first from stock 1.51 Zencart files. Then I copied over the COWOA files on top, plus SQL. All enabled from admin. The only thing I have is Ceon URI mapping, but I have removed the URis now.

Any help is greatly appreciated, many thanks in advance

28 Oct 2012, 3:48 PM
#143
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: COWOA (for ZC v1.5.x)

lat9:

The standard Zen Cart login is case-insensitive ... because the database is case-insensitive -- that's with the _ci is on the end of the database collation. A collation of utf8_general_ci indicates that database compares are to be case-insensitive.

That said, in a standard Zen Cart installation, if you create an account using the email address of [email protected] there is no problem on the login page using [email protected] ... because the comparison is done via the database lookup. Changing the order_status page's header_php.php starting at line 24 to the following uses the database comparisons and achieves the same functionality as DrByte's solution:

$customer_info_query = "SELECT customers_email_address, customers_id
FROM " . TABLE_ORDERS . "
WHERE orders_id = :ordersID
AND customers_email_address = :emailAddress";

$customer_info_query = $db->bindVars($customer_info_query, ':ordersID', $_POST['order_id'], 'integer');
$customer_info_query = $db->bindVars($customer_info_query, ':emailAddress', $_POST['query_email_address'], 'string');
$customer_info = $db->Execute($customer_info_query);

if ($customer_info->EOF) {
$errorNoMatch=TRUE;
} else {
...

> 
> P.S. Off-subject, but when I did a fresh install of COWOA on a fresh install of Zen Cart 1.5.1, the define TEXT_CHECKOUT_LOGOFF_CUSTOMER appears to be missing from the orders_status page.


This fix works perfectly!

Thank you!
28 Oct 2012, 3:59 PM
#144
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: COWOA (for ZC v1.5.x)

Limitless:

Not to continue this, but what you refer to as an 'email address login' is really a UPN, whether that is really the 'email address' of the user, is irregardless. And 'checking' case sensitivity and HAVING 5 users with [email protected], [email protected], [email protected] and [email protected] is ridiculous and those are NOT email addresses as they would all have mail delivered to the same place. Your security by obscurity just fell apart.

Within applications on a corporate network, sure, programmers can require case sensitivity on user names, but if you display that logins MUST BE IN CAPS on the login page, that sort of defeats the argument.

And this IS the place to talk about this, while ZenCart does not use email addresses for logins, my inquiry was related to order status checking with COWOA accounts and that does require using an email address along with order number to verify identity.

*nix systems and their derivatives have case sensitive user names. Windows, Netware and other LDAP based systems do not.Again you have clearly misunderstand what I have stated previously.. So let me state this..

I am WELL AWARE that e-mail addresses in an e-mail system used to send and receive e-mail are NOT case sensitive.. Let me further be clear that I am also not talking abut LDAP, Windows, or Netware systems either as that is a completely different discussion.. Zen Cart is NONE of these kinds of systems.. (apples and oranges)

So now we are back to a software system which happens to use e-mail addresses as the user login. Not an e-mail address tied to any e-mail, Windows, Netware or LDAP server. Rather a VALUE for a user login that is stored in a database which happens to be an e-mail address.. Therefore as I stated originally, user logins in a software system CAN BE case sensitive and this is usually done for security purposes much like the reason that passwords are also case sensitive. lat9 provided the explanation why this is so, and it is not something that COWOA does that makes customer logins case sensistive. It its a part of core Zen Cart functionality. lat9 and DrByte also have pointed out that there is a way to modify this behavior with code. I personally like the extra measure of security that case sensitivity offers. You do not agree clearly.. Different strokes..

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.

28 Oct 2012, 6:54 PM
#145
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: COWOA (for ZC v1.5.x)

Is this thread gonna continue arguing back and forth about whether emails should be case sensitive?

If so, start another thread for that. Everyone using COWOA doesn't need to be blasted with email notices about your differences of opinions.

Zen Cart should (and has always intended to) treat email addresses as case-insensitive. It is rare when it does not.
The suggestions proposed above show how to make that happen with COWOA's code as well, and I suspect the next update to COWOA will incorporate one of these approaches.
The core of Zen Cart will certainly treat emails as case-insensitive whenever guest-checkout is incorporated.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 Oct 2012, 10:19 PM
#146
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

DrByte:

Is this thread gonna continue arguing back and forth about whether emails should be case sensitive?

If so, start another thread for that. Everyone using COWOA doesn't need to be blasted with email notices about your differences of opinions.

Zen Cart should (and has always intended to) treat email addresses as case-insensitive. It is rare when it does not.
The suggestions proposed above show how to make that happen with COWOA's code as well, and I suspect the next update to COWOA will incorporate one of these approaches.
The core of Zen Cart will certainly treat emails as case-insensitive whenever guest-checkout is incorporated.

I did have a thread I started talking about whether emails should be case sensitive or case insensitive. You could have move all this extra post to it if it still existed.

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

29 Oct 2012, 12:53 AM
#147
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: COWOA (for ZC v1.5.x)

I was kinda suggesting that the point has already been flogged to death and doesn't need more discussion.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Oct 2012, 12:59 AM
#148
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

HeathenMagic:

Hello there,
Just installed this mod, it works very well. I just have two design issues that may be specific to me, that I have been tearing my out trying to figure out lol.

  1. If you use Checkout Without Account, the Newsletter Subscribe area does not have a tickbox, it just forces html or text instead of being optional. Normal create account is fine

  2. Checkout Payment - step 2. The discount coupon, reward and payment method boxes appear without white background, above the Order Steps and order total boxes, which has the Continue Checkout button above the Order Steps. The next page has the same issue also, but the Checkout Shipping page looks perfect.

It is all very strange. I completely gutted a FEAC checkout install, SQL aswell. Pretty sure I have removed all traces of it, and overwritten checkout page files first from stock 1.51 Zencart files. Then I copied over the COWOA files on top, plus SQL. All enabled from admin. The only thing I have is Ceon URI mapping, but I have removed the URis now.

Any help is greatly appreciated, many thanks in advance

I will look into why the Newsletter Subscribe area does not have a tick-box. I haven't even notice that before now.

Everything else you are describing is because you didn't uninstall FEC right or still have some files fron FEC checkout installed somewhere. Check to make sure you installed Cowoa right.

You can look at the pictures I posted below to show what you are describing is not possible if you installed Cowoa right.

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

29 Oct 2012, 3:30 AM
#149
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

DrByte:

I was kinda suggesting that the point has already been flogged to death and doesn't need more discussion.

.......Nods :yes::yes: in agreement........

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

29 Oct 2012, 4:26 AM
#150
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: COWOA (for ZC v1.5.x)

DrByte:

I was kinda suggesting that the point has already been flogged to death and doesn't need more discussion.
countrycharm:

.......Nods :yes::yes: in agreement........
Agreed.. I can assure you, I was done with my last post on this topic.. DrByte.. you have my apologies..

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.

29 Oct 2012, 1:35 PM
#153
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: COWOA (for ZC v1.5.x)

HeathenMagic:

Thanks for your reply and your help, yes it is almost as if it has been jumbled up. I am going to go over the files with a fine tooth comb now and find any remnants lol. Great mod by the way.
Suggest using a file comparison tool (Winmerge or Beyond Compare) and comparing your store to the FEC fileset.. This way you can identify the FEC files and changes.. Afterwards you are gonna wanna to check to make sure that the COWOA mods are still in place since there is some overlap in the changes made to the same files by both mods..

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.

29 Oct 2012, 1:36 PM
#154
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: COWOA (for ZC v1.5.x)

shaileshpatil17:

Hi Countrycharm, have installed COWOA, it didn't give any error while installation. But during checkout its giving me http 500 error.
Check link https://www.heightgrowth.com/ssl-checkout/index.php?main_page=checkout_shipping
while the normal zencart flow is working properly.Any quick help much appreciated.Sounds like an install error.. Double check your installation..

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.

1 Nov 2012, 8:14 AM
#155
bbarasa avatar

bbarasa

New Zenner

Join Date:
Oct 2012
Posts:
11
Plugin Contributions:
0

Re: COWOA (for ZC v1.5.x)

I have COWOA installed and working on my site (now that I got the correct version).

https://westpac-ptg.org/zencart

It is working the way I want except the conference director finds it too confusing to include the option of creating ZC account. She is probably right because for this use (conference registration) it is highly unlikely that any users will want to log back in for any reason. I've already moved the code for COWOA to the top of the page and made the fieldset blue to make it more prominent, but she wants all but that and paypal checkout to be gone.

In looking at the code in tpl_login_default page, it is difficult for me to know what code I can safely remove to take out both the zc login and sign up. There is this type comment: > <!--BOF PPEC split login- DO NOT REMOVE--> before the section where I would have to remove code. Makes me nervous.

Since the site is now live, I'd rather not experiment too much. Is the code for ZC login and ZC signup required in order for COWOA to work? Or do you think I can safely remove it?

1 Nov 2012, 3:41 PM
#156
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

bbarasa:

I have COWOA installed and working on my site (now that I got the correct version).

https://westpac-ptg.org/zencart

It is working the way I want except the conference director finds it too confusing to include the option of creating ZC account. She is probably right because for this use (conference registration) it is highly unlikely that any users will want to log back in for any reason. I've already moved the code for COWOA to the top of the page and made the fieldset blue to make it more prominent, but she wants all but that and paypal checkout to be gone.

In looking at the code in tpl_login_default page, it is difficult for me to know what code I can safely remove to take out both the zc login and sign up. There is this type comment: before the section where I would have to remove code. Makes me nervous.

Since the site is now live, I'd rather not experiment too much. Is the code for ZC login and ZC signup required in order for COWOA to work? Or do you think I can safely remove it?

Make a backup file first then Open up the includes/templates/YOUR_TEMPLATE/templates/tpl_login_default and delete the code. Copy and insert the code below, upload it to your server. No more zc login or sign ups on that page.

<?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.3 - 2007 - 2012
 */
?>
<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 ($_SESSION['cart']->count_contents() > 0) { ?>
<!-- BOF COWOA -->
<?php if (COWOA_STATUS == 'true') { ?>  
    <fieldset>
    <legend>Checkout Without Account</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 } ?>
<!-- BOF COWOA -->  
<?php } ?>
<?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>

<?php } ?>
<?php // ** END PAYPAL EXPRESS CHECKOUT ** ?>
</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>

<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>

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

1 Nov 2012, 10:35 PM
#157
bbarasa avatar

bbarasa

New Zenner

Join Date:
Oct 2012
Posts:
11
Plugin Contributions:
0

Re: COWOA (for ZC v1.5.x)

Thanks a heap! This is great.

2 Nov 2012, 12:22 AM
#158
geeker avatar

geeker

New Zenner

Join Date:
Mar 2011
Posts:
52
Plugin Contributions:
0

Re: COWOA (for ZC v1.5.x)

I suspect the solution to this is to restore the forgot password page to it's unmodified state but I figured I'd ask if anyone has run into this and perhaps explain where this function comes from.

After installing COWOA on a dev install I was testing and the forgot password page threw a 500 error. I checked logs and it was due to "Call to undefined function zen_create_padss_password()". Any idea where this function comes from and what benefit would there be in using it instead of whatever zen uses by default? This is a 1.5 zen install.

Using Dev tool kit on both dev and live (live has a working forgot password page) installs I can't seem to find this function.

Thanks in advance.

2 Nov 2012, 4:36 AM
#159
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

bbarasa:

Thanks a heap! This is great.

No problem glad to help.

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

2 Nov 2012, 4:56 AM
#160
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

geeker:

I suspect the solution to this is to restore the forgot password page to it's unmodified state but I figured I'd ask if anyone has run into this and perhaps explain where this function comes from.

After installing COWOA on a dev install I was testing and the forgot password page threw a 500 error. I checked logs and it was due to "Call to undefined function zen_create_padss_password()". Any idea where this function comes from and what benefit would there be in using it instead of whatever zen uses by default? This is a 1.5 zen install.

Using Dev tool kit on both dev and live (live has a working forgot password page) installs I can't seem to find this function.

Thanks in advance.
Most problems occur because the files are not being uploaded to there correct directories or you have not merge the files correctly. Make sure you renamed the Admin_Folder and the YOUR_TEMPLATE folders to your custom folder name that you are using. The forgot password function should work with no problems.

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation