changes on front office template UI

This commit is contained in:
Julien Chanséaume
2014-07-28 17:08:21 +02:00
committed by Julien Chanseaume
parent ca3cdb278c
commit 953a6300f9
6 changed files with 169 additions and 68 deletions

View File

@@ -8258,6 +8258,10 @@ fieldset[disabled] .checkout-progress .btn-step.active {
.table-cart tbody td.unitprice .old-price .price {
font-size: 14px;
}
.table-cart tbody td.unitprice .secondary-price .price {
font-size: 14px;
font-weight: normal;
}
.table-cart tbody td.qty .group-qty {
margin-bottom: 0;
}
@@ -8275,6 +8279,20 @@ fieldset[disabled] .checkout-progress .btn-step.active {
border-bottom-color: transparent;
border-left-color: transparent;
}
.table-cart-total td {
width: 50%;
}
.table-cart-total td.shipping .price {
color: #7a7a7a;
font-size: 19px;
}
.table-cart-total td.total .price {
font-size: 19px;
}
.table-cart-total td.empty {
border-bottom-color: transparent;
border-left-color: transparent;
}
.cart-warning {
clear: both;
padding: 15px;

View File

@@ -47,6 +47,12 @@
font-size: @font-size-base;
}
}
.secondary-price {
.price {
font-size: @font-size-base;
font-weight: normal;
}
}
}
&.qty {
.group-qty {
@@ -82,6 +88,21 @@
}
}
.table-cart-total{
td {
width: 50%;
&.coupon {}
&.total {
.price {
font-size: ceil(@font-size-base * 1.3);
}
}
&.empty {
border-bottom-color: transparent; border-left-color: transparent;
}
}
}
// Message if no product in the cart
.cart-warning {
clear: both;

View File

@@ -16,7 +16,7 @@
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
{nocache}
{ifloop rel="cartloop"}
{include file="misc/checkout-progress.tpl" step="cart"}
@@ -182,7 +182,7 @@
<strong>{intl l="Warning"}!</strong> {intl l="You have no items in your shopping cart."}
</div>
{/elseloop}
{/nocache}
</article>
{ifloop rel="product_upsell"}

View File

@@ -181,6 +181,7 @@ GNU General Public License : http://www.gnu.org/licenses/
</form>
</div>
{if {count type="lang" exclude="{lang attr='id'}"} != 0 }
<div class="language-switch" aria-labelledby="language-label" role="form">
<span id="language-label" class="dropdown-label">{intl l="Language:"}</span>
<a class="current dropdown-toggle" data-toggle="dropdown" href="{url path="/language"}">{lang attr="title"}</a>
@@ -190,7 +191,9 @@ GNU General Public License : http://www.gnu.org/licenses/
{/loop}
</ul>
</div>
{/if}
{if {count type="currency" exclude="{currency attr='id'}"} != 0 }
<div class="currency-switch" aria-labelledby="currency-label" role="form">
<span id="currency-label" class="dropdown-label">{intl l="Currency:"}</span>
<a class="current dropdown-toggle" data-toggle="dropdown" href="{url path="/currency"}">{currency attr="code"}</a>
@@ -200,6 +203,7 @@ GNU General Public License : http://www.gnu.org/licenses/
{/loop}
</ul>
</div>
{/if}
</div>
</div>

View File

@@ -53,6 +53,10 @@
<span class="hidden-xs">{intl l="Unit Price"}</span>
<span class="visible-xs">{intl l="Price"}</span>
</th>
<th class="unitprice">
<span class="hidden-xs">{intl l="Unit Taxed Price"}</span>
<span class="visible-xs">{intl l="Taxed Price"}</span>
</th>
<th class="qty">
<span class="hidden-xs">{intl l="Quantity"}</span>
<span class="visible-xs">{intl l="Qty"}</span>
@@ -68,8 +72,8 @@
{loop type="cart" name="cartloop"}
<tr>
<td class="image">
{assign "cart_count" $LOOP_COUNT}
<a href="{$PRODUCT_URL}">
{ifloop rel='product-image'}
{loop type="image" name="product-image" product=$PRODUCT_ID limit="1" width="118" height="85" force_return="true"}
<img src="{$IMAGE_URL}" alt="Product #{$cart_count}">
@@ -78,10 +82,11 @@
{elseloop rel="product-image"}
{images file='assets/img/product/1/118x85.png'}<img itemprop="image" src="{$asset_url}" alt="Product #{$cart_count}">{/images}
{/elseloop}
</a>
</td>
<td class="product" >
<h3 class="name">
{$TITLE}
<a href="{$PRODUCT_URL}">{$TITLE}</a>
</h3>
<div class="product-options">
<dl class="dl-horizontal">
@@ -100,6 +105,15 @@
</dl>
</div>
</td>
<td class="unitprice">
<div class="secondary-price">
{if $IS_PROMO == 1}
<small><span class="price">{$PROMO_PRICE} {currency attr="symbol"}</span></small>
{else}
<small><span class="price">{$PRICE} {currency attr="symbol"}</span></small>
{/if}
</div>
</td>
<td class="unitprice">
{if $IS_PROMO == 1}
{assign "real_price" $PROMO_TAXED_PRICE}
@@ -107,7 +121,7 @@
<small class="old-price">{intl l="instead of"} <span class="price">{$TAXED_PRICE} {currency attr="symbol"}</span></small>
{else}
{assign "real_price" $TAXED_PRICE}
<div class="special-price"><span class="price">{$TAXED_PRICE} {currency attr="symbol"} </span></div>
<div class="special-price"><span class="price">{$TAXED_PRICE} {currency attr="symbol"}</span></div>
{/if}
</td>
<td class="qty">
@@ -121,56 +135,72 @@
{/loop}
</tbody>
<tfoot>
<tr >
<td rowspan="4" colspan="3" class="empty">&nbsp;</td>
<th class="shipping">{intl l="Discount"}</th>
<td class="shipping">
<div class="shipping-price">
<span class="price">{order attr="discount"} {currency attr="symbol"}</span>
</div>
</td>
</tr>
<tr >
<th class="shipping">{intl l="Shipping Tax"}</th>
<td class="shipping">
<div class="shipping-price">
<span class="price">{order attr="postage"} {currency attr="symbol"}</span>
</div>
</td>
</tr>
<tr >
<th class="coupon"><label for="coupon">{intl l="You may have a coupon ?"}</label></th>
<td class="coupon">
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/order/invoice"}" />
{/form_field}
{form_field form=$form field='coupon-code'}
<div class="{if $error}has-error{/if}">
<div class="input-group">
<label class="control-label sr-only" for="code">{intl l='Code :'}</label>
<input id="coupon" class="form-control" type="text" name="{$name}" value="{$value}" placeholder="{intl l='Coupon code'}" required>
<span class="input-group-btn">
<button type="submit" class="btn btn-coupon">{intl l="Ok"}</button>
</span>
</div>
{if $error}<span class="help-block">{$message}</span>{/if}
</div>
{/form_field}
<!-- /input-group -->
</td>
</tr>
<tr >
<th class="total">{intl l="Total"}</th>
<td class="total">
<div class="total-price">
<span class="price">{{cart attr="total_taxed_price"} + {order attr="postage"}} {currency attr="symbol"}</span>
</div>
</td>
</tr>
</tfoot>
</table>
<div class="row">
<div class="col-md-6 col-md-offset-6 col-sm-9 col-sm-offset-3 col-xs-12">
<table class="table table-cart table-cart-total">
<tfoot>
{$discount={order attr="discount"}}
{if $discount}
<tr>
<th class="discount">{intl l="Discount"}</th>
<td class="shipping">
<div class="shipping-price">
<span class="price">{$discount} {currency attr="symbol"}</span>
</div>
</td>
</tr>
{/if}
<tr>
<th class="coupon"><label for="coupon">{intl l="You may have a coupon ?"}</label></th>
<td class="coupon">
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/order/invoice"}" />
{/form_field}
{form_field form=$form field='coupon-code'}
<div class="{if $error}has-error{/if}">
<div class="input-group">
<label class="control-label sr-only" for="code">{intl l='Code :'}</label>
<input id="coupon" class="form-control" type="text" name="{$name}" value="{$value}" placeholder="{intl l='Coupon code'}" required>
<span class="input-group-btn">
<button type="submit" class="btn btn-coupon">{intl l="Ok"}</button>
</span>
</div>
{if $error}<span class="help-block">{$message}</span>{/if}
</div>
{/form_field}
<!-- /input-group -->
</td>
</tr>
<tr>
<th class="shipping">{intl l="Shipping Tax"}</th>
<td class="shipping">
<div class="shipping-price">
<span class="price">{order attr="postage"} {currency attr="symbol"}</span>
</div>
</td>
</tr>
<tr>
<th>{intl l="Total excl. taxes"}</th>
<td>
<div>
<span class="price">{{cart attr="total_price"} + {order attr="postage"}} {currency attr="symbol"}</span>
</div>
</td>
</tr>
<tr>
<th class="total">{intl l="Total incl. taxes"}</th>
<td class="total">
<div class="total-price">
<span class="price">{{cart attr="total_taxed_price"} + {order attr="postage"}} {currency attr="symbol"}</span>
</div>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</form>
{/form}
@@ -244,7 +274,6 @@
{/loop}
<a href="#" class="btn btn-change-address hidden">{intl l="Change address"}</a>
</div>
</div>
@@ -266,15 +295,15 @@
{loop type="payment" name="payments" force_return="true"}
{assign "paymentModuleId" $ID}
<li class="list-group-item text-left">
<label for="payment_{$paymentModuleId}">
<input type="radio" name="{$name}" id="payment_{$paymentModuleId}" value="{$paymentModuleId}" {if $LOOP_TOTAL ==1 && $LOOP_COUNT == 1}checked{/if}>
<label for="payment_{$paymentModuleId}">
<input type="radio" name="{$name}" id="payment_{$paymentModuleId}" value="{$paymentModuleId}" {if $LOOP_TOTAL ==1 && $LOOP_COUNT == 1}checked{/if}>
{loop type="image" name="paymentspicture" source="module" source_id=$ID force_return="true" width="100" height="72"}
<img src="{$IMAGE_URL}" alt="{intl l="Pay with %module_title" module_title={$TITLE}}">
{/loop}
{loop type="image" name="paymentspicture" source="module" source_id=$ID force_return="true" width="100" height="72"}
<img src="{$IMAGE_URL}" alt="{intl l="Pay with %module_title" module_title={$TITLE}}">
{/loop}
{$TITLE}
</label>
{$TITLE}
</label>
</li>
{/loop}
</ul>

View File

@@ -67,7 +67,10 @@
</tbody>
</table>
</page_footer>
{loop name="order.invoice" type="order" id=$order_id customer="*"}
{$taxes = []}
{loop name="order.invoice" type="order" id=$order_id customer="*"}
{loop name="currency.order" type="currency" id=$CURRENCY}
{assign "orderCurrency" $SYMBOL}
{/loop}
@@ -153,13 +156,18 @@
{assign "realTax" $PRICE_TAX}
{assign "realTaxedPrice" $TAXED_PRICE}
{/if}
{$taxes[{$TAX_RULE_TITLE}][] = $realTax * $QUANTITY}
<tr class="table-2">
<td><p>{$TITLE}</p>
{ifloop rel="combinations"}
{loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
<td>
<p>{$TITLE}</p>
{ifloop rel="combinations"}
{loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
{$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE}<br>
{/loop}
{/ifloop}
{/loop}
{/ifloop}
[[ {$TAX_RULE_TITLE} = {$realTax * $QUANTITY} ]]
</td>
<td><p>{$orderCurrency} {$realPrice}</p></td>
<td><p>{$orderCurrency} {$realTax}</p></td>
@@ -200,5 +208,26 @@
<td class="table-3-1" style="background:#f6993c;"><h3 style="color:white;">{$orderCurrency} {$TOTAL_TAXED_AMOUNT}</h3></td>
</tr>
</table>
<table class="table-3" cellspacing="0" cellpadding="0" tyle="padding-top: 5mm;">
<col style="width: 60%; padding: 1mm;" />
<col style="width: 40%; padding: 1mm;" />
{foreach $taxes as $name=>$prices}
{assign var="_price_taxe_" value="0"}
{foreach $prices as $price}
{$_price_taxe_= $_price_taxe_ + $price}
{/foreach}
{if $_price_taxe_ != 0}
<tr>
<td>
{$name}
</td>
<td>
{format_number number={$_price_taxe_}} {$orderCurrency}
</td>
</tr>
{/if}
{/foreach}
</table>
{/loop}
</page>