A simple MOD for adding the following to the Cart side-box:
-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:
[COLOR=“Red”]STEP 1:
---------------------------------------[/COLOR]
Add the following line in this file:
[COLOR=“Blue”]/skins//customer/side_boxes/cart.tpl[/COLOR]
below this existing line (around line 6):
```php
{include file=“cart_pages/cart_status.tpl”}
```
you add this line:
```php
{include file=“cart_pages/cart_thumbs.tpl”}
```
[COLOR=“Red”]STEP 2:
---------------------------------------[/COLOR]
[COLOR=“Blue”]Create a NEW file[/COLOR], so open notepad or similar and put this code in:
```php
{* $Id: cart_thumbs.tpl 2006-10-31 nwsco $ *}
{if $cart_products}
{literal}
.thumb_cart_divider { border-bottom:1px dotted #808080; } /you can move this line to styles.css if you like/
{/literal}
{foreach from=$cart_products item="product" key="key"}
{/foreach}
{include file="common_templates/image.tpl" image_width=30 obj_id=$key images=$product.main_pair object_type="product"} |
{$product.product|truncate:15:".."} |
|
{/if}
```
Save it here, under the name [B][COLOR="Blue"]cart_thumbs.tpl[/COLOR][/B], so here:
[COLOR="blue"]/skins//customer/cart_pages/[B]cart_thumbs.tpl[/B][/COLOR]
[COLOR="Red"][B]STEP 3:[/B]
---------------------------------------[/COLOR]
Add the following code at the bottom of the file:
[COLOR="blue"]/include/customer/cart_status.php[/COLOR] (one line before the ?>)
```php
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 [COLOR="blue"]bug[/COLOR] 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 [U]will[/U] 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 :cool: