There are a few ways that the CFWebstore® code differs a bit from Fusebox. These are just some conventions we have used in the store to extend its capabilities and make it easier to follow the code.
config.cfm file – This file in the top directory is used for easy setup of store settings. It is not part of a standard Fusebox structure, but allows you to easily separate out the settings that apply directly to just your site.
fbx_Switch.cfm files – Typically these files use a cfswitch/cfcase structure to determine what fuses to run. However, it was discovered that cfswitch is not very efficient when comparing text strings (versus numbers). So main level switches are coded using cfif/cfelseif/cfelse for better performance under load.
admin/index.cfm files – Each circuit has an admin fuseaction which calls the index.cfm file from the admin directory. This file uses the additional parameters being passed to determine the exact admin actions to perform. You can kind of think of it as a circuit for the admin functions. As an example, the fuseaction “product.admin&do=edit” performs a product edit admin function. The one exception to this is the home circuit, which uses the fbx_Switch.cfm file in the admin directory to handle the admin actions. This allows you to get to the main admin menu page with the link “www.yoursite.com/admin”
shopping.checkout fuseaction – This fuseaction calls the do_checkout.cfm file in the checkout directory which works a little differently than most fuses. This page performs all the functions for the checkout area. It is broken into two main sections, the processing section and the display section. The variable “step” is used to determine where in the process the user is, and based on what happens in the process section, this variable will get set to determine the display page that is needed as a result.
The rest of the code basically follows Fusebox 3 standards. Let’s take a look at the different circuits and what is available in each one.