View Single Post
  #25  
Old 04-29-2007, 08:18 AM
  vtonya's Avatar 
vtonya vtonya is offline
 

Advanced Member
  
Join Date: Apr 2007
Posts: 61
 

Thumbs up COMBINED 2 carts methods from this forum

To get the product names to link to the products just replace the body of minicart.tpl with the following code:

Quote:
{* $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>
</TABLE>
{if $minicart_total_items > 0}
<table width="200" border="0" cellpadding="2">
<tr>
<td align="center" 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 align="center" 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="center" 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>
<td align="center" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px"><b>Delete</b></td>
</tr>
<tr>
{foreach from=$minicart_contents item=item}
<td align="left" class="MiniCartTextTiny"><b><a href="product.php?productid={ $item.productid }" title="{$item.product}">{$item.product|truncate:47 :"...":true}</a>
</b></td>

<td align="center">{$item.amount}</td>


<td align="center">{$item.display_subtotal}</td>

<td align="center">
{if $config.Adaptives.platform eq 'MacPPC' && $config.Adaptives.browser eq 'NN'}
{assign var="js_to_href" value="Y"}
{/if}
{if $type eq 'input'}
{assign var="img_type" value='input type="image" class="blank"'}
{else}
{assign var="img_type" value='IMG'}
{/if}
{assign var="js_link" value=$href|regex_replace:"/^\s*javascript\s*:/Si":""}
{if $js_link eq $href}
{assign var="js_link" value="javascript: self.location='cart.php?mode=delete&productindex=` $item.cartid`'"}
{else}
{assign var="js_link" value=$href}
{if $js_to_href ne 'Y'}
{assign var="onclick" value=$href}
{assign var="href" value="javascript: void(0);"}
{/if}
{/if}
{if ($config.Adaptives.platform ne 'MacPPC' || $config.Adaptives.browser ne 'NN')}<a href="{$js_link}"><img src="/skin1/images/delete.gif" width="22" height="30" alt="Remove product" /></a>
{else}
<A href="cart.php?mode=delete&productindex=`$item.car tid`"{if $onclick ne ''} onclick="{$onclick}"{/if}{if $title ne ''} title="{$title}"{/if}{if $target ne ''} target="{$target}"{/if}><FONT class="FormButton">{$button_title} </FONT></A>
{/if}</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"><strong>{$lng.lbl_total} </strong>: </td>
<td align="right" class="MiniCartTextSmall"><strong>{include file="currency.tpl" value=$minicart_total_cost}</strong></td>
</tr>
</table>
{else}{/if}
<br>


I've also added a DELETE button
All product are linkable!

So, with this mod my shopping cart looks like this:
Click image for larger version

Name:	basket.jpg
Views:	278
Size:	26.7 KB
ID:	348
__________________
X-card Gold 4.1.7
Batch Order Mod/Order Processing
Detailed Order Management Mod
Order Audit/Profit reports
Advanced Product Search
Ajax Username Checker
Direct Product Enquiry Form
FAQ Manager
Social Bookmarking
Tabs Mod v3
MagneticOne.com All-IN-ONE X-Cart Export
Show Referrer Information on Order Details Page
www.medsmarket.net
Reply With Quote