Initial Application.cfm Settings
Open Application.cfm in the web root (or the ezcart directory if using the standalone cart). For the rest
of this document we will simply refer to this as "Application.cfm". If you used an upload "scenario" other
than the recommended one, we will be referring to the Application.cfm used by the secure server as the "Secure
Application.cfm". Otherwise, you may ognore references to the Secure Application.cfm.
Set the following variables:
- <cfset attributes.DSN = ""> - Enter your datasource name.
- <cfset request.dbuser = ""> - If you didn't set up the
database login and password (SQL Server and MySQL only) in CF Administrator, enter
the database user/login name.
- <cfset request.dbpass = ""> - If you set the database user/login name above,
enter the passsword here.
- <cfset whichversion = ""> - If running...
- ColdFusion version 4.5 enter "45"
- ColdFusion version 5 enter "50"
- ColdFusion version MX enter "60"
Notice that the values above are numbers and do not have a dot in them. ColdFusion 4.01 is not supported in cf_ezcart version 9.x and higher. Please contact if you have a need to run on ColdFusion 4.01.
- <cfset attributes.usejsessionid = "0"> - If running ColdFusion MX, this may need to be set to "1" or "0" depending upon the server setup. Try it at "0" first.
- <cfset localpath = "ezcart/">
- Leave this like it is if Application.cfm (this file) is in the same folder as the ezcart folder (not in the ezcart folder itself).
- Make it blank if running the standalone cart and you place Application.cfm inside the ezcart folder.
- Under any other scenario, enter any additional path information as required, such as "somefolder/someotherfolder/ezcart/".
- <cfset usequickpay = "1"> - To collect the credit card during the checkout procedure, set this to "1". Set to "0" if you need to capture afterward, such as if the secure
checkout is on a separate server.
- <cfset attributes.usecftransaction = "1"> - Leave this at "1" unless you are using a version of MySQL that
does not support transactions. If you are unsure, place a test order. If you get an error along the line that the database does not
support transactions, then set this to "0".
You will likely not have to change any of the variables below. However, you should read the rest of this page
in case any of the following situations apply to you.
- <cfset attributes.cookiedomain = ""> - Situations where you will wish to set this.
- If you are running in a clustered environment and the machine name may change, for example from
www1.mydomain.com to www2.mydomain.com, etc.
- If your web site is set up to work under mydomain.com and www.mydomain.com, and you may have links pointing to both.
- If for any other reason your customers may switch sub-domains during the session. This doesn't include going to
the secure URL during checkout. We take care of that separately.
If any of the situations above are true, set the base domain name preceded by a . (dot). So, if your
base domain name is mydomain.com, set this to...
attributes.cookiedomain = ".mydomain.com"
- <cfset attributes.cookiepath = ""> - This will be the path where the cookie would be set.
Situations where you will wish to set this include.
- If you are running several instances of cf_ezcart under a single domain, but contained in sub folders. Setting the path to each sub folder will
set separate cookies for each site. This should always begin and end with a slash and you MUST also set attributes.cookiedomain. For example, you have 2
sites running cf-ezcart. sitea and siteb. The URL to sitea will be...
http://www.mydomain.cfm/sitea/
You will set attributes.cookiedomain as you did above, and set this to...
attributes.cookiepath = "/sitea/"
- If you have a different application runnning under your domain, we will set the CFID and CFTOKEN cookies manually with the path you specify, allowing the CFID and CFTOKEN
cookies for your other application to remain independent of the shopping cart.
- <cfset attributes.securecookiedomain = ""> - The same rules apply here as they do for attributes.cookiedomain.
- <cfset attributes.securecookiepath = ""> - The same rules also apply here as they do for attributes.cookiepath.
However, another reason you may wish to use this is, if you are hosting cf_ezcart with a host that provides a shared SSL certificate,
then your secure checkout section will be a URL like...
https://secure.yourhost.com/yoursite/somepage.cfm
Setting these 2 attributes to...
attributes.securecookiedomain = ".secure.yourhost.com"
attributes.securecookiepath = "/yoursite/"
will ensure that cookies set on "yoursite" under that shared certificate cannot be read or overwritten by another "anothersite"
under that shared certificate.
- <cfset attributes.timeout = "30"> - The session/client timeout value in minutes. 20 to 30
minutes is generally a good time, however you may want to set this higher for testing. Note that on MX this should never be higher than the J2EE session timeout.
generally 30 minutes.
- <cfset DefaultLocale = "English (US)"> - This will be the Locale of your website and will dictate how the
currencies are displayed. To see exactly which Locales are available on your server and how they will affect the
display, open the Locales folder from your download file and upload the locales.cfm file to your ColdFusion server and
look at it in your browser.
- <cfset request.mailuser = ""> - If you set an SMTP server in administration and you must use a username
and password to send email, enter the email username here.
- <cfset request.mailpassword = ""> - If you set an SMTP server in administration and you must use a username
and password to send email, enter the email password here.
Please read below concerning Client variable storage!
Note that the cfapplication tag in ezcart/app_ezcart.cfm has no Clientstorage variable
which means it will use the default set by the server administrator (usually your web host
unless this is your own server). many hosts set this to cookie, which will work, but
isn't recommended. If you had a datasoure created for you, or
if there is a global Client storage database that is not the default, or if you
had your own database enabled to store Client variables, you will need to
specify a datasource. If this is the case, add the following line to the
cfapplication tag within ezcart/app_ezcart.cfm, adding the datasource name you wish to
use between the quotes:
Clientstorage="[datasource name]"
We are finished with the Initial Applicatiopn.cfm settings. After initial testing, please
read the Final Application.cfm Settings section. There are many settings and features covered there.
If you have renamed/moved the if_needed_Application.cfm file in the ezcartsecure
directory during the "Uploading Your Shopping Cart" chapter, continue with the
steps below.
- Open Application.cfm in the SSL secure directory (or the ezcartsecure directory
if using the standalone cart). For the rest of this document we will refer to
this as "The Secure Application.cfm".
- <cfset attributes.DSN = ""> - Enter the datasource name that
your created in Scenario 4 of the "Uploading Your Files" chapter.
- If you didn't set up the database login and password (SQL Server and MySQL only)
in CF Administrator, add the database login name in request.dbuser = "" and the
password in request.dbpass = ""
- <cfset whichversion = ""> - If running...
- ColdFusion version 4.5 enter "45"
- ColdFusion version 5 enter "50"
- ColdFusion version MX enter "60"
ColdFusion 4.01 is not supported in cf_ezcart version 9.x and higher. Please contact if you have a need to run on ColdFusion 4.01.
- <cfset localpath = ""> - If you are using the Application.cfm in the ezcartsecure directory and left it
in the ezcartsecure directory, do nothing here. If you moved it up to the secure
directory, change localpath = "" to localpath = "ezcartsecure/".