We are selling unique items.  When the user looks at their cart or right
before the last step in placing an order, I verify that no one has bought
the item or it has been removed from inventory for some other reason.

So I want a cfc that will check to see if adjustments need to be made, and
if so, display the changes to the quantities in the cart to the user.

I've put the functionality in the cart cfc, right now I have the functions:
check_item_quantities
display_adjustments

I could wrap those two in another function that handles everything.  Not
really sure of the best way to do this.  Just getting into cfcs(yeah, i
know, kinda slow there).  Very cool stuff.  I'm pretty much rewriting the
site to use them.

On Mon, Apr 5, 2010 at 9:36 PM, Qing Xia <txiasum...@gmail.com> wrote:

>
> I have a cfc that will generate some html to be displayed inline.  I
> was just going to reuturn a string rather than have it output directly.  Is
> this the proper way to do that?
>
> I've been struggling to draw a clear line between the usage of CFCs and
> Custom Tags, but one general trend I see developers practicing seems to be
> to put "display code for reuse" in Custom Tags rather than in CFCs. For
> example, I have a Custom Tag that can spit out either a printable HTML
> invoice or the same invoice in PDF--and customize contents of the invoice
> based on user input. The same logic can very well be encapsulated in a CFC
> instead, but the Custom Tag is better for black-box processing like this
> one. It's hard to tell without knowing more of your situation, but just
> thought I'd share the thought. :-)
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332619
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to