[ic] Customers who bought

Anthony Minero anthony at urbanscooters.com
Mon Nov 17 18:01:53 EST 2003

On 11/17/03 5:45 PM, "Anthony Minero" <anthony at urbanscooters.com> wrote:

> 4.9.8
> Does anyone know where to edit the "Customers who bought this also bought"
> feature. I accidentally generated this code by clicking on "Build Related"
> in the Quicklinks bar and now all of a sudden it's showing up in my basket
> page and I don't see where I can either remove it or, since I kinda like
> this feature, edit it to lay it out a little differently?

Whoops, OK I just found it. It's in the cart component. I just commented it
out for now.

This is what it was just in case anyone wanted to know;

[if type=explicit compare="[control others_bought]"]
    [if-item-data merchandising others_bought]
    [perl tables=products]
        my $hash = [item-data merchandising others_bought];
        my @ary = sort { $hash->{$b} <=> $hash->{$a} } keys %$hash;
        return '' unless @ary;
        my %in_basket;
        splice(@ary, 3);
        for(@{$Carts->{main}}) {
            $in_basket{$_->{code}} = 1;
        @ary = grep ! $in_basket{$_}, @ary;
        return '' unless @ary;
        my $out = <<'EOF';
        <TR class="contentbar2">
              <TD>Customers who bought this item also bought:</TD>
            <TR class="[item-calc]$row_class || 'contentbar1'[/item-calc]">
        for(@ary) {
             my $desc = tag_data( 'products', 'description', $_);
            $out .= <<EOF;
        <A HREF="[area $_]">$desc</A><BR>
        return $out . '</TD></TR></TABLE>';

Anthony Minero

More information about the interchange-users mailing list