That's what i was scared of... scaring everyone away with that leap of code... Still don't have a clue...
On Nov 29, 2:50 pm, Marco van den Oever <[email protected]> wrote: > Mjes strange, well I'll just dump the whole bunch here then....... > Here they are: > > ------- cfc ------- > > <cfcomponent extends="farcry.core.packages.types.types" > displayname="products" hint="Shop product administration." > bFriendly="true" bObjectBroker="true"> > <!------------------------------------------------------------------------ > type properties > ------------------------------------------------------------------------- > > <cfproperty ftseq="1" ftfieldset="General Details" > ftwizardStep="General Details" name="title" type="string" > hint="Title." required="no" default="" ftlabel="Title" > ftvalidation="required" /> > > <cfproperty ftSeq="2" ftFieldset="General Details" > ftwizardStep="General Details" name="price" type="string" > hint="Price." ftdefault="0" required="yes" ftLabel="Price" > ftvalidation="required" /> > > <cfproperty ftSeq="3" ftFieldset="General Details" > ftwizardStep="General Details" name="stock" type="integer" > hint="Stock." required="no" ftLabel="Stock" ftvalidation="required" /> > > <cfproperty > ftseq="4" ftfieldset="Redirection" ftwizardStep="General Details" > name="linkNavigation" type="string" > hint="Link to a navigation folder within the site." required="no" > default="" > fttype="navigation" ftalias="home" ftrendertype="tree" > ftSelectMultiple="true" ftlabel="Navigation Folder" /> > > <cfproperty ftseq="6" ftfieldset="Categorisation" > ftwizardStep="General Details" name="catshopproducts" type="longchar" > hint="Categorisation." required="no" default="" fttype="category" > ftlabel="Category" /> > > <cfproperty ftseq="21" ftfieldset="Description" > ftwizardStep="Description" name="Body" type="longchar" hint="Main body > of content." required="no" default="" ftType="RichText" ftlabel="Body > Content" > ftImageArrayField="aObjectIDs" ftImageTypename="dmImage" > ftImageField="StandardImage" > ftTemplateTypeList="dmImage,dmfile,dmflash,dmNavigation,dmHTML" > ftTemplateWebskinPrefixList="insertHTML" /> > > <cfproperty ftseq="31" ftfieldset="Teaser" ftwizardStep="Description" > name="teaserImage" type="UUID" hint="Teaser image to display." > required="no" default="" fttype="uuid" ftjoin="dmImage" > ftlabel="Teaser Image" > fthelptitle="Teaser Requirements" > fthelpsection="Teaser images can only be selected > from the pool of > associated media images. You must add to the media library before > selecting." /> > > <cfproperty ftseq="32" ftfieldset="Product teaser" > ftwizardStep="Description" name="Teaser" type="longchar" hint="Product > teaser text." required="no" default="" ftlabel="Product teaser" > ftlimit="400" /> > > <cfproperty ftseq="41" ftfieldset="Related Content" > ftwizardStep="Description" name="aObjectIds" type="array" hint="Mixed > media content for this content." required="no" default="" > ftJoin="dmImage,dmfile,dmflash" ftlabel="Media Library" > bSyncStatus="true" ftJoinAllowDuplicates="false" /> > <cfproperty ftseq="42" ftfieldset="Related Content" > ftwizardStep="Description" name="aRelatedIDs" type="array" hint="Holds > object pointers to related content. Can be of mixed types." > required="no" default="" ftJoin="dmFile,dmNavigation,dmHTML" > ftlabel="Related Content" /> > > <!--- system attribute ---> > <cfproperty name="status" type="string" hint="Status of the node > (draft, pending, approved)." required="yes" default="draft" /> > > <!------------------------------------------------------------------------ > object methods > ------------------------------------------------------------------------- > > > > <!--- check if the item is allready in shopcart array > > thank you > bubblocity!http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functio3.htm#wp3473387 > > ---> > <cffunction name="ArrayFind" returntype="boolean"> > <cfargument name="Needle" required="true"> > <cfargument name="HayStack" required="true"> > <cfset var Found=false> > <cfif isArray(arguments.HayStack)> > <cfloop index="i" from="1" to="#ArrayLen(arguments.HayStack)#"> > <cfif arguments.Needle IS arguments.Haystack[i].id> > <cfset Found = true> > <cfbreak> > </cfif> > </cfloop> > </cfif> > <cfreturn Found> > </cffunction> > <cffunction name="ArrayFindNoCase" returntype="boolean"> > <cfargument name="Needle" required="true"> > <cfargument name="HayStack" required="true"> > <cfset var Found=false> > <cfif isArray(arguments.HayStack)> > <cfloop index="i" from="1" to="#ArrayLen(arguments.HayStack)#"> > <cfif UCase(arguments.Needle) EQ UCase(arguments.Haystack[i].id) > > <cfset Found = true> > <cfbreak> > </cfif> > </cfloop> > </cfif> > <cfreturn Found> > </cffunction> > > <cffunction name="getactiveshops" hint="Gets all active shops and put > them in session array for later usage" output="false" > returntype="any"> > > <!--- get current active shops and set them to a session array ---> > > <!--- set faruser object ---> > <cfset obj_faruser = createObject > ('component',application.stcoapi.faruser.packagepath) /> > > <!--- set dmProfile object ---> > <cfset obj_dmProfile = createObject > ('component',application.stcoapi.dmProfile.packagepath) /> > > <!--- set props ---> > <cfset props = {} /> > <cfset props.selectclause = "userid"> > <cfset props.whereclause="#application.dbowner#faruser.userstatus = > 'active'" /> > > <!--- set active users to query ---> > <cfset activeusers = obj_faruser.getMultipleByQuery > (argumentCollection=props) /> > > <!--- loop the query ---> > <cfloop query="activeusers"> > > <!--- get the shopurl of the profile that matches the current > activeusers loop ---> > > <cfset props = {} /> > <cfset props.selectclause = "shopurl"> > <cfset props.whereclause = "username = '#activeusers.userid#_CLIENTUD' > AND shopurl NOT LIKE 'www' AND shopurl NOT LIKE 'secure'"> > <cfset shops = obj_dmProfile.getMultipleByQuery > (argumentCollection=props) /> > > <!--- set shopurl to session struct ---> > <cfif isdefined('application.shopurls')> > > <cfif shops.shopurl neq ""> > > <cfset application.shopurls[currentrow]=shops.shopurl> > > </cfif> > > <!--- if the shopurls array not exists create it ---> > <cfelse> > > <cfif shops.shopurl neq ""> > > <!--- set the application.urls structure to the shopurls array ---> > <cfset application.shopurls = arraynew(1)> > <cfset application.shopurls[1]=shops.shopurl> > > </cfif> > > </cfif> > > </cfloop> > > <cfreturn this /> > > </cffunction> > > </cfcomponent> > > ------- edit.cfm ------- > > <cfsetting enablecfoutputonly="true" /> > > <cfimport taglib="/farcry/core/tags/formtools" prefix="ft" /> > <cfimport taglib="/farcry/core/tags/wizard" prefix="wiz" /> > > <!--- Always save wizard WDDX data ---> > <wiz:processwizard excludeAction="Cancel"> > <!--- Save the Primary wizard Object ---> > <wiz:processwizardObjects typename="#stobj.typename#" /> > </wiz:processwizard> > <wiz:processwizard action="Save" Savewizard="true" Exit="true" /> > <!--- Save wizard Data to Database and remove wizard ---> > <wiz:processwizard action="Cancel" Removewizard="true" Exit="true" /> > <!--- remove wizard ---> > <!--- RENDER THE WIZARD ---> > <wiz:wizard ReferenceID="#stobj.objectid#" r_stWizard="stWizard"> > <wiz:step name="General Details"> > <wiz:object stobject="#stobj#" wizardID="#stWizard.ObjectID#" > lfields="title,price,stock" format="edit" intable="false" > legend="General Details" /> > <wiz:object stobject="#stobj#" wizardID="#stWizard.ObjectID#" > lfields="catshopproducts,linkNavigation" intable="false" > legend="Categorisation" /> > > </wiz:step> > <wiz:step name="News Body"> > <wiz:object stobject="#stobj#" wizardID="#stWizard.ObjectID#" > lfields="Body" format="edit" intable="false" legend="News Story" /> > > <wiz:object stobject="#stobj#" wizardID="#stWizard.ObjectID#" > lfields="teaserImage,Teaser" format="edit" intable="false" > legend="Story Teaser" /> > > <wiz:object stobject="#stobj#" wizardID="#stWizard.ObjectID#" > lfields="aObjectIds,aRelatedIDs" format="edit" intable="false" > legend="Related Content" /> > </wiz:step> > > <wiz:step name="Statistics"> > > <cfoutput> > > <fieldset class="formSection"> > <legend class="">Statistics</legend> > </fieldset> > > <!--- set today's date from and to ---> > <cfset datefromtoday = dateformat(now(),"yyyy-mm-dd") & " 00-00-00"> > <cfset datetotoday = dateformat(now(),"yyyy-mm-dd") & " 23:59:59"> > > <!--- if the form was submitted by the Excel button, save data to > Excel ---> > <ft:processform action="xls"> > > </ft:processform> > > <!--- if the form was submitted by the Today button, show today's data > ---> > <ft:processForm action="Today"> > <cfset request.filter = "today"> > </ft:processForm> > > <!--- if the form was submitted by the Total button, show today's data > ---> > <ft:processForm action="Total"> > <cfset request.filter = "Total"> > </ft:processForm> > > <ft:form> > > <!--- get all the product objectid's ---> > <cfquery name="all" datasource="#application.dsn#"> > SELECT objectid,title > FROM shopproducts > WHERE objectid = '#stobj.objectid#' > </cfquery> > > <!--- get views ---> > <cfquery name="views" datasource="#application.dsn#"> > SELECT datetimecreated > FROM shopproductbehaviour_views > <cfif isdefined('request.filter') and request.filter eq "today"> > WHERE datetimecreated > BETWEEN '#datefromtoday#' AND '#datetotoday#' > AND productobjectid = '#all.objectid#' > <cfelse> > WHERE productobjectid = '#all.objectid#' > </cfif> > ORDER BY datetimecreated ASC > </cfquery> > > <!--- get ads ---> > <cfquery name="ads" datasource="#application.dsn#"> > SELECT datetimecreated > FROM > shopproductbehaviour_ads > <cfif isdefined('request.filter') and request.filter eq "today"> > WHERE datetimecreated > BETWEEN '#datefromtoday#' AND '#datetotoday#' > AND productobjectid = '#all.objectid#' > <cfelse> > WHERE productobjectid = '#all.objectid#' > </cfif> > ORDER BY datetimecreated ASC > </cfquery> > > <!--- get dels ---> > <cfquery name="dels" datasource="#application.dsn#"> > SELECT datetimecreated > FROM > shopproductbehaviour_dels > <cfif isdefined('request.filter') and request.filter eq "today"> > WHERE datetimecreated > BETWEEN '#datefromtoday#' AND ... > > read more » -- You received this message cos you are subscribed to "farcry-dev" Google group. To post, email: [email protected] To unsubscribe, email: [email protected] For more options: http://groups.google.com/group/farcry-dev -------------------------------- Follow us on Twitter: http://twitter.com/farcry
