当前位置: 动力学知识库 > 问答 > 编程问答 >

jquery - Cold Fusion Shopping Cart not working

问题描述:

I've spent the last month trying to get this ColdFusion problem to work...I have 5 cfm files. These are the following issues i'm having:

ShoppingCart.cfm : the table is cascading instead of staying the same format.

revieworder.cfm: the customerinfo from the customerinfo.cfm page isn't showing up.

OrderConfirmation.cfm: emailing the customer a copy of the invoice isn't working...frankly the whole thing isn't working and i have a feeling it has something to do with the session: application.cfm file. if anyone could help guide me with these, i would greatly appreciate it!!

application.cfc

<cfcomponent>

<cfset this.name = "mmd24shoppingcart">

<cfset this.datasource = "mmd24_shoppingcart">

<cfset this.sessionmanagement="Yes">

<cfset this.sessiontimeout="#createtimespan(0,0,45,0)#">

<cfset This.applicationtimeout="#createtimespan(5,0,0,0)#">

<cffunction name = "onApplicationStart">

<cfscript>

Application.availableResources=0;

Application.counter1=1;

Application.sessions=0;

</cfscript>

</cffunction>

<cffunction name="onSessionStart">

<cfscript>

Session.started = now();

Session.shoppingCart = Structnew();

Session.shoppingCart.items =0;

</cfscript>

</cffunction>

</cfcomponent>

网友答案:

Had a quick look and clearly there are two issues with 'customerinfo.cfm':

  1. There is no starting <form> tag. Though there is a closing tag: </form>.
  2. The syntax of the SUBMIT button is wrong.

Insert a starting <form> tag and define the form action as "reviewOrder.cfm". Change the submit button to <input type="submit ...>

One more thing: end of script tag (</script>) is appearing after start of body tag!

Hope this will help!

分享给朋友:
您可能感兴趣的文章:
随机阅读: