[if items]
[then]
[item-list]
[item-calc]
#Log("Checking master item $master");
$row_class = ++$count % 2 ? 'cartnorm' : 'cartalt';
my $item = '[item-increment]';
my $up = q{[item-data merchandising upsell_to]};
my $cr = q{[item-data merchandising cross_sell]};
$upsell_remove{'[item-code]'} = 1;
$cross_remove{'[item-code]'} = 1;
my %seen = ( '' => 1 );
$Scratch->{upsell} .= " $up" if $up;
$Scratch->{cross_codes} .= " $cr" if $cr;
my @up = split /\s+/, $Scratch->{upsell};
my @cr = split /\s+/, $Scratch->{cross_codes};
@up = grep ( (!$seen{$_}++ && ! $upsell_remove{$_}), @up);
@cr = grep ( (!$seen{$_}++ && ! $cross_remove{$_}), @cr);
$Scratch->{upsell} = join " ", @up;
$Scratch->{cross_codes} = join " ", @cr;
return;
[/item-calc]
[L]Price[/L]
[item-discount-price]
[L]Total price[/L]
[subtotal]
[/item-list]
[/then]
[/if]