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 '#datetotoday#'
AND productobjectid = '#all.objectid#'
<cfelse>
WHERE productobjectid = '#all.objectid#'
</cfif>
ORDER BY datetimecreated ASC
</cfquery>
<!--- get sails --->
<cfquery name="sails" datasource="#application.dsn#">
SELECT datetimecreated
FROM
shopproductbehaviour_sails
<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>
<!--- show the polling results in cfchart --->
<cfchart format="png" show3d="yes" xAxisTitle = "#all.title#">
<cfchartseries type="bar">
<cfchartdata item="views" value="#views.recordcount#">
<cfchartdata item="ads" value="#ads.recordcount#">
<cfchartdata item="dels" value="#dels.recordcount#">
<cfchartdata item="sails" value="#sails.recordcount#">
</cfchartseries>
</cfchart>
<ft:farcryButtonPanel>
<ft:farcryButton value="Today" />
<ft:farcryButton value="Total" />
<ft:farcryButton value="Export to Excel" />
</ft:farcryButtonPanel>
</ft:form>
</cfoutput>
</wiz:step>
</wiz:wizard>
<cfsetting enablecfoutputonly="false" />
On Nov 29, 7:25 am, ""Jørgen M. Skogås"" <[email protected]> wrote:
> That's strange, it should work. Can you post some more code, for the .cfc
> (content type) and the edit handler (edit.cfm?).
> Jørgen~
>
> On 28. nov. 2009, at 23.08, Marco van den Oever wrote:
>
> > Got a funny thing, when using this code, so including both
> > "catshopproducts,linkNavigation":
>
> > <wiz:object stobject="#stobj#" wizardID="#stWizard.ObjectID#"
> > lfields="catshopproducts,linkNavigation" intable="false"
> > legend="Categorisation" />
>
> > it all works and both show, when i remove "catshopproducts" it doesn't
> > work anymore and linkNavigation doesn't show...
>
> > huhhhh ?
>
> > Using this property:
>
> > <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" />
>
> > On Nov 28, 10:28 pm, Marco van den Oever <[email protected]>
> > wrote:
> >> I updated to community 5.2.7 and it works :) Thanks Deamon....
>
> >> On Nov 28, 7:21 pm, Marco van den Oever <[email protected]>
> >> wrote:
>
> >>> FC 5.2.2 (not the community one), and logged in with user "farcry"....
> >>> Maybe update to FC 5.2.2 community?
>
> >>> On Nov 28, 7:17 pm, ""Jørgen M. Skogås"" <[email protected]> wrote:
>
> >>>> What FC version are you running?
>
> >>>> And are you logged in with the farcry user?
>
> >>>> Jørgen~
>
> >>>> On 28. nov. 2009, at 19.03, Marco van den Oever wrote:
>
> >>>>> So that the underlying nav nodes are not showing is that a permission
> >>>>> thing?? Guess not as all permissions are on granted... what else could
> >>>>> it be....
>
> >>>>> On Nov 28, 6:41 pm, Marco van den Oever <[email protected]>
> >>>>> wrote:
> >>>>>> Skip that Railo comment as i am locally on CF8 ...... Dude......
>
> >>>>>> On Nov 28, 5:50 pm, Marco van den Oever <[email protected]>
> >>>>>> wrote:
>
> >>>>>>> Only problem is that i only see the home node and not the underlying
> >>>>>>> nav nodes .... is there more i need to change or could this be another
> >>>>>>> Railo metadata problem???
>
> >>>>>>> On Nov 28, 5:46 pm, Marco van den Oever <[email protected]>
> >>>>>>> wrote:
>
> >>>>>>>> Hi, well Chris and your answer now makes me wonder if i shouldn't
> >>>>>>>> just
> >>>>>>>> use the navigation folder selector.
>
> >>>>>>>> I now tried to use it and grasping the idea, with this in place i can
> >>>>>>>> set each shopproduct to a certain nav node, then as Chris suggested
> >>>>>>>> filter on current request.navid against the navid in the content
> >>>>>>>> type's extra "linkNavigation" field value created by adding:
>
> >>>>>>>> <cfproperty
> >>>>>>>> ftseq="4" ftfieldset="Redirection"
> >>>>>>>> name="linkNavigation" type="string"
> >>>>>>>> hint="Link to a navigation folder within the site." required="no"
> >>>>>>>> default=""
> >>>>>>>> fttype="navigation" ftalias="home" ftrendertype="tree"
> >>>>>>>> ftSelectMultiple="false" ftlabel="Navigation Folder" />
>
> >>>>>>>> Then i of course can repeat this approach for a custom dmimage... of
> >>>>>>>> dmfile... if needed.
>
> >>>>>>>> Thanks both.
>
> >>>>>>>> On Nov 28, 5:39 pm, ""Jørgen M. Skogås"" <[email protected]> wrote:
>
> >>>>>>>>> Hi Marco,
>
> >>>>>>>>> Do you need to use categories? Can you use the navigation folder
> >>>>>>>>> selector
> >>>>>>>>> instead?http://docs.farcrycms.org/display/FCDEV40/Navigation+Folder+Selector
>
> >>>>>>>>> J~
>
> >>>>>>>>> On 28. nov. 2009, at 17.22, Marco van den Oever wrote:
>
> >>>>>>>>>> What i want is that when a admin creates navigation's, also the
> >>>>>>>>>> needed
> >>>>>>>>>> categories are created. That way you can use the internal category
> >>>>>>>>>> system of Farcry so you can put the products and also put product
> >>>>>>>>>> images and documentation all together in the right categories.
>
> >>>>>>>>>> Then with a copied paste and slightly changed dmnews listing rule,
> >>>>>>>>>> now
> >>>>>>>>>> shopproduct rule, they can set the rule for the right nav.
>
> >>>>>>>>>> As i understand the navigation formtool should made this all
> >>>>>>>>>> possible
> >>>>>>>>>> automatically accept for the categories creation?
> >>>>>>>>>> Maybe i don't grasp the idea yet but i am stuck when thinking of
> >>>>>>>>>> one
> >>>>>>>>>> content item being selected for one navigation node, i need
> >>>>>>>>>> multiple
> >>>>>>>>>> navigation nodes for one content type.
>
> >>>>>>>>>> Thanks again.
>
> >>>>>>>>>> On Nov 28, 10:03 am, Chris Kent <[email protected]> wrote:
> >>>>>>>>>>> I assume you are trying to set a "home" within the site tree for
> >>>>>>>>>>> your
> >>>>>>>>>>> news items to appear.
>
> >>>>>>>>>>> I have used the Navigation
> >>>>>>>>>>> Formtoolhttp://docs.farcrycms.org/display/FCDEV40/Navigation+Folder+Selector
> >>>>>>>>>>> to associate content items with a particular navigation node.
>
> >>>>>>>>>>> You can then modify the sql in your publishing rule to check
> >>>>>>>>>>> request.navid to select the items that need to appear.
>
> >>>>>>>>>>> Admin users can then specify where the content items should
> >>>>>>>>>>> appear by
> >>>>>>>>>>> selecting the navigation node(s).
>
> >>>>>>>>>>> Chris.
>
> >>>>>>>>>>> On Nov 28, 3:48 am, Marco van den Oever
> >>>>>>>>>>> <[email protected]>
> >>>>>>>>>>> wrote:
>
> >>>>>>>>>>>> Creating Navs is easy, creating Categories also, but what if you
> >>>>>>>>>>>> want
> >>>>>>>>>>>> to create those both at the same time. For instance when you
> >>>>>>>>>>>> want to
> >>>>>>>>>>>> use a rule like the dmnews listing rule, then you have to pick a
> >>>>>>>>>>>> Category that you want to show.
>
> >>>>>>>>>>>> Shouldn't it be logical when there was a little magical checkbox
> >>>>>>>>>>>> when
> >>>>>>>>>>>> creating a Nav that states
> >>>>>>>>>>>> "Create Category", so the process would be a one step, not multi
> >>>>>>>>>>>> with
> >>>>>>>>>>>> manual thinking and entering Category names and levels...
>
> >>>>>>>>>>>> Anyone had ever made a solution for that?
>
> >>>>>>>>>>>> I have add it as improvement
> >>>>>>>>>>>> suggestion:http://bugs.farcrycms.org/browse/FC-2057
>
> >>>>>>>>>> --
> >>>>>>>>>> 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
>
> >>>>> --
> >>>>> 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
>
> > --
> > 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
--
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