Contribution:Integrated Checkout Without Account

From Zen Cart(tm) Wiki
Revision as of 05:02, 23 January 2012 by Craftzombie (talk | contribs) (Status)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Status

For personal reasons, I, KGZotU, am no longer able to support this mod. Essentially, I was sort of aimless after getting out of the service. I've found some purpose, and my purpose involves a bit more school and a bit less entrepreneurship.

Anyone may contact me at meingolem (at) gmail (dot) com, though technical support questions would probably be better addressed in the forum as by now I have very little memory of how this thing works. (;


Update January 5, 2008 --- Note from Zen Cart forum user CraftZombie:

Hi All! Since KGZotU is no longer able to support this mod and since I needed to upgrade these files to work with Zen Cart 1.3.8 for my own store, I thought I would share the files with you so you can upgrade as well. After much testing, things are working fine for me. Please remember to back up your files before upgrading. I am by no means a Zen Cart expert and I know very little about PHP. I basically took KGZotU's instructions for manually adding the code to files and I went through each file one at a time to add the correct code. I did no upgrades to the add_ons folder because I do not use those files for my own site. I do not know if any upgrades even need to be done to those files. I also must say that I don't want to be known as the one "in charge" of this mod, since I didn't write it and I know nothing about how the SQL, PHP, etc. works. Its all trial and error for me. Best of luck to you and have fun on your Zen adventure! -April

COWOA Links/Downloads

There is a COWOA 1.3.8 Support Thread here


DOWNLOAD COWOA for Zencart 1.3.8


JT of GTI_Custom has made a 1.3.9 version available here and the support thread for that version is here


Wanna know which customers used COWOA when they used your site? The COWOA 1.3.8 download includes the add-on for viewing COWOA customers in your admin and is now part of the regular installation process as of May 29, 2010. For users who downloaded COWOA 1.3.8 prior to April 30, 2009, you can download the add-on separately here:

Download COWOA Admin 1.3.8 ( user "Bluefish" made this -- see thread )

Download COWOA Admin 1.3.9 if you are using COWOA 1.3.9 and want to see which of your customers checked out using COWOA.

Here is a screen capture of what COWOA Admin looks like on your "Customers" page. It basically adds a COWOA column where COWOA customers are marked with an "X".

Here is a screen capture of what COWOA Admin looks like on your "Admin Home" page. It adds a box telling you how many regular customers and how many COWOA customers you have. It also adds a "COWOA" note underneath the customers name.




(Just a side note.... if COWOA turns out to be something you don't want after all, you may want to check out Fast and Easy Checkout or Easy Sign-Up and Login from Numinix. These are other options for those looking to make checkout bearable for their customers.)

Known COWOA Issues

  • Mod is not compatible with implementations of single page checkout.

-No plans exist at this time to rectify Integrated Checkout Without Account with single page checkout.


  • Order centers, such as Super Order Center, which use their own functions to send order update e-mails present an incompatibility with COWOA. That is, they include a link in their e-mail to the account area.

-See below for a fix for Super Order Center.

What COWOA Does

When a visitor adds something to their cart and proceeds to checkout, they are greeted with three options. They can sign in to their existing account, they can create a new account, or they can proceed through checkout without an account. They are only given this third option if they have something in their cart. After entering their billing information they are sent to checkout_shipping. If they somehow manage to enter the COWOA sequence without something in their cart, then after they enter their billing information they are directed to their empty cart.

A visitor may COWOA as many times as they like using the same e-mail address. They may COWOA using a given e-mail address, and then later use that same e-mail address in the creation of a regular account. They may not COWOA using an e-mail address that is associated with a regular account.

A visitor that COWOA gains none of the benefits of having an account following their order. They can never "log in" to their account to check order status, etc.

Most of the fields on the no_account page are controllable using the create account controls in the admin. However, the following fields are not available to the no_account page: Date of Birth, PhpBB integration, Newsletter signup.

COWOA Features

Creates an option for checking out without an account while maintaining the option to create an account.

Captures and stores all necessary contact information for users checking out without an account.

Captures billing address, phone number, e-mail, and other optional "account creation" details in a "Billing Details" page which resembles a checkout page. No password required.

Though COWOA customers do in fact construct an account, this fact is hidden with conditional account references.

OPTIONAL: An optional modification of Tableless Order Steps has been included. This modification will display four steps during normal check out and five steps during COWOA. Tableless Order Steps is a mod that helps prevent accidental cart abandonment due to customer confusion by providing a graphical indication of how many checkout steps are left. Find this in the 'add_ons' folder.

OPTIONAL: An optional page has been included on which users may check for order status using an e-mail address and an order number. Find this in the 'add_ons' folder.

OPTIONAL: You can optionally edit checkout_success to make COWOA customers logout from their sessions upon completion of checkout. You can find this in the auxiliary readme. Eventually this feature as well as a couple others will be controllable from an admin panel.

How COWOA Works

My mod was inspired by the COWOA modifications of craftzombie and PaulM, who posted some simple methods to allow multiple accounts with the same e-mail address, and to remove the visibility of the password. The sum effect of these is that you make the existence of accounts invisible to your users. They can never log back into their account, but they can create as many as they like, and if you use the right presentation then they're never aware that accounts are involved.

But, this didn't provide all of the functionality I needed. Namely, it didn't provide for having the option of COWOA or regular accounts.

This mod includes an SQL patch which includes a COWOA boolean for the tables 'customers' and 'orders'.

If a customer begins the checkout process via checkout without account, their customer database entry is marked as COWOA and they are given a session flag. They are not required to enter a password, though a password is generated for them to protect their information. The session flag is used to cloak account specific content during their checkout.

If the customer returns and wishes to COWOA again with the same e-mail address, they may do so. When checking whether there is already an account with that address in the database, the system does not consider those accounts which are marked as COWOA. Likewise, someone who has used COWOA before may then create an account using that same e-mail address. However, once an e-mail has been used in the creation of a permanent account that e-mail may not be used for COWOA. It also ensures that gift voucher users can not COWOA.

The system uses these flags to ensure that no account specific content is sent to COWOA customers via e-mail. If you are using a mod which uses non-stock e-mail generation functions, it will need some minor modification to be completely compatible with COWOA.

Super Orders Compatibility Mod

Order centers, such as Super Order Center, which use their own functions to send order update e-mails present an incompatibility with COWOA. That is, they include a link in their e-mail to the account area. Perform the following modification to Super Orders for compatibility with COWOA:

File: admin/includes/functions/extra_functions/super_orders_functions/

Find:

$customer_info = $db->Execute("SELECT customers_name, customers_email_address, date_purchased
                                 FROM " . TABLE_ORDERS . "
                                 WHERE orders_id = '" . $oID . "'");

Replace With:

$customer_info = $db->Execute("SELECT customers_name, customers_email_address, date_purchased, COWOA_order
                                 FROM " . TABLE_ORDERS . "
                                 WHERE orders_id = '" . $oID . "'");

Find:

  // send email to customer
  $message = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" .
  EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
  EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n\n" .
  EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($customer_info->fields['date_purchased']) . "\n\n" .
  strip_tags($notify_comments) .
  EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
  EMAIL_TEXT_STATUS_PLEASE_REPLY;

  $html_msg['EMAIL_CUSTOMERS_NAME']    = $customer_info->fields['customers_name'];
  $html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
  $html_msg['EMAIL_TEXT_INVOICE_URL']  = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') .'">'.str_replace(':','',EMAIL_TEXT_INVOICE_URL).'</a>';
  $html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($customer_info->fields['date_purchased']);
  $html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = $notify_comments;
  $html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED);
  $html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
  $html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
  $html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);

Replace With:

  // send email to customer
  $message = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" .
  EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n";
  if(!$customer_info->fields['COWOA_order'])
    $message .= EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n\n";
  $message .= EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($customer_info->fields['date_purchased']) . "\n\n" .
  strip_tags($notify_comments) .
  EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
  EMAIL_TEXT_STATUS_PLEASE_REPLY;

  $html_msg['EMAIL_CUSTOMERS_NAME']    = $customer_info->fields['customers_name'];
  $html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
  if(!$customer_info->fields['COWOA_order'])
    $html_msg['EMAIL_TEXT_INVOICE_URL']  = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') .'">'.str_replace(':','',EMAIL_TEXT_INVOICE_URL).'</a>';
  else
    $html_msg['EMAIL_TEXT_INVOICE_URL']  = '';   
  $html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($customer_info->fields['date_purchased']);
  $html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = $notify_comments;
  $html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED);
  $html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
  $html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
  $html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);