Merge Master

This commit is contained in:
touffies
2013-10-07 11:50:20 +02:00
69 changed files with 1560 additions and 11105 deletions

View File

@@ -118,11 +118,11 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{intl l="Orders"} <span class="caret"></span></a>
<ul class="dropdown-menu config_menu" role="menu">
<ul class="dropdown-menu" role="menu">
<li role="menuitem">
<a data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
{intl l="All orders"}
<a class="clearfix" data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
<span class="pull-left">{intl l="All orders"}</span>
<span class="label label-default pull-right">{count type="order" customer="*" backend_context="1"}</span>
</a>
</li>
@@ -130,8 +130,8 @@
{loop name="order-status-list" type="order-status"}
{assign "orderStatusLabel" "order_$CODE"}
<li role="menuitem">
<a data-target="{url path='admin/orders/$LABEL'}" href="{url path="admin/orders" status=$ID}">
{$TITLE}
<a class="clearfix" data-target="{url path='admin/orders/$LABEL'}" href="{url path="admin/orders" status=$ID}">
<span class="pull-left">{$TITLE}</span>
<span class="label label-{#$orderStatusLabel#} pull-right">{count type="order" customer="*" backend_context="1" status=$ID}</span>
</a>
</li>

View File

@@ -0,0 +1,111 @@
{* Update an Address *}
{form name="thelia.address.update"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "edit_address_dialog"}
{form_hidden_fields form=$form}
{form_field form=$form field='label'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label} }" placeholder="{intl l='Label'}">
</div>
{/form_field}
{form_field form=$form field='company'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Company'}">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="title" name="title1"}
<option value="{$ID}" {if $value == $ID}selected{/if}>{$LONG}</option>
{/loop}
</select>
</div>
{/form_field}
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Firstname'}">
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Lastname'}">
</div>
{/form_field}
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Address'}">
</div>
<div class="form-group">
{form_field form=$form field='address2'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
<div class="form-group">
{form_field form=$form field='address3'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
{/form_field}
{form_field form=$form field='zipcode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Zip code'}">
</div>
{/form_field}
{form_field form=$form field='city'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='City'}">
</div>
{/form_field}
{form_field form=$form field='country'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="country" name="country1"}
<option value="{$ID}" {if $value == $ID}selected{/if}>{$TITLE}</option>
{/loop}
</select>
</div>
{/form_field}
{/capture}
{include
file = "includes/generic-create-dialog.html"
dialog_id = "edit_address_dialog"
dialog_title = {intl l="Edit an address"}
dialog_body = {$smarty.capture.edit_address_dialog nofilter}
dialog_ok_label = {intl l="Edit this address"}
dialog_cancel_label = {intl l="Cancel"}
form_action = {url path="/admin/address/save/{$address_id}"}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}

View File

@@ -9,6 +9,14 @@
// Base class and wrapper
.navbar {
margin-bottom: 0;
.dropdown-menu {
> li {
> a > .label {
font-size: 15px;
}
}
}
}
// Inner for background effects

View File

@@ -295,6 +295,13 @@
width: auto;
}
.modal-backdrop .loading {
left: 50%;
top: 50%;
right: auto;
position: absolute;
}
.existing-image .col-sm-6{
position: relative;

View File

@@ -44,7 +44,7 @@
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="true"}
<div class="col-md-6">
<p class="title title-without-tabs">{intl l="Customer informations"}</p>
@@ -74,7 +74,7 @@
</div>
{/form_field}
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="true"}
<p class="title title-without-tabs">{intl l="Default address"}</p>
@@ -171,15 +171,15 @@
<td>
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Edit this address'}" href="#edit_address_dialog" data-toggle="modal">
<a class="btn btn-default btn-xs customer-update-address" title="{intl l='Edit this address'}" href="#" data-id="{$ID}">
<span class="glyphicon glyphicon-edit"></span>
</a>
<a class="btn btn-default btn-xs" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-toggle="modal" rel="tooltip">
<a class="btn btn-default btn-xs customer-address-use" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-id="{$ID}" data-toggle="modal" rel="tooltip">
<span class="glyphicon glyphicon-pushpin"></span>
</a>
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
<a class="btn btn-default btn-xs customer-address-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
@@ -218,7 +218,7 @@
</div>
</div>
<div id="address-update-modal"></div>
{* Add an Address *}
{form name="thelia.address.create"}
@@ -227,7 +227,10 @@
{capture "address_creation_dialog"}
{form_hidden_fields form=$form}
<input type="hidden" name="customer_id" value="{$customer_id}">
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/admin/customer/update/{$customer_id}"}" />
{/form_field}
{form_field form=$form field='label'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
@@ -246,7 +249,7 @@
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
{loop type="title" name="title1"}
<option value="{$ID}">{$LONG}</option>
{/loop}
@@ -257,21 +260,21 @@
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}" required>
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}" required>
</div>
{/form_field}
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}" required>
</div>
<div class="form-group">
@@ -290,21 +293,21 @@
{form_field form=$form field='zipcode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}" required>
</div>
{/form_field}
{form_field form=$form field='city'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}" required>
</div>
{/form_field}
{form_field form=$form field='country'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
{loop type="country" name="country1"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
@@ -331,117 +334,7 @@
{/form}
{* Update an Address *}
{form name="thelia.address.update"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "edit_address_dialog"}
{form_hidden_fields form=$form}
{form_field form=$form field='label'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Label'}">
</div>
{/form_field}
{form_field form=$form field='company'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Company'}">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="title" name="title1"}
<option value="{$ID}">{$LONG}</option>
{/loop}
</select>
</div>
{/form_field}
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
</div>
{/form_field}
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
</div>
<div class="form-group">
{form_field form=$form field='address2'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
<div class="form-group">
{form_field form=$form field='address3'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
{/form_field}
{form_field form=$form field='zipcode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
</div>
{/form_field}
{form_field form=$form field='city'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
</div>
{/form_field}
{form_field form=$form field='country'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="country" name="country1"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
</select>
</div>
{/form_field}
{/capture}
{include
file = "includes/generic-create-dialog.html"
dialog_id = "edit_address_dialog"
dialog_title = {intl l="Edit an address"}
dialog_body = {$smarty.capture.edit_address_dialog nofilter}
dialog_ok_label = {intl l="Edit this address"}
dialog_cancel_label = {intl l="Cancel"}
form_action = {url path='/admin/address/update'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}
{* Default confirmation dialog *}
@@ -475,7 +368,7 @@
dialog_message = {intl l="Do you really want to delete this address ?"}
form_action = {url path='/admin/address/delete'}
form_content = {$smarty.capture.delete_dialog nofilter}
form_content = {$smarty.capture.delete_address_dialog nofilter}
}
{/block}
@@ -483,4 +376,35 @@
{javascripts file='assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}
<script>
(function($) {
$(document).ready(function(){
$("a.customer-address-delete").click(function(e){
$("#address_delete_id").val($(this).data("id"));
});
$("a.customer-address-use").click(function(e){
$("#address_use_id").val($(this).data("id"));
});
$("a.customer-update-address").click(function(e){
var baseUrl = "{url path="/admin/address/update/"}";
$('body').append('<div class="modal-backdrop fade in" id="loading-event"><div class="loading"></div></div>');
$.ajax({
method: 'get',
url: baseUrl+$(this).data('id')
}).done(function(data){
$("#loading-event").remove();
$("#address-update-modal").html(data);
$("#edit_address_dialog").modal("show");
});
});
$(document).on("hidden.bs.modal", "#edit_address_dialog", function(ev){
$("#edit_address_dialog").remove();
});
});
})(jQuery);
</script>
{/block}

View File

@@ -193,7 +193,7 @@
<caption class="clearfix">
{intl l='Invoice informations'}
<div class="pull-right">
<a class="btn btn-default btn-primary" title="{intl l='Download invoice as PDF'}" href="#">
<a class="btn btn-default btn-primary" title="{intl l='Download invoice as PDF'}" href="{url path="/admin/order/pdf/invoice/$ID"}">
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='PDF | Invoice'}
</a>
<a class="btn btn-default btn-primary js-update-order-address" data-address-id="{$INVOICE_ADDRESS}" title="{intl l='Edit invoice address'}" href="#edit_order_address_dialog" data-toggle="modal">
@@ -268,7 +268,7 @@
<caption class="clearfix">
{intl l='Delivery address'}
<div class="pull-right">
<a class="btn btn-default btn-primary" title="{intl l='Download purchase order as PDF'}" href="#">
<a class="btn btn-default btn-primary" title="{intl l='Download purchase order as PDF'}" href="{url path="/admin/order/pdf/delivery/$ID"}">
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='PDF | Purchase order'}
</a>
<a class="btn btn-default btn-primary js-update-order-address" data-address-id="{$DELIVERY_ADDRESS}" title="{intl l='Edit delivery address'}" href="#edit_order_address_dialog" data-toggle="modal">

View File

@@ -1,3 +0,0 @@
<h1>PAGE NOT FOUND</h1>
<a href="{navigate to="index"}">Back Home</a>

View File

@@ -1,99 +0,0 @@
{check_auth context="front" roles="CUSTOMER" login_tpl="login"}
{include file="includes/header.html"}
{$page_title="{intl l='My Account'}"}
{form name="thelia.address.create"}
{if $form_error}<div class="alert alert-block alert-error">{$form_error_message}</div>{/if}
{* We use {navigate to="index"} as form action to avoid mixing post and get data *}
<form action="{url path="/address/create" }" method="post" {form_enctype form=$form}>
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{viewurl view="address_list"}" />
{/form_field}
{form_hidden_fields form=$form}
{form_field form=$form field="label"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="title"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<select name="{$name}">
{loop type="title" name="title1"}
<option value="{$ID}">{$LONG}</option>
{/loop}
</select>
<br />
{/form_field}
{form_field form=$form field="firstname"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="lastname"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="address1"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="zipcode"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="city"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="country"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<select name="{$name}">
{loop type="country" name="country1"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
</select>
<br />
{/form_field}
{form_field form=$form field="phone"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
<input type="submit" value="submit">
</form>
{/form}
{include file="includes/footer.html"}

View File

@@ -1,100 +0,0 @@
{check_auth context="front" roles="CUSTOMER" login_tpl="login"}
{include file="includes/header.html"}
{$page_title="{intl l='My Account'}"}
{form name="thelia.address.update"}
{if $form_error}<div class="alert alert-block alert-error">{$form_error_message}</div>{/if}
{* We use {navigate to="index"} as form action to avoid mixing post and get data *}
<form action="{url path="/address/update" }" method="post" {form_enctype form=$form}>
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{viewurl view="address_list"}" />
{/form_field}
<input type="hidden" name="address_id" value="5" />
{form_hidden_fields form=$form}
{form_field form=$form field="label"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="title"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<select name="{$name}">
{loop type="title" name="title1"}
<option value="{$ID}">{$LONG}</option>
{/loop}
</select>
<br />
{/form_field}
{form_field form=$form field="firstname"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="lastname"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="address1"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="zipcode"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="city"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
{form_field form=$form field="country"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<select name="{$name}">
{loop type="country" name="country1"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
</select>
<br />
{/form_field}
{form_field form=$form field="phone"}
{if $error}{$message}{/if}
<label> <span>{intl l="{$label}"} : </span></label>
<input type="text" name="{$name}" value="{$value}" {$attr}>
<br />
{/form_field}
<input type="submit" value="submit">
</form>
{/form}
{include file="includes/footer.html"}

View File

@@ -1,11 +0,0 @@
{check_auth context="front" roles="CUSTOMER" login_tpl="login"}
{include file="includes/header.html"}
{$page_title="{intl l='My Account'}"}
<ul>
{loop type="address" name="customer_list" customer="current"}
<li>{$LABEL} - {$FIRSTNAME} {$LASTNAME} - <a href="{url path="/address/edit/{$ID}"}">edit</a></li>
{/loop}
</ul>
{include file="includes/footer.html"}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -1,9 +0,0 @@
body {
font-size: 12px;
font-family: Arial, helvetica, sans serif;
background-image: url("../img/test-background.jpg");
}
div {
margin: 10px 0;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

File diff suppressed because one or more lines are too long

View File

@@ -1,50 +0,0 @@
{include file="includes/header.html"}
<h1>{intl l='cart'}</h1>
<ul>
{loop name="cart" type="cart"}
<li>Item {$LOOP_COUNT}/{$LOOP_TOTAL} : {$ITEM_ID} {$TITLE} - quantity : {$QUANTITY}</li>
{/loop}
</ul>
{form name="thelia.cart.add" }
{* We use {navigate to="index"} as form action to avoid mixing post and get data *}
<form action="{url path="/cart/add" }" method="post" {form_enctype form=$form}>
{*
The form error status and the form error messages are defined in Customer action,
and passed back to the form plugin through the ParserContext.
*}
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
{form_hidden_fields form=$form}
{form_field form=$form field="product"}
{form_error form=$form field="product"}
{$message}
{/form_error}
<label for="{$label_attr.for}">{intl l="{$label}"}: </label><input id="{$label_attr.for}" type="text" name="{$name}" value="{$value}" {$attr} ><br />
{/form_field}
{form_field form=$form field='product_sale_elements_id'}
{form_error form=$form field="product_sale_elements_id"}
{$message}
{/form_error}
<label>{intl l="product_sale_elements_id"}: </label><input type="text" name="{$name}" value="{$value}" {$attr}> <br />
{/form_field}
{form_field form=$form field='quantity'}
{form_error form=$form field="quantity"}
{$message}
{/form_error}
<label>{intl l="quantity"}: </label><input type="text" name="{$name}" value="{$value}" {$attr}> <br />
{/form_field}
<button type="submit">{intl l='Login'}</button>
</form>
{/form}
{include file='includes/footer.html'}

View File

@@ -1,145 +0,0 @@
<h1>Category page</h1>
<div style="border: solid 8px; margin: 0px; padding: 0px; width: 45%; float: left">
<h2>CATALOG</h2>
{loop name="category0" type="category" parent="0" order="manual"}
<div style="border: solid 4px blue; padding: 20px; margin: 10px;">
<h2>CATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h2>
{ifloop rel="prod_ass_cont"}
<h5>Associated Content</h5>
<ul>
{loop name="prod_ass_cont" type="associated_content" category="$ID" order="associated_content"}
<li>{$TITLE}</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="prod_ass_cont"}
<h5>No associated content</h5>
{/elseloop}
{loop name="product" type="product" category="$ID"}
<div style="border: dashed 2px red; padding: 20px; margin: 10px;">
<h3><a href="{$URL}">PRODUCT {$ID} : {$REF} ({$LOOP_COUNT} / {$LOOP_TOTA}L)</a></h3>
<h4>{$TITLE}</h4>
<p>{$DESCRIPTION}</p>
<p>Starting by {$BEST_PRICE} € HT (TAX : {$BEST_PRICE_TAX} ; {$BEST_TAXED_PRICE} € TTC)</p>
{ifloop rel="ft"}
<h5>Features</h5>
<ul>
{assign var=current_product value=$ID}
{loop name="ft" type="feature" order="manual" product="$ID"}
<li>
<strong>{$TITLE}</strong> :
{loop name="ft_v" type="feature_value" product="{$current_product}" feature="{$ID}"}
{$TITLE} / {$PERSONAL_VALUE}
{/loop}
</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="ft"}
<h5>No feature</h5>
{/elseloop}
</div>
{/loop}
{loop name="catgory1" type="category" parent="$ID"}
<div style="border: double 4px lightseagreen; padding: 20px; margin: 10px;">
<h3>SUBCATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h3>
{ifloop rel="prod_ass_cont"}
<h5>Associated Content</h5>
<ul>
{loop name="prod_ass_cont" type="associated_content" category="$ID" order="associated_content"}
<li>{$TITLE}</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="prod_ass_cont"}
<h5>No associated content</h5>
{/elseloop}
{loop name="product" type="product" category="$ID"}
<div style="border: solid 1px green; padding: 20px; margin: 10px;">
<h3><a href="{$URL}">PRODUCT {$ID} : {$REF} ({$LOOP_COUNT} / {$LOOP_TOTAL})</a></h3>
<h4>{$TITLE}</h4>
<p>{$DESCRIPTION}</p>
{ifloop rel="ft"}
<h5>Features</h5>
<ul>
{assign var=current_product value=$ID}
{loop name="ft" type="feature" order="manual" product="$ID"}
<li>
<strong>{$TITLE}</strong> :
{loop name="ft_v" type="feature_value" product="{$current_product}" feature="$ID"}
{$TITLE} / {$PERSONAL_VALUE}
{/loop}
</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="ft"}
<h5>No feature</h5>
{/elseloop}
</div>
{/loop}
</div>
{/loop}
</div>
{/loop}
</div>
<div style="border: solid 8px; margin: 0px; padding: 0px; width: 45%; float: left">
<h2>ALL FEATURES AND THEIR AVAILABILITY</h2>
<ul>
{loop name="ft" type="feature" order="manual"}
<li>
{$TITLE}
<ul>
{loop name="ftav" type="feature_availability" order="manual" feature="$ID"}
<li>{$TITLE}</li>
{/loop}
</ul>
</li>
{/loop}
</ul>
<hr />
<h2>ALL ATTRIBUTES AND THEIR AVAILABILITY</h2>
<ul>
{loop name="attr" type="attribute" order="manual"}
<li>
{$TITLE}
<ul>
{loop name="attrav" type="attribute_availability" order="manual" attribute="$ID"}
<li>{$TITLE}</li>
{/loop}
</ul>
</li>
{/loop}
</ul>
<hr />
<h2>CURRENCIES</h2>
<ul>
{loop name="cur" type="currency"}
<li>
{$NAME} ({$SYMBOL})
</li>
{/loop}
</ul>
</div>

View File

@@ -1,165 +0,0 @@
{include file="includes/header.html"}
{form name="thelia.customer.creation"}
{* We use {navigate to="index"} as form action to avoid mixing post and get data *}
<form action="{url path="/customer/create" }" method="post" {form_enctype form=$form}>
{*
The two fields below are not par of the form, they are here to defines
the action to process, and the view to render once the form is submited
*}
{*
This field is common to all BaseForm instances (thus, this one), and defines
the URL the customer is redirected to once the form has been successfully
processed
*}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{navigate to="return_to"}" /> {* the url the user is redirected to on login success *}
{/form_field}
{form_field form=$form field='auto_login'}
<input type="hidden" name="{$name}" value="1" /> {* the customer will be loogged-in automatically *}
{/form_field}
{*
The form error status and the form error messages are defined in Customer action,
and passed back to the form plugin through the ParserContext.
*}
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
{form_hidden_fields form=$form}
{form_field form=$form field="title"}
{form_error form=$form field="title"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label>
<select name="{$name}">
<option value="1">M.</option>
<option value="2">Mme.</option>
</select>
<br />
{/form_field}
{form_field form=$form field="firstname"}
{form_error form=$form field="firstname"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
{/form_field}
{form_field form=$form field="lastname"}
{form_error form=$form field="lastname"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
{/form_field}
{form_field form=$form field="address1"}
{form_error form=$form field="address1"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
{/form_field}
{form_field form=$form field="address2"}
{form_error form=$form field="address2"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
{/form_field}
{form_field form=$form field="address3"}
{form_error form=$form field="address3"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
{/form_field}
{form_field form=$form field="zipcode"}
{form_error form=$form field="zipcode"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
{/form_field}
{form_field form=$form field="city"}
{form_error form=$form field="city"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
{/form_field}
{form_field form=$form field="country"}
{form_error form=$form field="country"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label>
<select name="{$name}">
<option value="1">France</option>
<option value="2">Belgium</option>
</select>
<br />
{/form_field}
{form_field form=$form field="phone"}
{form_error form=$form field="phone"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr}> <br />
{/form_field}
{form_field form=$form field="cellphone"}
{form_error form=$form field="cellphone"}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr}> <br />
{/form_field}
{form_field form=$form field="email"}
{form_error form=$form field="email"}
{$message}
{/form_error}
<label><span>{intl l="{$label}"}</span></label><input type="email" name="{$name}" value="{$value}" {$attr} ><br />
{/form_field}
{form_field form=$form field="email_confirm"}
{form_error form=$form field="email_confirm"}
{$message}
{/form_error}
<label><span>{intl l="{$label}"}</span></label><input type="email" name="{$name}" {$attr} ><br />
{/form_field}
{form_field form=$form field="password"}
{form_error form=$form field="password"}
{$message}
{/form_error}
<label><span>{intl l="{$label}"}</span></label><input type="password" name="{$name}" {$attr} ><br />
{/form_field}
{form_field form=$form field="password_confirm"}
{form_error form=$form field="password_confirm"}
{$message}
{/form_error}
<label><span>{intl l="{$label}"}</span></label><input type="password" name="{$name}" {$attr} ><br />
{/form_field}
<input type="submit" value="valider">
</form>
{/form}
{include file="includes/footer.html"}

View File

@@ -1,125 +0,0 @@
<h1>CUSTOMER</h1>
<h2>Information</h2>
{loop name="customer" type="customer"}
<table border="1" cellspacing="0" cellpadding="5">
<tr>
<td>ID</td>
<td>{$ID}</td>
</tr>
<tr>
<td>Réference</td>
<td>{$REF}</td>
</tr>
<tr>
<td>Title</td>
<td>
{loop name="title" type="title" id="$TITLE"}
{$LONG} ({$SHORT})
{/loop}
</td>
</tr>
<tr>
<td>Firstname</td>
<td>{$FIRSTNAME}</td>
</tr>
<tr>
<td>Lastname</td>
<td>{$LASTNAME}</td>
</tr>
<tr>
<td>Email</td>
<td>{$EMAIL}</td>
</tr>
<tr>
<td>Is reseller</td>
<td>{$RESELLER}</td>
</tr>
<tr>
<td>Sponsor</td>
<td>{$SPONSOR}</td>
</tr>
<tr>
<td>Discount</td>
<td>{$DISCOUNT} %</td>
</tr>
</table>
{/loop}
<h2>Addresses</h2>
{loop name="addresses" type="address"}
<table border="1" cellspacing="0" cellpadding="5">
<tr>
<td>ID</td>
<td>{$ID}</td>
</tr>
<tr>
<td>Name</td>
<td>{$NAME}</td>
</tr>
<tr>
<td>Title</td>
<td>
<ul>
{assign var=current_title value=$TITLE}
{loop name="title" type="title"}
<li {if $current_title==$ID}style="background-color: yellow"{/if}>
{$LONG} ({$SHORT})
</li>
{/loop}
</ul>
</td>
</tr>
<tr>
<td>Company</td>
<td>{$COMPANY}</td>
</tr>
<tr>
<td>Firstname</td>
<td>{$FIRSTNAME}</td>
</tr>
<tr>
<td>Lastname</td>
<td>{$LASTNAME}</td>
</tr>
<tr>
<td>Address</td>
<td>{$ADDRESS1}<br/>{$ADDRESS2}<br/>{$ADDRESS3}</td>
</tr>
<tr>
<td>Zipcode</td>
<td>{$ZIPCODE}</td>
</tr>
<tr>
<td>City</td>
<td>{$CITY}</td>
</tr>
<tr>
<td>Country</td>
<td>
<select>
{assign var=current_country value=$COUNTRY}
{loop name="country" type="country"}
<option {if $current_country==$ID}selected="selected"{/if}>
{$TITLE} ({$ID} - {$ISOCODE} - {$ISOALPHA2} - {$ISOALPHA3})
</option>
{/loop}
</select>
</td>
</tr>
<tr>
<td>Phone</td>
<td>{$PHONE}</td>
</tr>
<tr>
<td>Cellphone</td>
<td>{$CELLPHONE}</td>
</tr>
</table>
{/loop}

View File

@@ -1,8 +0,0 @@
<h1>Category page</h1>
{loop type="category" name="categoryloop" id="500"}
TOTO
{/loop}
{pageloop rel="categoryloop"}
{/pageloop}

View File

@@ -1,15 +0,0 @@
{include file="includes/header.html"}
<ul>
{loop type="delivery" name="delivery.list"}
<li>
<ul>
<li>id : {$ID}</li>
<li>prix : {$PRICE}</li>
<li>Choisir : <a href="{url path="/delivery/choose/{$ID}"}">Choisir</a></li>
</ul>
</li>
{/loop}
</ul>
{include file="includes/footer.html"}

View File

@@ -1,16 +0,0 @@
{loop name="folder0" type="folder" parent="0" order="alpha_reverse"}
<div style="border: solid 4px blue; padding: 20px; margin: 10px;">
<h2>FOLDER : {$TITLE}</h2>
{loop name="folder1" type="folder" parent="$ID"}
<div style="border: double 4px lightseagreen; padding: 20px; margin: 10px;">
<h3>SUBFOLDER : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h3>
{loop name="content" type="content" folder="$ID"}
<div style="border: solid 1px green; padding: 20px; margin: 10px;">
<h3>CONTENT : {$TITLE}</h3>
<p>{$DESCRIPTION}</p>
</div>
{/loop}
</div>
{/loop}
</div>
{/loop}

View File

@@ -1 +0,0 @@
<?php

View File

@@ -1,104 +0,0 @@
{include file="includes/header.html"}
<div>
<h2>Category Images</h2>
<ul>
{loop type="category" name="jsvdfk"}
<li><p>Category id {$ID}: {$TITLE}</p>
<ul>
<li>
{loop type="image" name="image_test" category="$ID" width="200" height="100" resize_mode="borders"}
<p>Processed file URL: {$IMAGE_URL}</p>
<p>Original file URL: {$ORIGINAL_IMAGE_URL}</p>
<img src="{$IMAGE_URL}" />
{/loop}
{loop type="image" name="image_test" category="$ID"}
<p>Full size file URL: {$IMAGE_URL}</p>
<img src="{$IMAGE_URL}" />
{/loop}
{loop type="image" name="image_test" source="category" source_id="$ID"}
<p>source="category" source_id="x" argument style: Processed file URL: {$IMAGE_URL}</p>
{/loop}
</li>
</ul>
</li>
{/loop}
</ul>
</div>
<div>
<h2>Product Images</h2>
<ul>
{loop type="product" name="jsvdfk"}
<li><p>Product id {$ID}: {$TITLE}</p>
<ul>
<li>
{loop type="image" name="image_test" product="$ID" width="200" height="100" resize_mode="borders" effects="gamma:0.7" background_color="#cc8000"}
<p>Processed file URL: {$IMAGE_URL}</p>
<p>Original file URL: {$ORIGINAL_IMAGE_URL}</p>
<p>Images:</p>
<img src="{$IMAGE_URL}" />
{/loop}
{loop type="image" name="image_test" product="$ID" width="200" height="100" resize_mode="crop"}
<img src="{$IMAGE_URL}" />
{/loop}
{loop type="image" name="image_test" product="$ID" width="100" height="200" resize_mode="borders" background_color="#cc8000"}
<img src="{$IMAGE_URL}" />
{/loop}
{loop type="image" name="image_test" product="$ID" width="100" rotation="-20" background_color="#facabe"}
<img src="{$IMAGE_URL}" />
{/loop}
{loop type="image" name="image_test" product="$ID" width="200" height="100" resize_mode="borders" background_color="#facabe" effects="negative"}
<img src="{$IMAGE_URL}" />
{/loop}
</p>
</li>
</ul></li>
{/loop}
</ul>
</div>
<div>
<h2>Folder Images</h2>
<ul>
{loop type="folder" name="jsvdfk"}
<li><p>Folder id {$ID}: {$TITLE}</p>
<ul>
<li>
{loop type="image" name="image_test" folder="$ID" width="200" height="100" resize_mode="borders"}
<p>Processed file URL: {$IMAGE_URL}</p>
<p>Original file URL: {$ORIGINAL_IMAGE_URL}</p>
<img src="{$IMAGE_URL}" />
{/loop}
</li>
</ul>
</li>
{/loop}
</ul>
</div>
<div>
<h2>Content Images</h2>
<ul>
{loop type="content" name="jsvdfk"}
<li><p>Content id {$ID}: {$TITLE}</p>
<ul>
<li>
{loop type="image" name="image_test" content="$ID" width="200" height="100" resize_mode="borders"}
<p>Processed file URL: {$IMAGE_URL}</p>
<p>Original file URL: {$ORIGINAL_IMAGE_URL}</p>
<img src="{$IMAGE_URL}" />
{/loop}
</li>
</ul>
</li>
{/loop}
</ul>
</div>
{include file="includes/footer.html"}

View File

@@ -1,12 +0,0 @@
{loop name="included0" type="category" parent="0"}
<h2>Out before - CATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h2>
{loop name="category1" type="category" parent="$ID"}
<h3>Inner - SUBCATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h3>
{/loop}
{loop name="category2" type="category" parent="$ID"}
<h3>Inner 2 - SUBCATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h3>
{/loop}
<h2>Out after - CATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h2>
<hr />
{/loop}

View File

@@ -1,19 +0,0 @@
{* Include required JS files *}
{javascripts file='../assets/js/*'}
<script src="{$asset_url}"></script>
{/javascripts}
<script>
$(function() {
$('#jquery_block').html("Jquery is now loaded.").hover(function() {
$(this).css('font-weight', 'bold');
}, function() {
$(this).css('font-weight', 'normal');
});
});
</script>
{debugbar_renderjs}
{debugbar_renderresult}
</body>
</html>

View File

@@ -1,26 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>{$page_title|default:{intl l="Thelia II"}}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{stylesheets file='../assets/css/*' filters='less,cssembed'}
<link rel="stylesheet" href="{$asset_url}">
{/stylesheets}
{debugbar_rendercss}
</head>
<body>
<div>
{loop type="auth" name="customer_info_block" roles="CUSTOMER" context="front"}
<p>Your are logged in as {customer attr="firstname"} {customer attr="lastname"} ! <a href="{url path='/customer/logout'}">Logout</a></p>
{/loop}
{loop type="auth" name="admin_info_block" roles="ADMIN" context="admin"}
<p>You are logged as administrator {admin attr="firstname"} {admin attr="lastname"}</p>
{/loop}
{elseloop rel="customer_info_block"}
You are not logged in. <a href="{viewurl view='login'}">Login now</a> or <a href="{viewurl view='connexion'}">create your account</a>
{/elseloop}
</div>
<hr />

View File

@@ -1,153 +0,0 @@
{include file="includes/header.html"}
<div>
Here you are : {navigate to="current"}
{loop type="auth" name="auth_test" context="front" roles="CUSTOMER"}
<p>Customer is authentified :-)</p>
{/loop}
{elseloop rel="auth_test"}
<p>Customer is not authentified :-(</p>
{/elseloop}
An image from asset directory :
{images file='assets/img/logo-thelia-34px.png'}<img src="{$asset_url}" alt="{intl l='Thelia, solution e-commerce libre'}" />{/images}
</div>
<div>
{intl l='An internationalized string'}
</div>
<div>
jQuery data: <span id="jquery_block"></span>
</div>
<div>
<p>Category loop example</p>
<ul>
{loop type="category" name="catloop1"}
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}, children: {$NB_CHILD}
{ifloop rel="inner1"}
<ul>
{loop type="category" name="inner1" parent="{$ID}"}
<li>Sub cat {$ID} (parent is {$PARENT}): {$TITLE}</li>
{/loop}
</ul>
{/ifloop}
</li>
{/loop}
</ul>
</div>
<div>
<p>Conditional example #1</p>
{ifloop rel="catloop2"}
Hey ! Loop catloop2 is not empty:
<ul>
{loop type="category" name="catloop2" parent="12"}
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="catloop2"}
<p>Loop catloop2 is empty</p>
{/elseloop}
</div>
<div>
<p>Conditional example #2</p>
{ifloop rel="catloop3"}
Loop catloop3 is not empty:
<ul>
{loop type="category" name="catloop3" parent="0"}
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="catloop3"}
<p>Loop catloop3 is empty</p>
{/elseloop}
{elseloop rel="catloop2"}
<p>... but catloop2 is still empty :-)</p>
{/elseloop}
</div>
<div>
<p>Traditional for loop</p>
{for $index=5 to 12 step 1}
Compteur = {$index}<br />
{/for}
</div>
<div>
<p>Some pagination</p>
<p>PAGE 1</p>
<ul>
{loop type="category" name="catloopwithpagination1" limit="2" page="1"}
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
{/loop}
</ul>
<p>PAGE 2</p>
<ul>
{loop type="category" name="catloopwithpagination2" limit="2" page="2"}
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
{/loop}
</ul>
<p>PAGE 1000</p>
<ul>
{loop type="category" name="catloopwithpagination1000" limit="2" page="1000"}
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
{/loop}
{elseloop rel="catloopwithpagination1000"}
NO RESULTS
{/elseloop}
</ul>
</div>
<div>
<p>Some pagination with page choice</p>
{assign var=current_page value=2}
<p>PAGE {$current_page} :</p>
<ul>
{loop type="category" name="catloopwithpaginationchoice" limit="2" page="{$current_page}"}
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
{/loop}
</ul>
<p>page choice</p>
{pageloop rel="catloopwithpaginationchoice"}
{if ${PAGE} != {$current_page}}
{if {$PAGE} > {$current_page}-10 AND {$PAGE} < {$current_page}+10}
{$PAGE}
{/if}
{if {$PAGE} == {$current_page}-10 OR {$PAGE} == {$current_page}+10}
...
{/if}
{if ({$PAGE} < {$current_page}-10 OR {$PAGE} > {$current_page}+10) AND ({$PAGE}%10 == 0 OR ${PAGE} == {$LAST} OR ${PAGE} == 1)}
{$PAGE}
{/if}
{else}
{ {$PAGE} }
{/if}
{if {$PAGE} != {$LAST}}
-
{/if}
{/pageloop}
</div>
{include file="includes/footer.html"}

View File

@@ -1,49 +0,0 @@
{include file="includes/header.html"}
<h1>{intl l='Please login'}</h1>
{form name="thelia.customer.login" }
<form action="{url path='/customer/login'}" method="post" {form_enctype form=$form}>
{*
The field below are not par of the Login form, it defines view to render if the form cannot be validated
*}
<input type="hidden" name="view" value="login" /> {* the view to return to if the form cannot be validated *}
{*
This field is common to all BaseForm instances (thus, this one), and defines
the URL the customer is redirected to once the form has been successfully
processed
*}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{navigate to="return_to"}" /> {* the url the user is redirected to on login success *}
{/form_field}
{*
The form error status and the form error messages are defined in Customer action,
and passed back to the form plugin through the ParserContext.
*}
{if $0form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
{form_hidden_fields form=$form}
{form_field form=$form field="email"}
{if $error}{$message}{/if}
<label>{intl l="Your e-mail address"}: </label><input type="email" name="{$name}" {$attr} value="{$value}"><br />
{/form_field}
{form_field form=$form field='password'}
<label>{intl l="Your password"}: </label><input type="password" name="{$name}" {$attr} value="{$value}"> <br />
{/form_field}
{form_field form=$form field='remember_me'}
<label class="checkbox"> <input type="checkbox" name="{$name}" value="{$value}" {$attr} {if $options.checked}checked="checked"{/if}/> {intl l='Remember me'}</label>
{/form_field}
<button type="submit">{intl l='Login'}</button>
</form>
{/form}
{include file='includes/footer.html'}

View File

@@ -1,6 +0,0 @@
{check_auth context="front" roles="CUSTOMER" login_tpl="login"}
{$page_title="{intl l='My Account'}"}
{include file="includes/header.html"}
{include file="includes/footer.html"}

View File

@@ -1,94 +0,0 @@
{assign var=category_current_page value={$smarty.get.category_page|default:1}}
<h1>Pagination</h1>
<h2>Categories</h2>
<div style="border: solid 1px; padding: 20px;">
{loop name="cat" type="category" page="{$category_current_page}" limit="2"}
<h2>{$LOOP_COUNT} - {$TITLE}</h2>
<h3>Products :</h3>
<div style="border: solid 1px; padding: 20px;">
{assign var=this_product_getter value="product_`$ID`_page"}
{assign var=product_current_page value={$smarty.get.$this_product_getter|default:1}}
<ul>
{loop name="prod" type="product" category="$ID" page="{$product_current_page}" limit="2"}
<li>
{$ID}:{$REF}
</li>
{/loop}
</ul>
</div>
<p>{$TITLE} page choice</p>
{pageloop rel="prod"}
{if $PAGE != $product_current_page}
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}={$PAGE}">{$PAGE}</a>
{else}
{$PAGE}
{/if}
{if $PAGE != $LAST}
-
{/if}
{/pageloop}
{/loop}
</div>
<p>categories page choice</p>
{pageloop rel="cat"}
{if $PAGE != $category_current_page}
<a href="index_dev.php?view=pagination&category_page={$PAGE}">{$PAGE}</a>
{else}
{$PAGE}
{/if}
{if $PAGE != $LAST}
-
{/if}
{/pageloop}
<hr>
Pagination before loop
<hr>
{assign var=product_current_page value={$smarty.get.$this_product_getter|default:1}}
{capture name="prod2"}
{loop name="prod2" type="product" page="{$product_current_page}" limit="2"}
<li>
{$ID}:{$REF}
</li>
{/loop}
{/capture}
{pageloop rel="prod2"}
{if ${PAGE} != {$product_current_page}}
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}={$PAGE}">{$PAGE}</a>
{else}
{$PAGE}
{/if}
{if $PAGE != $LAST}
-
{/if}
{/pageloop}
{$smarty.capture.prod2}
{pageloop rel="prod2"}
{if ${PAGE} != {$product_current_page}}
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}={$PAGE}">{$PAGE}</a>
{else}
{$PAGE}
{/if}
{if $PAGE != $LAST}
-
{/if}
{/pageloop}

View File

@@ -1,94 +0,0 @@
{*include file="includes/header.html"*}
Here you are : {navigate to="current"}<br />
From : {navigate to="return_to"}<br />
Index : {navigate to="index"}<br />
<h1>Product page</h1>
{ifloop rel="product"}
{loop type="product" name="product" current="true"}
<div style="border: dashed 2px red; padding: 20px; margin: 10px;">
<h2>PRODUCT ({$ID}) : {$REF}</h2>
<h3>{$TITLE}</h3>
<p>{$DESCRIPTION}</p>
<p>Starting by {$BEST_PRICE} {currency attr="symbol"} HT (TAX : {$BEST_PRICE_TAX} ; {$BEST_TAXED_PRICE} {currency attr="symbol"} TTC)</p>
{ifloop rel="acc"}
<h4>Accessories</h4>
<ul>
{loop name="acc" type="accessory" product="$ID" order="accessory"}
<li><a href="{$URL}">{$REF}</a></li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="acc"}
<h4>No accessory</h4>
{/elseloop}
{ifloop rel="prod_ass_cont"}
<h4>Associated Content</h4>
<ul>
{loop name="prod_ass_cont" type="associated_content" product="$ID" order="associated_content"}
<li>{$TITLE}</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="prod_ass_cont"}
<h4>No associated content</h4>
{/elseloop}
{ifloop rel="ft"}
<h4>Features</h4>
<ul>
{assign var=current_product value=$ID}
{loop name="ft" type="feature" order="manual" product="$ID"}
<li>
<strong>{$TITLE}</strong> :
{loop name="ft_v" type="feature_value" product="{$current_product}" feature="$ID"}
{$TITLE} / {$PERSONAL_VALUE}
{/loop}
</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="ft"}
<h4>No feature</h4>
{/elseloop}
<h4>Product sale elements</h4>
{assign var=current_product value=$ID}
{loop name="pse" type="product_sale_elements" product="$ID" order="promo,min_price"}
<div style="border: solid 2px darkorange; padding: 5px; margin: 5px;">
{loop name="combi" type="attribute_combination" product_sale_elements="$ID"}
{$ATTRIBUTE_TITLE} = {$ATTRIBUTE_AVAILABILITY_TITLE}<br />
{/loop}
<br />{$WEIGHT} g
<br /><strong>{if $IS_PROMO == 1} {$PROMO_PRICE} {currency attr="symbol"} HT // TAX : {$PROMO_PRICE_TAX} ; {$TAXED_PROMO_PRICE} {currency attr="symbol"} TTC (instead of {$PRICE} HT // TAX : {$PRICE_TAX} ; {$TAXED_PRICE} {currency attr="symbol"} TTC){else} {$PRICE} {currency attr="symbol"} HT // TAX : {$PRICE_TAX} ; {$TAXED_PRICE} {currency attr="symbol"} TTC{/if}</strong>
<br /><br />
Add
<select>
{for $will=1 to $QUANTITY}
<option>{$will}</option>
{/for}
</select>
to my cart
</ul>
</div>
{/loop}
</div>
{/loop}
{/ifloop}
{elseloop rel="product"}
<h2>Produit introuvable !</h2>
{/elseloop}
{*include file="includes/footer.html"*}

View File

@@ -1,11 +0,0 @@
<ul>
{loop name="car" type="category"}
<li>
<ul>
{loop name="product" type="product" category="$ID"}
<li>{$REF}</li>
{/loop}
</ul>
</li>
{/loop}
</ul>

193
templates/pdf/delivery.html Normal file
View File

@@ -0,0 +1,193 @@
<!--
THELIA - Modèle de bon de livraison
Pour plus d'information sur les possibilités de mise en page, merci de consulter
la documentation de html2pdf: http://html2pdf.fr/
-->
<style type="text/css">
<!--
table {
border-collapse: collapse;
width: 100%;
}
td,th {
padding: 1.5mm;
border: 0.2mm solid #333;
}
th {
background-color: #D83C46;
color: #fff;
text-align: center;
font-weight: normal;
}
td.total {
background-color: #ccc;
font-weight: bold;
}
-->
</style>
<page backtop="10mm" backleft="10mm" backright="10mm" backbottom="10mm">
<page_header>
</page_header>
<page_footer>
<table>
<col style="width: 80%; padding: 3mm; border: none; text-align: center;" />
<col style="width: 20%; padding: 3mm; border: none; text-align: right;" />
<tbody>
<tr>
<td><!-- Insérer ici les mentions légales --></td>
<td>{intl l="page"} [[page_cu]]/[[page_nb]]</td>
</tr>
</tbody>
</table>
</page_footer>
{loop name="order.invoice" type="order" id=$order_id customer="*"}
{loop name="currency.order" type="currency" id=$CURRENCY}
{assign "orderCurrency" $SYMBOL}
{/loop}
<!-- En-tete du document -->
<table style="padding-bottom: 5mm;">
<col style="width:50%; padding: 0; border: none;" />
<col style="width:50%; padding: 0; border: none;" />
<tr>
<!-- A gauche: informations sur le BL -->
<td valign="bottom">
<div style="text-align: center; padding-bottom: 5mm;">
<h1 style="font-size: 5mm;">
{config key="company_name"}
<!-- Vous pouvez remplacer #VARIABLE(nomsite) par le nom de votre entreprise -->
</h1>
<!--
<p> Vous pouvez insérer ici l'adresse de votre entreprise</p>
-->
<h2 style="font-size: 5mm;">{intl l='Delivery module'}<br />{$DELIVERY_REF}</h2>
</div>
<table style="width: 80%">
<col style="width:50%;text-align: center;" />
<col style="width:50%;text-align: center;" />
<tr>
<th>{intl l="invoice ref"}</th>
<th>{intl l="invoice date"}</th>
</tr>
<tr>
<td>{$REF}</td>
<td>{format_date date=$INVOICE_DATE}</td>
</tr>
</table>
<table style="width: 80%; margin-top: 3mm;">
<col style="width:50%;text-align: center;" />
<col style="width:50%;text-align: center;" />
<tr>
<th>{intl l="invoice"} </th>
<th>{intl l="customer number"}</th>
</tr>
<tr>
<td>{$INVOICE_REF}</td>
<td>{loop type="customer" name="customer.invoice" id=$CUSTOMER current="0"}{$REF}{/loop}</td>
</tr>
</table>
</td>
<!-- A droite: adresses de livraison et de facturation -->
<td valign="bottom">
<table style="padding-bottom: 5mm;">
<tr>
<th style="width: 100%; text-align: left;">{intl l="delivery address"}</th>
</tr>
<tr>
<td>
{loop type="order_address" name="delivery_address" id=$DELIVERY_ADDRESS}
{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}{$FIRSTNAME} {$LASTNAME}<br />
{$ADDRESS1} {$ADDRESS2} {$ADDRESS3}<br />
{$ZIPCODE} {$COUNTRY}<br/>
{loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
{/loop}
</td>
</tr>
</table>
<table>
<tr>
<th style="width: 100%; text-align: left;">{intl l="invoice address"}</th>
</tr>
<tr>
<td>
{loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS}
{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}{$FIRSTNAME} {$LASTNAME}<br />
{$ADDRESS1} {$ADDRESS2} {$ADDRESS3}<br />
{$ZIPCODE} {$COUNTRY}<br/>
{loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
{/loop}
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Liste des articles -->
<table>
<col style="width: 20%;" />
<col style="width: 65%;" />
<col style="width: 15%; text-align: right" />
<thead>
<tr>
<th style="text-align: center;">{intl l="Ref"}</th>
<th style="text-align: center;">{intl l="product"}</th>
<th style="text-align: center;">{intl l="Quantity"}</th>
</tr>
</thead>
<tbody>
{loop type="order_product" name="order-products" order=$ID}
<tr>
<td>{$REF}</td>
<td>{$TITLE}</td>
<td>{$QUANTITY}</td>
</tr>
{/loop}
</tbody>
</table>
<!-- Mode de livraison -->
<table style="width: 100%; margin-top: 5mm;">
<col style="width: 20%;" />
<col style="width: 80%;" />
<tbody>
<tr>
<th>{intl l="delivery module"}</th>
<td>{loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}</td>
</tr>
</tbody>
</table>
{/loop}
</page>

233
templates/pdf/invoice.html Normal file
View File

@@ -0,0 +1,233 @@
<!--
THELIA - Modèle de facture
Pour plus d'information sur les possibilités de mise en page, merci de consulter
la documentation de html2pdf: http://html2pdf.fr/
-->
<style type="text/css">
<!--
table {
border-collapse: collapse;
width: 100%;
}
td,th {
padding: 1.5mm;
border: 0.2mm solid #333;
}
th {
background-color: #D83C46;
color: #fff;
text-align: center;
font-weight: normal;
}
td.total {
background-color: #ccc;
font-weight: bold;
}
-->
</style>
<page backtop="10mm" backleft="10mm" backright="10mm" backbottom="10mm">
<page_header>
</page_header>
<page_footer>
<table>
<col style="width: 80%; padding: 3mm; border: none; text-align: center;" />
<col style="width: 20%; padding: 3mm; border: none; text-align: right;" />
<tbody>
<tr>
<td><!-- Insérer ici les mentions légales --></td>
<td>{intl l="Page"} [[page_cu]]/[[page_nb]]</td>
</tr>
</tbody>
</table>
</page_footer>
{loop name="order.invoice" type="order" id=$order_id customer="*"}
{loop name="currency.order" type="currency" id=$CURRENCY}
{assign "orderCurrency" $SYMBOL}
{/loop}
<table style="padding-bottom: 5mm;">
<tr>
<td style="width:50%; padding: 0; border: none;" valign="bottom">
<div style="text-align: center; padding-bottom: 10mm;">
<h1>{config key="company_name"}</h1>
<p><!-- Insérer ici l'adresse de votre entreprise --></p>
<h2>{intl l="invoice"} {$INVOICE_REF}</h2>
</div>
<table style="width: 100%">
<tr>
<th>{intl l="invoice ref"}</th>
<th>{intl l="customer number"}</th>
<th>{intl l="invoice date"}</th>
</tr>
<tr>
<td>{$REF}</td>
<td>{loop type="customer" name="customer.invoice" id=$CUSTOMER current="0"}{$REF}{/loop}</td>
<td>{format_date date=$INVOICE_DATE}</td>
</tr>
</table>
</td>
<td style="width:50%; padding: 0; border: none;" valign="bottom">
<table style="padding-bottom: 5mm;">
<tr>
<th style="width: 100%; text-align: left;">{intl l="delivery address"}</th>
</tr>
<tr>
<td>
{loop type="order_address" name="delivery_address" id=$DELIVERY_ADDRESS}
{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}{$FIRSTNAME} {$LASTNAME}<br />
{$ADDRESS1} {$ADDRESS2} {$ADDRESS3}<br />
{$ZIPCODE} {$COUNTRY}<br/>
{loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
{/loop}
</td>
</tr>
</table>
<table>
<tr>
<th style="width: 100%; text-align: left;">{intl l="invoice address"}</th>
</tr>
<tr>
<td>
{loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS}
{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}{$FIRSTNAME} {$LASTNAME}<br />
{$ADDRESS1} {$ADDRESS2} {$ADDRESS3}<br />
{$ZIPCODE} {$COUNTRY}<br/>
{loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
{/loop}
</td>
</tr>
</table>
</td>
</tr>
</table>
<table>
<col style="width: 38%;" />
<col style="width: 15%;" />
<col style="width: 15%; text-align: right" />
<col style="width: 12%; text-align: right" />
<col style="width: 5%; text-align: right" />
<col style="width: 15%; text-align: right" />
<thead>
<tr>
<th style="text-align: center;">{intl l="Product"}</th>
<th style="text-align: center;">{intl l="Unit. price"}</th>
<th style="text-align: center;">{intl l="Tax"}</th>
<th style="text-align: center;">{intl l="Unit taxed price"}</th>
<th style="text-align: center;">{intl l="Quantity"}</th>
<th style="text-align: center;">{intl l="Taxed total"}</th>
</tr>
</thead>
<tbody>
{loop type="order_product" name="order-products" order=$ID}
{if $WAS_IN_PROMO == 1}
{assign "realPrice" $PROMO_PRICE}
{assign "realTax" $PROMO_PRICE_TAX}
{assign "realTaxedPrice" $TAXED_PROMO_PRICE}
{else}
{assign "realPrice" $PRICE}
{assign "realTax" $PRICE_TAX}
{assign "realTaxedPrice" $TAXED_PRICE}
{/if}
<tr>
<td>
{$TITLE}
{ifloop rel="combinations"}
{loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
{$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE}<br>
{/loop}
{/ifloop}
</td>
<td>{$orderCurrency} {$realPrice}</td>
<td>{$orderCurrency} {$realTax}</td>
<td>{$orderCurrency} {$realTaxedPrice}</td>
<td>{$QUANTITY}</td>
<td>{$orderCurrency} {$realTaxedPrice * $QUANTITY}</td>
</tr>
{/loop}
</tbody>
</table>
<!-- Pied du tableau -->
<table>
<col style="width: 65%;" />
<col style="width: 35%;" />
<tr>
<td style="padding: 0; padding-top: 5mm; border: none;">
<table style="width: 90%; padding-bottom: 5mm;">
<col style="width: 35%; text-align: right;" />
<col style="width: 65%;" />
<tbody>
<tr>
<th>{intl l="Payment module"}</th>
<td>{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</td>
</tr>
<tr>
<th>{intl l="delivery module"}</th>
<td>{loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}</td>
</tr>
</tbody>
</table>
</td>
<td valign="top" style="padding: 0;padding-top: 5mm; border: none;">
<table style="padding-bottom: 5mm;">
<col style="width: 58%; text-align: right;" />
<col style="width: 42%; text-align: right;" />
<tbody>
<tr>
<td>{intl l="Total without tax"}</td>
<td>{$orderCurrency} {$TOTAL_AMOUNT}</td>
</tr>
<tr>
<td>{intl l="Total with tax"}</td>
<td>{$orderCurrency} {$TOTAL_TAXED_AMOUNT - $POSTAGE}</td>
</tr>
<tr>
<td>{intl l="Postage"}</td>
<td>{$orderCurrency} {$POSTAGE}</td>
</tr>
<tr>
<td class="total">{intl l="Total"}</td>
<td class="total">{$orderCurrency} {$TOTAL_TAXED_AMOUNT}</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
{/loop}
</page>