There's some really great work in this thread!! Thanks.
Another tweak to this minicart:
http://www.greatamericantoystore.com/minicart.gif
I got rid of the "Product X Qty Price" format , and went with a columnar format to clean it up a little. Also added the shipping and total tweaks. Finally, I bolded the shipping cost and Total in the css.
Make sure you add these lines to minicart.php (thanks Shan!):
Code:
$smarty->assign("minicart_contents", $cart["products"]); //added this line
$smarty->assign("minicart_shipping", $cart["shipping_cost"]); //added this line
$smarty->assign("minicart_delivery", $cart["delivery"]); //added this line
?>
Make sure you add the class to your .css
Code:
.MiniCartTextSmall {
FONT-SIZE: 10px;font-weight:bold
}
Finally, change your customer/main/minicart.tpl to:
Code:
{* $Id: minicart.tpl,v 1.12 2004/07/06 14:00:12 svowl Exp $ *}
<TABLE border="0" cellpadding="1" cellspacing="0">
<TR>
<TD rowspan="2" width="23">
{if $minicart_total_items > 0}<img border="0" src="{$ImagesDir}/cart_full.gif" width="19" height="16">
{else}<img border="0" src="{$ImagesDir}/cart_empty.gif" width="19" height="16">{/if}
</TD>
<TD class="VertMenuItems">{if $minicart_total_items > 0}{$lng.lbl_items}: </TD>
<TD class="VertMenuItems" color="#0000ff">{$minicart_total_items}{else}<CENT ER>{$lng.lbl_cart_is_empty}</CENTER>{/if}</TD>
</TR>
<TR>
<TD class="VertMenuItems">{if $minicart_total_items > 0}{$lng.lbl_total}: </TD>
<TD class="VertMenuItems">{include file="currency.tpl" value=$minicart_total_cost}{/if}</TD>
</TR>
</TABLE>
{if $minicart_total_items > 0}
<table width="100%" id="table1">
<tr><td width="65%" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px"><b>Item</b></td>
<td style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px"><b>Qty</b></td>
<td align="right" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px"><b>Price</b></td></tr>
</table>
<table width="100%">
{foreach from=$minicart_contents item=item}
<tr><td width="65%">{$item.product|truncate:17:"...":true}</td>
<td align="center">{$item.amount}</td><td align="right">{$item.display_subtotal}</td></tr>
{/foreach}
</table>
{/if}
<HR size="1" NOSHADE class="VertMenuHr">
{if $minicart_total_items > 0}
<table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr>
<TD class="MiniCartTextSmall"><a title="{$minicart_delivery}">Shipping Cost:</a></td><td align="right" class="MiniCartTextSmall">
<a title="{$minicart_delivery}">{include file="currency.tpl" value=$minicart_shipping}</a></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr>
<TD class="MiniCartTextSmall">{$lng.lbl_total}: </td>
<td align="right" class="MiniCartTextSmall">{include file="currency.tpl" value=$minicart_total_cost}</td>
</tr>
</table>
{else}{/if}
<br>
My cart is ~ 200 pxl wide or so. To get the right balance for your cart, so the product name displays the most it can on 1 line, you will need to play around with the two instances of cell width [currently: <td width="65%"] and the truncated value [currently: {$item.product|truncate:17:"...":true}].
Now, to figure out how to get the product names to link to the products!!
Thanks for all who have posted about this mod. It's a great improvement, and adds a lot of value to the minicart feature for our customers.