The Welcome & Login Custom Tags
cf_welcome
Welcomes the customer by name if recognized by cookie. Otherwise, provides link
to login section. The welcome tag must be used with the login tag, however the
login tag may be used without the welcome tag:
page value passed: login
This tag probably works best showing up in a default section of your templates.
See the optional "goto" parameter.
You may also hide the login buttons on the search page and the checkout page if
you are showing the welcome tag on the template when viewing those pages by
using one or both of the cfset tags below:
<cfset hidesearchlogin = 1>
<cfset hidecheckoutlogin = 1>
Copy and paste below into template. The cfparam tag will only be needed if you
don't have it previously in the template or it is in a template that will always
have a page parameter passed to it.
<CFPARAM NAME="page" DEFAULT="">
<cf_welcome
cartpage="#cartpage#"
usequickpay="#usequickpay#"
cookiedomain="#attributes.cookiedomain#"
securecookiedomain="#attributes.securecookiedomain#"
cookiepath="#attributes.cookiepath#"
securecookiepath="#attributes.securecookiepath#">
Minimum required parameters:
cartpage="#cartpage#" DO NOT REMOVE OR CHANGE!
usequickpay="#usequickpay#" DO NOT REMOVE OR CHANGE!
cookiedomain="#attributes.cookiedomain#" DO NOT REMOVE OR CHANGE!
securecookiedomain="#attributes.securecookiedomain#" DO NOT REMOVE OR CHANGE!
cookiepath="#attributes.cookiepath#" DO NOT REMOVE OR CHANGE!
securecookiepath="#attributes.securecookiepath#" DO NOT REMOVE OR CHANGE!
Optional Parameters:
goto="[URL]" If you are loading all of your custom tags into a
single template, you can leave this blank, or omit
it. If not, and you would like to place this
"welcome" custom tag on any or all of your pages,
simply use this parameter with the URL to the page
it is on. This can be a full, or relative URL, but
if everything is in the same directory, which is the
easiest way, just the page name will do. This way
you will only need to place the cf_login sister tag
on one page and the user will be transported back to
where they were when they logged in. See the
instructions for this variable in the cf_login
section below.
fontclass="[style]" Defaults to ezcarttext.
linkclass="[style]" Link styles, (active, hover, etc.). Defaults to ezcart.
killcookie="1" If a person is recognized by cookie, they are asked
if it is them. It will look something like this:
Welcome Joe!
Not Joe Smith? Click Here
killalways="1/0" If you set killcookie to 1, you can show the link to
kill the cookie or log out always if you set this to
"1". Defaults to "0", in which case it will only
appear when the customer is first recognized.
killfontclass="[style]" The style of that 2nd line of text above. Defaults
to ezcartsmalltext.
cf_login
Tag for logging past customers into shopping cart.
page value passed: login
If cust_email is passed with a password, we try and log the user in.
If you would like to use this tag without the Welcome Tag, you should link to it
like this:
<a href="#cartpage#?page=login#querystringback#">Login Here!</a>
or:
<a href="template_name.cfm?page=login#querystringback#">Login Here!</a>
Copy and paste below into template. You must paste the cfparam tags also.
These can be placed just above the cf_login tag or in the top of the template.
As long as they load first.
Note! Be sure to include the mail_id_smtp.cfm and mail_id_nosmtp.cfm files in
the directory with the templates so the user can be e-maied his login information
if he forgets it.
<CFPARAM NAME="cust_email" DEFAULT="">
<CFPARAM NAME="password" DEFAULT="">
<cf_login
cartpage="#cartpage#"
pageback="#pageback#"
from="#GetSetup.order_email#"
smtp="#GetSetup.smtp#"
company="#GetSetup.company_name#"
cust_email="#cust_email#"
password="#password#">
Note on pageback: You may set a default pageback if you
are not using this in conjucntion with cf_welcome.
<CFPARAM NAME="pageback" DEFAULT="">
This will load the default section of the cartpage template.
Or something like:
<CFPARAM NAME="pageback" DEFAULT="somecondition">
If the section of the page you linked to this tag from
was loaded with a page condition of "somecondition",
this is the section of the page that is loaded.
Minimum required parameters:
cartpage="#cartpage#" DO NOT REMOVE OR CHANGE!
pageback="#pageback#" DO NOT REMOVE OR CHANGE!
from="#GetSetup.order_email#" DO NOT REMOVE OR CHANGE!
smtp="#GetSetup.smtp#" DO NOT REMOVE OR CHANGE!
company="#GetSetup.company_name#" DO NOT REMOVE OR CHANGE!
cust_email="#cust_email#" DO NOT REMOVE OR CHANGE!
password="#password#" DO NOT REMOVE OR CHANGE!
Optional parameters:
goto="#goto#" If you are loading all of your custom tags into a
single template, you can leave this blank, or omit
it. If not, and you would like to place the
"welcome" custom tag on all of your pages, simply
paste this parameter in exactly as it is shown. You
will need to set a default parameter at the top of
the page if this is used. Paste the code below at
the top of the page with the cf_login tag.
<CFPARAM NAME="goto" DEFAULT="">
text="[text]" This will be the submit button text, or the alt text
if using an image for your button (see optional
imgsrc parameter). Defaults to "Login" if omitted.
imgsrc="[path to button]" The absolute or relative path to image submit
button. Omitting this will show a regular button for
the form.
topfontclass="[style]" Text style above the login form. Defaults to
ezcartboldtext.
fontclass="[style]" Form text (e-mail, password). Defaults to ezcarttext.
linkfontclass="[style]" Font style of link back to previous page in case
the login fails. Defaults to ezcarttext.
linkclass="[style]" Link styles (active, hover, etc.) of link back to
previous page in case the login fails. Defaults to
ezcart.
border="[number]" Table border size. Defaults to 1 if omitted.
spacing="[number]" Table cellspacing. Defaults to 0 if omitted.
padding="[number]" Table cellpadding. Defaults to 2 if omitted.
bordercolor="[hex]" Table bodercolor. Defaults to no bordercolor if omitted or
blank.
bgcolor="[hex]" Table background color. Defaults to no bgcolor if omitted or
blank.
usejscript="1" If running on IIS and CF version 5, you'll probably
get dumb looking http headers at the top of the page
after a cflocation. If this is the case, you can add
this to the tag to force redirection via javascript.
We've heard of this happening with IE 6 on Windows
XP also.
usecfheader="1" Same as usejscript only not dependent on the user
having javascript enabled, but also not as fast. You
should only use one of these.