View Single Post
  #3  
Old 06-26-2008, 05:46 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: If statement to display 'check out' button

Here is what I use....
In customer/home.tpl I added the following at the top of the "menu" column

{if $main ne "fast_lane_checkout"}
{include file="customer/main/minicart-box.tpl" short_mode="short"}
<br />{/if}

Then I modified customer/main/minicart.tpl and named it minicart-box.tpl

Code:
{* $Id: minicart-box.tpl,v 1.17 2006/03/28 08:21:07 max Exp $ *} {* Mods - BG yellow if cart full - added text *} {if $short_mode eq "short"} {if $minicart_total_items > 0} <TABLE width="155" border="0" cellpadding="1" cellspacing="0" bgcolor="yellow"> <tr> <td align="center" nowrap="nowrap"><a href="cart.php"><img src="{$ImagesDir}/custom/top-cart-full.gif" alt="Your Shopping Cart" /><br /> <b>Items in Cart:<IMG src="{$ImagesDir}/spacer.gif" width="1" height="6" border="0"> {$minicart_total_items}<br /> <b>SubTotal:<IMG src="{$ImagesDir}/spacer.gif" width="2" height="6" border="0">{include file="currency.tpl" value=$minicart_total_cost}</b></a></TD> </tr> </table> {/if} {/if}

The image "top-cart-full.gif" shows a full cart and has text that says "Your Shopping Cart".

In essence, what it does is remain invisible until there is something in the cart, then it puts a highlighted box (in my case bright yellow) at the head of the menu column that shows the customer how many items are in the cart, a subtotal, and when clicked takes them to their shopping cart/checkout.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote