Skip to content

Commit

Permalink
Cleaned up cart show.tpl
Browse files Browse the repository at this point in the history
  • Loading branch information
illiphilli committed Jun 16, 2011
1 parent 87ce25b commit c8dae3d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 39 deletions.
7 changes: 7 additions & 0 deletions framework/modules/ecommerce/assets/css/cart.css
Expand Up @@ -153,6 +153,13 @@ table#cart table td {
white-space:nowrap;
}

/* discount code styles */
.input-code .control {
display:inline-block;
*display:inline;
zoom:1;
vertical-align:bottom;
}

/************* END CART STYLES ****************/

Expand Down
68 changes: 29 additions & 39 deletions framework/modules/ecommerce/views/cart/show.tpl
Expand Up @@ -14,7 +14,7 @@
*
*}

{css unique="cart" link="`$asset_path`css/cart.css" corecss="panels"}
{css unique="cart" link="`$asset_path`css/cart.css" corecss="tables,panels"}

{/css}

Expand All @@ -32,15 +32,12 @@
<div id="myCart" class="module cart show hide">
<h1>{ecomconfig var='cart_title_text' default="Your Secure Shopping Cart"}</h1>
<div id="cart-message">{ecomconfig var='cart_description_text' default=""}</div>
<div>
<div style="float:left; padding-bottom: 8px;">
<a class="exp-ecom-link" href="{link controller=store action=showall}"><strong><em>Continue Shopping</em></strong></a>
{if $items|@count gt 0}
<a class="exp-ecom-link" style="margin-left: 18px;" href="{securelink controller=cart action=checkout}"><strong><em>Checkout Now</em></strong></a>
{/if}
</div>
<div style="float:right; padding-bottom: 8px; font-size: 9px;"><a href="{link action=empty_cart}" onclick="return confirm('Are you sure you want to empty all items from your shopping cart?');">[Empty Cart]</a></div>
<div style="clear: both;"></div>
<div style="padding:8px; 0">
<a class="awesome {$smarty.const.BTN_SIZE} {$smarty.const.BTN_COLOR}" href="{backlink}">Continue Shopping</a>
{if $items|@count gt 0}
<a class="awesome {$smarty.const.BTN_SIZE} {$smarty.const.BTN_COLOR}" style="margin-left: 18px;" href="{securelink controller=cart action=checkout}">Checkout Now</a>
{/if}
<a class="awesome {$smarty.const.BTN_SIZE} red" style="margin-left: 18px;" href="{link action=empty_cart}" onclick="return confirm('Are you sure you want to empty all items from your shopping cart?');">Empty Cart</a>
</div>
<div id="cartbox">
<div id="cart-top" width="100%" cellpadding="0" cellspacing="0">
Expand All @@ -52,18 +49,12 @@
{/if}
<span id="cart-total" class="carttotal">{currency_symbol}{$order->total|number_format:2}</span>
</div>
{if $coupons}
{img src="`$smarty.const.ICON_RELATIVE`/ecom/cart-coupon-btn.png"}
{/if}
<a class="checkout-now-btn" href="{link action=checkout}" title="Proceed to checkout">
<img src="{$smarty.const.URL_FULL}themes/common/skin/ecom/cart-checkout-btn.png" alt="checkout now">
</a>
</div>

{include file="show_cart_only.tpl"}

{if $items|@count gt 0}
<table width="100%" id="cart-totals" border="0" cellspacing="0" cellpadding="0">
<table width="100%" id="cart-totals" border="0" cellspacing="0" cellpadding="0" class="exp-skin-table">
<thead>
<tr>
<th colspan=3 align="left">
Expand All @@ -72,19 +63,19 @@
</tr>
</thead>
<tbody>
<tr>
<tr class="{cycle values="odd, even"}">
<td class="cart-totals-title">
{gettext str="Subtotal"}:
</td>
<td>
{currency_symbol}
</td>
<td style="text-align:right;">{$order->subtotal|number_format:2}
<td style="text-align:left;">{$order->subtotal|number_format:2}
</td>
</tr>
{if isset($discounts[0])}
{if $discounts[0]->isCartDiscount()}
<tr>
<tr class="{cycle values="odd, even"}">
<td class="cart-totals-title">
<a style="font-weight: none;" href="{link action=removeDiscountFromCart id=$discounts[0]->id}" alt="Remove discount from cart.">[remove coupon code]</a>&nbsp;(<span style="background-color:#33CC00;">{$discounts[0]->coupon_code}</span>)&nbsp;{gettext str="Total Discounts"}:
</td>
Expand All @@ -94,7 +85,7 @@
<td style="text-align:right;">-{$order->total_discounts|number_format:2}
</td>
</tr>
<tr >
<tr class="{cycle values="odd, even"}">
<td class="cart-totals-title">
{gettext str="Cart Total"}:
</td>
Expand All @@ -106,7 +97,7 @@
</tr>
{/if}
{/if}
<tr>
<tr class="{cycle values="odd, even"}">
<td width="90%" class="cart-totals-title">
{gettext str="Tax - "}
{foreach from=$order->taxzones item=zone}
Expand All @@ -118,10 +109,10 @@
<td>
{currency_symbol}
</td>
<td style="text-align:right;">{$order->tax|number_format:2}
<td style="text-align:left;">{$order->tax|number_format:2}
</td>
</tr>
<tr >
<tr class="{cycle values="odd, even"}">
<td class="cart-totals-title">
{if isset($discounts[0])}
{if $discounts[0]->isShippingDiscount()}
Expand All @@ -135,42 +126,40 @@
<td>
{currency_symbol}
</td>
<td style="text-align:right;">
<td style="text-align:left;">
{$order->shipping_total|number_format:2}
</td>
</tr>
{if $order->surcharge_total != 0}
<tr>
<tr class="{cycle values="odd, even"}">
<td class="cart-totals-title">
{gettext str="Freight Surcharge"}
</td>
<td>
{currency_symbol}
</td>
<td style="text-align:right;">{$order->surcharge_total|number_format:2}
<td style="text-align:left;">{$order->surcharge_total|number_format:2}
</td>
</tr>
{/if}
<tr>
<tr class="{cycle values="odd, even"}">
<td class="cart-totals-title">
{gettext str="Order Total"}:
</td>
<td>
{currency_symbol}
</td>
<td style="text-align:right;">{$order->grand_total|number_format:2}
<td style="text-align:left;">{$order->grand_total|number_format:2}
</td>
</tr>
<tr>
<td class="cart-totals-title" style="text-align:right;" colspan="3">
<tr class="{cycle values="odd, even"}">
<td colspan="3">
{if !$discounts}
<div class="input-code" style="text-align: right;">
<div class="input-code">
{form action="addDiscountToCart"}
<div style="vertical-align: middle; padding-top:5px; float: left;">{gettext str="Enter a Discount Code"}:</div>
<div style="float:left;">{control type="text" name="coupon_code" label=" "}</div>
<div style="float:left; right:0px">{control type="buttongroup" submit="Apply Code"}</div>
{control type="text" name="coupon_code" label="Enter a Discount Code"}
{control type="buttongroup" submit="Apply Code"}
{/form}
<div style="clear:both;"></div>
</div>
{/if}
<div style="clear:both"></div>
Expand All @@ -180,10 +169,11 @@
</table>
{/if}
</div>
<div style="padding-top: 8px;">
<a class="awesome large blue" href="{backlink}">Continue Shopping</a>
<div style="padding:8px; 0">
<a class="awesome {$smarty.const.BTN_SIZE} {$smarty.const.BTN_COLOR}" href="{backlink}">Continue Shopping</a>
{if $items|@count gt 0}
<a class="awesome large blue" style="margin-left: 18px;" href="{securelink controller=cart action=checkout}">Checkout Now</a>
<a class="awesome {$smarty.const.BTN_SIZE} {$smarty.const.BTN_COLOR}" style="margin-left: 18px;" href="{securelink controller=cart action=checkout}">Checkout Now</a>
{/if}
<a class="awesome {$smarty.const.BTN_SIZE} red" style="margin-left: 18px;" href="{link action=empty_cart}" onclick="return confirm('Are you sure you want to empty all items from your shopping cart?');">Empty Cart</a>
</div>
</div>

0 comments on commit c8dae3d

Please sign in to comment.