Inital commit
This commit is contained in:
@@ -27,15 +27,25 @@
|
||||
|
||||
{include file="misc/checkout-progress.tpl" step="invoice"}
|
||||
|
||||
{hook name="order-invoice.top"}
|
||||
|
||||
{form name="thelia.order.coupon"}
|
||||
|
||||
<form id="form-coupon" action="{url path="/order/coupon"}" method="post" {form_enctype form=$form}>
|
||||
<form id="form-coupon" action="{url path="/order/coupon"}" method="post" {form_enctype}>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
{form_hidden_fields}
|
||||
|
||||
{form_field field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/order/invoice"}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field field='error_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/order/invoice"}" />
|
||||
{/form_field}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
<table class="table table-cart">
|
||||
<table class="table table-cart table-bordered">
|
||||
<colgroup>
|
||||
<col width="150">
|
||||
<col>
|
||||
@@ -72,34 +82,46 @@
|
||||
{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}">
|
||||
<a href="{$PRODUCT_URL nofilter}">
|
||||
{assign var="product_image_url" value=null}
|
||||
{ifloop rel="pse-first-image"}
|
||||
{loop type="product-sale-elements-image" name="pse-first-image" product_sale_elements_id=$PRODUCT_SALE_ELEMENTS_ID limit="1"}
|
||||
{loop type="image" name="product-image" id=$PRODUCT_IMAGE_ID product=$PRODUCT_ID limit="1" width="118" height="85" force_return="true"}
|
||||
{assign var="product_image_url" value=$IMAGE_URL}
|
||||
{/loop}
|
||||
{/loop}
|
||||
{/ifloop}
|
||||
{elseloop rel="product-image"}
|
||||
{images file='assets/img/product/1/118x85.png'}<img itemprop="image" src="{$asset_url}" alt="Product #{$cart_count}">{/images}
|
||||
{elseloop rel="pse-first-image"}
|
||||
{loop type="image" name="product-image" product=$PRODUCT_ID limit="1" width="118" height="85" force_return="true"}
|
||||
{assign var="product_image_url" value=$IMAGE_URL}
|
||||
{/loop}
|
||||
{/elseloop}
|
||||
{if $product_image_url}
|
||||
<img itemprop="image" src="{$product_image_url nofilter}" alt="Product #{$LOOP_COUNT}">
|
||||
{else}
|
||||
<img itemprop="image" src="{image file='assets/dist/img/product/1/118x85.png'}" alt="Product #{$LOOP_COUNT}">
|
||||
{/if}
|
||||
</a>
|
||||
</td>
|
||||
<td class="product" >
|
||||
<h3 class="name">
|
||||
<a href="{$PRODUCT_URL}">{$TITLE}</a>
|
||||
<a href="{$PRODUCT_URL nofilter}">{$TITLE}</a>
|
||||
</h3>
|
||||
<div class="product-options">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{intl l="Available"} :</dt>
|
||||
<dt class="stockView">{intl l="Available"} :</dt>
|
||||
{if $STOCK > 0}
|
||||
<dd>{intl l="In Stock"}</dd>
|
||||
{else}
|
||||
<dd>{intl l="Out of Stock"}</dd>
|
||||
{/if}
|
||||
<dt>{intl l="No."}</dt>
|
||||
<dd>{$REF}</dd>
|
||||
{loop type="product_sale_elements" name="ref" id=$PRODUCT_SALE_ELEMENTS_ID}
|
||||
<dt class="refView">{intl l="No."}</dt>
|
||||
<dd>{$REF}</dd>
|
||||
{/loop}
|
||||
|
||||
{loop type="attribute_combination" name="product_options" product_sale_elements="$PRODUCT_SALE_ELEMENTS_ID"}
|
||||
<dt>{$ATTRIBUTE_TITLE}</dt>
|
||||
<dt class="attributeView">{$ATTRIBUTE_TITLE}</dt>
|
||||
<dd>{$ATTRIBUTE_AVAILABILITY_TITLE}</dd>
|
||||
{/loop}
|
||||
</dl>
|
||||
@@ -108,27 +130,29 @@
|
||||
<td class="unitprice">
|
||||
<div class="secondary-price">
|
||||
{if $IS_PROMO == 1}
|
||||
<small><span class="price">{$PROMO_PRICE} {currency attr="symbol"}</span></small>
|
||||
<small><span class="price">{format_money number=$PROMO_PRICE}</span></small>
|
||||
{else}
|
||||
<small><span class="price">{$PRICE} {currency attr="symbol"}</span></small>
|
||||
<small><span class="price">{format_money number=$PRICE}</span></small>
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
<td class="unitprice">
|
||||
{if $IS_PROMO == 1}
|
||||
{assign "real_price" $PROMO_TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{$PROMO_TAXED_PRICE} {currency attr="symbol"}</span></div>
|
||||
<small class="old-price">{intl l="instead of"} <span class="price">{$TAXED_PRICE} {currency attr="symbol"}</span></small>
|
||||
{assign "real_total_price" $TOTAL_PROMO_TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{format_money number=$PROMO_TAXED_PRICE}</span></div>
|
||||
<small class="old-price">{intl l="instead of"} <span class="price">{format_money number=$TAXED_PRICE}</span></small>
|
||||
{else}
|
||||
{assign "real_price" $TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{$TAXED_PRICE} {currency attr="symbol"}</span></div>
|
||||
{assign "real_total_price" $TOTAL_TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{format_money number=$TAXED_PRICE}</span></div>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="qty">
|
||||
<span class="price">{$QUANTITY}</span>
|
||||
</td>
|
||||
<td class="subprice">
|
||||
<span class="price">{$real_price * $QUANTITY} {currency attr="symbol"}</span>
|
||||
<span class="price">{format_money number=$real_total_price}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -139,7 +163,7 @@
|
||||
|
||||
<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">
|
||||
<table class="table table-cart table-bordered table-cart-total">
|
||||
<tfoot>
|
||||
{$discount={order attr="discount"}}
|
||||
{if $discount}
|
||||
@@ -147,7 +171,7 @@
|
||||
<th class="discount">{intl l="Discount"}</th>
|
||||
<td class="shipping">
|
||||
<div class="shipping-price">
|
||||
<span class="price">{$discount} {currency attr="symbol"}</span>
|
||||
<span class="price">{format_money number=$discount}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -155,16 +179,16 @@
|
||||
<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'}
|
||||
{form_field field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/order/invoice"}" />
|
||||
{/form_field}
|
||||
{form_field form=$form field='coupon-code'}
|
||||
{form_field 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>
|
||||
<button type="submit" class="btn btn-default">{intl l="Ok"}</button>
|
||||
</span>
|
||||
</div>
|
||||
{if $error}<span class="help-block">{$message}</span>{/if}
|
||||
@@ -173,19 +197,21 @@
|
||||
<!-- /input-group -->
|
||||
</td>
|
||||
</tr>
|
||||
{if {cart attr="is_virtual"} != 1}
|
||||
<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>
|
||||
<span class="price">{format_money number={order attr="postage"}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<th>{intl l="Total excl. taxes"}</th>
|
||||
<td>
|
||||
<div>
|
||||
<span class="price">{{cart attr="total_price"} + {order attr="postage"}} {currency attr="symbol"}</span>
|
||||
<span class="price">{format_money number={{cart attr="total_price"} + {order attr="postage"} - {order attr="postage_tax"}}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -193,7 +219,7 @@
|
||||
<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>
|
||||
<span class="price">{format_money number={{cart attr="total_taxed_price"} + {order attr="postage"}}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -201,18 +227,25 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{hook name="order-invoice.coupon-form"}
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
{form name="thelia.order.payment"}
|
||||
{assign var="isPost" value=$smarty.post|count}
|
||||
<form id="form-cart-payment" action="{url path="/order/invoice"}" method="post" {form_enctype form=$form}>
|
||||
<form id="form-cart-payment" action="{url path="/order/invoice"}" method="post" {form_enctype}>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
{form_hidden_fields}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
<div id="cart-address">
|
||||
<div class="panel">
|
||||
|
||||
<div id="cart-address" class="row">
|
||||
{ifhook rel="order-invoice.delivery-address"}
|
||||
{* delivery module can customize the delivery address *}
|
||||
{hook name="order-invoice.delivery-address" module={order attr="delivery_module"}}
|
||||
{/ifhook}
|
||||
{elsehook rel="order-invoice.delivery-address"}
|
||||
<div class="panel panel-default col-sm-6">
|
||||
{loop type="address" name="delivery-address" id={order attr="delivery_address"}}
|
||||
<div class="panel-heading">{intl l="Delivery address"}</div>
|
||||
<div class="panel-body">
|
||||
@@ -227,53 +260,58 @@
|
||||
<span class="street-address">{$ADDRESS3}</span><br>
|
||||
{/if}
|
||||
<span class="postal-code">{$ZIPCODE}</span>
|
||||
<span class="locality">{$CITY}, <span class="country-name">{loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop}</span></span>
|
||||
<span class="locality">{$CITY},
|
||||
<span class="country-name">{loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop}</span></span>
|
||||
{if $STATE}, <span class="state-name">{loop type="state" name="customer.state.info" id=$STATE}{$TITLE}{/loop}</span></span>{/if}
|
||||
</address>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
{/elsehook}
|
||||
|
||||
{form_field form=$form field='invoice-address'}
|
||||
<div class="panel">
|
||||
{form_field field='invoice-address'}
|
||||
<div class="panel panel-default col-sm-6">
|
||||
<div class="panel-heading">{intl l="Billing address"}</div>
|
||||
|
||||
{if $error}
|
||||
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||
<span class="help-block"><span class="fa fa-remove"></span> {$message}</span>
|
||||
{/if}
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
{loop type="address" name="invoice-address"}
|
||||
{assign var="isInvoiceAddressChecked" value="0"}
|
||||
{if $isPost}
|
||||
{if $value == $ID}
|
||||
{loop type="address" name="invoice-address"}
|
||||
{assign var="isInvoiceAddressChecked" value="0"}
|
||||
{if $isPost}
|
||||
{if $value == $ID && $value != ""}
|
||||
{assign var="isInvoiceAddressChecked" value="1"}
|
||||
{elseif $DEFAULT}
|
||||
{assign var="isInvoiceAddressChecked" value="1"}
|
||||
{/if}
|
||||
{elseif $DEFAULT}
|
||||
{assign var="isInvoiceAddressChecked" value="1"}
|
||||
{/if}
|
||||
{elseif $DEFAULT}
|
||||
{assign var="isInvoiceAddressChecked" value="1"}
|
||||
{/if}
|
||||
|
||||
<div class="radio">
|
||||
<label for="invoice-address_{$ID}">
|
||||
<input type="radio" name="{$name}" id="invoice-address_{$ID}" value="{$ID}"{if $isInvoiceAddressChecked} checked="checked"{/if}>
|
||||
<span class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$LASTNAME|upper} {$FIRSTNAME|ucwords}</span>
|
||||
<span class="org">{$COMPANY}</span>
|
||||
<address class="adr">
|
||||
<span class="street-address">{$ADDRESS1}</span><br>
|
||||
{if $ADDRESS2 != ""}
|
||||
<span class="street-address">{$ADDRESS2}</span><br>
|
||||
{/if}
|
||||
{if $ADDRESS3 != ""}
|
||||
<span class="street-address">{$ADDRESS3}</span><br>
|
||||
{/if}
|
||||
<span class="postal-code">{$ZIPCODE}</span>
|
||||
<span class="locality">{$CITY}, <span class="country-name">{loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop}</span></span>
|
||||
</address>
|
||||
</label>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
<a href="#" class="btn btn-change-address hidden">{intl l="Change address"}</a>
|
||||
<div class="radio">
|
||||
<label for="invoice-address_{$ID}">
|
||||
<input type="radio" name="{$name}" id="invoice-address_{$ID}" value="{$ID}"{if $isInvoiceAddressChecked} checked="checked"{/if}>
|
||||
<span class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$LASTNAME|upper} {$FIRSTNAME|ucwords}</span>
|
||||
<span class="org">{$COMPANY}</span>
|
||||
<address class="adr">
|
||||
<span class="street-address">{$ADDRESS1}</span><br>
|
||||
{if $ADDRESS2 != ""}
|
||||
<span class="street-address">{$ADDRESS2}</span><br>
|
||||
{/if}
|
||||
{if $ADDRESS3 != ""}
|
||||
<span class="street-address">{$ADDRESS3}</span><br>
|
||||
{/if}
|
||||
<span class="postal-code">{$ZIPCODE}</span>
|
||||
<span class="locality">{$CITY},
|
||||
<span class="country-name">{loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop}</span></span>
|
||||
{if $STATE}, <span class="state-name">{loop type="state" name="customer.state.info" id=$STATE}{$TITLE}{/loop}</span></span>{/if}
|
||||
</address>
|
||||
</label>
|
||||
</div>
|
||||
{/loop}
|
||||
<a href="#" class="btn btn-change-address btn-link hidden"><i class="fa fa-pencil"></i> {intl l="Change address"}</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -281,13 +319,13 @@
|
||||
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='payment-module'}
|
||||
{form_field field='payment-module'}
|
||||
|
||||
<div id="payment-method" class="panel">
|
||||
<div id="payment-method" class="panel panel-default">
|
||||
<div class="panel-heading">{intl l="Choose your payment method"}</div>
|
||||
|
||||
{if $error}
|
||||
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||
<span class="help-block"><span class="fa fa-remove"></span> {$message}</span>
|
||||
{/if}
|
||||
|
||||
<div class="panel-body">
|
||||
@@ -297,13 +335,12 @@
|
||||
<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}>
|
||||
|
||||
{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}}">
|
||||
<img src="{$IMAGE_URL nofilter}" alt="{intl l="Pay with %module_title" module_title={$TITLE}}">
|
||||
{/loop}
|
||||
|
||||
{$TITLE}
|
||||
</label>
|
||||
{hook name="order-invoice.payment-extra" module={$paymentModuleId}}
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
@@ -311,7 +348,7 @@
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field="agreed"}
|
||||
{form_field field="agreed"}
|
||||
<div class="well">
|
||||
<div class="form-group group-agreed{if $error} has-error{/if}">
|
||||
<div class="control-input">
|
||||
@@ -324,7 +361,7 @@
|
||||
{$termsAndConditionsUrl=$URL}
|
||||
{/loop}
|
||||
{/if}
|
||||
{intl l="I've read and agreed on <a href='%link' class='terms-quickview'>Terms & Conditions</a>" link="$termsAndConditionsUrl"}.
|
||||
{intl l="I've read and agreed on <a href='%link' class='terms-quickview'>Terms & Conditions</a>" link={$termsAndConditionsUrl nofilter}}.
|
||||
</label>
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
@@ -335,10 +372,13 @@
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<a href="{url path="/order/delivery"}" role="button" class="btn btn-back"><span>{intl l="Back"}</span></a>
|
||||
<button type="submit" class="btn btn-checkout-next"><span>{intl l="Order Payment"}</span></button>
|
||||
{hook name="order-invoice.payment-form"}
|
||||
|
||||
<a href="{url path="/order/delivery"}" role="button" class="btn btn-default"><i class="fa fa-chevron-left"></i> {intl l="Back"}</a>
|
||||
<button type="submit" class="btn btn-primary pull-right"><i class="fa fa-chevron-right"></i> {intl l="Next Step"}</button>
|
||||
</form>
|
||||
{/form}
|
||||
{hook name="order-invoice.bottom"}
|
||||
</article>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -370,7 +410,7 @@ jQuery(function($) {
|
||||
bootbox.hideAll();
|
||||
// Show dialog
|
||||
bootbox.dialog({
|
||||
message : $("#content-main",data),
|
||||
message : '<div class="clearfix">'+$("#content-main",data).html()+'</div>',
|
||||
onEscape: function() {
|
||||
bootbox.hideAll();
|
||||
}
|
||||
@@ -382,4 +422,14 @@ jQuery(function($) {
|
||||
|
||||
});
|
||||
</script>
|
||||
{hook name="order-invoice.javascript-initialization"}
|
||||
{/block}
|
||||
|
||||
{block name="stylesheet"}
|
||||
{hook name="order-invoice.stylesheet"}
|
||||
{/block}
|
||||
|
||||
{block name="after-javascript-include"}
|
||||
{hook name="order-invoice.after-javascript-include"}
|
||||
{/block}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user