1and1 Help Centre Categories

print article

How to include an image of the item in the Shopping cart

1. You have to first add 2 hidden values in the detail_template.template file.
(eShop -> Shop design -> detail_template.template)


<form action="<% ORDER_URL %>" method=post name="artikel_$item_cnt">
<!-- Variablen -->
<input type=hidden name="article[Title]" value='$item_title'>
<input type=hidden name="article[VAT]" value="$item_vat">
<input type=hidden name="article[Item_Number]" value="$item_code">
<input type=hidden name="article[Price]" value="$item_price">
<input type=hidden name="article[Category]" value="$item_category_path">

<input type=hidden name="article[image]" value="$item_image">
<input type=hidden name="article[path_to_article]" value="$path_tmp">
2. Now you can include the image in basket_table.tmpl file
(eShop -> Shop design -> Edit cart templates -> Shopping cart table -> basket_table.tmpl
In this example it is included in the following:

[....]
// if no hint is defined, show delete button on one row
if ((item_get_field("hint", $item) == "") || (! $BASKET_SHOW_HINTS)) {
echo "
<td align=middle valign=center bgcolor=\"$table_background_color\">";
if ($BASKET_EDITABLE) echo remove_item_button($i);
else echo "&nbsp";
echo"

<td bgcolor=\"$global_color1_dark\"><img src=\"".$toshopdata.$item['path_to_article']."/.".$item['image']."\">

</td>";
}

Now, you can see the item image in the shopping cart and order checkout too.