-Thumbnail
-Productname (shortened to ..., but completely visible on tooltip incl. amount)
-Delete-button
Very simple to add: it looks like quite a lot at first glance, but its just 3 simple steps:
STEP 1:
---------------------------------------
Add the following line in this file:
/skins/<skinname>/customer/side_boxes/cart.tpl
below this existing line (around line 6):
{include file="cart_pages/cart_status.tpl"}
you add this line:
{include file="cart_pages/cart_thumbs.tpl"}
STEP 2:
---------------------------------------
Create a NEW file, so open notepad or similar and put this code in:
{* $Id: cart_thumbs.tpl 2006-10-31 nwsco $ *}
{if $cart_products}
{literal}
<style>.thumb_cart_divider { border-bottom:1px dotted #808080; } /*you can move this line to styles.css if you like*/</style>
{/literal}
<table cellpadding="0" cellspacing="0" width="100%" align="center" border="0">
{foreach from=$cart_products item="product" key="key"}
<tr height="40">
<td valign="middle" class="thumb_cart_divider">
<a href="{$index_script}?{$target_name}=products&product_id={$product.product_id}">
{include file="common_templates/image.tpl" image_width=30 obj_id=$key images=$product.main_pair object_type="product"}</a>
</td>
<td valign="middle" class="thumb_cart_divider">
<a title="{$product.amount} x {$product.product}" href="{$index_script}?{$target_name}=products&product_id={$product.product_id}" class="product-title">{$product.product|truncate:15:".."}</a>
</td>
<td align="right" valign="middle" class="thumb_cart_divider">
<a href="{$index_script}?{$target_name}=cart&cart_id={$key}&{$mode_name}=delete"><img src="{$images_dir}/delete_product.gif" width="12" height="12" border="0" alt="{$lang.remove} {$product.amount}x" title="{$lang.remove} {$product.amount}x" align="absbottom" /></a>
</td>
</tr>
{/foreach}
</table>
<br>
{/if}
Save it here, under the name cart_thumbs.tpl, so here:
/skins/<skinname>/customer/cart_pages/cart_thumbs.tpl
STEP 3:
---------------------------------------
Add the following code at the bottom of the file:
/include/customer/cart_status.php (one line before the ?>)
extract(fn_calculate_cart_content($cart, $auth, true, false));
if (!empty($cart_products)) {
foreach($cart_products as $k => $v) {
fn_gather_additional_product_data($cart_products[$k], true);
}
}
$smarty->assign_by_ref('cart_products', $cart_products);
Result looks like this:
[ATTACH]205[/ATTACH]
There's still a small bug in there, only when using ajax with the cart (this doesnt hinder any functionality though!):
If you add a product, you cannot see the thumbnail&info for this directly (ajax).
Add another one (or add the same again) and then you will see it,
so there's a delay of 1 product (presuming you dont do a page-refresh
or change to another page, but stay on the same page).
If someone has a nice solution for this, please share: i cant find the
time for this right now, sorry.
Again, all quick & dirty but should work just fine. If not, post here please.
Tested with version 1.3.4
Note that this (of course) does slow down every page a bit by a few ms.
good luck
