Just thinking about this implementation so:

if a customer purchases internal sku 2,5,7
Would it make sense to pop the data in to a table like:

MainSku | AddonSku | Count | DateTime
2 | 5 | count | datetime
2 | 7 | count | datetime
5 | 2 | count | datetime
5 | 7 | count | datetime
7 | 2 | count | datetime
7 | 5 | count | datetime

select * from whobought where MainSku = x and AddonSku = y;

if no result

insert into whobought (bla bla....

if result

update whobought set Count = Count + 1 and Datetime = (current time) where
bla bla.....

I can't think of another way around it that makes sence.  An auto purge
could be set in place on skus that were no longer active.  You could also
run a 10 most popular items off this table.  It would add 2 more queries to
the invoice creation process.  Maybe that isn't worth it.  Maybe there is a
better way to do it.

kevin

----- Original Message -----
From: Leon Atkinson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 01, 2001 4:39 PM
Subject: Re: [FreeTrade-dev] people who bought x also bought y


Yeah, this is doable.  I suspect it will be best implemented with a "report"
table.  You don't want to generate that data on the fly because it's
probably pretty intense, and it doesn't change from minute to minute.
Nightly or even weekly is probably fine.  In the past, I've written reports
of the admin about item popularity...you can score them by total quanity or
number of times they appear on an invoice.  You can also measure which items
produces the most money.  One last report, that should be real time, shows
the active sessions.  That gives you an idea of how "crowded" your store is.

Yeah, these are things that I'll get around to eventually...

Leon


_______________________________________________
FreeTrade-dev mailing list
[EMAIL PROTECTED]
http://share.whichever.com/mailman/listinfo/freetrade-dev


_______________________________________________
FreeTrade-dev mailing list
[EMAIL PROTECTED]
http://share.whichever.com/mailman/listinfo/freetrade-dev

Reply via email to