Merge branch 'master' of https://github.com/thelia/thelia into coupon

* 'master' of https://github.com/thelia/thelia: (102 commits)
  add higher priority to module routing
  update smarty version
  select default country in front register form
  add modal error id changing default country failed
  enabled change default country
  fiw module generator class name issue
  complete javascript for changing default country
  validate country removal
  validate country creation
  implement abstract method from AbstractCrudController in Country Controller
  create country action class
  add pre/post CRUD method in Country model
  create coutry events
  finish customer address update
  complete readme
  update .gitignore file
  add specifig php.ini file for travis
  try to fix travis conf
  remove unused directory
  check session directory permission in install process
  ...
This commit is contained in:
Kahn
2013-10-08 23:22:53 +02:00
481 changed files with 9445 additions and 15685 deletions

View File

@@ -4,6 +4,9 @@
{check_auth roles="ADMIN" permissions="{block name="check-permissions"}{/block}" login_tpl="/admin/login"}
{/block}
{* -- Define some stuff for Smarty ----------------------------------------- *}
{config_load file='variables.conf'}
<!DOCTYPE html>
<html lang="{$lang_code}">
<head>
@@ -111,26 +114,30 @@
{/loop}
{loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"}
<li class="dropdown {if $admin_current_location == 'customer'}active{/if}" id="orders_menu" data-toggle="dropdown">
<li class="dropdown {if $admin_current_location == 'order'}active{/if}" id="orders_menu">
<a href="#">{intl l="Orders"} <span class="caret"></span></a>
<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"}
<span class="badge badge-important">{count type="order"}</span></a>
</li>
<li role="menuitem">
<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>
{loop name="order-status-list" type="order-status"}
<li role="menuitem">
<a data-target="{url path='admin/orders/$LABEL'}" href="{url path='admin/orders/$LABEL'}">
{$LABEL} <span class="badge badge-important">{count type="order" status="{$ID}"}</span>
</a>
</li>
{/loop}
</ul>
</li>
{loop name="order-status-list" type="order-status"}
{assign "orderStatusLabel" "order_$CODE"}
<li role="menuitem">
<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>
{/loop}
</ul>
</li>
{/loop}
{loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"}

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

@@ -13,6 +13,19 @@
}
}
}
tbody {
tr.active, tr {
td.td-unstyled {
background-color: white;
border-top: none;
border-right: 1px solid @table-border-color;
}
td.last {
border-bottom: 1px solid @table-border-color;
}
}
}
}
@@ -55,10 +68,6 @@ tfoot{
}
}
// td, th {
// text-align: center;
// }
td.object-title, th.object-title {
text-align: left;
}

View File

@@ -193,6 +193,11 @@
padding: 1em;
margin-bottom: 20px;
.select-fixed-width {
width: 120px;
}
// The block title
.title {
color: #5A6876;
@@ -290,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

@@ -0,0 +1,9 @@
#order
max_displayed_orders = 20
#order status
order_not_paid = 'warning'
order_paid = 'success'
order_processing = 'primary'
order_sent = 'info'
order_canceled = 'danger'

View File

@@ -8,7 +8,7 @@
<div class="folder edit-folder">
<div id="wrapper" class="container">
{* include file="includes/folder-breadcrumb.html" editing_category="true" *}
{include file="includes/folder-breadcrumb.html" editing_category="false" editing_content="true"}
<div class="row">
{loop name="content_edit" type="content" visible="*" id="{$content_id}" backend_context="1" lang="$edit_language_id"}
@@ -42,7 +42,7 @@
<ul class="nav nav-tabs" id="tabbed-menu">
<li class="active"><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
<li><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
<li><a href="#association" data-toggle="tab">{intl l="Associations"}</a></li>
<li><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
<li><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
@@ -102,7 +102,7 @@
{$myparent=$DEFAULT_FOLDER}
{loop name="fold-parent" type="folder-tree" visible="*" folder="0"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $myparent == $ID}selected="selected"{/if} {if $folder_id == $ID}disabled="disabled"{/if}>{$TITLE}</option>
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $myparent == $ID}selected="selected"{/if}>{$TITLE}</option>
{/loop }
</select>
@@ -141,108 +141,8 @@
</div>
</div>
<div class="tab-pane fade" id="details">
<div class="form-container">
<div class="form-group">
<form action="{url path='/admin/folders/related-content/add'}" id="related_content_form">
{include
file="includes/inner-form-toolbar.html"
hide_submit_buttons=true
close_url="{url path='/admin/folders' folder_id=$folder_id}"
}
<input type="hidden" name="folder_id" value="{$folder_id}" />
<input type="hidden" name="current_tab" value="details" />
{ifloop rel="folders"}
<div class="row">
<div class="col-md-6">
<div class="form-group">
<select name="folder_id" id="folder_id" class="form-control">
<option value="">Select a folder...</option>
{loop name="folders" type="folder" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
</select>
</div>
<span class="help-block">{intl l='Select a folder to get its content'}</span>
</div>
<div class="col-md-6">
<div id="content_selector" class="hide">
<div class="input-group">
<select required="required" name="content_id" id="content_id" class="form-control">
<option value="">Select a folder content...</option>
</select>
<span class="input-group-btn" id="content_add_button">
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
</span>
</div>
<span class="help-block">{intl l='Select a content and click (+) to add it to this category'}</span>
</div>
</div>
</div>
{/ifloop}
{elseloop rel="folders"}
<div class="alert alert-info">{intl l="No folders found"}</div>
{/elseloop}
</form>
</div>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Attribute title'}</th>
{module_include location='folder_contents_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{*loop name="assigned_contents" type="associated_content" folder="$folder_id" backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<td>
{$TITLE}
</td>
{module_include location='folder_contents_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.folder.content.delete"}
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="assigned_contents"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="This folder contains no contents"}
</div>
</td>
</tr>
{/elseloop*}
</tbody>
</table>
</div>
<div class="tab-pane fade" id="association">
{include file="includes/content-folder-management.html"}
</div>
<div class="tab-pane fade" id="images">
@@ -265,28 +165,29 @@
</div>
{* Delete related content confirmation dialog *}
{* Delete category confirmation dialog *}
{capture "delete_content_dialog"}
<!-- <input type="hidden" name="category_id" value="{$category_id}" /> -->
<input type="hidden" name="content_id" id="content_delete_id" value="" />
<input type="hidden" name="folder_id" id="folder_delete_id" value="" />
{capture "delete_folder_dialog"}
<input type="hidden" name="content_id" value="{$content_id}" />
<input type="hidden" name="additional_folder_id" id="additional_folder_delete_id" value="" />
<input type="hidden" name="current_tab" value="details" />
<input type="hidden" name="current_tab" value="association" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_content_dialog"
dialog_title = {intl l="Remove related content"}
dialog_message = {intl l="Do you really want to remove this related content ?"}
dialog_id = "delete_folder_dialog"
dialog_title = {intl l="Remove associated folder"}
dialog_message = {intl l="Do you really want to remove the content from this folder ?"}
form_action = {url path='/admin/folders/related-content/delete'}
form_content = {$smarty.capture.delete_content_dialog nofilter}
form_action = {url path='/admin/content/folder/delete'}
form_content = {$smarty.capture.delete_folder_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/dropzone.js'}
<script src="{$asset_url}"></script>
@@ -314,6 +215,9 @@ form_content = {$smarty.capture.delete_content_dialog nofilter}
$('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
{/if}
$('a.delete-folder').click(function(e) {
$('#additional_folder_delete_id').val($(this).data('id'));
});
// Set proper content ID in delete content from
$('a.delete-content').click(function(ev) {

View File

@@ -35,12 +35,12 @@
</caption>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Default</th>
<th>Shop</th>
<th>N° ISO</th>
<th>ISO Code</th>
<th>{intl l="ID"}</th>
<th>{intl l="Name"}</th>
<th>{intl l="Default"}</th>
<th>{intl l="Shop"}</th>
<th>{intl l="N° ISO"}</th>
<th>{intl l="ISO Code"}</th>
{module_include location='countries_table_header'}
@@ -54,8 +54,8 @@
<td>{$ID}</td>
<td>{$TITLE}</td>
<td>
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
<div class="make-switch switch-small switch-radio change-default-toggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default-toggle" type="radio" name="by_default" value="{$ID}" {if $IS_DEFAULT}checked="checked"{/if}/>
</div>
</td>
<td>
@@ -71,7 +71,7 @@
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"}
<a class="btn btn-default btn-xs country-change" title="{intl l='Change this country'}" href="{url path="/admin/configuration/countries/update/{$ID}"}">
<a class="btn btn-default btn-xs country-change" title="{intl l='Change this country'}" href="{url path="/admin/configuration/country/update/{$ID}"}">
<span class="glyphicon glyphicon-edit"></span>
</a>
{/loop}
@@ -121,7 +121,7 @@
{form_field form=$form field='success_url'}
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/country/update' country_id='_ID_'}" />
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/country/update/_ID_'}" />
{/form_field}
{form_field form=$form field='title'}
@@ -160,6 +160,12 @@
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 3'}">
</div>
{/form_field}
{loop type="lang" name="default-lang" default_only="1"}
<input type="hidden" name="edit_language_id" value="{$ID}" />
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
{/form_field}
{/loop}
{module_include location='country_create_form'}
@@ -202,6 +208,23 @@
form_content = {$smarty.capture.delete_dialog nofilter}
}
<div class="modal fade" id="toggle-default-failed" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content alert alert-block alert-danger ">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h2>{intl l="Error"}</h2>
</div>
<div class="modal-body">
<strong>{intl l="Impossible to change default country. Please contact your administrator or try later"}</strong>
</div>
</div>
</div>
</div>
{/block}
{block name="javascript-initialization"}
@@ -210,10 +233,30 @@
<script src="{$asset_url}"></script>
<script>
// Toogle switch on input radio
$('.switch-radio').on('switch-change', function () {
$('.switch-radio').bootstrapSwitch('toggleRadioState');
$(document).ready(function(){
// Toogle switch on input radio
$('.switch-radio').on('switch-change', function () {
$('.switch-radio').bootstrapSwitch('toggleRadioState');
});
$('.country-delete').click(function(ev){
$('#country_delete_id').val($(this).data('id'));
});
$('.change-default-toggle').on('switch-change', function(e, data){
if(data.value) {
$.ajax({
url : "{url path='/admin/configuration/country/toggleDefault'}",
data : {
country_id: $(this).data('id')
}
}).fail(function(){
$('#toggle-default-failed').modal('show');
});
}
});
});
</script>
{/javascripts}

View File

@@ -92,13 +92,13 @@
{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>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Country title'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$TITLE}" title="{intl l="{$label}"}" placeholder="{intl l='Country title'}">
</div>
{/form_field}
{form_field form=$form field='short-description'}
{form_field form=$form field='chapo'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Country short description'}"></textarea>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l=""}" placeholder="{intl l='Country short description'}"></textarea>
</div>
{/form_field}
{form_field form=$form field='description'}

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

@@ -64,9 +64,21 @@
</thead>
<tbody>
{loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
{loop name="customer_list" type="customer" current="false" visible="*" backend_context="1" page={$customer_page} limit={$display_customer}}
{assign "lastOrderDate" ''}
{assign "lastOrderAmount" ''}
{assign "lastOrderCurrency" ''}
{loop type="order" name="last-order" customer=$ID order="create-date-reverse" limit="1"}
{assign "lastOrderDate" "{format_date date=$CREATE_DATE}"}
{assign "lastOrderAmount" "{format_number number=$TOTAL_TAXED_AMOUNT}"}
{loop type="currency" name="order-currency" id=$CURRENCY}
{assign "lastOrderCurrency" $SYMBOL}
{/loop}
{/loop}
<tr>
<td><a href="{url path="/admin/customer/update/{$ID}" }">{$REF}</a></td>
<td><a href="{url path="/admin/customer/update/{$ID}"}">{$REF}</a></td>
<td>
{$COMPANY}
@@ -79,11 +91,11 @@
{module_include location='customer_list_row'}
<td>
{format_date date=$LASTORDER_DATE}
{$lastOrderDate}
</td>
<td>
{format_number number=$LASTORDER_AMOUNT}
{$lastOrderCurrency} {$lastOrderAmount}
</td>
<td>
<div class="btn-group">

View File

@@ -8,7 +8,7 @@
<div class="folder edit-folder">
<div id="wrapper" class="container">
{* include file="includes/folder-breadcrumb.html" editing_category="true" *}
{include file="includes/folder-breadcrumb.html" editing_category="true" }
<div class="row">
{loop name="folder_edit" type="folder" visible="*" id="{$folder_id}" backend_context="1" lang="$edit_language_id"}

View File

@@ -5,332 +5,337 @@
{block name="check-permissions"}admin.folders.view{/block}
{block name="main-content"}
<div class="folders">
<div class="folders">
<div id="wrapper" class="container">
{* include file="includes/folder-breadcrumb.html" *}
{include file="includes/folder-breadcrumb.html" folder_id=$parent }
{module_include location='folders_top'}
{module_include location='folders_top'}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed" id="folder_list">
<caption>
{* display parent folder name, and get current folder ID *}
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
{intl l="Folders in %fold" fold=$TITLE}
{$fold_id = $ID}
{/loop}
{elseloop rel="folder_title"}
{intl l="Top level folders"}
{/elseloop}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed" id="folder_list">
<caption>
{* display parent folder name, and get current folder ID *}
{loop name="folder_title" type="folder" visible="*" id=$parent}
{intl l="Folders in %fold" fold=$TITLE}
{$fold_id = $ID}
{/loop}
{elseloop rel="folder_title"}
{intl l="Top level folders"}
{/elseloop}
{*
<td class="object-title">
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}">
{$TITLE}
</a>
</td>*}
{module_include location='folder_list_caption'}
{module_include location='folder_list_caption'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="folder_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='id'
reverse_order='id_reverse'
path={url path='/admin/folders' parent=$parent}
request_parameter_name='folder_order'
label="{intl l='ID'}"
}
</th>
{ifloop rel="folder_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='id'
reverse_order='id_reverse'
path={url path='/admin/folders' id_folder=$folder_id}
request_parameter_name='folder_order'
label="{intl l='ID'}"
}
</th>
<th class="object-image">&nbsp;</th>
<th class="object-image">&nbsp;</th>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='alpha'
reverse_order='alpha_reverse'
path={url path='/admin/folders' parent=$parent}
request_parameter_name='folder_order'
label="{intl l='Folder title'}"
}
</th>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='alpha'
reverse_order='alpha_reverse'
path={url path='/admin/folders' id_folder=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Folder title'}"
}
</th>
{module_include location='folder_list_header'}
{module_include location='folder_list_header'}
<th>
{admin_sortable_header
current_order=$folder_order
order='visible'
reverse_order='visible_reverse'
path={url path='/admin/folders' parent=$parent}
request_parameter_name='folder_order'
label="{intl l='Online'}"
}
</th>
<th>
{admin_sortable_header
current_order=$folder_order
order='visible'
reverse_order='visible_reverse'
path={url path='/admin/folders' id_folder=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Online'}"
}
</th>
<th>
{admin_sortable_header
current_order=$folder_order
order='manual'
reverse_order='manual_reverse'
path={url path='/admin/folders' parent=$parent}
request_parameter_name='folder_order'
label="{intl l='Position'}"
}
</th>
<th>
{admin_sortable_header
current_order=$folder_order
order='manual'
reverse_order='manual_reverse'
path={url path='/admin/folders' id_folder=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Position'}"
}
</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="folder_list" type="folder" visible="*" parent=$parent order=$folder_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<td>
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
<td>
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
<td class="object-title">
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}">
{$TITLE}
</a>
</td>
<td class="object-title">
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}">
{$TITLE}
</a>
</td>
{module_include location='folder_list_row'}
{module_include location='folder_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<div class="make-switch switch-small folderVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<div class="make-switch switch-small folderVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{admin_position_block
permission="admin.folders.edit"
path={url path='admin/folders/update-position' folder_id=$ID}
url_parameter="folder_id"
in_place_edit_class="folderPositionChange"
position=$POSITION
id=$ID
}
</td>
<td>
{admin_position_block
permission="admin.folders.edit"
path={url path='admin/folders/update-position' folder_id=$ID}
url_parameter="folder_id"
in_place_edit_class="folderPositionChange"
position=$POSITION
id=$ID
}
</td>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folders' parent=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folder' folder_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path="/admin/folders/update/{$ID}"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path='/admin/folders/update' folder_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="folder_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
{/loop}
{elseloop rel="folder_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
{/loop}
{elseloop rel="can_create"}
{elseloop rel="can_create"}
{intl l="This folder has no sub-folders."}
{/elseloop}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
</div>
{/elseloop}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
</div>
</div>
</div>
</div>
{* -- CONTENT MANAGEMENT ---------------------------------------------------- *}
{* -- CONTENT MANAGEMENT ---------------------------------------------------- *}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>
{* display parent folder name *}
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
{intl l="Contents in %fold" fold=$TITLE}
{/loop}
<table class="table table-striped table-condensed">
<caption>
{* display parent folder name *}
{loop name="folder_title" type="folder" visible="*" id=$parent}
{intl l="Contents in %fold" fold=$TITLE}
{/loop}
{elseloop rel="folder_title"}
{intl l="Top level Contents"}
{/elseloop}
{elseloop rel="folder_title"}
{intl l="Top level Contents"}
{/elseloop}
{module_include location='content_list_caption'}
{module_include location='content_list_caption'}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new content'}" href="#content_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</caption>
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new content'}" href="#content_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</caption>
{ifloop rel="content_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
{ifloop rel="content_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$content_order
order='id'
reverse_order='id_reverse'
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
path={url path='/admin/folders' parent=$parent target='contents'}
label="{intl l='ID'}"
}
}
<th>&nbsp;</th>
<th>&nbsp;</th>
<th class="object-title">
{admin_sortable_header
<th class="object-title">
{admin_sortable_header
current_order=$content_order
order='alpha'
reverse_order='alpha_reverse'
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
path={url path='/admin/folders' parent=$parent target='contents'}
label="{intl l='Content title'}"
}
}
{module_include location='content_list_header'}
{module_include location='content_list_header'}
<th>
{admin_sortable_header
<th>
{admin_sortable_header
current_order=$content_order
order='visible'
reverse_order='visible_reverse'
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
path={url path='/admin/folders' parent=$parent target='contents'}
label="{intl l='Online'}"
}
</th>
}
</th>
<th>
{admin_sortable_header
<th>
{admin_sortable_header
current_order=$content_order
order='manual'
reverse_order='manual_reverse'
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
path={url path='/admin/folders' parent=$parent target='contents'}
label="{intl l='Position'}"
}
</th>
}
</th>
<th>&nbsp;</th>
</tr>
</thead>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{loop name="content_list" type="content" visible="*" folder_default=$folder_id order=$content_order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="content_list" type="content" visible="*" folder_default=$parent order=$content_order}
<tr>
<td>{$ID}</td>
<td>
{loop type="image" name="folder_image" source="content" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/content/edit' id=$ID}" title="{intl l='Edit this content'}">
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
</a>
{/loop}
<td>
{loop type="image" name="folder_image" source="content" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path="admin/content/update/$ID"}" title="{intl l='Edit this content'}">
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
</a>
{/loop}
<td class="object-title"><a href="{url path="/admin/content/update/$ID"}" title="{intl l='Edit this content'}">{$TITLE}</a></td>
<td class="object-title"><a href="{url path="/admin/content/update/$ID"}" title="{intl l='Edit this content'}">{$TITLE}</a></td>
{module_include location='content_list_row'}
{module_include location='content_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.contents.edit"}
<div class="make-switch switch-small contentVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="contentVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.contents.edit"}
<div class="make-switch switch-small contentVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="contentVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{admin_position_block
permission="admin.content.edit"
path={url path='/admin/content/update-position' content_id=$ID}
url_parameter="content_id"
in_place_edit_class="contentPositionChange"
position=$POSITION
id=$ID
}
</td>
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.content.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this content'}" href="{url path="admin/content/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.content.delete"}
<a class="btn btn-default btn-xs content-delete" title="{intl l='Delete this content'}" href="#content_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{/loop}
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{admin_position_block
permission="admin.content.edit"
path={url path='/admin/content/update-position' content_id=$ID}
url_parameter="content_id"
in_place_edit_class="contentPositionChange"
position=$POSITION
id=$ID
}
</td>
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.content.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this content'}" href="{url path="admin/content/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.content.delete"}
<a class="btn btn-default btn-xs content-delete" title="{intl l='Delete this content'}" href="#content_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="content_list"}
<thead>
<tr>
<td class="message"><div class="alert alert-info">{intl l="This folder doesn't contains any contents. To add a new content, <strong>click the + button</strong> above."}</div></td>
</tr>
</thead>
{/elseloop}
</table>
{elseloop rel="content_list"}
<thead>
<tr>
<td class="message"><div class="alert alert-info">{intl l="This folder doesn't contains any contents. To add a new content, <strong>click the + button</strong> above."}</div></td>
</tr>
</thead>
{/elseloop}
</table>
</div>
</div>
</div>
</div>
</div>
{module_include location='folders_bottom'}
{module_include location='folders_bottom'}
</div>
</div>
</div>
{* -- Adding a new folder ------------------------------------------------- *}
{form name="thelia.admin.folder.creation"}
{form name="thelia.admin.folder.creation"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "folder_creation_dialog"}
@@ -338,12 +343,12 @@
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/folders/update' folder_id='_ID_'}" />
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/folders/update/_ID_'}" />
{/form_field}
{form_field form=$form field='parent'}
<input type="hidden" name="{$name}" value="{$folder_id}" />
<input type="hidden" name="{$name}" value="{$parent}" />
{/form_field}
{form_field form=$form field='title'}
@@ -357,12 +362,12 @@
<div class="help-block">{intl l='Enter here the folder name in the default language (%title)' title="$TITLE"}</div>
{* Switch edition to the current locale *}
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
{/form_field}
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
{/form_field}
{/loop}
</div>
{/form_field}
@@ -382,55 +387,55 @@
{/capture}
{include
{include
file = "includes/generic-create-dialog.html"
dialog_id = "folder_creation_dialog"
dialog_title = {intl l="Create a new folder"}
dialog_body = {$smarty.capture.folder_creation_dialog nofilter}
dialog_ok_label = {intl l="Create this folder"}
dialog_ok_label = {intl l="Create this folder"}
form_action = {url path='/admin/folders/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
form_action = {url path='/admin/folders/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}
{/form}
{* -- Adding a new content -------------------------------------------------- *}
{form name="thelia.admin.content.creation"}
{form name="thelia.admin.content.creation"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "content_creation_dialog"}
{capture "content_creation_dialog"}
{form_hidden_fields form=$form}
{form_hidden_fields form=$form}
{* Be sure to get the folder_id, even if the form could not be validated *}
<input type="hidden" name="folder_id" value="{$folder_id}" />
{* Be sure to get the folder_id, even if the form could not be validated *}
<input type="hidden" name="parent" value="{$parent}" />
{form_field form=$form field='success_url'}
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/contents/update' content_id='_ID_'}" />
{/form_field}
{form_field form=$form field='success_url'}
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/content/update/_ID_' }" />
{/form_field}
{form_field form=$form field='default_folder'}
<input type="hidden" name="{$name}" value="{$folder_id}" />
{/form_field}
{form_field form=$form field='default_folder'}
<input type="hidden" name="{$name}" value="{$parent}" />
{/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">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}
<div class="input-group">
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Title'}">
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}
<div class="input-group">
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Title'}">
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="$TITLE" /></span>
</div>
</div>
<div class="help-block">{intl l='Enter here the content name in the default language (%title)' title="$TITLE"}</div>
<div class="help-block">{intl l='Enter here the content name in the default language (%title)' title="$TITLE"}</div>
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
@@ -455,18 +460,18 @@
{/capture}
{include
file = "includes/generic-create-dialog.html"
file = "includes/generic-create-dialog.html"
dialog_id = "content_creation_dialog"
dialog_title = {intl l="Create a new content"}
dialog_body = {$smarty.capture.content_creation_dialog nofilter}
dialog_id = "content_creation_dialog"
dialog_title = {intl l="Create a new content"}
dialog_body = {$smarty.capture.content_creation_dialog nofilter}
dialog_ok_label = {intl l="Create this content"}
dialog_ok_label = {intl l="Create this content"}
form_action = {url path='/admin/contents/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
form_action = {url path='/admin/content/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}
{* -- Delete folder confirmation dialog ----------------------------------- *}
@@ -479,36 +484,36 @@
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
file = "includes/generic-confirm-dialog.html"
dialog_id = "folder_delete_dialog"
dialog_title = {intl l="Delete folder"}
dialog_message = {intl l="Do you really want to delete this folder and all its content ?"}
dialog_id = "folder_delete_dialog"
dialog_title = {intl l="Delete folder"}
dialog_message = {intl l="Do you really want to delete this folder and all its content ?"}
form_action = {url path='/admin/folders/delete'}
form_content = {$smarty.capture.folder_delete_dialog nofilter}
}
form_action = {url path='/admin/folders/delete'}
form_content = {$smarty.capture.folder_delete_dialog nofilter}
}
{* -- Delete content confirmation dialog ------------------------------------ *}
{capture "content_delete_dialog"}
<input type="hidden" name="content_id" id="content_delete_id" value="" />
<input type="hidden" name="folder_id" value="{$folder_id}" />
<input type="hidden" name="folder_id" value="{$parent}" />
{module_include location='content_delete_form'}
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
file = "includes/generic-confirm-dialog.html"
dialog_id = "content_delete_dialog"
dialog_title = {intl l="Delete content"}
dialog_message = {intl l="Do you really want to delete this content ?"}
dialog_id = "content_delete_dialog"
dialog_title = {intl l="Delete content"}
dialog_message = {intl l="Do you really want to delete this content ?"}
form_action = {url path='/admin/content/delete'}
form_content = {$smarty.capture.content_delete_dialog nofilter}
}
form_action = {url path='/admin/content/delete'}
form_content = {$smarty.capture.content_delete_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
@@ -536,23 +541,23 @@
// JS stuff for creation form
{include
file = "includes/generic-js-dialog.html"
dialog_id = "folder_creation_dialog"
form_name = "thelia.admin.folder.creation"
}
file = "includes/generic-js-dialog.html"
dialog_id = "folder_creation_dialog"
form_name = "thelia.admin.folder.creation"
}
{include
file = "includes/generic-js-dialog.html"
dialog_id = "content_creation_dialog"
form_name = "thelia.admin.content.creation"
}
file = "includes/generic-js-dialog.html"
dialog_id = "content_creation_dialog"
form_name = "thelia.admin.content.creation"
}
{* Toggle object visibility *}
$(".folderVisibleToggle").on('switch-change', function(event, data) {
$.ajax({
url : "{url path='admin/folders/toggle-online'}",
data : {
data : {
folder_id : $(this).data('id'),
action : 'visibilityToggle'
}
@@ -570,9 +575,9 @@
});
});
{* Inline editing of object position using bootstrap-editable *}
{* Inline editing of object position using bootstrap-editable *}
$('.folderPositionChange').editable({
$('.folderPositionChange').editable({
type : 'text',
title : '{intl l="Enter new folder position"}',
mode : 'popup',
@@ -580,18 +585,18 @@
placement : 'left',
success : function(response, newValue) {
// The URL template
var url = "{url noamp='1' path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
var url = "{url path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
// Perform subtitutions
url = url.replace('__ID__', $(this).data('id'))
.replace('__POS__', newValue);
// Perform subtitutions
url = url.replace('__ID__', $(this).data('id'))
.replace('__POS__', newValue);
// Reload the page
location.href = url;
}
});
// Reload the page
location.href = url;
}
});
$('.contentPositionChange').editable({
$('.contentPositionChange').editable({
type : 'text',
title : '{intl l="Enter new content position"}',
mode : 'popup',
@@ -599,7 +604,7 @@
placement : 'left',
success : function(response, newValue) {
// The URL template
var url = "{url noamp='1' path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
var url = "{url path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
// Perform subtitutions
url = url.replace('__ID__', $(this).data('id'))

View File

@@ -28,7 +28,7 @@
<div class="col-md-12">
{form name="$formId"}
<form method="POST" action="{url path="/admin/image/type/{$imageType}/{$ID}/update"}" enctype="multipart/form-data" class="clearfix">
<form method="POST" action="{url path="/admin/image/type/{$imageType}/{$ID}/update"}" {form_enctype form=$form} class="clearfix">
<div class="row inner-toolbar clearfix">
<div class="col-md-6 inner-actions pull-right">

View File

@@ -1,8 +1,8 @@
{* Breadcrumb for categories browsing and editing *}
<ul class="breadcrumb">
<li><a href="{url path='admin/home'}">Home</a></li>
<li><a href="{url path='admin/catalog'}">Catalog</a></li>
<li><a href="{url path='admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='admin/catalog'}">{intl l="Catalog"}</a></li>
{ifloop rel="category_path"}
{loop name="category_path" type="category-path" visible="*" category=$category_id}

View File

@@ -0,0 +1,102 @@
<div class="form-container">
<div class="row">
{* -- Begin folders management ----------------------------------- *}
<div class="col-md-6">
<div class="well well-sm">
<div class="form-group">
<form method="POST" action="{url path='/admin/content/folder/add'}" id="related_content_form">
<p class="title title-without-tabs">{intl l='Additional categories'}</p>
<p>{intl l='A content could be attached to more than one folder. Select here the additional fodlers for this content.'}
{loop name="default_folder" type="folder" id=$DEFAULT_FOLDER}
{intl l='You can change the default folder (%title) in the "General" tab.' title=$TITLE}
{/loop}
{$exclude_from_tree = "-1"}
{loop name="additional_folders" type="folder" exclude=$DEFAULT_FOLDER content=$content_id backend_context="1" lang="$edit_language_id"}
{$exclude_from_tree = "$exclude_from_tree,$ID"}
{/loop}
<input type="hidden" name="content_id" value="{$content_id}" />
<input type="hidden" name="current_tab" value="association" />
{ifloop rel="folders"}
<div class="input-group">
<select name="additional_folder_id" id="additional_folder_id" class="form-control">
<option value="">{intl l='Select a folder...'}</option>
{loop name="folders" type="folder-tree" folder="0" exclude=$exclude_from_tree backend_context="1" lang="$edit_language_id"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $DEFAULT_FOLDER==$ID}disabled="disabled"{/if}>
{$TITLE} {if $DEFAULT_FOLDER==$ID}{intl l=' (default)'}{/if}
</option>
{/loop}
</select>
<span class="input-group-btn" id="content_add_button">
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
</span>
</div>
<span class="help-block">{intl l='Select a folder and click (+) to add it to the additional folder list'}</span>
{/ifloop}
{elseloop rel="folders"}
<div class="alert alert-info">{intl l="No Folders found"}</div>
{/elseloop}
</form>
</div>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Folder title'}</th>
{module_include location='product_folders_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="additional_folders" type="folder" content=$content_id exclude=$DEFAULT_FOLDER backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<td>
{$TITLE}
</td>
{module_include location='product_folders_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.category.delete"}
<a class="btn btn-default btn-xs delete-folder" title="{intl l='Remove the product from this category'}" href="#delete_folder_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="additional_folders"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="This product doesn't belong to any additional folder."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</div>
{* -- End folders management ------------------------------------- *}
</div>
</div>

View File

@@ -1,26 +1,28 @@
{* Breadcrumb for folders browsing and editing *}
<ul class="breadcrumb">
<li><a href="{url path='admin/home'}">Home</a></li>
<li><a href="{url path='admin/folders'}">Folders</a>
<li><a href="{url path='admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='admin/folders'}">{intl l="Folders"}</a></li>
{ifloop rel="folder_path"}</li>
{ifloop rel="folder_path"}
{loop name="folder_path" type="folder-path" visible="*" folder=$folder_id}
{if $ID == $folder_id}
{if $ID == $parent}
<li class="active">
{if $editing_folder == true}
{intl l='Editing %fold' fold="{$TITLE}"}
{else}
{$TITLE} <a href="{url path='/admin/folders/update' folder_id=$ID}" title="{intl l='Edit this folder'}">{intl l="(edit)"}</a>
{$TITLE} <a href="{url path="/admin/folders/update/$ID"}" title="{intl l='Edit this folder'}">{intl l="(edit)"}</a>
{/if}
</li>
{else}
<li><a href="{url path='/admin/folders' folder_id=" $ID" action='browse'}">{$TITLE}</a></li>
<li><a href="{url path='/admin/folders' parent="$ID" }">{$TITLE}</a></li>
{/if}
{/loop}
{/ifloop}
{elseloop rel="folder_path"}
</li>
{/elseloop}
{if $editing_content == true}
{loop name="content_path" type="content" visible="*" id=$content_id}
<li>{intl l="Editing %title" title="$TITLE"}</li>
{/loop}
{/if}
</ul>

View File

@@ -5,6 +5,9 @@
{block name="check-permissions"}admin.order.edit{/block}
{block name="main-content"}
{assign oder_tab {$smarty.get.tab|default:"cart"}}
<div class="orders edit-order">
<div id="wrapper" class="container">
@@ -17,325 +20,327 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<ul class="nav nav-tabs">
<li class="active"><a href="#cart" data-toggle="tab"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Cart"}</a></li>
<li><a href="#bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Bill"}</a></li>
<li><a href="#carriage" data-toggle="tab"><span class="glyphicon glyphicon-send"></span> {intl l="Carriage"}</a></li>
<li><a href="#settlement" data-toggle="tab"><span class="glyphicon glyphicon-credit-card"></span> {intl l="Settlement"}</a></li>
<li><a href="#address" data-toggle="tab"><span class="glyphicon glyphicon-home"></span> {intl l="Address"}</a></li>
<li><a href="#supplements" data-toggle="tab"><span class="glyphicon glyphicon-info-sign"></span> {intl l="Further information"}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane fade active in" id="cart">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about order 01201303540354'}
</caption>
<thead>
<tr>
<th>{intl l="Designation"}</th>
<th>{intl l="Price"}</th>
<th>{intl l="Quantity"}</th>
<th>{intl l="Total"}</th>
</tr>
</thead>
<div class="general-block-decorator">
<tbody>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="3"><strong>Total</strong></td>
<td><strong>180.00 &euro;</strong></td>
</tr>
</tfoot>
</table>
</div>
</div> <!-- #cart -->
{ifloop rel='the-order'}
<div class="tab-pane fade" id="bill">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Information about the bill'}
</caption>
<thead>
<tr>
<th>{intl l="Bill n°"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Firstname & Lastname"}</th>
<th>{intl l="Date & Hour"}</th>
</tr>
</thead>
{loop type="order" name="the-order" id=$order_id customer="*"}
<tbody>
<tr>
<td><a href="#">0001</a></td>
<td>Thelia</td>
<td>Dupont Jean</td>
<td>11/01/2013 14:11:00</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #bill -->
{loop type="currency" name="order-currency" id=$CURRENCY}
{assign "orderCurrency" $SYMBOL}
{/loop}
<div class="tab-pane fade" id="carriage">
<p class="title title-without-tabs clearfix">
{intl l='Information about the carriage'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Download pdf bill'}" href="#">
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download pdf bill'}
</a>
</p>
{assign "orderStatusId" $STATUS}
<dl class="dl-horizontal">
<dt>{intl l="Mode of transportation"}</dt>
<dd>Colissimo</dd>
</dl>
<dl class="dl-horizontal">
<dt>{intl l="Description"}</dt>
<dd>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ut, error, necessitatibus ipsam dolores ad quisquam provident sed repudiandae ullam quasi quae perferendis numquam voluptates doloribus laborum possimus dicta similique in?</dd>
</dl>
</div> <!-- #carriage -->
<div class="lead clearfix">
<span class='label label-default pull-left'>{$REF}</span>
<div class="pull-right select-fixed-width">
<form id="order-update-status-form" action="{url path="/admin/order/update/$ID/status"}" method="post">
<input class="js-current-tab" type="hidden" name="tab" value="{$oder_tab}">
<select class="js-update-order-status" name="status_id" data-toggle="selectpicker">
{loop type="order-status" name="all-status"}
{assign "orderStatusLabel" "order_$CODE"}
<option {if $ID == $orderStatusId}selected="selected" {/if} value="{$ID}" data-content="<span class='label label-{#$orderStatusLabel#}'>{$TITLE}</span>">{$TITLE}</option>
{/loop}
</select>
</form>
</div>
</div>
<div class="tab-pane fade" id="settlement">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about the settlement'}
</caption>
<tbody>
<tr>
<th>{intl l="Type of payment"}</th>
<td>Unknown</td>
</tr>
<tr>
<th>{intl l="Transaction reference"}</th>
<td>141100</td>
</tr>
<tr>
<th>{intl l="Total order before discount"}</th>
<td>60 &euro;</td>
</tr>
<tr>
<th>{intl l="Discount"}</th>
<td>10%</td>
</tr>
<tr>
<th>{intl l="Coupon code"}</th>
<td></td>
</tr>
<tr>
<th>{intl l="Total with discount"}</th>
<td>50 &euro;</td>
</tr>
<tr>
<th>{intl l="Freight"}</th>
<td>6 &euro;</td>
</tr>
<tr>
<th>{intl l="Total"}</th>
<td>56 &euro;</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #settlement -->
<ul class="nav nav-tabs clearfix">
<li {if $oder_tab == 'cart'}class="active"{/if}><a href="#cart" data-tab-name="cart" data-toggle="tab"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Ordered products"}</a></li>
<li {if $oder_tab == 'bill'}class="active"{/if}><a href="#bill" data-tab-name="bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Invoice and Delivery"}</a></li>
<div class="tab-pane fade clearfix" id="address">
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Billing address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this billing address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
</div>
</div>
</ul>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this delivery address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
</div>
</div>
</div> <!-- #address -->
<div class="tab-pane fade clearfix" id="supplements">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Further information'}
</caption>
<tbody>
<tr>
<th><label for="">{intl l='Status'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<select name="" id="" class="form-control">
<option value="">Status 1</option>
<option value="">Status 2</option>
<option value="">Status 3</option>
</select>
</div>
</div>
</form>
</td>
</tr>
<tr>
<th><label for="">{intl l='Order Tracking'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<input type="text" id="" name="" class="form-control" value="" title="" placeholder="">
</div>
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>
</div>
</form>
</td>
</tr>
<tr>
<th>{intl l='Bill'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download bill to pdf'}</a></td>
</tr>
<tr>
<th>{intl l='Delivery'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download delivery to pdf'}</a></td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #supplements -->
<div class="tab-content">
<div class="tab-pane fade {if $oder_tab == 'cart'}active in{/if}" id="cart">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Cart'}
</caption>
<thead>
<tr>
<th class="col-md-7">{intl l="Product"}</th>
<th class="col-md-1">{intl l="Unit. price"}</th>
<th class="col-md-1">{intl l="Tax"}</th>
<th class="col-md-1">{intl l="Unit taxed price"}</th>
<th class="col-md-1">{intl l="Quantity"}</th>
<th class="col-md-1">{intl l="Taxed total"}</th>
</tr>
</thead>
</div>
<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>
<a href="#">{$TITLE}</a>
{ifloop rel="combinations"}
<dl class="dl-horizontal">
{loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
<dt>{$ATTRIBUTE_TITLE}</dt>
<dd>{$ATTRIBUTE_AVAILABILITY_TITLE}</dd>
{/loop}
</dl>
{/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>
<tbody class="table-condensed">
<tr class="active">
<td colspan="2" class="td-unstyled"></td>
<td colspan="3"><strong>{intl l="Total without discount"}</strong></td>
<td><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}</strong></td>
</tr>
<tr>
<td colspan="2" class="td-unstyled"></td>
<td colspan="3"><strong>{intl l="Discount"}</strong></td>
<td><strong>{$orderCurrency} 0</strong></td>
</tr>
<tr class="active">
<td colspan="2" class="td-unstyled"></td>
<td colspan="3"><strong>{intl l="Coupon code"}</strong></td>
<td><strong>{$orderCurrency} 0</strong></td>
</tr>
<tr>
<td colspan="2" class="td-unstyled"></td>
<td colspan="3"><strong>{intl l="Total including discount"}</strong></td>
<td><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}</strong></td>
</tr>
<tr class="active">
<td colspan="2" class="td-unstyled"></td>
<td colspan="3"><strong>{intl l="Postage"}</strong></td>
<td><strong>{$orderCurrency} {$POSTAGE}</strong></td>
</tr>
<tr>
<td colspan="2" class="td-unstyled"></td>
<td colspan="3" class="last"><strong>{intl l="Total"}</strong></td>
<td class="last"><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT}</strong></td>
</tr>
</tbody>
</table>
</div>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Payment information'}
</caption>
<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="Transaction reference"}</th>
<td>{$TRANSACTION_REF}</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #cart -->
<div class="tab-pane fade {if $oder_tab == 'bill'}active in{/if} clearfix" id="bill">
<div class="title title-without-tabs clearfix">
{intl l='Delivery module'}
<div class="pull-right col-md-3">
<form action="{url path="/admin/order/update/$ID/delivery-ref"}" method="post">
<input class="js-current-tab" type="hidden" name="tab" value="{$oder_tab}">
<div class="input-group">
<input class="form-control" type="text" name="delivery_ref" value="{$DELIVERY_REF}" placeholder="{intl l="tracking reference"}"/>
<span class="input-group-btn">
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span></button>
</span>
</div>
</form>
</div>
</div>
{loop name="payment-module" type="module" id=$DELIVERY_MODULE}
<dl class="dl-horizontal">
<dt>{intl l="Name"}</dt>
<dd>{$TITLE}</dd>
</dl>
<dl class="dl-horizontal">
<dt>{intl l="Description"}</dt>
<dd>{$DESCRIPTION}</dd>
</dl>
{/loop}
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<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="{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">
<span class="glyphicon glyphicon-edit"></span>
</a>
</div>
</caption>
<tbody>
<tr>
<th>{intl l="Invoice reference"}</th>
<td>{$INVOICE_REF}</td>
</tr>
<tr>
<th>{intl l="Invoice date"}</th>
<td>{format_date date=$INVOICE_DATE output="date"}</td>
</tr>
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
<tr data-field-class="js-title" data-value="{$TITLE}">
<th>{intl l="Title"}</th>
<td>{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}</td>
</tr>
<tr data-field-class="js-company">
<th>{intl l="Company"}</th>
<td>{$COMPANY}</td>
</tr>
<tr data-field-class="js-firstname">
<th>{intl l="Firstname"}</th>
<td>{$FIRSTNAME}</td>
</tr>
<tr data-field-class="js-lastname">
<th>{intl l="Lastname"}</th>
<td>{$LASTNAME}</td>
</tr>
<tr data-field-class="js-address1">
<th>{intl l="Street address"}</th>
<td>{$ADDRESS1}</td>
</tr>
<tr data-field-class="js-address2">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS2}</td>
</tr>
<tr data-field-class="js-address3">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS3}</td>
</tr>
<tr data-field-class="js-zipcode">
<th>{intl l="Zip code"}</th>
<td>{$ZIPCODE}</td>
</tr>
<tr data-field-class="js-city">
<th>{intl l="City"}</th>
<td>{$CITY}</td>
</tr>
<tr data-field-class="js-country" data-value="{$COUNTRY}">
<th>{intl l="Country"}</th>
<td>{loop type="country" name="order-invoice-address-country" id=$COUNTRY}{$TITLE}{/loop}</td>
</tr>
<tr data-field-class="js-phone">
<th>{intl l="Phone"}</th>
<td>{$PHONE}</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<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="{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">
<span class="glyphicon glyphicon-edit"></span>
</a>
</div>
</caption>
<tbody>
{loop type="order_address" name="order-delivery-address" id=$DELIVERY_ADDRESS}
<tr data-field-class="js-title" data-value="{$TITLE}">
<th>{intl l="Title"}</th>
<td>{loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}</td>
</tr>
<tr data-field-class="js-company">
<th>{intl l="Company"}</th>
<td>{$COMPANY}</td>
</tr>
<tr data-field-class="js-firstname">
<th>{intl l="Firstname"}</th>
<td>{$FIRSTNAME}</td>
</tr>
<tr data-field-class="js-lastname">
<th>{intl l="Lastname"}</th>
<td>{$LASTNAME}</td>
</tr>
<tr data-field-class="js-address1">
<th>{intl l="Street address"}</th>
<td>{$ADDRESS1}</td>
</tr>
<tr data-field-class="js-address2">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS2}</td>
</tr>
<tr data-field-class="js-address3">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS3}</td>
</tr>
<tr data-field-class="js-zipcode">
<th>{intl l="Zip code"}</th>
<td>{$ZIPCODE}</td>
</tr>
<tr data-field-class="js-city">
<th>{intl l="City"}</th>
<td>{$CITY}</td>
</tr>
<tr data-field-class="js-country" data-value="{$COUNTRY}">
<th>{intl l="Country"}</th>
<td>{loop type="country" name="order-delivery-address-country" id=$COUNTRY}{$TITLE}{/loop}</td>
</tr>
<tr data-field-class="js-phone">
<th>{intl l="Phone"}</th>
<td>{$PHONE}</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</div> <!-- #bill -->
</div>
{/loop}
{/ifloop}
{elseloop rel="the-order"}
DOES NOT EXISTS
{/elseloop}
</div>
@@ -347,34 +352,31 @@
{* Update an Address *}
{form name="thelia.address.update"}
{form name="thelia.order.update.address"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "edit_address_dialog"}
{capture "edit_order_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=$form field='id'}
<input type="hidden" id="{$label_attr.for}" name="{$name}" class="js-order-address-id" value="{$value}">
{/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'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-company" 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>
<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 js-title">
{loop type="title" name="title1"}
<option value="{$ID}">{$LONG}</option>
<option value='{$ID}'>{$LONG}</option>
{/loop}
</select>
</div>
@@ -382,79 +384,128 @@
{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'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-firstname" 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'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-lastname" 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'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-address1" 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'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-address2" 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'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-address3" 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'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-zipcode" 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'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-city" 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">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control js-country">
{loop type="country" name="country1"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
</select>
</div>
{/form_field}
{/form_field}
{form_field form=$form field='phone'}
<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 js-phone" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Phone'}">
</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_id = "edit_order_address_dialog"
dialog_title = {intl l="Edit order address"}
dialog_body = {$smarty.capture.edit_order_address_dialog nofilter}
dialog_ok_label = {intl l="Edit this address"}
dialog_ok_label = {intl l="Confirm changes"}
dialog_cancel_label = {intl l="Cancel"}
form_action = {url path='/admin/address/update'}
form_action = {url path="/admin/order/update/$order_id/address"}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
form_id = 'updateOrderAddressForm'
}
{/form}
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
<script src='{$asset_url}'></script>
{/javascripts}
{javascripts file='assets/js/main.js'}
<script src='{$asset_url}'></script>
{/javascripts}
<script type="text/javascript">
$(".js-update-order-status").change(function(e){
e.preventDefault();
$('#order-update-status-form').submit();
});
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
$(".js-current-tab").val($(e.target).data("tab-name"));
});
$(".js-update-order-address").click(function(){
$(".js-order-address-id").val(
$(this).data("address-id")
);
$(this).parents('table').find('tr').each(function(k, v) {
if(!$(v).data('field-class')) {
return true;
}
if($(v).data('value')) {
var fieldValue = $(v).data('value');
} else {
var fieldValue = $(v).children('td').text();
}
$('.' + $(v).data('field-class')).val(fieldValue);
});
});
</script>
{/block}

View File

@@ -5,13 +5,15 @@
{block name="check-permissions"}admin.orders.view{/block}
{block name="main-content"}
{assign order_page {$smarty.get.page|default:1}}
{assign status_filter {$smarty.get.status|assertType:'IntListType'}}
<div class="orders">
<div id="wrapper" class="container">
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/orders'}">{intl l="Orders"}</a></li>
<li><a href="#">{intl l="Orders"}</a></li>
</ul>
{module_include location='orders_top'}
@@ -23,17 +25,15 @@
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Orders'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create an order'}" href="#creation_dialog">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="order-list"}
<thead>
<tr>
<th>{intl l="Order n°"}</th>
<th>{intl l="Date & Hour"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Company"}</th>
<th>{intl l="Name"}</th>
<th>{intl l="Amount"}</th>
<th>{intl l="Status"}</th>
@@ -45,88 +45,83 @@
</thead>
<tbody>
{loop type="order" name="order-list" customer="*" backend_context="1" page={$order_page} limit={#max_displayed_orders#} status=$status_filter|default:'*'}
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
{assign "orderInvoiceFirstName" $FIRSTNAME}
{assign "orderInvoiceLastName" $LASTNAME}
{assign "orderInvoiceCompany" $COMPANY}
{/loop}
{loop type="order-status" name="order-status" id=$STATUS}
{assign "orderStatus" $TITLE}
{assign "orderStatusLabel" "order_$CODE"}
{/loop}
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-success">Paid</span></td>
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
<td>{format_date date=$CREATE_DATE}</td>
<td>{$orderInvoiceCompany}</td>
<td><a href="{url path="/admin/customer/update/$CUSTOMER"}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
<td>{$TOTAL_TAXED_AMOUNT}</td>
<td><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.update"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-danger">Canceled</span></td>
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-info">Current</span></td>
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{if $STATUS !== 5}
<a class="btn btn-default btn-xs order-cancel" title="{intl l='Cancel this order'}" href="#cancel_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-remove-sign"></span></a>
{/if}
{/loop}
</div>
</td>
</tr>
<!-- <tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="No mailing template has been created yet. Click the + button to create one."}
</div>
</td>
</tr> -->
{/loop}
</tbody>
<tfoot>
<tr>
<td colspan="7">
<div class="text-center">
<ul class="pagination pagination-centered">
{if $order_page != 1}
<li><a href="{url path="/admin/orders" page="1"}">&laquo;</a></li>
{else}
<li class="disabled"><a href="#">&laquo;</a></li>
{/if}
{pageloop rel="order-list"}
{if $PAGE != $CURRENT}
<li><a href="{url path="/admin/orders" page=$PAGE}">{$PAGE}</a></li>
{else}
<li class="active"><a href="#">{$PAGE}</a></li>
{/if}
{/pageloop}
{if $PAGE == $LAST && $LAST != $CURRENT}
<li><a href="{url path="/admin/orders" page="$PAGE"}">&raquo;</a></li>
{else}
<li class="disabled"><a href="#">&raquo;</a></li>
{/if}
</ul>
</div>
</td>
</tr>
</tfoot>
{/ifloop}
</table>
</div>
</div>
@@ -138,22 +133,34 @@
</div>
</div>
{* Delete order confirmation dialog *}
{* Cancel order confirmation dialog *}
{capture "delete_order_dialog"}
<input type="hidden" name="current_order_id" value="{$current_order_id}" />
<input type="hidden" name="order_id" id="delete_order_id" value"" />
{capture "cancel_order_dialog"}
<input type="hidden" name="order_page" value="{$order_page}">
<input type="hidden" name="order_id" id="cancel_order_id" />
<input type="hidden" name="status_id" value="5" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_order_dialog"
dialog_id = "cancel_order_dialog"
dialog_title = {intl l="Delete an order"}
dialog_message = {intl l="Do you really want to delete this order ?"}
dialog_message = {intl l="Do you really want to cancel this order ?"}
form_action = {url path='/admin/orders/delete'}
form_content = {$smarty.capture.delete_order_dialog nofilter}
form_action = {url path='/admin/order/update/status'}
form_content = {$smarty.capture.cancel_order_dialog nofilter}
form_id = "cancel-order-form"
}
{/block}
{block name="javascript-initialization"}
<script type="text/javascript">
$(".order-cancel").click(function(){
$("#cancel_order_id").val($(this).attr("data-id"));
});
</script>
{/block}

View File

@@ -2,10 +2,10 @@
{block name="breadcrumb"}
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
<strong id="breadcrumb-label">You are here: </strong>
<strong id="breadcrumb-label">{intl l="You are here"} : </strong>
<ul class="breadcrumb" itemprop="breadcrumb">
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">Home</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">Cart</span></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="Cart"}</span></li>
</ul>
</nav><!-- /.nav-breadcrumb -->
{/block}
@@ -14,13 +14,13 @@
<div class="main">
<article id="cart" class="col-main" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page-header">Your Cart</h1>
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
<div class="btn-group checkout-progress">
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">1</span> <span class="step-label">{intl l="Your Cart"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
</div>
<table class="table table-cart">
@@ -35,20 +35,20 @@
<tr>
<th class="image">&nbsp;</th>
<th class="product">
<span class="hidden-xs">Product Name</span>
<span class="visible-xs">Name</span>
<span class="hidden-xs">{intl l="Product Name"}</span>
<span class="visible-xs">{intl l="Name"}</span>
</th>
<th class="unitprice">
<span class="hidden-xs">Unit Price</span>
<span class="visible-xs">Price</span>
<span class="hidden-xs">{intl l="Unit Price"}</span>
<span class="visible-xs">{intl l="Price"}</span>
</th>
<th class="qty">
<span class="hidden-xs">Quantity</span>
<span class="visible-xs">Qty</span>
<span class="hidden-xs">{intl l="Quantity"}</span>
<span class="visible-xs">{intl l="Qty"}</span>
</th>
<th class="subprice">
<span class="hidden-xs">Total <abbr title="Tax Inclusive">TTC</abbr></span>
<span class="visible-xs">Total</span>
<span class="hidden-xs">{intl l="Total"} <abbr title="{intl l="Tax Inclusive"}">{intl l="TTC"}</abbr></span>
<span class="visible-xs">{intl l="Total"}</span>
</th>
</tr>
</thead>
@@ -75,9 +75,9 @@
</a></h3>
<div class="product-options">
<dl class="dl-horizontal">
<dt>Available :</dt>
<dd>In Stock</dd>
<dt>No.</dt>
<dt>{intl l="Available"} :</dt>
<dd>{intl l="In Stock"}</dd>
<dt>{intl l="No."}</dt>
<dd>{$REF}</dd>
{*<dt>Select Size</dt>
<dd>Large</dd>
@@ -87,13 +87,13 @@
<dd>Option 1</dd>*}
</dl>
</div>
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove">Remove</a>
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove">{intl l="Remove"}</a>
</td>
<td class="unitprice">
{if $IS_PROMO == 1}
{assign "real_price" $PROMO_TAXED_PRICE}
<div class="special-price"><span class="price">{currency attr="symbol"} {$PROMO_TAXED_PRICE}</span></div>
<small class="old-price">instead of <span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></small>
<small class="old-price">{intl l="instead of"} <span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></small>
{else}
{assign "real_price" $TAXED_PRICE}
<div class="special-price"><span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></div>
@@ -122,7 +122,7 @@
<tfoot>
<tr >
<td colspan="3" class="empty">&nbsp;</td>
<th class="total">Total <abbr title="Tax Inclusive">TTC</abbr></th>
<th class="total">{intl l="Total"} <abbr title="{intl l="Tax Inclusive"}">{intl l="TTC"}</abbr></th>
<td class="total">
<div class="total-price">
<span class="price">{currency attr="symbol"} {cart attr="total_taxed_price"}</span>
@@ -132,14 +132,14 @@
</tfoot>
</table>
<a href="{navigate to="index"}" role="button" class="btn btn-continue-shopping"><span>Continue Shopping</span></a>
<a href="{url path="/order/delivery"}" class="btn btn-checkout">Proceed checkout</a>
<a href="{navigate to="index"}" role="button" class="btn btn-continue-shopping"><span>{intl l="Continue Shopping"}</span></a>
<a href="{url path="/order/delivery"}" class="btn btn-checkout">{intl l="Proceed checkout"}</a>
</article>
<aside id="products-upsell" role="complementary" aria-labelledby="products-upsell-label">
<div class="products-heading">
<h3 id="products-upsell-label">Upsell Products</h3>
<h3 id="products-upsell-label">{intl l="Upsell Products"}</h3>
</div>
<div class="products-content">

View File

@@ -62,24 +62,6 @@ URL: http://www.thelia.net
<nav class="navbar-collapse collapse nav-main" role="navigation" aria-label="Main Navigation">
<ul class="nav navbar-nav navbar-categories">
<li class="active"><a href="{url path="/"}" class="home" tabindex="-1">Home</a></li>
{* <li class="dropdown">
<a href="" data-toggle="dropdown" class="dropdown-toggle">Pages</a>
<ul class="dropdown-menu list-subnav" role="menu">
<li class="active"><a href="index.html" tabindex="-1">Index</a></li>
<li><a href="category.html">Category Grid</a></li>
<li><a href="category-list.html">Category List</a></li>
<li><a href="account.html">Account</a></li>
<li><a href="login.html">Login</a></li>
<li><a href="password.html">Forgot Password</a></li>
<li><a href="register.html">Register</a></li>
<li><a href="cart.html">Cart</a></li>
<li><a href="cart-step2.html">Cart (Step 2)</a></li>
<li><a href="cart-step3.html">Cart (Step 3)</a></li>
<li><a href="cart-step4.html">Cart (Step 4)</a></li>
<li><a href="product-details.html">Product details</a></li>
<li><a href="address.html">New address</a></li>
</ul>
</li>*}
{loop type="category" name="category.navigation" parent="0"}
<li><a href="{$URL}">{$TITLE}</a></li>
{/loop}
@@ -90,12 +72,12 @@ URL: http://www.thelia.net
<li><a href="{url path="/customer/account"}" class="login">{intl l="My Account"}</a></li>
{/loop}
{elseloop rel="customer_info_block" rel="customer_info_block"}
{elseloop rel="customer_info_block"}
<li><a href="{url path="/register"}" class="register">{intl l="Register"}!</a></li>
<li><a href="{url path="/login"}" class="login">{intl l="Log In!"}</a></li>
{/elseloop}
<li class="dropdown">
<a href="{url path="/cart"}" class="dropdown-toggle cart" data-toggle="dropdown">
<a href="{url path="/cart"}" class="dropdown-toggle cart" {*data-toggle="dropdown"*}>
Cart <span class="badge">{cart attr="count_item"}</span>
</a>
</li>

View File

@@ -7,11 +7,11 @@
{block name="breadcrumb"}
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
<strong id="breadcrumb-label">You are here: </strong>
<strong id="breadcrumb-label">{intl l="You are here"} : </strong>
<ul class="breadcrumb" itemprop="breadcrumb">
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">Home</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{url path="/cart"}" itemprop="url"><span itemprop="title">Cart</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">Billing and delivery</span></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{url path="/cart"}" itemprop="url"><span itemprop="title">{intl l="Cart"}</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="Billing and delivery"}</span></li>
</ul>
</nav><!-- /.nav-breadcrumb -->
{/block}
@@ -20,13 +20,13 @@
<div class="main">
<article id="cart" class="col-main" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page-header">Your Cart</h1>
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
<div class="btn-group checkout-progress">
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label">{intl l="Your Cart"}</span></a>
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
</div>
{form name="thelia.order.delivery"}
@@ -40,8 +40,8 @@
<div id="delivery-address" class="panel">
<div class="panel-heading clearfix">
<a href="{url path="/address/create"}" class="btn btn-add-address">Add a new address</a>
Chose your delivery address
<a href="{url path="/address/create"}" class="btn btn-add-address">{intl l="Add a new address"}</a>
{intl l="Chose your delivery address"}
{if $error}
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
{/if}
@@ -95,7 +95,7 @@
</td>
<td>
<div class="group-btn">
<a href="{url path="/address/update/{$ID}"}" class="btn btn-edit-address" data-toggle="tooltip" title="Edit this address"><i class="icon-pencil"></i> <span>{intl l="Edit"}</span></a>
<a href="{url path="/address/update/{$ID}"}" class="btn btn-edit-address" data-toggle="tooltip" title="{intl l="Edit this address"}"><i class="icon-pencil"></i> <span>{intl l="Edit"}</span></a>
{if $DEFAULT != 1}
<a href="{url path="/address/delete/{$ID}"}" class="btn btn-remove-address js-remove-address" title="{intl l="Remove this address"}" data-toggle="tooltip"><i class="icon-remove"></i> <span>{intl l="Cancel"}</span></a>
{/if}
@@ -116,7 +116,7 @@
<div id="delivery-method" class="panel">
<div class="panel-heading">
Choose your delivery method
{intl l="Choose your delivery method"}
{if $error}
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
{/if}
@@ -137,8 +137,8 @@
{/form_field}
<a href="{url path="/cart"}" role="button" class="btn btn-back"><span>Back</span></a>
<button type="submit" class="btn btn-checkout-next"><span>Next Step</span></button>
<a href="{url path="/cart"}" role="button" class="btn btn-back"><span>{intl l="Back"}</span></a>
<button type="submit" class="btn btn-checkout-next"><span>{intl l="Next Step"}</span></button>
</form>
{/form}

View File

@@ -8,11 +8,11 @@
{block name="breadcrumb"}
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
<strong id="breadcrumb-label">You are here: </strong>
<strong id="breadcrumb-label">{intl l="You are here"} : </strong>
<ul class="breadcrumb" itemprop="breadcrumb">
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">Home</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{url path="/cart"}" itemprop="url"><span itemprop="title">Cart</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">My order</span></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{url path="/cart"}" itemprop="url"><span itemprop="title">{intl l="Cart"}</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="My order"}</span></li>
</ul>
</nav><!-- /.nav-breadcrumb -->
{/block}
@@ -21,13 +21,13 @@
<div class="main">
<article class="col-main" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page-header">Your Cart</h1>
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
<div class="btn-group checkout-progress">
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label"> <span>Your Cart</span></a>
<a href="{url path="/order/delivery"}" role="button" class="btn btn-step"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label"> <span>{intl l="Your Cart"}</span></a>
<a href="{url path="/order/delivery"}" role="button" class="btn btn-step"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
</div>
{form name="thelia.order.payment"}
@@ -49,20 +49,20 @@
<tr>
<th class="image">&nbsp;</th>
<th class="product">
<span class="hidden-xs">Product Name</span>
<span class="visible-xs">Name</span>
<span class="hidden-xs">{intl l="Product Name"}</span>
<span class="visible-xs">{intl l="Name"}</span>
</th>
<th class="unitprice">
<span class="hidden-xs">Unit Price</span>
<span class="visible-xs">Price</span>
<span class="hidden-xs">{intl l="Unit Price"}</span>
<span class="visible-xs">{intl l="Price"}</span>
</th>
<th class="qty">
<span class="hidden-xs">Quantity</span>
<span class="visible-xs">Quantity</span>
<span class="hidden-xs">{intl l="Quantity"}</span>
<span class="visible-xs">{intl l="Quantity"}</span>
</th>
<th class="subprice">
<span class="hidden-xs">Total <abbr title="Tax Inclusive">TTC</abbr></span>
<span class="visible-xs">Total</span>
<span class="hidden-xs">{intl l="Total"} <abbr title="{intl l="Tax Inclusive"}">{intl l="TTC"}</abbr></span>
<span class="visible-xs">{intl l="Total"}</span>
</th>
</tr>
</thead>
@@ -86,13 +86,13 @@
</td>
<td class="product" >
<h3 class="name">
Product #{$cart_count}
{$TITLE}
</h3>
<div class="product-options">
<dl class="dl-horizontal">
<dt>Available :</dt>
<dd>In Stock</dd>
<dt>No.</dt>
<dt>{intl l="Available"} :</dt>
<dd>{intl l="In Stock"}</dd>
<dt>{intl l="No."}</dt>
<dd>{$REF}</dd>
{*<dt>Select Size</dt>
<dd>Large</dd>
@@ -107,7 +107,7 @@
{if $IS_PROMO == 1}
{assign "real_price" $PROMO_TAXED_PRICE}
<div class="special-price"><span class="price">{currency attr="symbol"} {$PROMO_TAXED_PRICE}</span></div>
<small class="old-price">instead of <span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></small>
<small class="old-price">{intl l="instead of"} <span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></small>
{else}
{assign "real_price" $TAXED_PRICE}
<div class="special-price"><span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></div>
@@ -127,7 +127,7 @@
<tfoot>
<tr >
<td rowspan="3" colspan="3" class="empty">&nbsp;</td>
<th class="shipping">Shipping Tax</th>
<th class="shipping">{intl l="Shipping Tax"}</th>
<td class="shipping">
<div class="shipping-price">
<span class="price">{currency attr="symbol"} {order attr="postage"}</span>
@@ -135,18 +135,18 @@
</td>
</tr>
<tr >
<th class="coupon"><label for="coupon">Enter your coupon code if you have one</label></th>
<th class="coupon"><label for="coupon">{intl l="You may have a coupon ?"}</label></th>
<td class="coupon">
<div class="input-group">
<input type="text" name="coupon" id="coupon" class="form-control">
<span class="input-group-btn">
<button type="button" class="btn btn-coupon">Ok</button>
<button type="button" class="btn btn-coupon">{intl l="Ok"}</button>
</span>
</div><!-- /input-group -->
</td>
</tr>
<tr >
<th class="total">Total <abbr title="Tax Inclusive">TTC</abbr></th>
<th class="total">{intl l="Total"} <abbr title="{intl l="Tax Inclusive"}">{intl l="TTC"}</abbr></th>
<td class="total">
<div class="total-price">
<span class="price">{currency attr="symbol"} {{cart attr="total_taxed_price"} + {order attr="postage"}}</span>
@@ -158,8 +158,8 @@
<div id="cart-address">
<div class="panel">
{loop type="address" name="delivery-address" id="{order attr="delivery_address"}"}
<div class="panel-heading">Delivery address</div>
{loop type="address" name="delivery-address" id={order attr="delivery_address"}}
<div class="panel-heading">{intl l="Delivery address"}</div>
<div class="panel-body">
<span class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$LASTNAME|upper} {$FIRSTNAME|ucwords}</span>
<span class="org">{$COMPANY}</span>
@@ -181,7 +181,7 @@
{form_field form=$form field='invoice-address'}
<div class="panel">
<div class="panel-heading">Billing address</div>
<div class="panel-heading">{intl l="Billing addres"}s</div>
{if $error}
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
@@ -191,7 +191,17 @@
<table class="col-md-12">
{loop type="address" name="invoice-address" default="{if !$error && $value}*{else}true{/if}" id="{if !$error && $value}{$value}{else}*{/if}"}
{if !$error && $value}
{assign defaultParam '*'}
{else}
{assign defaultParam 'true'}
{/if}
{if !$error && $value}
{assign idParam $value}
{else}
{assign idParam '*'}
{/if}
{loop type="address" name="invoice-address" default=$defaultParam id=$idParam}
<tr>
<td>
@@ -217,14 +227,24 @@
{if !$error}
<tr class="js-change-invoice-address">
<td colspan="2">
<a href="#" class="btn btn-change-address">Change address</a>
<a href="#" class="btn btn-change-address">{intl l="Change address"}</a>
</td>
</tr>
{/if}
{/loop}
{loop type="address" name="invoice-address" default="{if !$error && $value}*{else}false{/if}" exclude="{if !$error && $value}{$value}{else}none{/if}"}
{if !$error && $value}
{assign defaultParam '*'}
{else}
{assign defaultParam 'false'}
{/if}
{if !$error && $value}
{assign excludeParam $value}
{else}
{assign excludeParam 'none'}
{/if}
{loop type="address" name="invoice-address" default=$defaultParam exclude=$excludeParam}
<tr class="js-other-invoice-address {if !$error}hidden{/if}">
<td>
@@ -261,7 +281,7 @@
{form_field form=$form field='payment-module'}
<div id="payment-method" class="panel">
<div class="panel-heading">Choose your payment method</div>
<div class="panel-heading">{intl l="Choose your payment method"}</div>
{if $error}
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
@@ -294,8 +314,8 @@
{/form_field}
<a href="{url path="/order/delivery"}" role="button" class="btn btn-back"><span>Back</span></a>
<button type="submit" class="btn btn-checkout-next"><span>Next Step</span></button>
<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="Next Step"}</span></button>
</form>
{/form}

View File

@@ -2,11 +2,11 @@
{block name="breadcrumb"}
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
<strong id="breadcrumb-label">You are here: </strong>
<strong id="breadcrumb-label">{intl l="You are here"} : </strong>
<ul class="breadcrumb" itemprop="breadcrumb">
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">Home</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{url path="/cart"}" itemprop="url"><span itemprop="title">Cart</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">Secure Payment</span></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{url path="/cart"}" itemprop="url"><span itemprop="title">{intl l="Cart"}</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="Secure Payment"}</span></li>
</ul>
</nav><!-- /.nav-breadcrumb -->
{/block}
@@ -15,32 +15,32 @@
<div class="main">
<article class="col-main clearfix" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page-header">Your Cart</h1>
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
<div class="btn-group checkout-progress">
<a href="cart.php" role="button" class="btn btn-step disabled"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
<a href="cart-step2.php" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
<a href="cart-step3.php" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
<a href="cart-step4.php" role="button" class="btn btn-step active"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
<a href="cart.php" role="button" class="btn btn-step disabled"><span class="step-nb">1</span> <span class="step-label">{intl l="Your Cart"}</span></a>
<a href="cart-step2.php" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
<a href="cart-step3.php" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
<a href="cart-step4.php" role="button" class="btn btn-step active"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
</div>
{loop type="order" name="placed-order" id=$placed_order_id}
<div id="payment-success" class="panel">
<div class="panel-heading">
<h3 class="panel-title">You chose to pay by : <span class="payment-method">{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</span></h3>
<h3 class="panel-title">{intl l="You chose to pay by"} : <span class="payment-method">{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</span></h3>
</div>
<div class="panel-body">
<h3>Thank you for the trust you place in us.</h3>
<p>A summary of your order email has been sent to the following address: {customer attr="email"}</p>
<p>Your order will be confirmed by us upon receipt of your payment.</p>
<h3>{intl l="Thank you for the trust you place in us."}</h3>
<p>{intl l="A summary of your order email has been sent to the following address"} : {customer attr="email"}</p>
<p>{intl l="Your order will be confirmed by us upon receipt of your payment."}</p>
<dl class="dl-horizontal">
<dt>Order number : </dt>
<dt>{intl l="Order number"} : </dt>
<dd>{$REF}</dd>
<dt>Date : </dt>
<dt>{intl l="Date"} : </dt>
<dd>{format_date date=$CREATE_DATE output="date"}</dd>
<dt>Total : </dt>
<dt>{intl l="Total"} : </dt>
<dd>{loop type="currency" name="order-currency" id=$CURRENCY}{$SYMBOL}{/loop} {$TOTAL_TAXED_AMOUNT}</dd>
</dl>
</div>
@@ -48,17 +48,9 @@
{/loop}
<a href="{navigate to="index"}" role="button" class="btn btn-checkout-home"><span>Go home</span></a>
<a href="{navigate to="index"}" role="button" class="btn btn-checkout-home"><span>{intl l="Go home"}</span></a>
</article>
</div>
{/block}
{block name="javascript-initialization"}
<script type="text/javascript">
jQuery(function($order) {
});
</script>
{/block}

View File

@@ -26,7 +26,7 @@
<meta itemprop="brand" content="{$TITLE}">
{/loop}
{/loop}
{loop name="brand.feature" type="feature" product=$ID title="isbn"}
{loop name="isbn.feature" type="feature" product=$ID title="isbn"}
{loop name="brand.value" type="feature_value" feature=$ID product=$product_id}
<meta itemprop="productID" content="isbn:{$TITLE}">
{/loop}

View File

@@ -204,7 +204,14 @@
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
<option value="">-- {intl l="Select Country"} --</option>
{loop type="country" name="country.list"}
<option value="{$ID}" {if $value == $ID}selected{/if} >{$TITLE}</option>
<option value="{$ID}"
{if $value != ""}
{if $value == $ID}selected{/if}
{else}
{if $IS_DEFAULT}selected{/if}
{/if}
>{$TITLE}</option>
{/loop}
</select>
{if $error }

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>