kaeverens / kvwebme

kvwebme
4 stars 5 forks source link

dynamic relation types in Products plugin #6

Open kaeverens opened 11 years ago

kaeverens commented 11 years ago

original here: https://code.google.com/p/kv-webme/issues/detail?id=67

Project Member Reported by superstoffer, Aug 31, 2011 Is it possible to make an automatic / dynamic relation type, where the system automatically detects what another customer has bought together with the current product? E.g. "Customers who bought this also bought...."

Nov 8, 2011 Project Member #1 kae.verens this kind of thing is tricky to get right, so I'm not going to touch it for a while, but here are some notes.

it's difficult to say "product X is often bought with product Y" because it depends on how you measure "often".

For example, I'm certain there was a period in the last year where Mentos and Coke were bought together quite a lot. But let's say that Mentos were not available to buy anymore - if "often" means "on average, over all time", then Coke will still be linked to it even years after the link makes no sense.

there needs to be some concrete rules explaining how the relationship should be decided.

one idea: set up an automatic relationship with a date range (last 6 months). then for each product, find every paid order that contained it in that period, and figure the relationships out. Still not easy, though, as you then need to figure out rules for sales where 2 products of type X were bought and 3 of type Y - is that counted as 1 relationship?

also, doing this "on-the-fly" would kill the server because of the amount of computation, so it needs to be done either:

  1. partially, each time a sale is completed
  2. or in a periodic "cron" event when the server is otherwise not busy

I think #1 is the best option.

you might also want to consider that sometimes marketers would like to "skew" the results to try create a link between products.