Like while using your example file I'm getting everything returned for each
type of service that's fine but how can I extract the price and assign it to a
variable. Do I have to do this right into the CFC or directly within my actual
file wich will us the variable in question. In the CFC if I remove <cfdump
var="#results#"> and replace it with
<cfoutput>#results.TOTALCHARGES#</cfoutput> it returned me only the price but
how do I assign that price to my variable. I'm using the exact code contained
in your example file:
<cfset st = createObject("component",
"org.camden.ups.rateservice").init(application.key, application.username,
application.password)>
<!--- Use this to show package types
<cfdump var="#st.getValidPackageTypes()#">
--->
<cfset packages = arrayNew(1)>
<cfset arrayAppend(packages,
st.getPackageStruct(weight=40,width=20,length=40,height=10,packagetype="02"))>
<cfset arrayAppend(packages,
st.getPackageStruct(weight=10,width=20,length=40,height=10,packagetype="03"))>
<cfset arrayAppend(packages, st.getPackageStruct(weight=10,packagetype="03"))>
<cfset rates =
st.getRateInformation(shipperpostalcode=70508,packages=packages,shiptopostalcode=90210)>
> What do you mean? I return a struct of info. If you just want one
> key.. just use that key. It's no different than any other structure.
> :)
>
>
> On Nov 2, 2007 2:35 PM, Jean-Michel Godin-Duguay
> <[EMAIL PROTECTED]> wrote:
> > I'm currently trying to implement Ray Camden CFUPS and just can't
> figure it out. I'm able to retrieve a rate but it's always dumping the
> whole thing I would like to have only the total price returned. The
> script is located at http://cfups.riaforge.org
> >
> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies
around the world in government. Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292578
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4