> Brian wrote: > > Patrick McElhaney wrote: > > parent > > model > > products > > orders > > view > > catalog > > cart > > checkout > > orderstatus > > controller > > shopper > > Patrick, I think I see what you are saying. But where in > this example would you handle the adding/changing quantity/remove > functions of the shopping cart? Add another folder under model > to handle that? I didn't include the admin functions, but I would probably create another controller circuit for administration. Then I'd have a view for updating the inventory. I could still use the products model circuit, and just add add/update/delete fuseactions.
> > Pass the query into the circuit as an attribute. > > > > <cfmodule > > template="#fusebox.rootpath##self# > > fuseaction="catalog.showItems" > > items="#attributes.items#"> > > Not sure I understand what you mean here...wouldn't the items > attribute of the cfmodule have to be something like: > items="#caller.myqueryname#"? You'd have #attibutes.myQueryname#, because the query would be passed in as an attribute. Here's a more complete example. Say the products circuit has a fuseaction called "getItemsInCategory." It would run a query to get the items in a category, and pass it up to the caller, using a variable name specified by the caller. <cfinclude template="qry_itemsInCategory.cfm"> <cfset "caller.#attributes.return#" = attributes.itemsInCategory> The controller circuit (shopping) would call that fuseaction and then pass the query on to the view circuit (catalog). Here's what the fuseaction in the controller circuit would look like. <cfmodule template="#fusebox.rootpath##self# fuseaction="products.getItemsInCategory" category="#attributes.category" return="attributes.itemsInCategory"> <cfmodule template="#fusebox.rootpath##self# fuseaction="catalog.showItems" items="#attributes.itemsInCategory#"> Now the catalog.showItems circuit would have a query called itemsInCategory in the attributes scope. Does that make sense? Patrick ==^================================================================ This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9 Or send an email to: [EMAIL PROTECTED] T O P I C A -- Register now to manage your mail! http://www.topica.com/partner/tag02/register ==^================================================================
