You can mine the data from your orderline database to suggest products that might be bought in combination with a certain product.
All that is necessary is to access this page. The database will be mined and entries made in the others_bought field of the merchandising database.
The database is scanned, and a list of items purchased on the same order with each item is built. This is stored in a data structure and can be accessed in a shopping cart or flypage with the code:
Customers who bought this item also bought: |
};
for(@ary) {
my $desc = tag_data( 'products', 'description', $_);
$out .= q{$desc } } return $out . ' |
This code is used in the Barry and possibly other demos.