##############################################################################################################
#
# Cart->miniCart() - show a mini cart summary
#
# Returns: HTML string containing cart breakdown
#
# Graham Bradley 2007
#
# NOT SUPPORTED BY ACTINIC
#
##############################################################################################################

sub miniCart
	{
	use HTML::Entities ();
	my $Self = shift;

	my $abrv=12;									# number of characters to abbreviate item name
	my $defaultCur="";								# currency symbol to include

	my $cartStr="ss=" . $::g_sSearchScript . "cur=" . $defaultCur;
	my $pCartItem;
	foreach $pCartItem (@{$Self->{_CartList}})
		{
		my ($Status, $Message, $pProduct) = GetProduct($pCartItem->{'PRODUCT_REFERENCE'}, $pCartItem->{'SID'});
		if ($Status == $::FAILURE)
			{
			return ($Status, $Message, []);
			}
		elsif ($Status == $::NOTFOUND)
			{
			next;
			}
		my @Prices = $Self->GetCartItemPrice($pCartItem);
		$cartStr=$cartStr . "&!" . $pCartItem->{'QUANTITY'} . "x" . HTML::Entities::encode($pCartItem->{'PRODUCT_REFERENCE'}) . ">" . HTML::Entities::encode(substr($pProduct->{'NAME'},0,$abrv)) . ">" . $Prices[2]/100;
		}
	return $cartStr;
	}