Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: users

Return best sellers from a single category?

 

 

Interchange users RSS feed   Index | Next | Previous | View Threaded


ic at tvcables

Apr 19, 2008, 2:53 AM

Post #1 of 6 (117 views)
Permalink
Return best sellers from a single category?

Hi Folks,

I am trying to modify the best component loop search to return only the best
selling products from a single category, I tried adding the following to the
loop search:-

fi=products
st=db
co=yes
sf=category
se=my category name

So the whole loop search ended up like this:-

[.loop search="
fi=products
st=db
co=yes
sf=category
se=my category name
fi=merchandising
st=db
ra=yes
tf=times_ordered
to=rn
ml=[control matches 3]
"]

This doesn't work though, I have tried co=yes and co=no, can anyone suggest
a way to fix it please?

Thanks,
Andy.





_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


kevin at cursor

Apr 19, 2008, 4:27 AM

Post #2 of 6 (113 views)
Permalink
Re: Return best sellers from a single category? [In reply to]

"IC" <ic[at]tvcables.co.uk> wrote:
> I am trying to modify the best component loop search to return only the best
> selling products from a single category, I tried adding the following to the
> loop search:-
>
> fi=products
> st=db
> co=yes
> sf=category
> se=my category name
>
> So the whole loop search ended up like this:-
>
> [.loop search="
> fi=products
> st=db
> co=yes
> sf=category
> se=my category name
> fi=merchandising
> st=db
> ra=yes
> tf=times_ordered
> to=rn
> ml=[control matches 3]
> "]
>
> This doesn't work though, I have tried co=yes and co=no, can anyone suggest
> a way to fix it please?
>
The "sf" parameter should include the table name, for a joined search,
like "tablename:colname".

See the examples in the documentation, here:

http://www.interchange.rtfm.info/icdocs/Interchange_search_engine.html#Multiple_table_joined_coordinated_search_examples

Also the mv_search_field (sf) documentation, here:

http://www.interchange.rtfm.info/icdocs/Search_parameters.html#mv_search_field_sf

--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin[at]cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


ic at tvcables

Apr 19, 2008, 4:49 AM

Post #3 of 6 (113 views)
Permalink
Re: Return best sellers from a single category? [In reply to]

"IC" <ic[at]tvcables.co.uk> wrote:
> I am trying to modify the best component loop search to return only the
best
> selling products from a single category, I tried adding the following to
the
> loop search:-
>
> fi=products
> st=db
> co=yes
> sf=category
> se=my category name
>
> So the whole loop search ended up like this:-
>
> [.loop search="
> fi=products
> st=db
> co=yes
> sf=category
> se=my category name
> fi=merchandising
> st=db
> ra=yes
> tf=times_ordered
> to=rn
> ml=[control matches 3]
> "]
>
> This doesn't work though, I have tried co=yes and co=no, can anyone
suggest
> a way to fix it please?
>
The "sf" parameter should include the table name, for a joined search,
like "tablename:colname".

See the examples in the documentation, here:


http://www.interchange.rtfm.info/icdocs/Interchange_search_engine.html#Multi
ple_table_joined_coordinated_search_examples

Also the mv_search_field (sf) documentation, here:


http://www.interchange.rtfm.info/icdocs/Search_parameters.html#mv_search_fie
ld_sf

--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin[at]cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Hi Kevin,

Thanks for the reply, I have modified the search to this:-

[.loop search="
co=yes
sf=category
se=my category name
nu=0
op=eq

sf=merchandising:times_ordered
se=1
op=ge
nu=1

tf=merchandising:times_ordered
to=rn
ml=[control matches 3]
"]


This returns 3 products from the correct category however it does not return
the 3 best sellers according to the times_ordered field, is there something
else missing?

Thanks,
Andy.



_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


kevin at cursor

Apr 19, 2008, 10:05 AM

Post #4 of 6 (110 views)
Permalink
Re: Return best sellers from a single category? [In reply to]

"IC" <ic[at]tvcables.co.uk> wrote:
> Thanks for the reply, I have modified the search to this:-
>
> [.loop search="
> co=yes
> sf=category
> se=my category name
> nu=0
> op=eq
>
> sf=merchandising:times_ordered
> se=1
> op=ge
> nu=1
>
> tf=merchandising:times_ordered
> to=rn
> ml=[control matches 3]
> "]
>
>
> This returns 3 products from the correct category however it does not return
> the 3 best sellers according to the times_ordered field, is there something
> else missing?
>
"op=ge" is not appropriate for numeric columns (nu=1).
Try "op=>=" instead.

You will find an operator list in the documentation, here:

http://www.interchange.rtfm.info/icdocs/Interchange_search_engine.html#Coordinated_and_joined_searches

--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin[at]cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


ic at tvcables

Apr 19, 2008, 10:19 AM

Post #5 of 6 (110 views)
Permalink
Re: Return best sellers from a single category? [In reply to]

"IC" <ic[at]tvcables.co.uk> wrote:
> Thanks for the reply, I have modified the search to this:-
>
> [.loop search="
> co=yes
> sf=category
> se=my category name
> nu=0
> op=eq
>
> sf=merchandising:times_ordered
> se=1
> op=ge
> nu=1
>
> tf=merchandising:times_ordered
> to=rn
> ml=[control matches 3]
> "]
>
>
> This returns 3 products from the correct category however it does not
return
> the 3 best sellers according to the times_ordered field, is there
something
> else missing?
>
>"op=ge" is not appropriate for numeric columns (nu=1).
>Try "op=>=" instead.

Just tried that, still no joy, it seems to be the sort order at the end that
doesn't work, must be something IC doesn't like with the tf or to lines? Any
other ideas?

Thanks,
Andy.




_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


kevin at cursor

Apr 19, 2008, 12:22 PM

Post #6 of 6 (108 views)
Permalink
Re: Return best sellers from a single category? [In reply to]

"IC" <ic[at]tvcables.co.uk> wrote:
> "IC" <ic[at]tvcables.co.uk> wrote:
> > Thanks for the reply, I have modified the search to this:-
> >
> > [.loop search="
> > co=yes
> > sf=category
> > se=my category name
> > nu=0
> > op=eq
> >
> > sf=merchandising:times_ordered
> > se=1
> > op=ge
> > nu=1
> >
> > tf=merchandising:times_ordered
> > to=rn
> > ml=[control matches 3]
> > "]
> >
> >
> > This returns 3 products from the correct category however it does not
> return
> > the 3 best sellers according to the times_ordered field, is there
> something
> > else missing?
> >
> >"op=ge" is not appropriate for numeric columns (nu=1).
> >Try "op=>=" instead.
>
> Just tried that, still no joy, it seems to be the sort order at the end that
> doesn't work, must be something IC doesn't like with the tf or to lines? Any
> other ideas?
>
Presumably you've tried removing the table name from the "tf"
parameter. The "tf" parameter only expects column names and optional
sort options:

http://www.interchange.rtfm.info/icdocs/Search_parameters.html#mv_sort_field_tf

--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin[at]cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Interchange users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.