[ic] Times_Ordered and Best Sellers
Andrew Rich
andrew at mapsdownunder.com.au
Wed Mar 9 17:15:02 EST 2005
> --- Andrew Rich <andrew at itdownunder.com.au> wrote:
> > Hi All
> >
> > I am working on improving our best seller component.
> >
> > Currently there is a build_related admin page.
> >
> > Firstly, I believe I can copy to catalog/pages/admin and modify for
the
> > specific catalog or there is an area for common custom mods. Can
> > someone indicate that for me.
> >
> > Secondly, when I execute this IC builds the data from all orders
still
> > in the system. This has become a problem as some obsolete products
sold
> > very well and there new versions haven't sold enough copies to be
Best
> > Sellers yet!
> >
> > So how do I change this to work in either a "number of days" or from
> > order number.
> >
> > This is the related code from build_related
> >
> > [perl tables="__UI_META_TABLE__ orderline merchandising"]
> > my $db = $Db{orderline};
> > return "NO ORDERLINE table???!" if ! $db;
> > my $start = tag_data( qw/__UI_META_TABLE__ lookup_exclude
> > orderline/ );
> >
> > my $query = "select code,order_number,sku,username from
> > orderline ";
> > if($start) {
> > $query .= " where order_number > '$start'";
> > }
> > else {
> > %sku = ();
> > }
> >
> > What does this code do and how do I set it? tag_data(
> > qw/__UI_META_TABLE__ lookup_exclude orderline/ );
> >
>
> I'm not sure about that line, but try adding this to the where clause
of
> your
> $query:
> where order_date > 20050101 (or some other date in format yyyymmdd)
>
> This will cause it to only pick up items that were ordered in calendar
> year
> 2005.
>
> Hope this helps,
> Mark
>
Thank you for the reply Mark.
I would still like to know what this line does.
my $start = tag_data( qw/__UI_META_TABLE__ lookup_exclude orderline/ );
Andrew
More information about the interchange-users
mailing list