Il manquait plein de fichiers dans Git
This commit is contained in:
@@ -58,21 +58,21 @@ var OWNER_CANT_VOTE = 'OWNER_CANT_VOTE';
|
||||
<link href="/templates/corporate/css/ie.css" rel="stylesheet" type="text/css" />
|
||||
<![endif]-->
|
||||
<link rel="shortcut icon" href="/templates/corporate/favicon.ico" />
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-20717501-4']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -117,107 +117,107 @@ _gaq.push(['_trackPageview']);
|
||||
|
||||
|
||||
|
||||
<p><img src="/images/stories/fran.gif" border="0" alt="fran.gif" title="fran.gif" /></p>
|
||||
|
||||
|
||||
|
||||
<p><embed src="http://www.la-mousse.com/images/consensus2010fr.pdf" width="720" height="576"/></p><div id="comments-container">
|
||||
<div id="comments-header">
|
||||
<h3>Commentaires</h3><a name="comments"></a>
|
||||
<!--<p>Sort by <a href="#" class="active">Date</a> <a href="#">Rating</a> <a href="#">Last Activity</a></p>-->
|
||||
</div>
|
||||
<div id="allcomments">
|
||||
<div class="comment-item" id="commentID346">
|
||||
<div class="comment-item-header"><a name="commentID346"></a>
|
||||
<a href="/component/comprofiler/userprofile/lopette.html"><img src="http://la-mousse.com/components/com_chronocomments/images/avatar1.png" alt="avatar" class="avatar" width="26" height="26" /></a>
|
||||
<span class="nickname-link">lopette</span>
|
||||
<div class="rating">
|
||||
<div class="score" id="score346">+5</div> <div id="plus_346" class="rating-plus" onmouseover="showPlus(this.id);" onClick="addPlus(346);" onmouseout="hidePlus(this.id);"> </div> <div id="minus_346" class="rating-minus" onmouseover="showMinus(this.id);" onClick="addMinus(346);" onmouseout="hideMinus(this.id);"> </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
ll
|
||||
</div>
|
||||
<div class="comment-status">
|
||||
<strong><a href="#commentID346">Dimanche 14 Octobre 2012, 18:30</a></strong>
|
||||
<div class="comment-button" id="post_346" onmouseover="showShadow(this.id);" onmouseout="hideShadow(this.id);" onclick="showCommentForm(346);">
|
||||
<div class="comment-button-left" id="post_346_l"></div>
|
||||
<div class="comment-button-center" id="post_346_c">Répondre</div>
|
||||
<div class="comment-button-right" id="post_346_r"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="post_346_form" class="comment-form">
|
||||
<div id="post_346_form_loading" style="text-align:center; display:none;"><img src="http://la-mousse.com/components/com_chronocomments/loaderb.gif" /></div>
|
||||
<fieldset>
|
||||
<form action="index2.php?option=com_chronocomments&task=savecomment" id="ccform_346" name="ccform_346" method="post" >
|
||||
<textarea id="post_346_text" name="text" cols="" rows="" class="form-text"></textarea>
|
||||
<input name="name" type="text" id="ccname_346" class="form-input" value="MONFREUX" /> <span class="input-text">Nom *</span><br /> <input name="email" type="text" id="ccemail_346" class="form-input" value="dr.monfreux@sterivein.com" /> <span class="input-text">Courriel (pour vérification & réponses)</span><br />
|
||||
<input name="url" type="text" id="ccurl_346" value="http://" class="form-input" /> <span class="input-text">URL</span><br />
|
||||
<input name="comment_captcha" type="text" size="5" style="width:30%" id="comment_captcha_346" class="form-input" /> <span class="input-text">Code</span>
|
||||
<img id="comment_captcha_img" class="comment_captcha_img" src="http://la-mousse.com/components/com_chronocomments/chrono_verification.php?imtype=1&anticache=7111">
|
||||
<br />
|
||||
<span class="input-text"><!-- You are not allowed to remove the next credit link without a ChronoComments license from ChronoEngine.com --><strong>ChronoComments by </strong><a target="_blank" href="http://www.chronoengine.com"><strong>Joomla Professional Solutions</strong></a></span>
|
||||
<div class="clear"></div>
|
||||
<div class="comment-status">
|
||||
|
||||
<div class="comment-button" id="submit_346" onmouseover="showShadow(this.id);" onmouseout="hideShadow(this.id);" onclick="submitCommentForm(346);">
|
||||
<div class="comment-button-left" id="submit_346_l"></div>
|
||||
<div class="comment-button-center" id="submit_346_c">Soumettre ce commentaire</div>
|
||||
<div class="comment-button-right" id="submit_346_r"></div>
|
||||
</div>
|
||||
<div class="comment-button" id="cancel_346" onmouseover="showShadow(this.id);" onmouseout="hideShadow(this.id);" onclick="hideCommentForm(346);">
|
||||
<div class="comment-button-left" id="cancel_346_l"></div>
|
||||
<div class="comment-button-center" id="cancel_346_c">Annuler</div>
|
||||
<div class="comment-button-right" id="cancel_346_r"></div>
|
||||
</div>
|
||||
</div>
|
||||
<input name="component" type="hidden" value="com_content" />
|
||||
<input name="pageid" type="hidden" value="80" />
|
||||
<input name="userid" type="hidden" value="128" />
|
||||
<input name="commentid" type="hidden" value="" />
|
||||
<input name="parentid" type="hidden" value="346" />
|
||||
<input type="hidden" name="3194a490d39f67829591f71794a7cbbe" value="1" /> </form>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="clear1"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="post_x1_form" class="comment-form display">
|
||||
<div id="post_x1_form_loading" style="text-align:center; display:none;"><img src="http://la-mousse.com/components/com_chronocomments/loaderb.gif" /></div>
|
||||
<form action="index2.php?option=com_chronocomments&task=savecomment" id="ccform_x1" name="ccform_x1" method="post" >
|
||||
<textarea name="text" id="post_x1_text" cols="" rows="" class="form-text"></textarea>
|
||||
<input name="name" type="text" id="ccname_x1" class="form-input" value="MONFREUX" /> <span class="input-text">Nom *</span><br /> <input name="email" type="text" id="ccemail_x1" class="form-input" value="dr.monfreux@sterivein.com" /> <span class="input-text">Courriel (pour vérification & réponses)</span><br />
|
||||
<input name="url" type="text" id="ccurl_x1" value="http://" class="form-input" /> <span class="input-text">URL</span><br />
|
||||
<input name="comment_captcha" type="text" size="5" style="width:30%" id="comment_captcha_x1" class="form-input" /> <span class="input-text">Code</span>
|
||||
<img id="comment_captcha_img" class="comment_captcha_img" src="http://la-mousse.com/components/com_chronocomments/chrono_verification.php?imtype=1&anticache=71140">
|
||||
<br />
|
||||
<span class="input-text"><!-- You are not allowed to remove the next credit link without a ChronoComments license from ChronoEngine.com --><strong>ChronoComments by </strong><a target="_blank" href="http://www.chronoengine.com"><strong>Joomla Professional Solutions</strong></a></span>
|
||||
<div class="clear"></div>
|
||||
<div class="comment-status">
|
||||
|
||||
<div class="comment-button" id="submit_x1" onmouseover="showShadow(this.id);" onmouseout="hideShadow(this.id);" onclick="submitCommentForm('x1');">
|
||||
<div class="comment-button-left" id="submit_x1_l"></div>
|
||||
<div class="comment-button-center" id="submit_x1_c">Soumettre ce commentaire</div>
|
||||
<div class="comment-button-right" id="submit_x1_r"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input name="component" type="hidden" value="com_content" />
|
||||
<input name="pageid" type="hidden" value="80" />
|
||||
<input name="userid" type="hidden" value="128" />
|
||||
<input name="parentid" type="hidden" value="0" />
|
||||
<input name="commentid" type="hidden" value="" />
|
||||
<input type="hidden" name="3194a490d39f67829591f71794a7cbbe" value="1" /> </form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="ccresponse">
|
||||
<div id="ccloading"></div>
|
||||
<div id="ccsuccess"></div>
|
||||
<p><img src="/images/stories/fran.gif" border="0" alt="fran.gif" title="fran.gif" /></p>
|
||||
|
||||
<p><embed src="http://www.la-mousse.com/images/consensus2010fr.pdf" width="720" height="576"/></p><div id="comments-container">
|
||||
<div id="comments-header">
|
||||
<h3>Commentaires</h3><a name="comments"></a>
|
||||
<!--<p>Sort by <a href="#" class="active">Date</a> <a href="#">Rating</a> <a href="#">Last Activity</a></p>-->
|
||||
</div>
|
||||
<div id="allcomments">
|
||||
<div class="comment-item" id="commentID346">
|
||||
<div class="comment-item-header"><a name="commentID346"></a>
|
||||
<a href="/component/comprofiler/userprofile/lopette.html"><img src="http://la-mousse.com/components/com_chronocomments/images/avatar1.png" alt="avatar" class="avatar" width="26" height="26" /></a>
|
||||
<span class="nickname-link">lopette</span>
|
||||
<div class="rating">
|
||||
<div class="score" id="score346">+5</div> <div id="plus_346" class="rating-plus" onmouseover="showPlus(this.id);" onClick="addPlus(346);" onmouseout="hidePlus(this.id);"> </div> <div id="minus_346" class="rating-minus" onmouseover="showMinus(this.id);" onClick="addMinus(346);" onmouseout="hideMinus(this.id);"> </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
ll
|
||||
</div>
|
||||
<div class="comment-status">
|
||||
<strong><a href="#commentID346">Dimanche 14 Octobre 2012, 18:30</a></strong>
|
||||
<div class="comment-button" id="post_346" onmouseover="showShadow(this.id);" onmouseout="hideShadow(this.id);" onclick="showCommentForm(346);">
|
||||
<div class="comment-button-left" id="post_346_l"></div>
|
||||
<div class="comment-button-center" id="post_346_c">Répondre</div>
|
||||
<div class="comment-button-right" id="post_346_r"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="post_346_form" class="comment-form">
|
||||
<div id="post_346_form_loading" style="text-align:center; display:none;"><img src="http://la-mousse.com/components/com_chronocomments/loaderb.gif" /></div>
|
||||
<fieldset>
|
||||
<form action="index2.php?option=com_chronocomments&task=savecomment" id="ccform_346" name="ccform_346" method="post" >
|
||||
<textarea id="post_346_text" name="text" cols="" rows="" class="form-text"></textarea>
|
||||
<input name="name" type="text" id="ccname_346" class="form-input" value="MONFREUX" /> <span class="input-text">Nom *</span><br /> <input name="email" type="text" id="ccemail_346" class="form-input" value="dr.monfreux@sterivein.com" /> <span class="input-text">Courriel (pour vérification & réponses)</span><br />
|
||||
<input name="url" type="text" id="ccurl_346" value="http://" class="form-input" /> <span class="input-text">URL</span><br />
|
||||
<input name="comment_captcha" type="text" size="5" style="width:30%" id="comment_captcha_346" class="form-input" /> <span class="input-text">Code</span>
|
||||
<img id="comment_captcha_img" class="comment_captcha_img" src="http://la-mousse.com/components/com_chronocomments/chrono_verification.php?imtype=1&anticache=7111">
|
||||
<br />
|
||||
<span class="input-text"><!-- You are not allowed to remove the next credit link without a ChronoComments license from ChronoEngine.com --><strong>ChronoComments by </strong><a target="_blank" href="http://www.chronoengine.com"><strong>Joomla Professional Solutions</strong></a></span>
|
||||
<div class="clear"></div>
|
||||
<div class="comment-status">
|
||||
|
||||
<div class="comment-button" id="submit_346" onmouseover="showShadow(this.id);" onmouseout="hideShadow(this.id);" onclick="submitCommentForm(346);">
|
||||
<div class="comment-button-left" id="submit_346_l"></div>
|
||||
<div class="comment-button-center" id="submit_346_c">Soumettre ce commentaire</div>
|
||||
<div class="comment-button-right" id="submit_346_r"></div>
|
||||
</div>
|
||||
<div class="comment-button" id="cancel_346" onmouseover="showShadow(this.id);" onmouseout="hideShadow(this.id);" onclick="hideCommentForm(346);">
|
||||
<div class="comment-button-left" id="cancel_346_l"></div>
|
||||
<div class="comment-button-center" id="cancel_346_c">Annuler</div>
|
||||
<div class="comment-button-right" id="cancel_346_r"></div>
|
||||
</div>
|
||||
</div>
|
||||
<input name="component" type="hidden" value="com_content" />
|
||||
<input name="pageid" type="hidden" value="80" />
|
||||
<input name="userid" type="hidden" value="128" />
|
||||
<input name="commentid" type="hidden" value="" />
|
||||
<input name="parentid" type="hidden" value="346" />
|
||||
<input type="hidden" name="3194a490d39f67829591f71794a7cbbe" value="1" /> </form>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="clear1"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="post_x1_form" class="comment-form display">
|
||||
<div id="post_x1_form_loading" style="text-align:center; display:none;"><img src="http://la-mousse.com/components/com_chronocomments/loaderb.gif" /></div>
|
||||
<form action="index2.php?option=com_chronocomments&task=savecomment" id="ccform_x1" name="ccform_x1" method="post" >
|
||||
<textarea name="text" id="post_x1_text" cols="" rows="" class="form-text"></textarea>
|
||||
<input name="name" type="text" id="ccname_x1" class="form-input" value="MONFREUX" /> <span class="input-text">Nom *</span><br /> <input name="email" type="text" id="ccemail_x1" class="form-input" value="dr.monfreux@sterivein.com" /> <span class="input-text">Courriel (pour vérification & réponses)</span><br />
|
||||
<input name="url" type="text" id="ccurl_x1" value="http://" class="form-input" /> <span class="input-text">URL</span><br />
|
||||
<input name="comment_captcha" type="text" size="5" style="width:30%" id="comment_captcha_x1" class="form-input" /> <span class="input-text">Code</span>
|
||||
<img id="comment_captcha_img" class="comment_captcha_img" src="http://la-mousse.com/components/com_chronocomments/chrono_verification.php?imtype=1&anticache=71140">
|
||||
<br />
|
||||
<span class="input-text"><!-- You are not allowed to remove the next credit link without a ChronoComments license from ChronoEngine.com --><strong>ChronoComments by </strong><a target="_blank" href="http://www.chronoengine.com"><strong>Joomla Professional Solutions</strong></a></span>
|
||||
<div class="clear"></div>
|
||||
<div class="comment-status">
|
||||
|
||||
<div class="comment-button" id="submit_x1" onmouseover="showShadow(this.id);" onmouseout="hideShadow(this.id);" onclick="submitCommentForm('x1');">
|
||||
<div class="comment-button-left" id="submit_x1_l"></div>
|
||||
<div class="comment-button-center" id="submit_x1_c">Soumettre ce commentaire</div>
|
||||
<div class="comment-button-right" id="submit_x1_r"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input name="component" type="hidden" value="com_content" />
|
||||
<input name="pageid" type="hidden" value="80" />
|
||||
<input name="userid" type="hidden" value="128" />
|
||||
<input name="parentid" type="hidden" value="0" />
|
||||
<input name="commentid" type="hidden" value="" />
|
||||
<input type="hidden" name="3194a490d39f67829591f71794a7cbbe" value="1" /> </form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="ccresponse">
|
||||
<div id="ccloading"></div>
|
||||
<div id="ccsuccess"></div>
|
||||
<div id="ccfail"></div>
|
||||
</div>
|
||||
<div id="chrono_comments_AJAX_response_temp" style="display:none;"></div>
|
||||
|
||||
<span class="articleseparator"> </span>
|
||||
|
||||
68
local/modules/AdminOrderCreation/AdminOrderCreation.php
Normal file
68
local/modules/AdminOrderCreation/AdminOrderCreation.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the module AdminOrderCreation */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace AdminOrderCreation;
|
||||
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Thelia\Model\ModuleQuery;
|
||||
use Thelia\Module\BaseModule;
|
||||
|
||||
class AdminOrderCreation extends BaseModule
|
||||
{
|
||||
/** @var string */
|
||||
const DOMAIN_NAME = 'adminordercreation';
|
||||
|
||||
const CONFIG_KEY_DEFAULT_NEW_CREDIT_NOTE_STATUS_ID = 'default-new-credit-note-status-id';
|
||||
const CONFIG_KEY_DEFAULT_NEW_CREDIT_NOTE_TYPE_ID = 'default-new-credit-note-type-id';
|
||||
const CONFIG_KEY_PAYED_ORDER_MINIMUM_STATUS_ID = 'payed-order-minimum-status-id';
|
||||
const CONFIG_KEY_INVOICE_REF_TYPE = 'invoice-ref-type'; // 0 for default thelia, 1 for separate
|
||||
const CONFIG_KEY_INVOICE_REF_INCREMENT = 'invoice-ref-increment';
|
||||
|
||||
const CONFIG_DEFAULT_VALUE_DEFAULT_NEW_CREDIT_NOTE_STATUS_ID = 4;
|
||||
const CONFIG_DEFAULT_VALUE_DEFAULT_NEW_CREDIT_NOTE_TYPE_ID = 7;
|
||||
const CONFIG_DEFAULT_VALUE_PAYED_ORDER_MINIMUM_STATUS_ID = 2;
|
||||
const CONFIG_DEFAULT_VALUE_INVOICE_REF_TYPE = 0;
|
||||
|
||||
public function update($currentVersion, $newVersion, ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === self::getConfigValue(self::CONFIG_KEY_DEFAULT_NEW_CREDIT_NOTE_STATUS_ID)) {
|
||||
self::setConfigValue(
|
||||
self::CONFIG_KEY_DEFAULT_NEW_CREDIT_NOTE_STATUS_ID,
|
||||
self::CONFIG_DEFAULT_VALUE_DEFAULT_NEW_CREDIT_NOTE_STATUS_ID
|
||||
);
|
||||
}
|
||||
|
||||
if (null === self::getConfigValue(self::CONFIG_KEY_DEFAULT_NEW_CREDIT_NOTE_TYPE_ID)) {
|
||||
self::setConfigValue(
|
||||
self::CONFIG_KEY_DEFAULT_NEW_CREDIT_NOTE_TYPE_ID,
|
||||
self::CONFIG_DEFAULT_VALUE_DEFAULT_NEW_CREDIT_NOTE_TYPE_ID
|
||||
);
|
||||
}
|
||||
|
||||
if (null === self::getConfigValue(self::CONFIG_KEY_PAYED_ORDER_MINIMUM_STATUS_ID)) {
|
||||
self::setConfigValue(
|
||||
self::CONFIG_KEY_PAYED_ORDER_MINIMUM_STATUS_ID,
|
||||
self::CONFIG_DEFAULT_VALUE_PAYED_ORDER_MINIMUM_STATUS_ID
|
||||
);
|
||||
}
|
||||
|
||||
if (null === self::getConfigValue(self::CONFIG_KEY_INVOICE_REF_TYPE)) {
|
||||
self::setConfigValue(
|
||||
self::CONFIG_KEY_INVOICE_REF_TYPE,
|
||||
self::CONFIG_DEFAULT_VALUE_INVOICE_REF_TYPE
|
||||
);
|
||||
}
|
||||
|
||||
if (null === self::getConfigValue(self::CONFIG_KEY_INVOICE_REF_INCREMENT)) {
|
||||
self::setConfigValue(
|
||||
self::CONFIG_KEY_INVOICE_REF_INCREMENT,
|
||||
1
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
7
local/modules/AdminOrderCreation/CHANGELOG.md
Normal file
7
local/modules/AdminOrderCreation/CHANGELOG.md
Normal file
@@ -0,0 +1,7 @@
|
||||
#1.3.1
|
||||
|
||||
- OpenSource version <3
|
||||
|
||||
#1.2.0
|
||||
|
||||
- First public version
|
||||
21
local/modules/AdminOrderCreation/Config/config.xml
Normal file
21
local/modules/AdminOrderCreation/Config/config.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<config xmlns="http://thelia.net/schema/dic/config"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
|
||||
|
||||
<forms>
|
||||
<form name="admin-order-creation.create" class="AdminOrderCreation\Form\OrderCreateForm" />
|
||||
</forms>
|
||||
|
||||
<hooks>
|
||||
<hook id="adminordercreation.hook.back.order" class="AdminOrderCreation\Hook\Back\OrderHook">
|
||||
<tag name="hook.event_listener" event="orders.table-header" type="back" method="onOrdersTableHeader" />
|
||||
<tag name="hook.event_listener" event="orders.js" type="back" method="onOrderJs" />
|
||||
</hook>
|
||||
<hook id="adminordercreation.hook.back.order.edit" class="AdminOrderCreation\Hook\Back\OrderEditHook">
|
||||
<tag name="hook.event_listener" event="order.edit-js" type="back" method="onOrderAddButtonJs" />
|
||||
<tag name="hook.event_listener" event="order.edit-js" type="back" method="onOrderJs" />
|
||||
</hook>
|
||||
</hooks>
|
||||
</config>
|
||||
28
local/modules/AdminOrderCreation/Config/module.xml
Normal file
28
local/modules/AdminOrderCreation/Config/module.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module xmlns="http://thelia.net/schema/dic/module"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/module http://thelia.net/schema/dic/module/module-2_2.xsd">
|
||||
<fullnamespace>AdminOrderCreation\AdminOrderCreation</fullnamespace>
|
||||
<descriptive locale="en_US">
|
||||
<title>Module for generate an order from the back office</title>
|
||||
</descriptive>
|
||||
<descriptive locale="fr_FR">
|
||||
<title>Module pour générer des commandes depuis le back office</title>
|
||||
</descriptive>
|
||||
<languages>
|
||||
<language>en_US</language>
|
||||
<language>fr_FR</language>
|
||||
</languages>
|
||||
<version>1.3.4</version>
|
||||
<authors>
|
||||
<author>
|
||||
<name>Gilles Bourgeat</name>
|
||||
<email>gilles.bourgeat@gmail.com</email>
|
||||
</author>
|
||||
</authors>
|
||||
<type>classic</type>
|
||||
<thelia>2.3.0</thelia>
|
||||
<stability>beta</stability>
|
||||
<mandatory>0</mandatory>
|
||||
<hidden>0</hidden>
|
||||
</module>
|
||||
18
local/modules/AdminOrderCreation/Config/routing.xml
Normal file
18
local/modules/AdminOrderCreation/Config/routing.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="adminordercreation.ajax.modal.create" path="/admin/admin-order-creation/ajax/modal/create">
|
||||
<default key="_controller">AdminOrderCreation:Order:ajaxModalCreate</default>
|
||||
</route>
|
||||
|
||||
<route id="adminordercreation.ajax.search.customer" path="/admin/admin-order-creation/ajax/search/customer">
|
||||
<default key="_controller">AdminOrderCreation:Order:ajaxSearchCustomer</default>
|
||||
</route>
|
||||
|
||||
<route id="adminordercreation.ajax.search.product" path="/admin/admin-order-creation/ajax/search/product">
|
||||
<default key="_controller">AdminOrderCreation:Order:ajaxSearchProduct</default>
|
||||
</route>
|
||||
</routes>
|
||||
30
local/modules/AdminOrderCreation/Config/schema.xml
Normal file
30
local/modules/AdminOrderCreation/Config/schema.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database defaultIdMethod="native" name="thelia"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/propel/propel/resources/xsd/database.xsd" >
|
||||
<!--
|
||||
See propel documentation on http://propelorm.org for all information about schema file
|
||||
|
||||
<table name="product_rel" namespace="AdminOrderCreation\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column defaultValue="0" name="visible" required="true" type="TINYINT" />
|
||||
<column defaultValue="0" name="position" required="true" type="INTEGER" />
|
||||
<column name="title" size="255" type="VARCHAR" />
|
||||
<column name="description" type="CLOB" />
|
||||
<column name="chapo" type="LONGVARCHAR" />
|
||||
<column name="postscriptum" type="LONGVARCHAR" />
|
||||
<foreign-key foreignTable="product" name="fk_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="product_id" />
|
||||
</foreign-key>
|
||||
<behavior name="timestampable" />
|
||||
<behavior name="i18n">
|
||||
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
|
||||
</behavior>
|
||||
<behavior name="versionable">
|
||||
<parameter name="log_created_at" value="true" />
|
||||
<parameter name="log_created_by" value="true" />
|
||||
</behavior>
|
||||
</table>
|
||||
-->
|
||||
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
|
||||
</database>
|
||||
803
local/modules/AdminOrderCreation/Controller/OrderController.php
Normal file
803
local/modules/AdminOrderCreation/Controller/OrderController.php
Normal file
@@ -0,0 +1,803 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the module AdminOrderCreation */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace AdminOrderCreation\Controller;
|
||||
|
||||
use AdminOrderCreation\AdminOrderCreation;
|
||||
use AdminOrderCreation\Util\Calc;
|
||||
use AdminOrderCreation\Util\CriteriaSearchTrait;
|
||||
use CreditNote\Model\CreditNote;
|
||||
use CreditNote\Model\CreditNoteAddress;
|
||||
use CreditNote\Model\CreditNoteDetail;
|
||||
use CreditNote\Model\CreditNoteQuery;
|
||||
use CreditNote\Model\CreditNoteStatusQuery;
|
||||
use CreditNote\Model\CreditNoteTypeQuery;
|
||||
use CreditNote\Model\OrderCreditNote;
|
||||
use InvoiceRef\EventListeners\OrderListener;
|
||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||
use Propel\Runtime\Propel;
|
||||
use Symfony\Component\Form\FormError;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Thelia\Controller\Admin\BaseAdminController;
|
||||
use Thelia\Core\Event\Order\OrderEvent;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Core\HttpFoundation\Request;
|
||||
use Thelia\Core\Security\AccessManager;
|
||||
use Thelia\Core\Security\Resource\AdminResources;
|
||||
use Thelia\Core\Template\Loop\ProductSaleElements;
|
||||
use Thelia\Model\AddressQuery;
|
||||
use Thelia\Model\Cart;
|
||||
use Thelia\Model\CountryQuery;
|
||||
use Thelia\Model\CurrencyQuery;
|
||||
use Thelia\Model\Customer;
|
||||
use Thelia\Model\CustomerQuery;
|
||||
use Thelia\Model\Map\AddressTableMap;
|
||||
use Thelia\Model\Map\OrderTableMap;
|
||||
use Thelia\Model\Map\ProductI18nTableMap;
|
||||
use AdminOrderCreation\Model\Order;
|
||||
use Symfony\Component\Form\Form;
|
||||
use Thelia\Model\OrderAddress;
|
||||
use Thelia\Model\OrderProduct;
|
||||
use Thelia\Model\OrderProductAttributeCombination;
|
||||
use Thelia\Model\OrderProductTax;
|
||||
use Thelia\Model\OrderStatusQuery;
|
||||
use Thelia\Model\Product;
|
||||
use Thelia\Model\ProductI18n;
|
||||
use Thelia\Model\ProductQuery;
|
||||
use Thelia\Model\ProductSaleElementsQuery;
|
||||
use Thelia\Model\TaxRuleI18n;
|
||||
use Thelia\Tools\I18n;
|
||||
use Thelia\Tools\URL;
|
||||
|
||||
class OrderController extends BaseAdminController
|
||||
{
|
||||
use CriteriaSearchTrait;
|
||||
|
||||
public function ajaxModalCreateAction(Request $request)
|
||||
{
|
||||
if (null !== $response = $this->checkAuth(AdminResources::ORDER, [], AccessManager::CREATE)) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
$order = new Order();
|
||||
|
||||
$order->setLang($this->getLang());
|
||||
|
||||
$order->setDispatcher($this->getDispatcher());
|
||||
|
||||
$form = $this->createForm('admin-order-creation.create', 'form', [], ['csrf_protection' => false]);
|
||||
|
||||
$formValidate = $this->validateForm($form, 'post');
|
||||
|
||||
$this->performOrder($order, $formValidate);
|
||||
|
||||
$this->getParserContext()->addForm($form);
|
||||
|
||||
$errorMessage = [];
|
||||
foreach ($formValidate->getErrors() as $error) {
|
||||
$errorMessage[] = $error->getMessage();
|
||||
}
|
||||
|
||||
if (count($errorMessage)) {
|
||||
$form->setErrorMessage(implode('<br/>', $errorMessage));
|
||||
}
|
||||
|
||||
if (!$form->hasError() && 'create' === $formValidate->get('action')->getData()) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(OrderTableMap::DATABASE_NAME);
|
||||
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table (I guess, conceivably)
|
||||
$con->beginTransaction();
|
||||
|
||||
try {
|
||||
$cart = new Cart();
|
||||
|
||||
$cart->save();
|
||||
|
||||
$order->setCartId($cart->getId());
|
||||
|
||||
// on passe par le statut par défault
|
||||
$order->setOrderStatus(
|
||||
OrderStatusQuery::create()->findOneById(1)
|
||||
);
|
||||
|
||||
$order->save();
|
||||
|
||||
$this->performCreditNote($order, $formValidate);
|
||||
|
||||
$orderStatusId = $formValidate->get('status_id')->getData();
|
||||
|
||||
if ((int) $orderStatusId >= 2) {
|
||||
if ((int) AdminOrderCreation::getConfigValue(AdminOrderCreation::CONFIG_KEY_INVOICE_REF_TYPE) === 0) {
|
||||
// pour retirer les stocks et générer la référence facture
|
||||
$order->setOrderStatus(
|
||||
OrderStatusQuery::create()->findOneById(2)
|
||||
);
|
||||
|
||||
$this->getDispatcher()->dispatch(
|
||||
TheliaEvents::ORDER_UPDATE_STATUS,
|
||||
(new OrderEvent($order))->setStatus(2)
|
||||
);
|
||||
|
||||
$order->save();
|
||||
} else { // dans le cas d'une facturation à par
|
||||
$order->setInvoiceRef((int) AdminOrderCreation::getConfigValue(AdminOrderCreation::CONFIG_KEY_INVOICE_REF_INCREMENT));
|
||||
|
||||
AdminOrderCreation::setConfigValue(
|
||||
AdminOrderCreation::CONFIG_KEY_INVOICE_REF_INCREMENT,
|
||||
(int) AdminOrderCreation::getConfigValue(AdminOrderCreation::CONFIG_KEY_INVOICE_REF_INCREMENT) + 1
|
||||
);
|
||||
|
||||
$order->setOrderStatus(
|
||||
OrderStatusQuery::create()->findOneById(2)
|
||||
);
|
||||
$order->save();
|
||||
}
|
||||
}
|
||||
|
||||
if ((int) $orderStatusId > 2) {
|
||||
$order->setOrderStatus(
|
||||
OrderStatusQuery::create()->findOneById((int) $orderStatusId)
|
||||
);
|
||||
$this->getDispatcher()->dispatch(
|
||||
TheliaEvents::ORDER_UPDATE_STATUS,
|
||||
(new OrderEvent($order))->setStatus((int) $orderStatusId)
|
||||
);
|
||||
}
|
||||
|
||||
$order->save();
|
||||
|
||||
$con->commit();
|
||||
} catch (\Exception $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
if ($order->getId()) {
|
||||
return $this->render('admin-order-creation/ajax/order-create-modal-success', [
|
||||
'order' => $order
|
||||
]);
|
||||
} else {
|
||||
return $this->render('admin-order-creation/ajax/order-create-modal', [
|
||||
'order' => $order,
|
||||
'hasCreditNoteModule' => $this->hasCreditNoteModule(),
|
||||
'configNewCreditNoteStatusId' => AdminOrderCreation::getConfigValue(AdminOrderCreation::CONFIG_KEY_DEFAULT_NEW_CREDIT_NOTE_STATUS_ID),
|
||||
'configNewCreditNoteTypeId' => AdminOrderCreation::getConfigValue(AdminOrderCreation::CONFIG_KEY_DEFAULT_NEW_CREDIT_NOTE_TYPE_ID),
|
||||
'configPayedOrderMinimumStatusId' => AdminOrderCreation::getConfigValue(AdminOrderCreation::CONFIG_KEY_PAYED_ORDER_MINIMUM_STATUS_ID)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws \Propel\Runtime\Exception\PropelException
|
||||
*/
|
||||
public function ajaxSearchCustomerAction(Request $request)
|
||||
{
|
||||
if (null !== $response = $this->checkAuth(AdminResources::ORDER, [], AccessManager::CREATE)) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
$customerQuery = CustomerQuery::create()
|
||||
->innerJoinAddress()
|
||||
->groupById()
|
||||
->limit(20);
|
||||
|
||||
$this->whereConcatRegex($customerQuery, [
|
||||
'customer.REF',
|
||||
'customer.FIRSTNAME',
|
||||
'customer.LASTNAME',
|
||||
'customer.EMAIL',
|
||||
'address.COMPANY',
|
||||
'address.PHONE'
|
||||
], $request->get('q'));
|
||||
|
||||
$customerQuery
|
||||
->withColumn(AddressTableMap::COMPANY, 'COMPANY')
|
||||
->withColumn(AddressTableMap::ADDRESS1, 'ADDRESS')
|
||||
->withColumn(AddressTableMap::CITY, 'CITY')
|
||||
->withColumn(AddressTableMap::ZIPCODE, 'ZIPCODE')
|
||||
->withColumn(AddressTableMap::PHONE, 'PHONE');
|
||||
|
||||
$customers = $customerQuery->find();
|
||||
|
||||
$json = [
|
||||
'incomplete_results' => count($customers) ? false : true,
|
||||
'items' => []
|
||||
];
|
||||
|
||||
/** @var Customer $customer */
|
||||
foreach ($customers as $customer) {
|
||||
$json['items'][] = [
|
||||
'id' => $customer->getId(),
|
||||
'company' => $customer->getVirtualColumn('COMPANY'),
|
||||
'firstname' => $customer->getFirstname(),
|
||||
'lastname' => $customer->getLastname(),
|
||||
'ref' => $customer->getRef(),
|
||||
'address' => $this->formatAddress($customer)
|
||||
];
|
||||
}
|
||||
|
||||
return new JsonResponse($json);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws \Propel\Runtime\Exception\PropelException
|
||||
*/
|
||||
public function ajaxSearchProductAction(Request $request)
|
||||
{
|
||||
if (null !== $response = $this->checkAuth(AdminResources::ORDER, [], AccessManager::CREATE)) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
$productQuery = ProductQuery::create();
|
||||
|
||||
$productQuery->useI18nQuery(
|
||||
$this->getRequest()->getSession()->getAdminEditionLang()->getLocale()
|
||||
);
|
||||
|
||||
$productQuery
|
||||
->withColumn(ProductI18nTableMap::TITLE, 'TITLE');
|
||||
|
||||
$this->whereConcatRegex($productQuery, array(
|
||||
'product.REF',
|
||||
'product_i18n.TITLE'
|
||||
), $request->get('q'));
|
||||
|
||||
$productQuery->setLimit(10);
|
||||
|
||||
$products = $productQuery->find();
|
||||
|
||||
$json = [
|
||||
'incomplete_results' => count($products) ? false : true,
|
||||
'items' => []
|
||||
];
|
||||
|
||||
/** @var Product $product */
|
||||
foreach ($products as $product) {
|
||||
$json['items'][] = [
|
||||
'id' => $product->getId(),
|
||||
'ref' => $product->getRef(),
|
||||
'title' => $product->getVirtualColumn('TITLE')
|
||||
];
|
||||
}
|
||||
|
||||
return new JsonResponse($json);
|
||||
}
|
||||
|
||||
protected function hasCreditNoteModule()
|
||||
{
|
||||
return class_exists('\CreditNote\CreditNote');
|
||||
}
|
||||
|
||||
protected function performOrder(Order $order, Form $formValidate)
|
||||
{
|
||||
$this
|
||||
->performCurrency($order, $formValidate)
|
||||
->performOrderStatus($order, $formValidate)
|
||||
->performCustomer($order, $formValidate)
|
||||
->performInvoiceAddress($order, $formValidate)
|
||||
->performDeliveryAddress($order, $formValidate)
|
||||
->performDeliveryAddress($order, $formValidate)
|
||||
->performProducts($order, $formValidate)
|
||||
->performShipping($order, $formValidate)
|
||||
->performGlobalReduction($order, $formValidate)
|
||||
->performPaymentModule($order, $formValidate)
|
||||
->performDeliveryModule($order, $formValidate)
|
||||
;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function performPaymentModule(Order $order, Form $form)
|
||||
{
|
||||
$paymentModuleId = (int) $form->get('payment_module_id')->getData();
|
||||
|
||||
$order->setPaymentModuleId($paymentModuleId);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function performDeliveryModule(Order $order, Form $form)
|
||||
{
|
||||
$deliveryModuleId = (int) $form->get('delivery_module_id')->getData();
|
||||
|
||||
$order->setDeliveryModuleId($deliveryModuleId);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function performShipping(Order $order, Form $form)
|
||||
{
|
||||
$price = (float) $form->get('shipping_price_with_tax')->getData();
|
||||
|
||||
$priceWithTax = (float) $form->get('shipping_price_with_tax')->getData();
|
||||
|
||||
$order->setPostage($priceWithTax);
|
||||
$order->setPostageTax($priceWithTax - $price);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function performGlobalReduction(Order $order, Form $form)
|
||||
{
|
||||
$reduction = (float) $form->get('reduction')->getData();
|
||||
|
||||
$reductionType = (int) $form->get('reduction_type')->getData();
|
||||
|
||||
$total = $order->getTotalAmountWithTax(false);
|
||||
|
||||
$afterDiscount = Calc::reduction(
|
||||
$reduction,
|
||||
$reductionType,
|
||||
$total,
|
||||
1
|
||||
);
|
||||
|
||||
$order->setDiscount(-($afterDiscount - $total));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function performCurrency(Order $order, Form $form)
|
||||
{
|
||||
/** @var int $currencyId */
|
||||
$currencyId = $form->get('currency_id')->getData();
|
||||
|
||||
if (empty($currencyId) || null === $currency = CurrencyQuery::create()->findPk($currencyId)) {
|
||||
$currency = CurrencyQuery::create()->findOneByByDefault(true);
|
||||
}
|
||||
|
||||
$order->setCurrency($currency);
|
||||
$order->setCurrencyRate($currency->getRate());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function getCountry(Form $form)
|
||||
{
|
||||
/** @var int $countryId */
|
||||
$countryId = $form->get('country_id')->getData();
|
||||
|
||||
if (!empty($countryId) && $country = CountryQuery::create()->findPk($countryId)) {
|
||||
return $country;
|
||||
}
|
||||
|
||||
return CountryQuery::create()->filterByByDefault(true)->findOne();
|
||||
}
|
||||
|
||||
protected function performOrderStatus(Order $order, Form $form)
|
||||
{
|
||||
if (null !== $statusId = $form->get('status_id')->getData()) {
|
||||
$order->setOrderStatus(
|
||||
OrderStatusQuery::create()->findOneById((int) $statusId)
|
||||
);
|
||||
} else {
|
||||
$order->setOrderStatus(
|
||||
OrderStatusQuery::create()->findOneById(1)
|
||||
);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function performCustomer(Order $order, Form $form)
|
||||
{
|
||||
if (null !== $customerId = $form->get('customer_id')->getData()) {
|
||||
$order->setCustomer(
|
||||
CustomerQuery::create()->findOneById((int) $customerId)
|
||||
);
|
||||
}
|
||||
|
||||
if (null === $customerId && 'create' === $form->get('action')->getData()) {
|
||||
$form->addError(
|
||||
new FormError('Please select a customer')
|
||||
);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function performCreditNote(Order $order, Form $form)
|
||||
{
|
||||
if (!$this->hasCreditNoteModule()) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$action = $form->get('action')->getData();
|
||||
|
||||
$creditNoteId = $form->get('credit_note_id')->getData();
|
||||
|
||||
$creditNoteStatusId = $form->get('credit_note_status_id')->getData();
|
||||
|
||||
$creditNoteTypeId = $form->get('credit_note_type_id')->getData();
|
||||
|
||||
if ($creditNoteId && $action === 'create') {
|
||||
/** @var CreditNote $creditNote */
|
||||
$creditNote = CreditNoteQuery::create()
|
||||
->filterById($creditNoteId)
|
||||
->useCreditNoteStatusQuery()
|
||||
->filterByUsed(false)
|
||||
->filterByInvoiced(true)
|
||||
->endUse()
|
||||
->findOne();
|
||||
|
||||
if (null === $creditNote) {
|
||||
$form->addError(
|
||||
new FormError('Please select a valid credit note')
|
||||
);
|
||||
}
|
||||
|
||||
$orderCreditNote = (new OrderCreditNote())
|
||||
->setOrderId($order->getId())
|
||||
->setCreditNoteId($creditNote->getId());
|
||||
|
||||
if (round($order->getTotalAmountWithTax() - $creditNote->getTotalPriceWithTax(), 2) > 0) { // cas crédit note plus petit
|
||||
$orderCreditNote->setAmountPrice($creditNote->getTotalPriceWithTax());
|
||||
} elseif (round($order->getTotalAmountWithTax() - $creditNote->getTotalPriceWithTax(), 2) < 0) { // cas crédit note plus grand
|
||||
$orderCreditNote->setAmountPrice($order->getTotalAmountWithTax());
|
||||
|
||||
// copy address
|
||||
$lastInvoiceAddress = $creditNote->getCreditNoteAddress();
|
||||
$invoiceAddress = (new CreditNoteAddress())
|
||||
->setFirstname($lastInvoiceAddress->getFirstname())
|
||||
->setLastname($lastInvoiceAddress->getLastname())
|
||||
->setCity($lastInvoiceAddress->getCity())
|
||||
->setZipcode($lastInvoiceAddress->getZipcode())
|
||||
->setAddress1($lastInvoiceAddress->getAddress1())
|
||||
->setAddress2($lastInvoiceAddress->getAddress2())
|
||||
->setAddress3($lastInvoiceAddress->getAddress3())
|
||||
->setCustomerTitleId($lastInvoiceAddress->getCustomerTitleId())
|
||||
->setCountryId($lastInvoiceAddress->getCountryId());
|
||||
|
||||
$invoiceAddress->save();
|
||||
|
||||
$crediNoteDetail = (new CreditNoteDetail())
|
||||
->setTitle('Remboursement différence')
|
||||
->setTaxRuleId(null)
|
||||
->setPriceWithTax(-($order->getTotalAmountWithTax() - $creditNote->getTotalPriceWithTax()))
|
||||
->setPrice(-($order->getTotalAmountWithTax() - $creditNote->getTotalPriceWithTax()))
|
||||
->setType('other');
|
||||
|
||||
$newCreditNote = (new CreditNote())
|
||||
->setCurrency($creditNote->getCurrency())
|
||||
->setTypeId($creditNoteTypeId)
|
||||
->setStatusId($creditNoteStatusId)
|
||||
->setCreditNoteAddress($invoiceAddress)
|
||||
->addCreditNoteDetail($crediNoteDetail)
|
||||
->setTotalPrice(-($order->getTotalAmountWithTax() - $creditNote->getTotalPriceWithTax()))
|
||||
->setTotalPriceWithTax(-($order->getTotalAmountWithTax() - $creditNote->getTotalPriceWithTax()))
|
||||
->setCustomerId($creditNote->getCustomer()->getId())
|
||||
->setParentId($creditNote->getId())
|
||||
->setOrderId($order->getId());
|
||||
|
||||
$newCreditNote->setDispatcher($this->getDispatcher());
|
||||
|
||||
$newCreditNote->save();
|
||||
} else { // cas crédit note égale
|
||||
$orderCreditNote->setAmountPrice($creditNote->getTotalPriceWithTax());
|
||||
}
|
||||
|
||||
$orderCreditNote->save();
|
||||
|
||||
$newStatus = CreditNoteStatusQuery::findNextCreditNoteUsedStatus($creditNote->getCreditNoteStatus());
|
||||
|
||||
$creditNote->setCreditNoteStatus($newStatus);
|
||||
$creditNote->save();
|
||||
}
|
||||
}
|
||||
|
||||
protected function performInvoiceAddress(Order $order, Form $form)
|
||||
{
|
||||
$action = $form->get('action')->getData();
|
||||
|
||||
$invoiceAddressId = $form->get('invoice_address_id')->getData();
|
||||
|
||||
if ($invoiceAddressId) {
|
||||
$address = AddressQuery::create()->findOneById((int) $invoiceAddressId);
|
||||
|
||||
$orderAddress = (new OrderAddress())
|
||||
->setCustomerTitle($address->getCustomerTitle())
|
||||
->setAddress1($address->getAddress1())
|
||||
->setAddress2($address->getAddress2())
|
||||
->setAddress3($address->getAddress3())
|
||||
->setFirstname($address->getFirstname())
|
||||
->setLastname($address->getLastname())
|
||||
->setCity($address->getCity())
|
||||
->setZipcode($address->getZipcode())
|
||||
->setCompany($address->getCompany())
|
||||
->setCountry($address->getCountry());
|
||||
} else {
|
||||
$invoiceAddressTitle = $form->get('invoice_address_title')->getData();
|
||||
$invoiceAddressFirstname = $form->get('invoice_address_firstname')->getData();
|
||||
$invoiceAddressLastname = $form->get('invoice_address_lastname')->getData();
|
||||
$invoiceAddressCompany = $form->get('invoice_address_company')->getData();
|
||||
$invoiceAddressAddress1 = $form->get('invoice_address_address1')->getData();
|
||||
$invoiceAddressAddress2 = $form->get('invoice_address_address2')->getData();
|
||||
$invoiceAddressZipcode = $form->get('invoice_address_zipcode')->getData();
|
||||
$invoiceAddressCity = $form->get('invoice_address_city')->getData();
|
||||
$invoiceAddressCountryId = $form->get('invoice_address_country_id')->getData();
|
||||
|
||||
$orderAddress = (new OrderAddress())
|
||||
->setCustomerTitleId($invoiceAddressTitle)
|
||||
->setAddress1($invoiceAddressAddress1)
|
||||
->setAddress2($invoiceAddressAddress2)
|
||||
->setFirstname($invoiceAddressFirstname)
|
||||
->setLastname($invoiceAddressLastname)
|
||||
->setCity($invoiceAddressCity)
|
||||
->setZipcode($invoiceAddressZipcode)
|
||||
->setCompany($invoiceAddressCompany)
|
||||
->setCountry(
|
||||
CountryQuery::create()->findOneById($invoiceAddressCountryId)
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($orderAddress->getLastname()) && 'create' === $form->get('action')->getData()) {
|
||||
$form->addError(
|
||||
new FormError('Please select a invoice address')
|
||||
);
|
||||
}
|
||||
|
||||
if ($action === 'create') {
|
||||
$orderAddress->save();
|
||||
|
||||
$order->setInvoiceOrderAddressId($orderAddress->getId());
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function performDeliveryAddress(Order $order, Form $form)
|
||||
{
|
||||
$action = $form->get('action')->getData();
|
||||
|
||||
$deliveryAddressId = $form->get('delivery_address_id')->getData();
|
||||
|
||||
if ($deliveryAddressId) {
|
||||
$address = AddressQuery::create()->findOneById((int) $deliveryAddressId);
|
||||
|
||||
$orderAddress = (new OrderAddress())
|
||||
->setCustomerTitle($address->getCustomerTitle())
|
||||
->setAddress1($address->getAddress1())
|
||||
->setAddress2($address->getAddress2())
|
||||
->setAddress3($address->getAddress3())
|
||||
->setFirstname($address->getFirstname())
|
||||
->setLastname($address->getLastname())
|
||||
->setCity($address->getCity())
|
||||
->setZipcode($address->getZipcode())
|
||||
->setCompany($address->getCompany())
|
||||
->setCountry($address->getCountry());
|
||||
} else {
|
||||
$deliveryAddressTitle = $form->get('delivery_address_title')->getData();
|
||||
$deliveryAddressFirstname = $form->get('delivery_address_firstname')->getData();
|
||||
$deliveryAddressLastname = $form->get('delivery_address_lastname')->getData();
|
||||
$deliveryAddressCompany = $form->get('delivery_address_company')->getData();
|
||||
$deliveryAddressAddress1 = $form->get('delivery_address_address1')->getData();
|
||||
$deliveryAddressAddress2 = $form->get('delivery_address_address2')->getData();
|
||||
$deliveryAddressZipcode = $form->get('delivery_address_zipcode')->getData();
|
||||
$deliveryAddressCity = $form->get('delivery_address_city')->getData();
|
||||
$deliveryAddressCountryId = $form->get('delivery_address_country_id')->getData();
|
||||
|
||||
$orderAddress = (new OrderAddress())
|
||||
->setCustomerTitleId($deliveryAddressTitle)
|
||||
->setAddress1($deliveryAddressAddress1)
|
||||
->setAddress2($deliveryAddressAddress2)
|
||||
->setFirstname($deliveryAddressFirstname)
|
||||
->setLastname($deliveryAddressLastname)
|
||||
->setCity($deliveryAddressCity)
|
||||
->setZipcode($deliveryAddressZipcode)
|
||||
->setCompany($deliveryAddressCompany)
|
||||
->setCountry(
|
||||
CountryQuery::create()->findOneById($deliveryAddressCountryId)
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($orderAddress->getLastname()) && 'create' === $form->get('action')->getData()) {
|
||||
$form->addError(
|
||||
new FormError('Please select a delivery address')
|
||||
);
|
||||
}
|
||||
|
||||
if ($action === 'create') {
|
||||
$orderAddress->save();
|
||||
|
||||
$order->setDeliveryOrderAddressId($orderAddress->getId());
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function getLang()
|
||||
{
|
||||
return $this->getSession()->getAdminEditionLang();
|
||||
}
|
||||
|
||||
protected function performProducts(Order $order, Form $form)
|
||||
{
|
||||
$country = $this->getCountry($form);
|
||||
|
||||
$productIds = $form->get('product_id')->getData();
|
||||
$quantities = $form->get('product_quantity')->getData();
|
||||
$productSaleElementIds = $form->get('product_sale_element_id')->getData();
|
||||
$productPriceWithoutTax = $form->get('product_price_without_tax')->getData();
|
||||
$refreshPrice = $form->get('refresh_price')->getData();
|
||||
|
||||
$currency = $this->getCurrency($form);
|
||||
|
||||
foreach ($productIds as $key => $id) {
|
||||
if (!isset($quantities[$key])) {
|
||||
$quantities[$key] = 1;
|
||||
}
|
||||
|
||||
$product = ProductQuery::create()->findOneById($id);
|
||||
|
||||
/** @var ProductI18n $productI18n */
|
||||
$productI18n = I18n::forceI18nRetrieving(
|
||||
$order->getLang()->getLocale(),
|
||||
'Product',
|
||||
$product->getId()
|
||||
);
|
||||
|
||||
$productSaleElementsLoop = new ProductSaleElements($this->container);
|
||||
|
||||
if (isset($productSaleElementIds[$key])) {
|
||||
if (null !== ProductSaleElementsQuery::create()
|
||||
->filterByProductId($product->getId())
|
||||
->filterById($productSaleElementIds[$key])
|
||||
->findOne()) {
|
||||
$productSaleElementsLoop->initializeArgs([
|
||||
'name' => 'product_sale_elements',
|
||||
'type' => 'product_sale_elements',
|
||||
'id' => $productSaleElementIds[$key],
|
||||
'currency' => $currency->getId()
|
||||
]);
|
||||
} else {
|
||||
$productSaleElementsLoop->initializeArgs([
|
||||
'name' => 'product_sale_elements',
|
||||
'type' => 'product_sale_elements',
|
||||
'product' => $product->getId(),
|
||||
'currency' => $currency->getId()
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
$productSaleElementsLoop->initializeArgs([
|
||||
'name' => 'product_sale_elements',
|
||||
'type' => 'product_sale_elements',
|
||||
'product' => $product->getId(),
|
||||
'currency' => $currency->getId()
|
||||
]);
|
||||
}
|
||||
|
||||
$pagination = null;
|
||||
$results = $productSaleElementsLoop->exec($pagination);
|
||||
|
||||
/** @var \Thelia\Model\ProductSaleElements $productSaleElement */
|
||||
$productSaleElement = $results->getResultDataCollection()[0];
|
||||
|
||||
/** @var TaxRuleI18n $taxRuleI18n */
|
||||
$taxRuleI18n = I18n::forceI18nRetrieving(
|
||||
$order->getLang()->getLocale(),
|
||||
'TaxRule',
|
||||
$product->getTaxRuleId()
|
||||
);
|
||||
|
||||
if (isset($refreshPrice[$key]) && (int) $refreshPrice[$key]) {
|
||||
$price = $productSaleElement->getVirtualColumn('price_PRICE');
|
||||
$promoPrice = $productSaleElement->getVirtualColumn('price_PROMO_PRICE');
|
||||
} else {
|
||||
$price = isset($productPriceWithoutTax[$key]) ? (float) $productPriceWithoutTax[$key] : $productSaleElement->getVirtualColumn('price_PRICE');
|
||||
$promoPrice = isset($productPriceWithoutTax[$key]) ? (float) $productPriceWithoutTax[$key] : $productSaleElement->getVirtualColumn('price_PROMO_PRICE');
|
||||
}
|
||||
|
||||
$taxDetail = $product->getTaxRule()->getTaxDetail(
|
||||
$product,
|
||||
$country,
|
||||
$price,
|
||||
$promoPrice,
|
||||
$order->getLang()->getLocale()
|
||||
);
|
||||
|
||||
$orderProduct = (new OrderProduct())
|
||||
->setProductRef($product->getRef())
|
||||
->setProductSaleElementsRef($productSaleElement->getRef())
|
||||
->setProductSaleElementsId($productSaleElement->getId())
|
||||
->setTitle($productI18n->getTitle())
|
||||
->setChapo($productI18n->getChapo())
|
||||
->setDescription($productI18n->getDescription())
|
||||
->setPostscriptum($productI18n->getPostscriptum())
|
||||
->setVirtual($product->getVirtual())
|
||||
->setQuantity($quantities[$key])
|
||||
->setWasNew($productSaleElement->getNewness())
|
||||
->setWeight($productSaleElement->getWeight())
|
||||
->setTaxRuleTitle($taxRuleI18n->getTitle())
|
||||
->setTaxRuleDescription($taxRuleI18n->getDescription())
|
||||
->setEanCode($productSaleElement->getEanCode())
|
||||
->setDispatcher($this->getDispatcher())
|
||||
->setPrice($price)
|
||||
->setPromoPrice($promoPrice)
|
||||
->setWasInPromo($productSaleElement->getPromo())
|
||||
;
|
||||
|
||||
/** @var OrderProductTax $tax */
|
||||
foreach ($taxDetail as $tax) {
|
||||
$orderProduct->addOrderProductTax($tax);
|
||||
}
|
||||
|
||||
foreach ($productSaleElement->getAttributeCombinations() as $attributeCombination) {
|
||||
/** @var \Thelia\Model\Attribute $attribute */
|
||||
$attribute = I18n::forceI18nRetrieving(
|
||||
$this->getSession()->getLang()->getLocale(),
|
||||
'Attribute',
|
||||
$attributeCombination->getAttributeId()
|
||||
);
|
||||
|
||||
/** @var \Thelia\Model\AttributeAv $attributeAv */
|
||||
$attributeAv = I18n::forceI18nRetrieving(
|
||||
$this->getSession()->getLang()->getLocale(),
|
||||
'AttributeAv',
|
||||
$attributeCombination->getAttributeAvId()
|
||||
);
|
||||
|
||||
$orderProduct->addOrderProductAttributeCombination(
|
||||
(new OrderProductAttributeCombination())
|
||||
->setOrderProductId($orderProduct->getId())
|
||||
->setAttributeTitle($attribute->getTitle())
|
||||
->setAttributeChapo($attribute->getChapo())
|
||||
->setAttributeDescription($attribute->getDescription())
|
||||
->setAttributePostscriptum($attribute->getPostscriptum())
|
||||
->setAttributeAvTitle($attributeAv->getTitle())
|
||||
->setAttributeAvChapo($attributeAv->getChapo())
|
||||
->setAttributeAvDescription($attributeAv->getDescription())
|
||||
->setAttributeAvPostscriptum($attributeAv->getPostscriptum())
|
||||
);
|
||||
}
|
||||
|
||||
$order->addOrderProduct($orderProduct);
|
||||
}
|
||||
|
||||
|
||||
if (!count($order->getOrderProducts()) && 'create' === $form->get('action')->getData()) {
|
||||
$form->addError(
|
||||
new FormError('Please select a product')
|
||||
);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function getCurrency(Form $form)
|
||||
{
|
||||
$currencyId = $form->get('currency_id')->getData();
|
||||
if (null !== $currencyId) {
|
||||
$currency = CurrencyQuery::create()->findPk($currencyId);
|
||||
if (null === $currency) {
|
||||
throw new \InvalidArgumentException('Cannot found currency id: `' . $currency . '` in product_sale_elements loop');
|
||||
}
|
||||
} else {
|
||||
$currency = $this->getRequest()->getSession()->getCurrency();
|
||||
}
|
||||
|
||||
return $currency;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ActiveRecordInterface $model
|
||||
* @return string
|
||||
* @throws \Propel\Runtime\Exception\PropelException
|
||||
*/
|
||||
protected function formatAddress(ActiveRecordInterface $model)
|
||||
{
|
||||
/** @var Order|Customer $model */
|
||||
return implode(' ', [$model->getVirtualColumn('ADDRESS'), $model->getVirtualColumn('ZIPCODE'), $model->getVirtualColumn('CITY')]);
|
||||
}
|
||||
}
|
||||
213
local/modules/AdminOrderCreation/Form/OrderCreateForm.php
Normal file
213
local/modules/AdminOrderCreation/Form/OrderCreateForm.php
Normal file
@@ -0,0 +1,213 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the module AdminOrderCreation */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace AdminOrderCreation\Form;
|
||||
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Thelia\Form\BaseForm;
|
||||
|
||||
/**
|
||||
* Class CreditNoteCreateForm
|
||||
* @package CreditNote\Form
|
||||
* @author Gilles Bourgeat <gilles.bourgeat@gmail.com>
|
||||
*/
|
||||
class OrderCreateForm extends BaseForm
|
||||
{
|
||||
/**
|
||||
* @return string the name of you form. This name must be unique
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'admin-order-creation-create';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* in this function you add all the fields you need for your Form.
|
||||
* Form this you have to call add method on $this->formBuilder attribute :
|
||||
*
|
||||
*/
|
||||
protected function buildForm()
|
||||
{
|
||||
$this->formBuilder
|
||||
->add('currency_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('country_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
));
|
||||
|
||||
$this->formBuilder
|
||||
->add('action', ChoiceType::class, array(
|
||||
'required' => true,
|
||||
'choices' => array(
|
||||
'open' => 'open',
|
||||
'refresh' => 'refresh',
|
||||
'create' => 'create',
|
||||
),
|
||||
))
|
||||
->add('status_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('customer_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('invoice_address_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_address_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
;
|
||||
|
||||
$this->formBuilder
|
||||
->add('invoice_address_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('invoice_address_title', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('invoice_address_firstname', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('invoice_address_lastname', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('invoice_address_company', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('invoice_address_address1', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('invoice_address_address2', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('invoice_address_zipcode', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('invoice_address_city', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('invoice_address_country_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
;
|
||||
|
||||
$this->formBuilder
|
||||
->add('delivery_address_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_address_title', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_address_firstname', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_address_lastname', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_address_company', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_address_address1', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_address_address2', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_address_zipcode', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_address_city', TextType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_address_country_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
;
|
||||
|
||||
$this->formBuilder
|
||||
->add('product_id', 'collection', array(
|
||||
'required' => false,
|
||||
'allow_add' => true,
|
||||
'allow_delete' => true
|
||||
))
|
||||
->add('product_sale_element_id', 'collection', array(
|
||||
'required' => false,
|
||||
'allow_add' => true,
|
||||
'allow_delete' => true
|
||||
))
|
||||
->add('product_quantity', 'collection', array(
|
||||
'required' => false,
|
||||
'allow_add' => true,
|
||||
'allow_delete' => true
|
||||
))
|
||||
->add('product_price_with_tax', 'collection', array(
|
||||
'required' => false,
|
||||
'allow_add' => true,
|
||||
'allow_delete' => true
|
||||
))
|
||||
->add('product_price_without_tax', 'collection', array(
|
||||
'required' => false,
|
||||
'allow_add' => true,
|
||||
'allow_delete' => true
|
||||
))
|
||||
->add('refresh_price', 'collection', array(
|
||||
'required' => false,
|
||||
'allow_add' => true,
|
||||
'allow_delete' => true
|
||||
))
|
||||
;
|
||||
|
||||
$this->formBuilder
|
||||
->add('reduction', TextType::class, array(
|
||||
'required' => false,
|
||||
'empty_data' => 0
|
||||
))
|
||||
->add('reduction_type', NumberType::class, array(
|
||||
'required' => false
|
||||
));
|
||||
|
||||
$this->formBuilder
|
||||
->add('shipping_price', TextType::class, array(
|
||||
'required' => false,
|
||||
'empty_data' => 0
|
||||
))
|
||||
->add('shipping_tax_rule_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('shipping_price_with_tax', TextType::class, array(
|
||||
'required' => false,
|
||||
'empty_data' => 0
|
||||
));
|
||||
|
||||
$this->formBuilder
|
||||
->add('payment_module_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('delivery_module_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
;
|
||||
|
||||
$this->formBuilder
|
||||
->add('credit_note_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('credit_note_type_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('credit_note_status_id', IntegerType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
;
|
||||
}
|
||||
}
|
||||
22
local/modules/AdminOrderCreation/Hook/Back/OrderEditHook.php
Normal file
22
local/modules/AdminOrderCreation/Hook/Back/OrderEditHook.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the module AdminOrderCreation */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace AdminOrderCreation\Hook\Back;
|
||||
|
||||
use Thelia\Core\Event\Hook\HookRenderEvent;
|
||||
|
||||
class OrderEditHook extends OrderHook
|
||||
{
|
||||
public function onOrderAddButtonJs(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->render(
|
||||
'admin-order-creation/hook/orders.edit.js.html',
|
||||
$event->getArguments()
|
||||
));
|
||||
}
|
||||
}
|
||||
35
local/modules/AdminOrderCreation/Hook/Back/OrderHook.php
Normal file
35
local/modules/AdminOrderCreation/Hook/Back/OrderHook.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the module AdminOrderCreation */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace AdminOrderCreation\Hook\Back;
|
||||
|
||||
use AdminOrderCreation\AdminOrderCreation;
|
||||
use Thelia\Core\Event\Hook\HookRenderEvent;
|
||||
use Thelia\Core\Hook\BaseHook;
|
||||
use Thelia\Core\Thelia;
|
||||
|
||||
class OrderHook extends BaseHook
|
||||
{
|
||||
public function onOrdersTableHeader(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->render(
|
||||
'admin-order-creation/hook/orders.table-header.html',
|
||||
$event->getArguments()
|
||||
));
|
||||
}
|
||||
|
||||
public function onOrderJs(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->render(
|
||||
'admin-order-creation/hook/orders.js.html',
|
||||
array_merge($event->getArguments() + [
|
||||
|
||||
])
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'A new credit note of %amount with tax will be issued for this customer.' => 'Un nouvel avoir d\'un montant de %amount TTC sera créer pour le client.',
|
||||
'Add product' => 'Ajouter un produit',
|
||||
'Address :' => 'Adresse :',
|
||||
'Address complement :' => 'Complément d\'adresse :',
|
||||
'An error has occurred !!!' => 'Une erreur est survenue',
|
||||
'Cancel' => 'Annuler',
|
||||
'City :' => 'Ville :',
|
||||
'Close' => 'Fermer',
|
||||
'Company :' => 'Société :',
|
||||
'Country :' => 'Pays :',
|
||||
'Create' => 'Créer',
|
||||
'Create new order' => 'Créer une nouvelle commande',
|
||||
'Create order' => 'Créer une commande',
|
||||
'Credit note :' => 'Avoir :',
|
||||
'Customer :' => 'Client :',
|
||||
'Default product sale element' => 'Déclinaison par défaut',
|
||||
'Delete' => 'Supprimer',
|
||||
'Delivery address' => 'Adresse de livraison',
|
||||
'Delivery module :' => 'Module de livraison :',
|
||||
'Firstname :' => 'Prénom :',
|
||||
'Global amount' => 'Montant global',
|
||||
'Global reduction' => 'Réduction global',
|
||||
'Invoice address' => 'Adresse de facturation',
|
||||
'Lastname :' => 'Nom :',
|
||||
'Message content :' => 'Message :',
|
||||
'Message status :' => 'Statut :',
|
||||
'Order Informations :' => 'Informations de la commande',
|
||||
'Other' => 'Autre',
|
||||
'Payment module :' => 'Module de paiement :',
|
||||
'Percentage' => 'Pourcentage',
|
||||
'Please wait, loading' => 'Veillez patienter, chargement ...',
|
||||
'Price' => 'Prix',
|
||||
'Price with tax :' => 'Prix TTC :',
|
||||
'Price without tax :' => 'Prix HT :',
|
||||
'Product' => 'Produit',
|
||||
'Product sale element' => 'Déclinaison',
|
||||
'Products' => 'Produits',
|
||||
'Quantity' => 'Quantité',
|
||||
'Search...' => 'Rechercher ...',
|
||||
'Shipping' => 'Frais de livraison',
|
||||
'Status :' => 'Statut :',
|
||||
'Status of new credit note :' => 'Statut du nouvel avoir :',
|
||||
'Total tax :' => 'Total taxe :',
|
||||
'Tax rule :' => 'Règle de taxe :',
|
||||
'This command uses the credit note ref %ref for the amount of %amount with tax.' => 'Cette commande utilise l\'avoir %ref avec un montant de %amount TTC.',
|
||||
'This order use the country : %country' => 'Cette commande utilise le pays : %country',
|
||||
'This order use the currency : %currency' => 'Cette commande utilise le devise : %currency',
|
||||
'Title :' => 'Titre :',
|
||||
'Total with tax :' => 'Total TTC :',
|
||||
'Total without tax :' => 'Total HT :',
|
||||
'Type :' => 'Type :',
|
||||
'Type of new credit note :' => 'Type du nouvel avoir :',
|
||||
'Unit price with tax' => 'Prix unitaire TTC',
|
||||
'Use Credit Note :' => 'Utiliser un avoir :',
|
||||
'Value :' => 'Value :',
|
||||
'Your customer will have to pay the difference of %amount with tax' => 'Votre client devra payer la différence d\'un montant de %amount TTC',
|
||||
'Zipcode :' => 'Code postal :',
|
||||
);
|
||||
4
local/modules/AdminOrderCreation/I18n/en_US.php
Normal file
4
local/modules/AdminOrderCreation/I18n/en_US.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return array(
|
||||
// 'an english string' => 'The displayed english string',
|
||||
);
|
||||
4
local/modules/AdminOrderCreation/I18n/fr_FR.php
Normal file
4
local/modules/AdminOrderCreation/I18n/fr_FR.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return array(
|
||||
// 'an english string' => 'La traduction française de la chaine',
|
||||
);
|
||||
21
local/modules/AdminOrderCreation/LICENSE
Normal file
21
local/modules/AdminOrderCreation/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 thelia-modules
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
63
local/modules/AdminOrderCreation/Model/Order.php
Normal file
63
local/modules/AdminOrderCreation/Model/Order.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the module AdminOrderCreation */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace AdminOrderCreation\Model;
|
||||
|
||||
class Order extends \Thelia\Model\Order
|
||||
{
|
||||
public function getTotalAmountWithTax($withDiscount = true)
|
||||
{
|
||||
$total = 0;
|
||||
|
||||
foreach ($this->getOrderProducts() as $orderProduct) {
|
||||
if ($orderProduct->getWasInPromo()) {
|
||||
$total += $orderProduct->getPromoPrice() * $orderProduct->getQuantity();
|
||||
} else {
|
||||
$total += $orderProduct->getPrice() * $orderProduct->getQuantity();
|
||||
}
|
||||
|
||||
foreach ($orderProduct->getOrderProductTaxes() as $orderProductTax) {
|
||||
if ($orderProduct->getWasInPromo()) {
|
||||
$total += $orderProductTax->getPromoAmount() * $orderProduct->getQuantity();
|
||||
} else {
|
||||
$total += $orderProductTax->getAmount() * $orderProduct->getQuantity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$total += $this->getPostage();
|
||||
|
||||
|
||||
if ($withDiscount) {
|
||||
$total -= $this->getDiscount();
|
||||
}
|
||||
|
||||
return $total;
|
||||
}
|
||||
|
||||
public function getTotalAmountWithoutTax($withDiscount = true)
|
||||
{
|
||||
$total = 0;
|
||||
|
||||
foreach ($this->getOrderProducts() as $orderProduct) {
|
||||
if ($orderProduct->getWasInPromo()) {
|
||||
$total += $orderProduct->getPromoPrice() * $orderProduct->getQuantity();
|
||||
} else {
|
||||
$total += $orderProduct->getPrice() * $orderProduct->getQuantity();
|
||||
}
|
||||
}
|
||||
|
||||
$total += $this->getPostage() - $this->getPostageTax();
|
||||
|
||||
if ($withDiscount) {
|
||||
$total -= $this->getDiscount();
|
||||
}
|
||||
|
||||
return $total;
|
||||
}
|
||||
}
|
||||
24
local/modules/AdminOrderCreation/Readme.md
Normal file
24
local/modules/AdminOrderCreation/Readme.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Admin Order Creation
|
||||
|
||||
Author: Gilles Bourgeat <gilles.bourgeat@gmail.com>
|
||||
|
||||
A module to create orders from the Thelia back-office.
|
||||
|
||||
## Compatibility
|
||||
|
||||
Thelia >= 2.3
|
||||
|
||||
## Installation
|
||||
|
||||
### Manually
|
||||
|
||||
* Copy the module into ```<thelia_root>/local/modules/``` directory and be sure that the name of the module is ```AdminOrderCreation```.
|
||||
* Activate it in your thelia administration panel
|
||||
|
||||
### Composer
|
||||
|
||||
Add it in your main thelia composer.json file
|
||||
|
||||
```
|
||||
composer require thelia/admin-order-creation ~1.3.3
|
||||
```
|
||||
39
local/modules/AdminOrderCreation/Util/Calc.php
Normal file
39
local/modules/AdminOrderCreation/Util/Calc.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the module AdminOrderCreation */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace AdminOrderCreation\Util;
|
||||
|
||||
class Calc
|
||||
{
|
||||
public static function reduction($value, $type, $price, $quantity = 1)
|
||||
{
|
||||
$type = (int) $type;
|
||||
$value = (float) $value;
|
||||
$quantity = (float) $quantity;
|
||||
|
||||
if ($type === 1) {
|
||||
if ($value < 0 || $value > 100) {
|
||||
throw new \Exception('Invalid arg reduction');
|
||||
}
|
||||
|
||||
return (($price / 100) * (100 - $value));
|
||||
} elseif ($type === 2) {
|
||||
if ($value < 0 || $value > $price * $quantity) {
|
||||
throw new \Exception('Invalid arg reduction');
|
||||
}
|
||||
|
||||
return ($price * $quantity - $value) / $quantity;
|
||||
} elseif ($type === 3) {
|
||||
if ($value < 0 || $value > $price) {
|
||||
throw new \Exception('Invalid arg reduction');
|
||||
}
|
||||
|
||||
return ($price - $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the module AdminOrderCreation */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace AdminOrderCreation\Util;
|
||||
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
|
||||
trait CriteriaSearchTrait
|
||||
{
|
||||
/**
|
||||
* @param string $q
|
||||
* @return string
|
||||
*/
|
||||
public function getRegex($q)
|
||||
{
|
||||
$q = explode(' ', $q);
|
||||
|
||||
$words = array();
|
||||
|
||||
foreach ($q as $v) {
|
||||
$v = trim($v);
|
||||
if (strlen($v) > 2 && preg_match('/^[a-z0-9]+$/i', $v)) {
|
||||
$words[] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
if (!count($words)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$regex = array();
|
||||
$regex[] = '.*' . implode('.+', $words) . '.*';
|
||||
if (count($words) > 1) {
|
||||
$regex[] = '.*' . implode('.+', array_reverse($words)) . '.*';
|
||||
}
|
||||
|
||||
return implode('|', $regex);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ModelCriteria $query
|
||||
* @param array $columns
|
||||
* @param string $q
|
||||
*/
|
||||
public function whereConcatRegex(ModelCriteria $query, array $columns, $q)
|
||||
{
|
||||
$query->where("CONCAT_WS(' ', " . implode(',', $columns). ") REGEXP ?", self::getRegex($q), \PDO::PARAM_STR);
|
||||
}
|
||||
}
|
||||
13
local/modules/AdminOrderCreation/composer.json
Normal file
13
local/modules/AdminOrderCreation/composer.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "thelia/admin-order-creation",
|
||||
"description": "A module to create orders from the Thelia back-office.",
|
||||
"license": "MIT",
|
||||
"type": "thelia-module",
|
||||
"require": {
|
||||
"thelia/installer": "~1.1",
|
||||
"thelia/credit-note-module": "~2.3.0"
|
||||
},
|
||||
"extra": {
|
||||
"installer-name": "AdminOrderCreation"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{check_auth role="ADMIN" resource="order" access="create"}
|
||||
|
||||
<div class="alert alert-success text-center">
|
||||
<a href="{url path="/admin/order/update/%id" id=$order->getId()}">Voir la commande</a>
|
||||
</div>
|
||||
@@ -0,0 +1,592 @@
|
||||
{form name="admin-order-creation.create"}
|
||||
<form method="POST" action="{url path="/admin/admin-order-creation/ajax/modal/create"}">
|
||||
|
||||
{form_field field='action'}
|
||||
<input type="hidden" name="{$name}" value="create" />
|
||||
{/form_field}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message nofilter}</div>{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="alert alert-info">
|
||||
{$currency_id = 0}
|
||||
{form_field field='currency_id'}
|
||||
{capture name="currency"}
|
||||
<select name="{$name}" class="js-field-currency">
|
||||
{loop type="currency" name="currency"}
|
||||
<option value="{$ID}" {if !$data and $IS_DEFAULT}selected{/if}{if $data == $ID}selected{/if}>{$SYMBOL}</option>
|
||||
{if $data == $ID}
|
||||
{$currency_id = $ID}
|
||||
{/if}
|
||||
{if !$data and $IS_DEFAULT}
|
||||
{$currency_id = $ID}
|
||||
{/if}
|
||||
{/loop}
|
||||
</select>
|
||||
{/capture}
|
||||
{intl l="This order use the currency : %currency" d="adminordercreation.bo.default" currency=$smarty.capture.currency}
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="alert alert-info">
|
||||
{$country_id = 0}
|
||||
{form_field field='country_id'}
|
||||
{capture name="country"}
|
||||
<select name="{$name}" class="js-field-country">
|
||||
{loop type="country" name="country"}
|
||||
<option value="{$ID}" {if !$data and $IS_DEFAULT}selected{/if}{if $data == $ID}selected{/if}>{$TITLE}</option>
|
||||
{if $data == $ID}
|
||||
{$country_id = $ID}
|
||||
{/if}
|
||||
{if !$data and $IS_DEFAULT}
|
||||
{$country_id = $ID}
|
||||
{/if}
|
||||
{/loop}
|
||||
</select>
|
||||
{/capture}
|
||||
{intl l="This order use the country : %country" d="adminordercreation.bo.default" country=$smarty.capture.country}
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* status select *}
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{intl l="Status :" d="adminordercreation.bo.default"}</label>
|
||||
{$ignoreStatus = false}
|
||||
{form_field field='credit_note_id'}
|
||||
{if $data}
|
||||
{$ignoreStatus = true}
|
||||
{/if}
|
||||
{/form_field}
|
||||
|
||||
{form_field field='status_id'}
|
||||
<select class="form-control js-select-status" name="{$name}">
|
||||
{loop type="order-status" name="order-status"}
|
||||
{if !$ignoreStatus || ($ignoreStatus && $ID >= {$configPayedOrderMinimumStatusId})}
|
||||
<option value="{$ID}" {if $order->getStatusId() == $ID}selected{/if} data-color="{$COLOR}">
|
||||
{if $TITLE}{$TITLE}{else}{$CODE}{/if}
|
||||
</option>
|
||||
{/if}
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* customer select *}
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{intl l="Customer :" d="adminordercreation.bo.default"}</label>
|
||||
{form_field field='customer_id'}
|
||||
<select class="form-control js-select-customer" name="{$name}" data-placeholder="{intl l="Search..." d="adminordercreation.bo.default"}" data-url="{url path="/admin/admin-order-creation/ajax/search/customer"}">
|
||||
{if $order->getCustomer()}
|
||||
{loop type="customer" name="customer" backend_context=true current=false id=$order->getCustomer()->getId()}
|
||||
<option value="{$ID}">{$REF} : ({$FIRSTNAME} {$LASTNAME})</option>
|
||||
{/loop}
|
||||
{else}
|
||||
<option value="">{intl l="Search..." d="adminordercreation.bo.default"}</option>
|
||||
{/if}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* delivery module *}
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{intl l="Delivery module :" d="adminordercreation.bo.default"}</label>
|
||||
{form_field field='delivery_module_id'}
|
||||
<select class="form-control js-select-delivery-module" name="{$name}" data-placeholder="{intl l="Search..." d="adminordercreation.bo.default"}" >
|
||||
{loop type="module" name="module-delivery" module_type=2 active="yes"}
|
||||
<option value="{$ID}" {if $data == $ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* payment module *}
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{intl l="Payment module :" d="adminordercreation.bo.default"}</label>
|
||||
{form_field field='payment_module_id'}
|
||||
<select class="form-control js-select-payment-module" name="{$name}" data-placeholder="{intl l="Search..." d="adminordercreation.bo.default"}" >
|
||||
{loop type="module" name="module-payment" module_type=3 active="yes"}
|
||||
<option value="{$ID}" {if $data == $ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* address invoice *}
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{intl l="Invoice address" d="adminordercreation.bo.default"}</div>
|
||||
<div class="panel-body">
|
||||
|
||||
{$other = false}
|
||||
<div class="form-group">
|
||||
{form_field field='invoice_address_id'}
|
||||
{if !$data}
|
||||
{$other = true}
|
||||
{/if}
|
||||
<select class="form-control js-select-invoice-address" name="{$name}" {if !$order->getCustomer()}disabled{/if}>
|
||||
{if $order->getCustomer()}
|
||||
{loop type="address" name="address-invoice" customer=$order->getCustomer()->getId()}
|
||||
<option value="{$ID}" {if $data == $ID}selected{/if}>
|
||||
({$FIRSTNAME} {$LASTNAME}) : {$ADDRESS1} {$CITY} {$ZIPCODE}
|
||||
</option>
|
||||
{/loop}
|
||||
<option value="" {if $other}selected{/if}>{intl l="Other" d="adminordercreation.bo.default"}</option>
|
||||
{/if}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="row js-other-area {if !$other or !$order->getCustomer()}hide{/if}">
|
||||
{form_field field='invoice_address_title'}
|
||||
<div class="form-group col-md-3">
|
||||
<label for="">{intl l="Title :" d="adminordercreation.bo.default"}</label>
|
||||
<select name="{$name}" class="form-control" >
|
||||
{loop type="title" name="title.invoice"}
|
||||
<option value="{$ID}" {if $data == $ID}selected{/if} >{$LONG}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='invoice_address_firstname'}
|
||||
<div class="form-group col-md-4">
|
||||
<label for="">{intl l="Firstname :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='invoice_address_lastname'}
|
||||
<div class="form-group col-md-5">
|
||||
<label for="">{intl l="Lastname :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='invoice_address_address1'}
|
||||
<div class="form-group col-md-12">
|
||||
<label for="">{intl l="Address :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='invoice_address_address2'}
|
||||
<div class="form-group col-md-12">
|
||||
<label for="">{intl l="Address complement :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='invoice_address_city'}
|
||||
<div class="form-group col-md-6">
|
||||
<label for="">{intl l="City :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='invoice_address_zipcode'}
|
||||
<div class="form-group col-md-6">
|
||||
<label for="">{intl l="Zipcode :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='invoice_address_country_id'}
|
||||
<div class="form-group col-md-6">
|
||||
<label for="">{intl l="Country :" d="adminordercreation.bo.default"}</label>
|
||||
<select name="{$name}" class="form-control">
|
||||
{if $data}
|
||||
{$data = 64}
|
||||
{loop type="country" name="country-address-invoice"}
|
||||
{if $IS_DEFAULT}
|
||||
{$data = $ID}
|
||||
{/if}
|
||||
{/loop}
|
||||
{/if}
|
||||
{loop type="country" name="country-address-invoice" visible=true}
|
||||
<option value="{$ID}" {if $data == $ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='invoice_address_company'}
|
||||
<div class="form-group col-md-6">
|
||||
<label for="">{intl l="Company :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* delivery invoice *}
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{intl l="Delivery address" d="adminordercreation.bo.default"}</div>
|
||||
<div class="panel-body">
|
||||
|
||||
{$other = false}
|
||||
<div class="form-group">
|
||||
{form_field field='delivery_address_id'}
|
||||
{if !$data}
|
||||
{$other = true}
|
||||
{/if}
|
||||
<select class="form-control js-select-delivery-address" name="{$name}" {if !$order->getCustomer()}disabled{/if}>
|
||||
{if $order->getCustomer()}
|
||||
{loop type="address" name="address-delivery" customer=$order->getCustomer()->getId()}
|
||||
<option value="{$ID}" {if $data == $ID}selected{/if}>
|
||||
({$FIRSTNAME} {$LASTNAME}) : {$ADDRESS1} {$CITY} {$ZIPCODE}
|
||||
</option>
|
||||
{/loop}
|
||||
<option value="" {if $other}selected{/if}>{intl l="Other" d="adminordercreation.bo.default"}</option>
|
||||
{/if}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="row js-other-area {if !$other or !$order->getCustomer()}hide{/if}">
|
||||
{form_field field='delivery_address_title'}
|
||||
<div class="form-group col-md-3">
|
||||
<label for="">{intl l="Title :" d="adminordercreation.bo.default"}</label>
|
||||
<select name="{$name}" class="form-control" >
|
||||
{loop type="title" name="title-delivery"}
|
||||
<option value="{$ID}" {if $data == $ID}selected{/if} >{$LONG}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='delivery_address_firstname'}
|
||||
<div class="form-group col-md-4">
|
||||
<label for="">{intl l="Firstname :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='delivery_address_lastname'}
|
||||
<div class="form-group col-md-5">
|
||||
<label for="">{intl l="Lastname :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='delivery_address_address1'}
|
||||
<div class="form-group col-md-12">
|
||||
<label for="">{intl l="Address :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='delivery_address_address2'}
|
||||
<div class="form-group col-md-12">
|
||||
<label for="">{intl l="Address complement :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='delivery_address_city'}
|
||||
<div class="form-group col-md-6">
|
||||
<label for="">{intl l="City :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='delivery_address_zipcode'}
|
||||
<div class="form-group col-md-6">
|
||||
<label for="">{intl l="Zipcode :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='delivery_address_country_id'}
|
||||
<div class="form-group col-md-6">
|
||||
<label for="">{intl l="Country :" d="adminordercreation.bo.default"}</label>
|
||||
<select name="{$name}" class="form-control">
|
||||
{if $data}
|
||||
{$data = 64}
|
||||
{loop type="country" name="country-address-delivery"}
|
||||
{if $IS_DEFAULT}
|
||||
{$data = $ID}
|
||||
{/if}
|
||||
{/loop}
|
||||
{/if}
|
||||
{loop type="country" name="country-address-delivery" visible=true}
|
||||
<option value="{$ID}" {if $data == $ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='delivery_address_company'}
|
||||
<div class="form-group col-md-6">
|
||||
<label for="">{intl l="Company :" d="adminordercreation.bo.default"}</label>
|
||||
<input type="text" name="{$name}" class="form-control" value="{$data}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Product *}
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{intl l="Products" d="adminordercreation.bo.default"}</div>
|
||||
<div class="panel-body">
|
||||
{$count = 0}
|
||||
{form_field field='product_id'}
|
||||
{foreach from=$data item=item key=key}
|
||||
{if $key > $count}
|
||||
{$count = $key}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/form_field}
|
||||
|
||||
<table class="table js-table-product-line">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30%">
|
||||
{intl l="Product" d="adminordercreation.bo.default"} / {intl l="Product sale element" d="adminordercreation.bo.default"}
|
||||
</th>
|
||||
<th width="15%">
|
||||
{intl l="Unit price with tax" d="adminordercreation.bo.default"}
|
||||
</th>
|
||||
<th width="10%">
|
||||
{intl l="Quantity" d="adminordercreation.bo.default"}
|
||||
</th>
|
||||
<th width="20%">
|
||||
{intl l="Price" d="adminordercreation.bo.default"}
|
||||
</th>
|
||||
<th width="5%">
|
||||
<button class="btn btn-success js-action-add" data-key="{$count}" title="{intl l="Add product" d="adminordercreation.bo.default"}">+</button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{form_field field='product_id'}
|
||||
{foreach from=$order->getOrderProducts() item=orderProduct key=key}
|
||||
{include file="admin-order-creation/include/product-line.html" orderProduct=$orderProduct}
|
||||
{/foreach}
|
||||
{/form_field}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Shipping *}
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{intl l="Shipping" d="adminordercreation.bo.default"}</div>
|
||||
<div class="panel-body js-shipping-area">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{form_field field='shipping_price'}
|
||||
<div class="form-group">
|
||||
<label for="">{intl l="Price without tax :" d="adminordercreation.bo.default"}</label>
|
||||
<input name="{$name}" class="form-control js-field-amount-without-tax" type="number" min="0" step="0.000001" value="{$data}" data-url="{url path="/admin/product/calculate-raw-price?action=to_tax"}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{form_field field='shipping_tax_rule_id'}
|
||||
<div class="form-group">
|
||||
<label for="">{intl l="Tax rule :" d="adminordercreation.bo.default"}</label>
|
||||
<select name="{$name}" class="form-control js-field-tax-rule" name="{$name}" data-url="{url path="/admin/product/calculate-raw-price?action=from_tax"}">
|
||||
{loop type="tax-rule" name="tax-rule"}
|
||||
<option value="{$ID}" {if $data == $ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{form_field field='shipping_price_with_tax'}
|
||||
<div class="form-group">
|
||||
<label for="">{intl l="Price with tax :" d="adminordercreation.bo.default"}</label>
|
||||
<input name="{$name}" class="form-control js-field-amount-with-tax" type="number" min="0" step="0.000001" value="{$data}" data-url="{url path="/admin/product/calculate-raw-price?action=from_tax"}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Global reduction *}
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{intl l="Global reduction" d="adminordercreation.bo.default"}</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
{form_field field='reduction_type'}
|
||||
<div class="form-group">
|
||||
<label for="">{intl l="Type :" d="adminordercreation.bo.default"}</label>
|
||||
<select class="form-control js-action-refresh" name="{$name}">
|
||||
<option value="1" {if $data == 1}selected{/if}>{intl l="Percentage" d="adminordercreation.bo.default"}</option>
|
||||
{*<option value="2" {if $data == 2}selected{/if}>{intl l="Global amount" d="adminordercreation.bo.default"}</option>*}
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{form_field field='reduction'}
|
||||
<div class="form-group">
|
||||
<label for="">{intl l="Value :" d="adminordercreation.bo.default"}</label>
|
||||
<input class="form-control js-action-refresh" type="number" min="0" step="0.01" name="{$name}" value="{$data}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $hasCreditNoteModule}
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{intl l="Use Credit Note :" d="adminordercreation.bo.default"}</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
{* customer select *}
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{intl l="Credit note :" d="adminordercreation.bo.default"}</label>
|
||||
{$credit_note_id = null}
|
||||
{form_field field='credit_note_id'}
|
||||
<select class="form-control js-select-credit-note" name="{$name}" data-placeholder="{intl l="Search..." d="adminordercreation.bo.default"}" {if !$order->getCustomer()}disabled{/if}>
|
||||
<option value=""></option>
|
||||
{if $order->getCustomer()}
|
||||
{loop type="credit-note" name="credit-note" backend_context=true customer_id=$order->getCustomer()->getId() invoiced=true used=false}
|
||||
{if $data == $ID}
|
||||
{$credit_note_id = $ID}
|
||||
{/if}
|
||||
<option value="{$ID}" {if $ID == $data}selected{/if}>{$REF} - {$INVOICE_REF} : {format_money number=$TOTAL_PRICE_WITH_TAX currency_id=$CURRENCY_ID}</option>
|
||||
{/loop}
|
||||
{/if}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{if $credit_note_id}
|
||||
{loop type="credit-note" name="credit-note" backend_context=true id=$credit_note_id}
|
||||
<div class="alert alert-info">
|
||||
{intl l="This command uses the credit note ref %ref for the amount of %amount with tax." d="adminordercreation.bo.default"
|
||||
ref=$REF
|
||||
amount={format_money number=$TOTAL_PRICE_WITH_TAX currency_id=$CURRENCY_ID}
|
||||
}
|
||||
</div>
|
||||
{$diffAmount = ($order->getTotalAmountWithTax() - $TOTAL_PRICE_WITH_TAX)|round:2}
|
||||
{if $diffAmount == 0}
|
||||
|
||||
{elseif $diffAmount > 0}
|
||||
<div class="alert alert-warning">
|
||||
{intl l="Your customer will have to pay the difference of %amount with tax" d="adminordercreation.bo.default"
|
||||
amount={format_money number={$order->getTotalAmountWithTax() - $TOTAL_PRICE_WITH_TAX} currency_id=$CURRENCY_ID}
|
||||
}
|
||||
</div>
|
||||
{else}
|
||||
<div class="alert alert-warning">
|
||||
{intl l="A new credit note of %amount with tax will be issued for this customer." d="adminordercreation.bo.default"
|
||||
amount={format_money number=-{$order->getTotalAmountWithTax() - $TOTAL_PRICE_WITH_TAX} currency_id=$CURRENCY_ID}
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{intl l="Status of new credit note :" d="adminordercreation.bo.default"}</label>
|
||||
{form_field field='credit_note_status_id'}
|
||||
{if !$data}
|
||||
{$data = $configNewCreditNoteStatusId}
|
||||
{/if}
|
||||
<select class="form-control js-select-credit-note-status" name="{$name}" {if $invoiced}disabled{/if}>
|
||||
{loop type="credit-note-status" name="credit-note-status" invoiced=true}
|
||||
<option value="{$ID}" data-color="{$COLOR}" {if $data == $ID}selected{/if}>
|
||||
{if $TITLE}{$TITLE}{else}{$CODE}{/if}
|
||||
</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{intl l="Type of new credit note :" d="adminordercreation.bo.default"}</label>
|
||||
{form_field field='credit_note_type_id'}
|
||||
{if !$data}
|
||||
{$data = $configNewCreditNoteTypeId}
|
||||
{/if}
|
||||
<select class="form-control js-select-credit-note-type" name="{$name}" {if $invoiced}disabled{/if}>
|
||||
{loop type="credit-note-type" name="credit-note-type"}
|
||||
<option value="{$ID}" data-color="{$COLOR}" {if $data == $ID}selected{/if}>
|
||||
{if $TITLE}{$TITLE}{else}{$CODE}{/if}
|
||||
</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/loop}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{intl l="Order Informations :" d="adminordercreation.bo.default"}</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-center">
|
||||
<h2>
|
||||
<span>{intl l="Total without tax :" d="adminordercreation.bo.default"}</span><span>
|
||||
{format_money number=$order->getTotalAmountWithoutTax() currency_id=$order->getCurrency()->getId()} HT
|
||||
</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2>
|
||||
<span>{intl l="Total tax :" d="adminordercreation.bo.default"}</span><span>
|
||||
{format_money number={$order->getTotalAmountWithTax()-$order->getTotalAmountWithoutTax()} currency_id=$order->getCurrency()->getId()}
|
||||
</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2>
|
||||
<span>{intl l="Total with tax :" d="adminordercreation.bo.default"}</span><span>
|
||||
{format_money number=$order->getTotalAmountWithTax() currency_id=$order->getCurrency()->getId()} TTC
|
||||
</span>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 modal-footer">
|
||||
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove"></span>
|
||||
{intl l="Cancel" d="adminordercreation.bo.default"}
|
||||
</button>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{intl l="Create order" d="adminordercreation.bo.default"}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
@@ -0,0 +1,465 @@
|
||||
(function(){
|
||||
var $modal = $('#modal-order-creation');
|
||||
var currentRequest;
|
||||
|
||||
// fix bug bootstrap 3 and select2
|
||||
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
|
||||
|
||||
var timer = null;
|
||||
function refreshWithTimer($form, event) {
|
||||
if (timer !== null) {
|
||||
clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
timer = setTimeout(function($form){
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[action]': 'refresh'
|
||||
}));
|
||||
}, 700, $form);
|
||||
}
|
||||
|
||||
function initSelect($target, allowClear){
|
||||
|
||||
if (typeof allowClear === "undefined") {
|
||||
allowClear = false;
|
||||
}
|
||||
return $target.select2({
|
||||
allowClear: allowClear,
|
||||
templateResult: function(data){
|
||||
if (!data.id) return data.text;
|
||||
var prefix = data.element.dataset.color ? '<span class="label" style="background-color: ' + data.element.dataset.color + ';width: 50px;"> </span>' : '';
|
||||
prefix += (data.element.dataset.ref ? ' <span style="font-weight: bold;">' + data.element.dataset.ref + '</span>' : '');
|
||||
return $(prefix + ' <span>' + data.text + '</span>');
|
||||
},
|
||||
templateSelection: function(data){
|
||||
if (!data.id) return data.text;
|
||||
var prefix = data.element.dataset.color ? '<span class="label" style="background-color: ' + data.element.dataset.color + ';width: 50px;"> </span>' : '';
|
||||
prefix += (data.element.dataset.ref ? ' <span style="font-weight: bold;">' + data.element.dataset.ref + '</span>' : '');
|
||||
return $(prefix + ' <span>' + data.text + '</span>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getFormData($form, data){
|
||||
var formData = $form.serializeArray();
|
||||
|
||||
for (var i in formData) {
|
||||
for (var e in data) {
|
||||
if (formData[i].name === e) {
|
||||
formData[i].value = data[e];
|
||||
delete data[e];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var e in data) {
|
||||
formData.push({
|
||||
name: i,
|
||||
value: data[i]
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return formData
|
||||
}
|
||||
|
||||
function initAjaxSelectCustomer($target){
|
||||
return $target.select2({
|
||||
ajax: {
|
||||
url: $target.data('url'),
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function (params){
|
||||
return {
|
||||
q: params.term,
|
||||
customerId: $target.data('customer-id')
|
||||
};
|
||||
},
|
||||
processResults: function (data){
|
||||
return {results: data.items};
|
||||
},
|
||||
error: function(jqXHR, textStatus){
|
||||
if (jqXHR.statusText === 'abort') return;
|
||||
$target.select2('destroy');
|
||||
$modal.displayError(jqXHR, textStatus);
|
||||
},
|
||||
cache: false
|
||||
},
|
||||
minimumInputLength: 3,
|
||||
placeholder: $target.data('placeholder'),
|
||||
templateResult: function(data){
|
||||
if (data.loading) return data.text;
|
||||
|
||||
var markup = "<div class='select2-result-repository clearfix'>";
|
||||
markup += data.ref + ' : (' + data.firstname + ' ' + data.lastname + ')' + '</br><small>' + data.address + '</small>';
|
||||
markup += "</div>";
|
||||
|
||||
return $(markup);
|
||||
},
|
||||
templateSelection: function(data){
|
||||
if (data.text) {
|
||||
return data.text;
|
||||
}
|
||||
|
||||
return data.ref + ' : (' + data.firstname + ' ' + data.lastname + ')';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initAjaxSelectProduct($target){
|
||||
return $target.select2({
|
||||
ajax: {
|
||||
url: $target.data('url'),
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function (params){
|
||||
return {
|
||||
q: params.term
|
||||
};
|
||||
},
|
||||
processResults: function (data){
|
||||
return {results: data.items};
|
||||
},
|
||||
error: function(jqXHR, textStatus){
|
||||
if (jqXHR.statusText === 'abort') return;
|
||||
$target.select2('destroy');
|
||||
$modal.displayError(jqXHR, textStatus);
|
||||
},
|
||||
cache: false
|
||||
},
|
||||
minimumInputLength: 3,
|
||||
placeholder: $target.data('placeholder'),
|
||||
templateResult: function(data){
|
||||
if (data.loading) return data.text;
|
||||
|
||||
var markup = "<div class='select2-result-repository clearfix'>";
|
||||
markup += data.ref + ' : ' + data.title;
|
||||
markup += "</div>";
|
||||
|
||||
return $(markup);
|
||||
},
|
||||
templateSelection: function(data){
|
||||
if (data.text) {
|
||||
return data.text;
|
||||
}
|
||||
|
||||
return data.ref + ' : ' + data.title;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/****** Modal methods ******/
|
||||
$modal.loaderOff = function(){
|
||||
$modal.find('.modal-loader').addClass('hidden');
|
||||
$modal.find('.modal-body').removeClass('hidden');
|
||||
};
|
||||
|
||||
$modal.loaderOn = function(){
|
||||
$modal.find('.modal-loader').removeClass('hidden');
|
||||
$modal.find('.modal-body').addClass('hidden');
|
||||
};
|
||||
|
||||
$modal.reset = function(){
|
||||
$modal.hideError();
|
||||
$modal.loaderOn();
|
||||
};
|
||||
|
||||
$modal.hideError = function(){
|
||||
$modal.find('.modal-error').addClass('hidden').find('iframe').contents().find('html').empty();
|
||||
};
|
||||
|
||||
$modal.displayError = function(jqXHR, textStatus){
|
||||
if (jqXHR.statusText === 'abort') return;
|
||||
$modal.loaderOff();
|
||||
$modal.find('.modal-body').addClass('hidden');
|
||||
var $error = $modal.find('.modal-error').removeClass('hidden');
|
||||
$error.find('.textStatus').html(textStatus);
|
||||
$error.find('iframe').contents().find('html').html(jqXHR.responseText);
|
||||
};
|
||||
|
||||
$modal.modalReady = function(){
|
||||
var $form = $modal.find('.modal-body form');
|
||||
|
||||
var $selectStatus = initSelect($form.find('.js-select-status'));
|
||||
var $selectCustomer = initAjaxSelectCustomer($form.find('.js-select-customer'));
|
||||
var $selectProduct = initAjaxSelectProduct($form.find('.js-select-product'));
|
||||
var $selectProductSaleElement = initSelect($form.find('.js-select-product-sale-element'));
|
||||
var $selectInvoiceAddress = initSelect($form.find('.js-select-invoice-address'));
|
||||
var $selectDeliveryAddress = initSelect($form.find('.js-select-delivery-address'));
|
||||
var $selectCreditNote = initSelect($form.find('.js-select-credit-note'), true);
|
||||
var $selectCreditNoteStatus = initSelect($form.find('.js-select-credit-note-status'));
|
||||
var $selectCreditNoteType = initSelect($form.find('.js-select-credit-note-type'));
|
||||
|
||||
$form.on('submit', function(event){
|
||||
event.preventDefault();
|
||||
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[action]': 'create'
|
||||
}));
|
||||
});
|
||||
|
||||
$selectStatus.on('select2:select', function(event){
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[action]': 'refresh'
|
||||
}));
|
||||
});
|
||||
|
||||
$selectCustomer.on('select2:select', function(event){
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[customer_id]': event.params.data.id,
|
||||
'admin-order-creation-create[action]': 'refresh'
|
||||
}));
|
||||
});
|
||||
|
||||
$selectInvoiceAddress.on('select2:select', function(event){
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[action]': 'refresh'
|
||||
}));
|
||||
});
|
||||
|
||||
$selectDeliveryAddress.on('select2:select', function(event){
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[action]': 'refresh'
|
||||
}));
|
||||
});
|
||||
|
||||
$selectProduct.on('select2:select', function(event){
|
||||
$(event.target).parents('tr').find('.js-refresh-price').val('1');
|
||||
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[action]': 'refresh'
|
||||
}));
|
||||
});
|
||||
|
||||
$selectProductSaleElement.on('select2:select', function(event){
|
||||
$(event.target).parents('tr').find('.js-refresh-price').val('1');
|
||||
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[action]': 'refresh'
|
||||
}));
|
||||
});
|
||||
|
||||
$selectCreditNote.on('select2:select', function(event){
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[action]': 'refresh'
|
||||
}));
|
||||
});
|
||||
|
||||
$form.on('change', '.js-field-currency', function(event){
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'credit-note-create[action]': 'refresh'
|
||||
}));
|
||||
});
|
||||
|
||||
$form.on('change', '.js-action-refresh', function(event){
|
||||
if ($(this).val().length) {
|
||||
refreshWithTimer($form, event);
|
||||
}
|
||||
});
|
||||
|
||||
var currentProductRequestTax;
|
||||
$form.on('change', '.js-product-price-with-tax, .js-product-price-without-tax', function(event){
|
||||
if (currentProductRequestTax) currentProductRequestTax.abort();
|
||||
|
||||
var $th = $(this), $thr = $(this).parents('tr');
|
||||
|
||||
var val = parseFloat($(this).val());
|
||||
|
||||
if (!val) {
|
||||
val = 0;
|
||||
}
|
||||
|
||||
currentProductRequestTax = $.ajax({
|
||||
url: $(this).data('url'),
|
||||
dataType: 'json',
|
||||
data: {
|
||||
price: val,
|
||||
tax_rule: this.dataset.taxRuleId
|
||||
}
|
||||
});
|
||||
|
||||
// ajax success
|
||||
currentProductRequestTax.done(function(data){
|
||||
if ($th.hasClass('js-product-price-without-tax')) {
|
||||
$thr.find('.js-product-price-with-tax').val(data.result);
|
||||
} else {
|
||||
$thr.find('.js-product-price-without-tax').val(data.result);
|
||||
}
|
||||
|
||||
refreshWithTimer($form, event);
|
||||
});
|
||||
|
||||
// ajax error
|
||||
currentProductRequestTax.fail(function(jqXHR, textStatus){
|
||||
if (jqXHR.statusText === 'abort') return;
|
||||
$modal.displayError(jqXHR, textStatus);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/***** Product line *****/
|
||||
var $tableProductLine = $form.find('.js-table-product-line');
|
||||
var templateProductLine = $('#template-order-creation-product-line').html();
|
||||
|
||||
$tableProductLine.on('click', '.js-action-add', function(event){
|
||||
event.preventDefault();
|
||||
$(this).data('key', parseInt($(this).data('key')) + 1);
|
||||
|
||||
var templateProductLineKey = templateProductLine.replace(/\[\]/g, '[' + $(this).data('key') + ']');
|
||||
$tableProductLine.find('tbody').append(templateProductLineKey);
|
||||
|
||||
var $selectProduct = initAjaxSelectProduct($form.find('.js-table-product-line tbody .js-select-product').last());
|
||||
|
||||
$selectProduct.on('select2:select', function(event){
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[action]': 'refresh'
|
||||
}));
|
||||
});
|
||||
|
||||
/*if ($tableProductLine.find('tbody tr').not('.js-no-free-amount').length) {
|
||||
$tableProductLine.find('.js-no-free-amount').addClass('hidden');
|
||||
} else {
|
||||
$tableProductLine.find('.js-no-free-amount').removeClass('hidden');
|
||||
}*/
|
||||
});
|
||||
|
||||
$tableProductLine.on('click', '.js-action-delete', function(event){
|
||||
event.preventDefault();
|
||||
$(this).parents('tr').remove();
|
||||
|
||||
$modal.loadAjax(event, getFormData($form, {
|
||||
'admin-order-creation-create[action]': 'refresh'
|
||||
}));
|
||||
});
|
||||
|
||||
var $shippingArea = $form.find('.js-shipping-area');
|
||||
|
||||
var currentRequestTax;
|
||||
$shippingArea.on('change', '.js-field-amount-without-tax, .js-field-amount-with-tax', function(event){
|
||||
if (currentRequestTax) currentRequestTax.abort();
|
||||
|
||||
var $th = $(this), $thr = $shippingArea;
|
||||
|
||||
var val = parseFloat($(this).val());
|
||||
|
||||
if (!val) {
|
||||
val = 0;
|
||||
}
|
||||
|
||||
currentRequestTax = $.ajax({
|
||||
url: $(this).data('url'),
|
||||
dataType: 'json',
|
||||
data: {
|
||||
price: val,
|
||||
tax_rule: parseInt($thr.find('.js-field-tax-rule').val())
|
||||
}
|
||||
});
|
||||
|
||||
// ajax success
|
||||
currentRequestTax.done(function(data){
|
||||
if ($th.hasClass('js-field-amount-without-tax')) {
|
||||
$thr.find('.js-field-amount-with-tax').val(data.result);
|
||||
} else {
|
||||
$thr.find('.js-field-amount-without-tax').val(data.result);
|
||||
}
|
||||
|
||||
refreshWithTimer($form, event);
|
||||
});
|
||||
|
||||
// ajax error
|
||||
currentRequestTax.fail(function(jqXHR, textStatus){
|
||||
if (jqXHR.statusText === 'abort') return;
|
||||
$modal.displayError(jqXHR, textStatus);
|
||||
});
|
||||
});
|
||||
|
||||
$shippingArea.on('change', '.js-field-tax-rule', function(event){
|
||||
if (currentRequestTax) currentRequestTax.abort();
|
||||
|
||||
var $th = $(this), $thr = $shippingArea;
|
||||
|
||||
var val = parseFloat($thr.find('.js-field-amount-with-tax').val());
|
||||
|
||||
if (!val) {
|
||||
val = 0;
|
||||
}
|
||||
|
||||
currentRequestTax = $.ajax({
|
||||
url: $(this).data('url'),
|
||||
dataType: 'json',
|
||||
data: {
|
||||
price: val,
|
||||
tax_rule: parseInt($thr.find('.js-field-tax-rule').val())
|
||||
}
|
||||
});
|
||||
|
||||
// ajax success
|
||||
currentRequestTax.done(function(data){
|
||||
if ($th.hasClass('js-field-amount-without-tax')) {
|
||||
$thr.find('.js-field-amount-with-tax').val(data.result);
|
||||
} else {
|
||||
$thr.find('.js-field-amount-without-tax').val(data.result);
|
||||
}
|
||||
|
||||
refreshWithTimer($form, event);
|
||||
});
|
||||
|
||||
// ajax error
|
||||
currentRequestTax.fail(function(jqXHR, textStatus){
|
||||
if (jqXHR.statusText === 'abort') return;
|
||||
$modal.displayError(jqXHR, textStatus);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
$modal.loadAjax = function(event, data){
|
||||
if (typeof data === 'undefined') {
|
||||
data = {};
|
||||
}
|
||||
|
||||
// kill last ajax request if not if it's not finished
|
||||
if (currentRequest) currentRequest.abort();
|
||||
|
||||
// to avoid a display bug with select2
|
||||
setTimeout(function(data){
|
||||
// ajax start
|
||||
currentRequest = $.ajax({
|
||||
url: $modal.data('ajaxUrl'),
|
||||
data: data,
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
// ajax success
|
||||
currentRequest.done(function(data, textStatus, xhr){
|
||||
$modal.loaderOff();
|
||||
$modal.find('.modal-body').html(data);
|
||||
$modal.modalReady();
|
||||
});
|
||||
|
||||
// ajax error
|
||||
currentRequest.fail(function(jqXHR, textStatus){
|
||||
$modal.displayError(jqXHR, textStatus);
|
||||
});
|
||||
}, 100, data);
|
||||
};
|
||||
|
||||
$('body').on('click', '#btn-create-order', function(event){
|
||||
$modal.modal('show');
|
||||
var customerId = $(this).data('customerId');
|
||||
var creditNoteId = $(this).data('creditNoteId');
|
||||
|
||||
$modal.loadAjax(event, {
|
||||
'admin-order-creation-create[action]': 'open',
|
||||
'admin-order-creation-create[customer_id]': customerId,
|
||||
'admin-order-creation-create[credit_note_id]': creditNoteId
|
||||
});
|
||||
});
|
||||
|
||||
$modal.on('hidden.bs.modal', function(){
|
||||
$modal.reset();
|
||||
});
|
||||
|
||||
}());
|
||||
@@ -0,0 +1,17 @@
|
||||
<script type="text/javascript">
|
||||
{loop type="order" name="from-order" id=$order_id customer="*" backend_context=true}
|
||||
{$creditNoteId = null}
|
||||
{loop type="credit-note" name="credit-note" order_id=$ID backend_context=true limit=1 used=false invoiced=true}
|
||||
{$creditNoteId = $ID}
|
||||
{/loop}
|
||||
$('.general-block-decorator:first > .row:first > div:last').prepend('<button class="btn btn-sm btn-primary" {if $creditNoteId != null}data-credit-note-id="{$creditNoteId}"{/if} data-customer-id="{$CUSTOMER}" id="btn-create-order" style="margin-left: 10px;">\n' +
|
||||
' {intl l="Create new order" d="adminordercreation.bo.default"}\n' +
|
||||
'</button>');
|
||||
{/loop}
|
||||
</script>
|
||||
<style>
|
||||
.select2-selection__clear {
|
||||
font-size: 20px;
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,56 @@
|
||||
<div class="modal fade" id="modal-order-creation" role="dialog" data-ajax-url="{url path="/admin/admin-order-creation/ajax/modal/create"}">
|
||||
<div class="modal-dialog modal-lg" role="document" style="width: 90%; min-width: 1000px; max-width: 1500px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-loader">
|
||||
<br/><br/><div class="text-center"><span class="loading">{intl l="Please wait, loading" d="adminordercreation.bo.default"}</span></div><br/><br/>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
</div>
|
||||
<div class="modal-error hidden">
|
||||
<div class="alert alert-danger">
|
||||
<strong>{intl l="An error has occurred !!!" d="adminordercreation.bo.default"}</strong>
|
||||
<br/>
|
||||
<span>{intl l="Message status :" d="adminordercreation.bo.default"} <span class="textStatus"></span></span>
|
||||
<br/>
|
||||
<span>{intl l="Message content :" d="adminordercreation.bo.default"}</span>
|
||||
<br/>
|
||||
<iframe width="100%" style="height: 400px;"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{intl l="Close" d="adminordercreation.bo.default"}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="template-order-creation-product-line">
|
||||
{form name="admin-order-creation.create"}
|
||||
{$key = ""}
|
||||
{include file="admin-order-creation/include/product-line.html"}
|
||||
{/form}
|
||||
</script>
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/css/select2.min.css" rel="stylesheet" />
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/js/select2.min.js"></script>
|
||||
{javascripts file='admin-order-creation/assets/js/script.js' source="AdminOrderCreation"}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
<style>
|
||||
{literal}
|
||||
.js-list {
|
||||
width: 100% !important;
|
||||
}
|
||||
.js-animate-info-button {
|
||||
animation: AnimateInfoButton 2s infinite;
|
||||
}
|
||||
@keyframes AnimateInfoButton{
|
||||
0%{opacity: 1;}
|
||||
50%{opacity: 0;}
|
||||
100%{opacity: 1;}
|
||||
}
|
||||
{/literal}
|
||||
</style>
|
||||
@@ -0,0 +1,3 @@
|
||||
<button class="btn btn-sm btn-primary pull-right" id="btn-create-order" style="margin-left: 10px;">
|
||||
{intl l="Create new order" d="adminordercreation.bo.default"}
|
||||
</button>
|
||||
@@ -0,0 +1,152 @@
|
||||
<tr>
|
||||
<td>
|
||||
{form_field field='product_id' value_key=$key}
|
||||
{if $orderProduct}
|
||||
{loop type="product_sale_elements" order="id" name="product-sale-element-price-$key" id=$orderProduct->getProductSaleElementsId() currency=$currency_id backend_context=true}
|
||||
{$product_id = $PRODUCT_ID}
|
||||
{/loop}
|
||||
{/if}
|
||||
{$taxRuleId = null}
|
||||
<div class="form-group">
|
||||
<select class="form-control js-select-product" name="{$name}" data-placeholder="{intl l="Search..." d="adminordercreation.bo.default"}" data-url="{url path="/admin/admin-order-creation/ajax/search/product"}">
|
||||
{if $product_id}
|
||||
{loop type="product" name="product-$key" id=$product_id visible="*" backend_context=true}
|
||||
{$taxRuleId = $TAX_RULE_ID}
|
||||
<option value="{$ID}">{$REF} : {$TITLE}</option>
|
||||
{/loop}
|
||||
{/if}
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='product_sale_element_id' value_key=$key}
|
||||
<div class="form-group">
|
||||
{if $product_id}
|
||||
{$attributeCombinations = []}
|
||||
{$PSE_first = null}
|
||||
{loop type="product_sale_elements" order="id" name="product-sale-element-$key" product=$product_id currency=$currency_id backend_context=true}
|
||||
{$PSE_id = $ID}
|
||||
{if !$PSE_first}
|
||||
{$PSE_first = $ID}
|
||||
{/if}
|
||||
{loop type="attribute_combination" name="attribute-combination-$key" product_sale_elements=$ID backend_context=true}
|
||||
{$attributeCombinations[$PSE_id][] = $ATTRIBUTE_TITLE|cat:' : '|cat:$ATTRIBUTE_AVAILABILITY_TITLE}
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
{if $attributeCombinations|count}
|
||||
<select class="form-control js-select-product-sale-element" name="{$name}" >
|
||||
{loop type="product_sale_elements" order="id" name="product-sale-element-$key" product=$product_id currency=$currency_id}
|
||||
{$selected = false}
|
||||
{if !$orderProduct->getProductSaleElementsId() and $PSE_first == $ID}
|
||||
{$productSaleEmenetIdSelected = $ID}
|
||||
{$selected = true}
|
||||
{elseif $orderProduct->getProductSaleElementsId() == $ID}
|
||||
{$productSaleEmenetIdSelected = $ID}
|
||||
{$selected = true}
|
||||
{elseif $PSE_first == $ID}
|
||||
{$productSaleEmenetIdSelected = $ID}
|
||||
{$selected = true}
|
||||
{/if}
|
||||
|
||||
<option {if $selected}selected{/if} data-quantity="{$QUANTITY}" data-ref="{$REF}" data-color="{if $QUANTITY > 0}#e6ffe6{else}#ffe6e6{/if}" value="{$ID}" >
|
||||
{', '|implode:$attributeCombinations[$ID]}
|
||||
</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{else}
|
||||
{intl l="Default product sale element" d="adminordercreation.bo.default"}
|
||||
|
||||
{loop type="product_sale_elements" order="id" name="product-sale-element-$key" product=$product_id limit=1 currency=$currency_id backend_context=true}
|
||||
{$productSaleEmenetIdSelected = $ID}
|
||||
<input type="hidden" value="{$ID}" name="{$name}" />
|
||||
{/loop}
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
</td>
|
||||
<td>
|
||||
{if $product_id}
|
||||
{if $productSaleEmenetIdSelected}
|
||||
|
||||
{loop type="product_sale_elements" order="id" name="product-sale-element-price-$key" id=$productSaleEmenetIdSelected currency=$currency_id backend_context=true}
|
||||
{form_field field='refresh_price' value_key=$key}
|
||||
<input class="js-refresh-price" type="hidden" name="{$name}" value="0" />
|
||||
{/form_field}
|
||||
|
||||
{if $orderProduct->getWasInPromo()}
|
||||
{$priceWithoutTax = $orderProduct->getPromoPrice()}
|
||||
{else}
|
||||
{$priceWithoutTax = $orderProduct->getPrice()}
|
||||
{/if}
|
||||
|
||||
{$taxes = 0}
|
||||
{foreach from=$orderProduct->getOrderProductTaxes() item=orderProductTax}
|
||||
{if $orderProduct->getWasInPromo()}
|
||||
{$taxes = $taxes + $orderProductTax->getPromoAmount()}
|
||||
{else}
|
||||
{$taxes = $taxes + $orderProductTax->getAmount()}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{form_field field='product_price_without_tax' value_key=$key}
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input class="form-control js-product-price-without-tax" data-tax-rule-id="{$taxRuleId}"
|
||||
data-url="{url path="/admin/product/calculate-raw-price?action=to_tax"}"
|
||||
type="number" min="0" step="0.000001" name="{$name}" value="{format_number number=$priceWithoutTax dec_point="." decimals="6"}" />
|
||||
<div class="input-group-addon">HT</div>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='product_price_with_tax' value_key=$key}
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input class="form-control js-product-price-with-tax" data-tax-rule-id="{$taxRuleId}"
|
||||
data-url="{url path="/admin/product/calculate-raw-price?action=from_tax"}"
|
||||
type="number" min="0" step="0.000001" name="{$name}" value="{format_number number=($priceWithoutTax + $taxes) dec_point="." decimals="6"}" />
|
||||
<div class="input-group-addon">TTC</div>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
{/loop}
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{form_field field='product_quantity' value_key=$key}
|
||||
<div class="form-group">
|
||||
{if $product_id}
|
||||
{loop type="product_sale_elements" order="id" name="product-sale-element-quanaity-$key" id=$productSaleEmenetIdSelected currency=$currency_id backend_context=true}
|
||||
<input class="form-control js-action-refresh" type="number" min="1" step="1" name="{$name}" value="{$orderProduct->getQuantity()}" />
|
||||
{/loop}
|
||||
{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
</td>
|
||||
<td>
|
||||
{if $productSaleEmenetIdSelected}
|
||||
{loop type="product_sale_elements" order="id" name="product-sale-element-price-$key" id=$productSaleEmenetIdSelected currency=$currency_id backend_context=true}
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input class="form-control js-action-refresh" type="number" min="0" step="0.000001" disabled value="{format_number number=($priceWithoutTax * $orderProduct->getQuantity()) dec_point="." decimals="6"}" />
|
||||
<div class="input-group-addon">HT</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input class="form-control js-action-refresh" type="number" min="0" step="0.000001" disabled value="{format_number number=(($priceWithoutTax + $taxes) * $orderProduct->getQuantity()) dec_point="." decimals="6"}" />
|
||||
<div class="input-group-addon">TTC</div>
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-danger js-action-delete" title="{intl l="Delete" d="adminordercreation.bo.default"}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1,44 +1,44 @@
|
||||
GE7vlAm9WMSVdL1BBXmeD2P1ZEWn6muDOdGYOaey91vi8104USqy5IrH4EmBVpbmFA
|
||||
dY2sm0spP7rjwm2YU97L6etVXtmidboXK2uyDGKo3tq1ruDId1vNY5dUPqpT8R1y3L
|
||||
LBa3ujKfrobNukNlLmi614ZqZ95IAg4wLhoAa9eTx7tMHdECYJwaMQdUkpevoFKoQy
|
||||
S3WFBwoltAHgQd3pEjOraOiKS5ZcqCdDtXLOCta3hcRt2JgLFIEhJvcXECIzCqiVhl
|
||||
eJr7kjuACxt8p3OTe8RjOTVLTRbvJiv1VPYRsvAWXggIXEfm75tv1CcaMy2K0GAqoa
|
||||
x92iBrg6fFJlTUIP3vjil7CnjDPo0pgxEaMpOjadKDsmsmsP4eeJEsc1jlVgZ7hP6U
|
||||
EN9PGjuwegkfuvxCKHifmWVhufEunk62uclrUT1ux0XkmNWFm5VxXs6dapzFHgmHnY
|
||||
lxckSHxSRqPLabW8ll1jn0BnH8x4PItAsXQe93YDPK552FsdKuVucDduMdNU9oI2pI
|
||||
bssDMRNkKD7gds6LrBAPNCpmp84mtIyvOqthjgKjH57fLqZ17my03C92ANaOVck1un
|
||||
BwcqZyOwYhxwwmAymGvBLYHYhXc6kyafOrPBpdcnUQ8MmYaBPan8lv6lyLZtWlz7cr
|
||||
HyE9s8dx8NN4RCUrer976qfdzfCTJO4QImKiAWrzKGmQB22YZYuaCnbIAm7EvaPUMc
|
||||
Nsyt1YcUT6RyzLBS2EBkl6jn7l2RTKB6qrWSGTgOfJozF1853AoBXnZN2iZ32fp95b
|
||||
bP0pAKYMptkmXjGIEDdCjvHfoCd1TLb1onywU7H3Xl0M0RAKsKpVw2UZ59MvfzwygA
|
||||
2JZBegSHydBvAA6f7Y7eUJxeEPdR58XTaQljHBA3znO5tl4XAs3bJwvWxxH55ZUOSt
|
||||
uWWJUIxTobE82LNQTxBUiBB6jPIPZNndV0swUHxF0IalwodLYn0EVgKeevzBdectCO
|
||||
EDCxoMxNtwiEHNvEOtlG8HRltxG44jLL4k2bxyJvvs1XV5OlNgwJO4FQftt0wlTYY9
|
||||
xdM9OJ3svb9FzHL9PBDGShOv6ZhxOrMhNxTNf7vK5gtUL1tPvcjzeSbyIWxXNhou15
|
||||
q4o5ZxmqcDJWeblzefVUjtzrMs5PnA5QoMuU7siDnXmh1GbDQsEEW9CIbDXSepHxIZ
|
||||
HC48dhjbmkdlPMorjCBLbHNUJf7eSMxKPyPrOFAhZai0w68AIc9D7ptZJoPEqms64O
|
||||
9lJbdo5ZG0PopS7dmEpcSWWpDFV3jhyJTYCpVCwwaSe4JoxoqcPCMCatFnti7kq5rN
|
||||
4MDogPwrgOVSrjjf3n64uvPPoZFdBqlRJX9GEBslEE6nfPT4jKWhwji2BXifKwWwAG
|
||||
7g6skqXHXcYfJJ876oijteOXINUCUJDMZxdqahTzJMnu0C9FskoOC2lTnZw0zsJ5DF
|
||||
ElXEALjZezEWQu4LkuJXXd2IThyEKLfth1doUHcWN6HJ4UUBR5d0w02IQ6Mxdt3LjB
|
||||
5Ldqqsab7WCwPWKEY6jmFEtscM0GVLXHuQk6jqiKod90ZaQKk5FT7y36a01ES18mB4
|
||||
BycGRfNXDWoqlYGsRCc1XhD8YNMfn8kEVmxyqZyfoKwXoUVAeAAooKAC4HHK7fRKDM
|
||||
144242079835C20C45E69EB347ABBCF77F04B23BF39629A8891035423E3CC386A0
|
||||
7B3C5701C4AD69E9553B26CC0BF5EECFF5870551C600B8F730F5D254BF74A565C6
|
||||
6B4579C390A8DC6qQr1zR6dLlJOiMDbG6OGmKSYrbRLjNxgYF6O0LOphKqjcTtEjC4
|
||||
qRYApJkYmWXLLANZn46w0I65L63PlBVrpYPSvFAu25aUMaSwcELNUKcpgFq5tsI1wG
|
||||
112A59107EB88144C8A7336C5487503B02EF1E0937AB588DC4E42D35BC8567C0EA
|
||||
181F19D1F3D8D3C19626080F3D3DA7901B63475590DD907AE1eFcB1ZxNnOK4rRiC
|
||||
YhZYW3QiL6OW9eXqQr1zR6dLlJOiMDbG6OGmKSYrbRLjNxgYF6O0LOphKqjcTtEjC4
|
||||
qRYApJkYmWXLLANZn46w0I65L63PlBVrpYPSvFAu25aUMaSwcELNUKcpgFq5tsI1wG
|
||||
144242079835C20C45E69EB347ABBCF77F04B23BF39629A8891035423E3CC386A0
|
||||
7B3C5701C4AD69E9553B26CC0BF5EECFF5870551C600B8F730F5D254BF74A565C6
|
||||
6B4579C390A8DC6qQr1zR6dLlJOiMDbG6OGmKSYrbRLjNxgYF6O0LOphKqjcTtEjC4
|
||||
qRYApJkYmWXLLANZn46w0I65L63PlBVrpYPSvFAu25aUMaSwcELNUKcpgFq5tsI1wG
|
||||
1127349E4948198B92E77303D3BF9D9E7C0D37B60245BB789F425406ED1ADC2EA7
|
||||
BAED72A82D8300C138275636798737F202F376F40453FA7B01eFcB1ZxNnOK4rRiC
|
||||
YhZYW3QiL6OW9eXqQr1zR6dLlJOiMDbG6OGmKSYrbRLjNxgYF6O0LOphKqjcTtEjC4
|
||||
qRYApJkYmWXLLANZn46w0I65L63PlBVrpYPSvFAu25aUMaSwcELNUKcpgFq5tsI1wG
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
SIPSATIS_SCLERIVEINSTERIVEIN,26/08/2014,V4,MERCANET,PROD++++++++++
|
||||
GE7vlAm9WMSVdL1BBXmeD2P1ZEWn6muDOdGYOaey91vi8104USqy5IrH4EmBVpbmFA
|
||||
dY2sm0spP7rjwm2YU97L6etVXtmidboXK2uyDGKo3tq1ruDId1vNY5dUPqpT8R1y3L
|
||||
LBa3ujKfrobNukNlLmi614ZqZ95IAg4wLhoAa9eTx7tMHdECYJwaMQdUkpevoFKoQy
|
||||
S3WFBwoltAHgQd3pEjOraOiKS5ZcqCdDtXLOCta3hcRt2JgLFIEhJvcXECIzCqiVhl
|
||||
eJr7kjuACxt8p3OTe8RjOTVLTRbvJiv1VPYRsvAWXggIXEfm75tv1CcaMy2K0GAqoa
|
||||
x92iBrg6fFJlTUIP3vjil7CnjDPo0pgxEaMpOjadKDsmsmsP4eeJEsc1jlVgZ7hP6U
|
||||
EN9PGjuwegkfuvxCKHifmWVhufEunk62uclrUT1ux0XkmNWFm5VxXs6dapzFHgmHnY
|
||||
lxckSHxSRqPLabW8ll1jn0BnH8x4PItAsXQe93YDPK552FsdKuVucDduMdNU9oI2pI
|
||||
bssDMRNkKD7gds6LrBAPNCpmp84mtIyvOqthjgKjH57fLqZ17my03C92ANaOVck1un
|
||||
BwcqZyOwYhxwwmAymGvBLYHYhXc6kyafOrPBpdcnUQ8MmYaBPan8lv6lyLZtWlz7cr
|
||||
HyE9s8dx8NN4RCUrer976qfdzfCTJO4QImKiAWrzKGmQB22YZYuaCnbIAm7EvaPUMc
|
||||
Nsyt1YcUT6RyzLBS2EBkl6jn7l2RTKB6qrWSGTgOfJozF1853AoBXnZN2iZ32fp95b
|
||||
bP0pAKYMptkmXjGIEDdCjvHfoCd1TLb1onywU7H3Xl0M0RAKsKpVw2UZ59MvfzwygA
|
||||
2JZBegSHydBvAA6f7Y7eUJxeEPdR58XTaQljHBA3znO5tl4XAs3bJwvWxxH55ZUOSt
|
||||
uWWJUIxTobE82LNQTxBUiBB6jPIPZNndV0swUHxF0IalwodLYn0EVgKeevzBdectCO
|
||||
EDCxoMxNtwiEHNvEOtlG8HRltxG44jLL4k2bxyJvvs1XV5OlNgwJO4FQftt0wlTYY9
|
||||
xdM9OJ3svb9FzHL9PBDGShOv6ZhxOrMhNxTNf7vK5gtUL1tPvcjzeSbyIWxXNhou15
|
||||
q4o5ZxmqcDJWeblzefVUjtzrMs5PnA5QoMuU7siDnXmh1GbDQsEEW9CIbDXSepHxIZ
|
||||
HC48dhjbmkdlPMorjCBLbHNUJf7eSMxKPyPrOFAhZai0w68AIc9D7ptZJoPEqms64O
|
||||
9lJbdo5ZG0PopS7dmEpcSWWpDFV3jhyJTYCpVCwwaSe4JoxoqcPCMCatFnti7kq5rN
|
||||
4MDogPwrgOVSrjjf3n64uvPPoZFdBqlRJX9GEBslEE6nfPT4jKWhwji2BXifKwWwAG
|
||||
7g6skqXHXcYfJJ876oijteOXINUCUJDMZxdqahTzJMnu0C9FskoOC2lTnZw0zsJ5DF
|
||||
ElXEALjZezEWQu4LkuJXXd2IThyEKLfth1doUHcWN6HJ4UUBR5d0w02IQ6Mxdt3LjB
|
||||
5Ldqqsab7WCwPWKEY6jmFEtscM0GVLXHuQk6jqiKod90ZaQKk5FT7y36a01ES18mB4
|
||||
BycGRfNXDWoqlYGsRCc1XhD8YNMfn8kEVmxyqZyfoKwXoUVAeAAooKAC4HHK7fRKDM
|
||||
144242079835C20C45E69EB347ABBCF77F04B23BF39629A8891035423E3CC386A0
|
||||
7B3C5701C4AD69E9553B26CC0BF5EECFF5870551C600B8F730F5D254BF74A565C6
|
||||
6B4579C390A8DC6qQr1zR6dLlJOiMDbG6OGmKSYrbRLjNxgYF6O0LOphKqjcTtEjC4
|
||||
qRYApJkYmWXLLANZn46w0I65L63PlBVrpYPSvFAu25aUMaSwcELNUKcpgFq5tsI1wG
|
||||
112A59107EB88144C8A7336C5487503B02EF1E0937AB588DC4E42D35BC8567C0EA
|
||||
181F19D1F3D8D3C19626080F3D3DA7901B63475590DD907AE1eFcB1ZxNnOK4rRiC
|
||||
YhZYW3QiL6OW9eXqQr1zR6dLlJOiMDbG6OGmKSYrbRLjNxgYF6O0LOphKqjcTtEjC4
|
||||
qRYApJkYmWXLLANZn46w0I65L63PlBVrpYPSvFAu25aUMaSwcELNUKcpgFq5tsI1wG
|
||||
144242079835C20C45E69EB347ABBCF77F04B23BF39629A8891035423E3CC386A0
|
||||
7B3C5701C4AD69E9553B26CC0BF5EECFF5870551C600B8F730F5D254BF74A565C6
|
||||
6B4579C390A8DC6qQr1zR6dLlJOiMDbG6OGmKSYrbRLjNxgYF6O0LOphKqjcTtEjC4
|
||||
qRYApJkYmWXLLANZn46w0I65L63PlBVrpYPSvFAu25aUMaSwcELNUKcpgFq5tsI1wG
|
||||
1127349E4948198B92E77303D3BF9D9E7C0D37B60245BB789F425406ED1ADC2EA7
|
||||
BAED72A82D8300C138275636798737F202F376F40453FA7B01eFcB1ZxNnOK4rRiC
|
||||
YhZYW3QiL6OW9eXqQr1zR6dLlJOiMDbG6OGmKSYrbRLjNxgYF6O0LOphKqjcTtEjC4
|
||||
qRYApJkYmWXLLANZn46w0I65L63PlBVrpYPSvFAu25aUMaSwcELNUKcpgFq5tsI1wG
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
SIPSATIS_SCLERIVEINSTERIVEIN,26/08/2014,V4,MERCANET,PROD++++++++++
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END
|
||||
@@ -1,60 +1,60 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>courriel de confirmation de commande de {config key="url_site"} </title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#liencompte {
|
||||
margin: 15px 0;
|
||||
text-align: center;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 480pt;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#entete {
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px dotted #000;
|
||||
}
|
||||
|
||||
#logotexte {
|
||||
float: left;
|
||||
width: 180pt;
|
||||
height: 75pt;
|
||||
border: 1pt solid #000;
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="entete">
|
||||
<h1 id="logotexte">{config key="store_name"}</h1>
|
||||
|
||||
<h2 id="info">The payment of your order is confirmed</h2>
|
||||
|
||||
<h3 id="commande">Reference {$order_ref} </h3>
|
||||
</div>
|
||||
|
||||
<p id="liencompte">
|
||||
Your invoice is now available in your customer account on
|
||||
<a href="{config key="url_site"}">{config key="store_name"}</a>.
|
||||
</p>
|
||||
|
||||
<p>Thank you for your order !</p>
|
||||
|
||||
<p>The {config key="store_name"} team.</p>
|
||||
</div>
|
||||
</body>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>courriel de confirmation de commande de {config key="url_site"} </title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#liencompte {
|
||||
margin: 15px 0;
|
||||
text-align: center;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 480pt;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#entete {
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px dotted #000;
|
||||
}
|
||||
|
||||
#logotexte {
|
||||
float: left;
|
||||
width: 180pt;
|
||||
height: 75pt;
|
||||
border: 1pt solid #000;
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="entete">
|
||||
<h1 id="logotexte">{config key="store_name"}</h1>
|
||||
|
||||
<h2 id="info">The payment of your order is confirmed</h2>
|
||||
|
||||
<h3 id="commande">Reference {$order_ref} </h3>
|
||||
</div>
|
||||
|
||||
<p id="liencompte">
|
||||
Your invoice is now available in your customer account on
|
||||
<a href="{config key="url_site"}">{config key="store_name"}</a>.
|
||||
</p>
|
||||
|
||||
<p>Thank you for your order !</p>
|
||||
|
||||
<p>The {config key="store_name"} team.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,9 +1,9 @@
|
||||
Dear customer,
|
||||
|
||||
This is a confirmation of the payment of your order {$order_ref} via Payzen on our shop.
|
||||
|
||||
Your invoice is now available in your customer account at {config key="url_site"}
|
||||
|
||||
Thank you again for your purchase.
|
||||
|
||||
Dear customer,
|
||||
|
||||
This is a confirmation of the payment of your order {$order_ref} via Payzen on our shop.
|
||||
|
||||
Your invoice is now available in your customer account at {config key="url_site"}
|
||||
|
||||
Thank you again for your purchase.
|
||||
|
||||
The {config key="store_name"} team.
|
||||
@@ -1,62 +1,62 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Confirmation du paiement de votre commande sur {config key="url_site"} </title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#liencompte {
|
||||
margin: 15px 0;
|
||||
text-align: center;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 480pt;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#entete {
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px dotted #000;
|
||||
}
|
||||
|
||||
#logotexte {
|
||||
float: left;
|
||||
width: 180pt;
|
||||
height: 75pt;
|
||||
border: 1pt solid #000;
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="entete">
|
||||
<h1 id="logotexte">{config key="store_name"}</h1>
|
||||
|
||||
<h2 id="info">Confirmation du paiement de votre commande</h2>
|
||||
|
||||
<h3 id="commande">N° {$order_ref}</h3>
|
||||
</div>
|
||||
|
||||
<p id="liencompte">
|
||||
Le suivi de votre commande est disponible dans la rubrique mon compte sur
|
||||
<a href="{config key="url_site"}">{config key="url_site"}</a>
|
||||
</p>
|
||||
|
||||
<p>Merci pour votre achat !</p>
|
||||
|
||||
<p>L'équipe {config key="store_name"}</p>
|
||||
</div>
|
||||
</body>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Confirmation du paiement de votre commande sur {config key="url_site"} </title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#liencompte {
|
||||
margin: 15px 0;
|
||||
text-align: center;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 480pt;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#entete {
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px dotted #000;
|
||||
}
|
||||
|
||||
#logotexte {
|
||||
float: left;
|
||||
width: 180pt;
|
||||
height: 75pt;
|
||||
border: 1pt solid #000;
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="entete">
|
||||
<h1 id="logotexte">{config key="store_name"}</h1>
|
||||
|
||||
<h2 id="info">Confirmation du paiement de votre commande</h2>
|
||||
|
||||
<h3 id="commande">N° {$order_ref}</h3>
|
||||
</div>
|
||||
|
||||
<p id="liencompte">
|
||||
Le suivi de votre commande est disponible dans la rubrique mon compte sur
|
||||
<a href="{config key="url_site"}">{config key="url_site"}</a>
|
||||
</p>
|
||||
|
||||
<p>Merci pour votre achat !</p>
|
||||
|
||||
<p>L'équipe {config key="store_name"}</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,9 +1,9 @@
|
||||
Cher client,
|
||||
|
||||
Ce message confirme le paiement de votre commande numero {$order_ref} via Payzen sur notre boutique.
|
||||
|
||||
Votre facture est maintenant disponible dans votre compte client à l'adresse {config key="url_site"}
|
||||
|
||||
Merci encore pour votre achat !
|
||||
|
||||
Cher client,
|
||||
|
||||
Ce message confirme le paiement de votre commande numero {$order_ref} via Payzen sur notre boutique.
|
||||
|
||||
Votre facture est maintenant disponible dans votre compte client à l'adresse {config key="url_site"}
|
||||
|
||||
Merci encore pour votre achat !
|
||||
|
||||
L'équipe {config key="store_name"}
|
||||
@@ -1,55 +1,55 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Order {config key="url_site"} </title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#liencompte {
|
||||
margin: 15px 0;
|
||||
text-align: center;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 480pt;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#entete {
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px dotted #000;
|
||||
}
|
||||
|
||||
#logotexte {
|
||||
float: left;
|
||||
width: 180pt;
|
||||
height: 75pt;
|
||||
border: 1pt solid #000;
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="entete">
|
||||
<h1 id="logotexte">{config key="store_name"}</h1>
|
||||
|
||||
<h2 id="info">Your order has been shipped.</h2>
|
||||
</div>
|
||||
|
||||
<p>Dear customer,<p>
|
||||
<p>Your order {$order_ref} in {config key="store_name"} has been shipped.<p>
|
||||
<p>Thank you for your order !</p>
|
||||
|
||||
<p>The {config key="store_name"} team.</p>
|
||||
</div>
|
||||
</body>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Order {config key="url_site"} </title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#liencompte {
|
||||
margin: 15px 0;
|
||||
text-align: center;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 480pt;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#entete {
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px dotted #000;
|
||||
}
|
||||
|
||||
#logotexte {
|
||||
float: left;
|
||||
width: 180pt;
|
||||
height: 75pt;
|
||||
border: 1pt solid #000;
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="entete">
|
||||
<h1 id="logotexte">{config key="store_name"}</h1>
|
||||
|
||||
<h2 id="info">Your order has been shipped.</h2>
|
||||
</div>
|
||||
|
||||
<p>Dear customer,<p>
|
||||
<p>Your order {$order_ref} in {config key="store_name"} has been shipped.<p>
|
||||
<p>Thank you for your order !</p>
|
||||
|
||||
<p>The {config key="store_name"} team.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
Dear customer,
|
||||
|
||||
Your order {$order_ref} in {config key="store_name"} has been shipped.
|
||||
|
||||
Thank you again for your purchase.
|
||||
|
||||
Dear customer,
|
||||
|
||||
Your order {$order_ref} in {config key="store_name"} has been shipped.
|
||||
|
||||
Thank you again for your purchase.
|
||||
|
||||
The {config key="store_name"} team.
|
||||
@@ -1,57 +1,57 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Confirmation de l'expédition de votre commande sur {config key="url_site"}</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#liencompte {
|
||||
margin: 15px 0;
|
||||
text-align: center;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 480pt;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#entete {
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px dotted #000;
|
||||
}
|
||||
|
||||
#logotexte {
|
||||
float: left;
|
||||
width: 180pt;
|
||||
height: 75pt;
|
||||
border: 1pt solid #000;
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="entete">
|
||||
<h1 id="logotexte">{config key="store_name"}</h1>
|
||||
|
||||
<h2 id="info">Votre commande a été expédiée.</h2>
|
||||
</div>
|
||||
|
||||
<p>Cher client,</p>
|
||||
<p>Votre commande {$order_ref} sur {config key="store_name"} a été expédiée.</p>
|
||||
<p>Merci pour votre achat !</p>
|
||||
|
||||
<p>L'équipe {config key="store_name"}</p>
|
||||
</div>
|
||||
</body>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Confirmation de l'expédition de votre commande sur {config key="url_site"}</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#liencompte {
|
||||
margin: 15px 0;
|
||||
text-align: center;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 480pt;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#entete {
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px dotted #000;
|
||||
}
|
||||
|
||||
#logotexte {
|
||||
float: left;
|
||||
width: 180pt;
|
||||
height: 75pt;
|
||||
border: 1pt solid #000;
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="entete">
|
||||
<h1 id="logotexte">{config key="store_name"}</h1>
|
||||
|
||||
<h2 id="info">Votre commande a été expédiée.</h2>
|
||||
</div>
|
||||
|
||||
<p>Cher client,</p>
|
||||
<p>Votre commande {$order_ref} sur {config key="store_name"} a été expédiée.</p>
|
||||
<p>Merci pour votre achat !</p>
|
||||
|
||||
<p>L'équipe {config key="store_name"}</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
Cher client,
|
||||
|
||||
Ce message confirme que votre commande {$order_ref} sur {config key="store_name"} a été expédiée.
|
||||
|
||||
Merci encore pour votre achat !
|
||||
|
||||
Cher client,
|
||||
|
||||
Ce message confirme que votre commande {$order_ref} sur {config key="store_name"} a été expédiée.
|
||||
|
||||
Merci encore pour votre achat !
|
||||
|
||||
L'équipe {config key="store_name"}
|
||||
18
local/modules/PurgeFakeCustomer/Config/config.xml
Normal file
18
local/modules/PurgeFakeCustomer/Config/config.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<config xmlns="http://thelia.net/schema/dic/config"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
|
||||
|
||||
<commands>
|
||||
<command class="PurgeFakeCustomer\Command\FakeCustomerPurge" />
|
||||
</commands>
|
||||
|
||||
<services>
|
||||
<service id="purgefakecustomer.purge" class="PurgeFakeCustomer\EventListener\EventManager">
|
||||
<argument type="service" id="event_dispatcher" />
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
</config>
|
||||
28
local/modules/PurgeFakeCustomer/Config/module.xml
Normal file
28
local/modules/PurgeFakeCustomer/Config/module.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module xmlns="http://thelia.net/schema/dic/module"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/module http://thelia.net/schema/dic/module/module-2_2.xsd">
|
||||
<fullnamespace>PurgeFakeCustomer\PurgeFakeCustomer</fullnamespace>
|
||||
<descriptive locale="en_US">
|
||||
<title>Delete fake customers</title>
|
||||
</descriptive>
|
||||
<descriptive locale="fr_FR">
|
||||
<title>Supprime des faux comptes clients</title>
|
||||
</descriptive>
|
||||
<languages>
|
||||
<language>en_US</language>
|
||||
<language>fr_FR</language>
|
||||
</languages>
|
||||
<version>1.0</version>
|
||||
<authors>
|
||||
<author>
|
||||
<name>Laurent LE CORRE</name>
|
||||
<email>laurent@thecoredev.fr</email>
|
||||
</author>
|
||||
</authors>
|
||||
<type>classic</type>
|
||||
<thelia>2.3.0</thelia>
|
||||
<stability>beta</stability>
|
||||
<mandatory>0</mandatory>
|
||||
<hidden>0</hidden>
|
||||
</module>
|
||||
12
local/modules/PurgeFakeCustomer/Config/routing.xml
Normal file
12
local/modules/PurgeFakeCustomer/Config/routing.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="purgefakecustomer.purge" path="/purgefakecustomer/{secretKey}">
|
||||
<default key="_controller">PurgeFakeCustomer\Controller\PurgeController::purge</default>
|
||||
<requirement key="secretKey">.+</requirement>
|
||||
</route>
|
||||
|
||||
</routes>
|
||||
11
local/modules/PurgeFakeCustomer/PurgeFakeCustomer.php
Normal file
11
local/modules/PurgeFakeCustomer/PurgeFakeCustomer.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace PurgeFakeCustomer;
|
||||
|
||||
use Thelia\Module\BaseModule;
|
||||
|
||||
class PurgeFakeCustomer extends BaseModule
|
||||
{
|
||||
/** @var string */
|
||||
const DOMAIN_NAME = 'purgefakecustomer';
|
||||
}
|
||||
55
local/modules/PurgeFakeCustomer/Readme.md
Normal file
55
local/modules/PurgeFakeCustomer/Readme.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Purge Fake Customer
|
||||
|
||||
Add a short description here. You can also add a screenshot if needed.
|
||||
|
||||
## Installation
|
||||
|
||||
### Manually
|
||||
|
||||
* Copy the module into ```<thelia_root>/local/modules/``` directory and be sure that the name of the module is PurgeFakeCustomer.
|
||||
* Activate it in your thelia administration panel
|
||||
|
||||
### Composer
|
||||
|
||||
Add it in your main thelia composer.json file
|
||||
|
||||
```
|
||||
composer require your-vendor/purge-fake-customer-module:~1.0
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Explain here how to use your module, how to configure it, etc.
|
||||
|
||||
## Hook
|
||||
|
||||
If your module use one or more hook, fill this part. Explain which hooks are used.
|
||||
|
||||
|
||||
## Loop
|
||||
|
||||
If your module declare one or more loop, describe them here like this :
|
||||
|
||||
[loop name]
|
||||
|
||||
### Input arguments
|
||||
|
||||
|Argument |Description |
|
||||
|--- |--- |
|
||||
|**arg1** | describe arg1 with an exemple. |
|
||||
|**arg2** | describe arg2 with an exemple. |
|
||||
|
||||
### Output arguments
|
||||
|
||||
|Variable |Description |
|
||||
|--- |--- |
|
||||
|$VAR1 | describe $VAR1 variable |
|
||||
|$VAR2 | describe $VAR2 variable |
|
||||
|
||||
### Exemple
|
||||
|
||||
Add a complete exemple of your loop
|
||||
|
||||
## Other ?
|
||||
|
||||
If you have other think to put, feel free to complete your readme as you want.
|
||||
11
local/modules/PurgeFakeCustomer/composer.json
Normal file
11
local/modules/PurgeFakeCustomer/composer.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "your-vendor/purge-fake-customer-module",
|
||||
"license": "LGPL-3.0+",
|
||||
"type": "thelia-module",
|
||||
"require": {
|
||||
"thelia/installer": "~1.1"
|
||||
},
|
||||
"extra": {
|
||||
"installer-name": "PurgeFakeCustomer"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
/* Bootstrap */
|
||||
@import "bootstrap/bootstrap";
|
||||
|
||||
/* FontAwesome */
|
||||
@import "fontawesome/font-awesome";
|
||||
|
||||
/* Thelia */
|
||||
@import "thelia/import";
|
||||
|
||||
/* Theme */
|
||||
@import "../themes/default/less/import";
|
||||
/* Bootstrap */
|
||||
@import "bootstrap/bootstrap";
|
||||
|
||||
/* FontAwesome */
|
||||
@import "fontawesome/font-awesome";
|
||||
|
||||
/* Thelia */
|
||||
@import "thelia/import";
|
||||
|
||||
/* Theme */
|
||||
@import "../themes/default/less/import";
|
||||
|
||||
@@ -1,115 +1,115 @@
|
||||
// Import Google Font
|
||||
@import url(//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800);
|
||||
|
||||
// Theme colors
|
||||
@gray-darker: #222;
|
||||
@gray-dark: #444;
|
||||
@gray: #555;
|
||||
@gray-light: #e5e5e5;
|
||||
@gray-lighter: #eee;
|
||||
|
||||
@brand-primary: #2a98d1;
|
||||
@brand-success: #5cb85c;
|
||||
@brand-warning: #f0ad4e;
|
||||
@brand-danger: #d9534f;
|
||||
@brand-info: #5bc0de;
|
||||
|
||||
@body-bg: #EDF7FF;
|
||||
@text-color: @gray-dark;
|
||||
|
||||
@link-color: #0985C8;
|
||||
@link-hover-color: #056192;
|
||||
|
||||
@font-family-sans-serif: 'Open Sans', sans-serif;
|
||||
@font-family-serif: Georgia, "Times New Roman", Times, serif;
|
||||
@font-family-monospace: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
@font-family-base: @font-family-sans-serif;
|
||||
|
||||
// Border Radius
|
||||
@border-radius-base: 3px;
|
||||
|
||||
// Forms
|
||||
@input-border: @gray-light;
|
||||
@input-color-placeholder: lighten(@text-color, 30%);
|
||||
|
||||
|
||||
// Breadcrumbs
|
||||
@breadcrumb-bg: @body-bg;
|
||||
@breadcrumb-color: @text-color;
|
||||
@breadcrumb-active-color: @text-color;
|
||||
@breadcrumb-padding: 0;
|
||||
|
||||
|
||||
// Pagination
|
||||
@pagination-bg: #f9f9f9;
|
||||
@pagination-border: #ddd;
|
||||
@pagination-hover-bg: transparent;//darken(@pagination-bg, 10%);
|
||||
@pagination-active-bg: @brand-primary;
|
||||
@pagination-active-color: #fff;
|
||||
@pagination-disabled-color: @gray-light;
|
||||
|
||||
|
||||
// Pager
|
||||
@pager-border-radius: 0;
|
||||
@pager-disabled-color: @gray-light;
|
||||
|
||||
|
||||
// Navbar
|
||||
@navbar-default-color: darken(@navbar-default-bg, 52%); //#707070;
|
||||
@navbar-default-bg: darken(@body-bg, 4%);
|
||||
@navbar-default-border: @body-bg;
|
||||
|
||||
// Navbar links
|
||||
@navbar-default-link-color: @navbar-default-color;
|
||||
@navbar-default-link-hover-color: #fff;
|
||||
@navbar-default-link-hover-bg: @link-color;
|
||||
@navbar-default-link-active-color: @link-color;
|
||||
@navbar-default-link-active-bg: transparent;
|
||||
|
||||
|
||||
// Thelia : Sub Navigation
|
||||
@navbar-subnav-bg: @navbar-default-link-hover-bg;
|
||||
@navbar-subnav-link-padding: 3px 12px;
|
||||
@navbar-subnav-link-color: @navbar-default-link-hover-color;
|
||||
@navbar-subnav-link-hover-bg: @navbar-subnav-link-color;
|
||||
@navbar-subnav-link-hover-color: @navbar-subnav-bg;
|
||||
@navbar-subnav-border: @navbar-subnav-bg;
|
||||
@navbar-subnav-border-radius: 0;
|
||||
@navbar-subnav-divider-bg: #fff;
|
||||
@navbar-subnav-shadow: none; //0 6px 12px rgba(0,0,0,.175);
|
||||
|
||||
|
||||
// Thelia : Toolbar
|
||||
@toolbar-sorter-bg: @body-bg;
|
||||
@toolbar-sorter-border-radius: 0;
|
||||
@toolbar-sorter-padding: 0;
|
||||
|
||||
|
||||
// Carousel
|
||||
@carousel-text-shadow: none;
|
||||
@carousel-control-color: #ccc;
|
||||
@carousel-control-width: 10%;
|
||||
@carousel-control-opacity: .5;
|
||||
@carousel-control-font-size: 30px;
|
||||
|
||||
|
||||
// Thelia : Products Filter
|
||||
@filter-border: @filter-bg;
|
||||
@filter-border-radius: 0;
|
||||
@filter-padding: 0 15px;
|
||||
|
||||
|
||||
// Thelia : Product Option
|
||||
@option-bg: #fff;
|
||||
@option-border: 0;
|
||||
@option-border-radius: 0;
|
||||
@option-padding: 0;
|
||||
@option-heading-border: transparent;
|
||||
@option-heading-color: @text-color;
|
||||
@option-heading-font-size: @font-size-base;
|
||||
|
||||
|
||||
// Panels
|
||||
@panel-border-radius: 0;
|
||||
@panel-default-border: @panel-default-heading-bg;
|
||||
|
||||
// Import Google Font
|
||||
@import url(//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800);
|
||||
|
||||
// Theme colors
|
||||
@gray-darker: #222;
|
||||
@gray-dark: #444;
|
||||
@gray: #555;
|
||||
@gray-light: #e5e5e5;
|
||||
@gray-lighter: #eee;
|
||||
|
||||
@brand-primary: #2a98d1;
|
||||
@brand-success: #5cb85c;
|
||||
@brand-warning: #f0ad4e;
|
||||
@brand-danger: #d9534f;
|
||||
@brand-info: #5bc0de;
|
||||
|
||||
@body-bg: #EDF7FF;
|
||||
@text-color: @gray-dark;
|
||||
|
||||
@link-color: #0985C8;
|
||||
@link-hover-color: #056192;
|
||||
|
||||
@font-family-sans-serif: 'Open Sans', sans-serif;
|
||||
@font-family-serif: Georgia, "Times New Roman", Times, serif;
|
||||
@font-family-monospace: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
@font-family-base: @font-family-sans-serif;
|
||||
|
||||
// Border Radius
|
||||
@border-radius-base: 3px;
|
||||
|
||||
// Forms
|
||||
@input-border: @gray-light;
|
||||
@input-color-placeholder: lighten(@text-color, 30%);
|
||||
|
||||
|
||||
// Breadcrumbs
|
||||
@breadcrumb-bg: @body-bg;
|
||||
@breadcrumb-color: @text-color;
|
||||
@breadcrumb-active-color: @text-color;
|
||||
@breadcrumb-padding: 0;
|
||||
|
||||
|
||||
// Pagination
|
||||
@pagination-bg: #f9f9f9;
|
||||
@pagination-border: #ddd;
|
||||
@pagination-hover-bg: transparent;//darken(@pagination-bg, 10%);
|
||||
@pagination-active-bg: @brand-primary;
|
||||
@pagination-active-color: #fff;
|
||||
@pagination-disabled-color: @gray-light;
|
||||
|
||||
|
||||
// Pager
|
||||
@pager-border-radius: 0;
|
||||
@pager-disabled-color: @gray-light;
|
||||
|
||||
|
||||
// Navbar
|
||||
@navbar-default-color: darken(@navbar-default-bg, 52%); //#707070;
|
||||
@navbar-default-bg: darken(@body-bg, 4%);
|
||||
@navbar-default-border: @body-bg;
|
||||
|
||||
// Navbar links
|
||||
@navbar-default-link-color: @navbar-default-color;
|
||||
@navbar-default-link-hover-color: #fff;
|
||||
@navbar-default-link-hover-bg: @link-color;
|
||||
@navbar-default-link-active-color: @link-color;
|
||||
@navbar-default-link-active-bg: transparent;
|
||||
|
||||
|
||||
// Thelia : Sub Navigation
|
||||
@navbar-subnav-bg: @navbar-default-link-hover-bg;
|
||||
@navbar-subnav-link-padding: 3px 12px;
|
||||
@navbar-subnav-link-color: @navbar-default-link-hover-color;
|
||||
@navbar-subnav-link-hover-bg: @navbar-subnav-link-color;
|
||||
@navbar-subnav-link-hover-color: @navbar-subnav-bg;
|
||||
@navbar-subnav-border: @navbar-subnav-bg;
|
||||
@navbar-subnav-border-radius: 0;
|
||||
@navbar-subnav-divider-bg: #fff;
|
||||
@navbar-subnav-shadow: none; //0 6px 12px rgba(0,0,0,.175);
|
||||
|
||||
|
||||
// Thelia : Toolbar
|
||||
@toolbar-sorter-bg: @body-bg;
|
||||
@toolbar-sorter-border-radius: 0;
|
||||
@toolbar-sorter-padding: 0;
|
||||
|
||||
|
||||
// Carousel
|
||||
@carousel-text-shadow: none;
|
||||
@carousel-control-color: #ccc;
|
||||
@carousel-control-width: 10%;
|
||||
@carousel-control-opacity: .5;
|
||||
@carousel-control-font-size: 30px;
|
||||
|
||||
|
||||
// Thelia : Products Filter
|
||||
@filter-border: @filter-bg;
|
||||
@filter-border-radius: 0;
|
||||
@filter-padding: 0 15px;
|
||||
|
||||
|
||||
// Thelia : Product Option
|
||||
@option-bg: #fff;
|
||||
@option-border: 0;
|
||||
@option-border-radius: 0;
|
||||
@option-padding: 0;
|
||||
@option-heading-border: transparent;
|
||||
@option-heading-color: @text-color;
|
||||
@option-heading-font-size: @font-size-base;
|
||||
|
||||
|
||||
// Panels
|
||||
@panel-border-radius: 0;
|
||||
@panel-default-border: @panel-default-heading-bg;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<section id="brands" class="block block-nav" role="navigation" aria-labelledby="brands-label">
|
||||
<div class="block-heading"><h3 class="block-title" id="brands-label">{intl l="Brands"}</h3></div>
|
||||
<div class="block-content">
|
||||
<nav class="nav-brands">
|
||||
<ul id="brand" class="accordion">
|
||||
{loop name="brands-list" type="brand"}
|
||||
<li><a href="{$URL}">{$TITLE} ({count type="product" brand="{$ID}"})</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
<section id="brands" class="block block-nav" role="navigation" aria-labelledby="brands-label">
|
||||
<div class="block-heading"><h3 class="block-title" id="brands-label">{intl l="Brands"}</h3></div>
|
||||
<div class="block-content">
|
||||
<nav class="nav-brands">
|
||||
<ul id="brand" class="accordion">
|
||||
{loop name="brands-list" type="brand"}
|
||||
<li><a href="{$URL}">{$TITLE} ({count type="product" brand="{$ID}"})</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,395 +1,395 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
______ __ __ ______ __ __ ______
|
||||
/\__ _\ /\ \_\ \ /\ ___\ /\ \ /\ \ /\ __ \
|
||||
\/_/\ \/ \ \ __ \ \ \ __\ \ \ \____ \ \ \ \ \ __ \
|
||||
\ \_\ \ \_\ \_\ \ \_____\ \ \_____\ \ \_\ \ \_\ \_\
|
||||
\/_/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_/\/_/
|
||||
|
||||
|
||||
Copyright (c) OpenStudio
|
||||
email : info@thelia.net
|
||||
web : http://www.thelia.net
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the
|
||||
GNU General Public License : http://www.gnu.org/licenses/
|
||||
-->
|
||||
|
||||
{* Declare assets directory, relative to template base directory *}
|
||||
{declare_assets directory='assets'}
|
||||
{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *}
|
||||
{default_translation_domain domain='fo.sterivein'}
|
||||
|
||||
{* -- Define some stuff for Smarty ------------------------------------------ *}
|
||||
{config_load file='variables.conf'}
|
||||
{block name="init"}{/block}
|
||||
{block name="no-return-functions"}{/block}
|
||||
{assign var="store_name" value="{config key="store_name"}"}
|
||||
{assign var="store_description" value="{config key="store_description"}"}
|
||||
{if not $store_name}{assign var="store_name" value="{intl l='Thelia V2'}"}{/if}
|
||||
{if not $store_description}{assign var="store_description" value="$store_name"}{/if}
|
||||
|
||||
{* paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither *}
|
||||
<!--[if lt IE 7 ]><html class="no-js oldie ie6" lang="{lang attr="code"}"> <![endif]-->
|
||||
<!--[if IE 7 ]><html class="no-js oldie ie7" lang="{lang attr="code"}"> <![endif]-->
|
||||
<!--[if IE 8 ]><html class="no-js oldie ie8" lang="{lang attr="code"}"> <![endif]-->
|
||||
<!--[if (gte IE 9)|!(IE)]><!--><html lang="{lang attr="code"}" class="no-js"> <!--<![endif]-->
|
||||
<head>
|
||||
|
||||
{* Test if javascript is enabled *}
|
||||
<script>(function(H) { H.className=H.className.replace(/\bno-js\b/,'js') } )(document.documentElement);</script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
{* Page Title *}
|
||||
<title>{block name="page-title"}{strip}{if $page_title}{$page_title}{elseif $breadcrumbs}{foreach from=$breadcrumbs|array_reverse item=breadcrumb}{$breadcrumb.title|unescape} - {/foreach}{$store_name}{/if}{/strip}{/block}</title>
|
||||
|
||||
{* Meta Tags *}
|
||||
<meta name="generator" content="{intl l='Thelia V2'}">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
{block name="meta"}
|
||||
<meta name="description" content="{if $page_description}{$page_description}{else}{$store_description|strip|truncate:120}{/if}">
|
||||
{/block}
|
||||
|
||||
{* Stylesheets *}
|
||||
{*
|
||||
{stylesheets file='assets/css/styles.css'}
|
||||
<link rel="stylesheet" href="{$asset_url}">
|
||||
{/stylesheets}
|
||||
*}
|
||||
{stylesheets file='assets/less/styles.less' filters="less"}
|
||||
<link rel="stylesheet" href="{$asset_url}">
|
||||
{/stylesheets}
|
||||
|
||||
{block name="stylesheet"}{/block}
|
||||
|
||||
{* Favicon *}
|
||||
{images file='assets/img/favicon.ico'}<link rel="shortcut icon" type="image/x-icon" href="{$asset_url}">{/images}
|
||||
{images file='assets/img/favicon.png'}<link rel="icon" type="image/png" href="{$asset_url}" />{/images}
|
||||
|
||||
{* Feeds *}
|
||||
<link rel="alternate" type="application/rss+xml" title="{intl l='All products'}" href="{url path="/feed/catalog/{lang attr="locale"}"}" />
|
||||
<link rel="alternate" type="application/rss+xml" title="{intl l='All contents'}" href="{url path="/feed/content/{lang attr="locale"}"}" />
|
||||
<link rel="alternate" type="application/rss+xml" title="{intl l='All brands'}" href="{url path="/feed/brand/{lang attr='locale'}"}" />
|
||||
{block name="feeds"}{/block}
|
||||
|
||||
{* HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries *}
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
{hook name="recaptcha.js"}
|
||||
</head>
|
||||
|
||||
<body class="{block name="body-class"}{/block}" itemscope itemtype="http://schema.org/WebPage">
|
||||
|
||||
<!-- Accessibility -->
|
||||
<a class="sr-only" href="#content">{intl l="Skip to content"}</a>
|
||||
|
||||
<div class="page" role="document">
|
||||
|
||||
<div class="header-container" itemscope itemtype="http://schema.org/WPHeader">
|
||||
|
||||
<header class="container" role="banner">
|
||||
<div class="header">
|
||||
<h1 class="logo">
|
||||
<a href="{navigate to="index"}" title="{$store_name}">
|
||||
<span class='site-logo'>S<span>TERIVEIN<span class="reg">®</span></span></span>
|
||||
</a>
|
||||
<a href="{navigate to="index"}" title="{$store_name}">
|
||||
<span class='site-logo site-logo-sclerivein'>S<span>CLERIVEIN<span class="reg">®</span></span></span>
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
</header><!-- /.header -->
|
||||
|
||||
<div class="navbar navbar-menu" itemscope itemtype="http://schema.org/SiteNavigationElement">
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar-header">
|
||||
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-main-1">
|
||||
<span class="sr-only">{intl l="Toggle navigation"}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{navigate to="index"}">{$store_name}</a>
|
||||
</div>
|
||||
|
||||
<nav class="navbar-collapse collapse nav-main-1" role="navigation" aria-label="{intl l="Main Navigation"}">
|
||||
|
||||
<ul class="nav navbar-nav navbar-categories">
|
||||
<li><a href="{navigate to="index"}">{intl l="Home"}</a></li>
|
||||
|
||||
<li class="dropdown">
|
||||
{loop type="category" name="menu-cat" id=#id_categorie_boutique#}
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{$TITLE}</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
{loop type="product" name="menu-prod" category=#id_categorie_boutique# order="manual"}
|
||||
<li><a href="{$URL}">{intl l="Commander"} {$TITLE}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/loop}
|
||||
</li>
|
||||
|
||||
{loop type="folder" name="main-menu" parent=#id_dossier_menu#}
|
||||
<li>
|
||||
{ifloop rel="sub-folders"}
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{$TITLE}</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
{loop name="sub-folders" type="folder" parent=$ID order="manual"}
|
||||
<li><a href="{$URL}">{$TITLE}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
{elseloop rel="sub-folders"}
|
||||
<a href="{$URL}">{$TITLE}</a>
|
||||
{/elseloop}
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
<li><a href="{url path="/contact"}">{intl l="Contact"}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navbar navbar-tools" itemscope itemtype="http://schema.org/SiteNavigationElement">
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar-header">
|
||||
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-main">
|
||||
<span class="sr-only">{intl l="Toggle navigation"}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{navigate to="index"}">{intl l="Navigation"}</a>
|
||||
</div>
|
||||
|
||||
<!-- Place everything within .nav-collapse to hide it until above 768px -->
|
||||
<nav class="navbar-collapse collapse nav-main" role="navigation" aria-label="{intl l="Main Navigation"}">
|
||||
{nocache}
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li>
|
||||
<a class="current dropdown-toggle" data-toggle="dropdown" href="{url path="/language"}">{images file="assets/img/flags/{lang attr="code"}.png"}<img src="{$asset_url}" alt="{$CODE}">{/images} {lang attr="title"}</a>
|
||||
<ul class="select dropdown-menu">
|
||||
{loop type="lang" name="lang_available" exclude="{lang attr="id"}"}
|
||||
<li>
|
||||
<a href="{url path="{navigate to="current"}" lang={$CODE}}">{images file="assets/img/flags/{$CODE}.png"}<img src="{$asset_url}" alt="{$CODE}">{/images} {$TITLE}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-cart navbar-right">
|
||||
{loop type="auth" name="customer_info_block" role="CUSTOMER"}
|
||||
<li><a href="{url path="/logout"}" class="logout">{intl l="Log out!"}</a></li>
|
||||
<li><a href="{url path="/account"}" class="account">{intl l="My Account"}</a></li>
|
||||
{/loop}
|
||||
{elseloop rel="customer_info_block"}
|
||||
<li><a href="{url path="/register"}" class="register">{intl l="Register!"}</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="{url path="/login"}" class="login">{intl l="Log In!"}</a>
|
||||
<div class="dropdown-menu">
|
||||
{form name="thelia.front.customer.login"}
|
||||
<form id="form-login-mini" action="{url path="/login"}" method="post" {form_enctype form=$form}>
|
||||
{form_hidden_fields form=$form}
|
||||
{form_field form=$form field="success_url"}
|
||||
<input type="hidden" name="{$name}" value="{navigate to="current"}">
|
||||
{/form_field}
|
||||
{form_field form=$form field="email"}
|
||||
<div class="form-group group-email">
|
||||
<label for="{$label_attr.for}-mini">{intl l="Email address"}</label>
|
||||
<input type="email" name="{$name}" id="{$label_attr.for}-mini" class="form-control" maxlength="255" aria-required="true" required>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field="password"}
|
||||
<div class="form-group group-password">
|
||||
<label for="{$label_attr.for}-mini">{intl l="Password"}</label>
|
||||
<input type="password" name="{$name}" id="{$label_attr.for}-mini" class="form-control" maxlength="255" aria-required="true" required>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field="account"}
|
||||
<input type="hidden" name="{$name}" value="1">
|
||||
{/form_field}
|
||||
<div class="group-btn">
|
||||
<button type="submit" class="btn btn-login-mini">{intl l="Sign In"}</button>
|
||||
<a href="{url path="/register"}" class="btn btn-register-mini">{intl l="Register"}</a>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</li>
|
||||
{/elseloop}
|
||||
{include file="includes/mini-cart.html" nocache}
|
||||
</ul>
|
||||
{/nocache}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.header-container -->
|
||||
|
||||
<main class="main-container" role="main">
|
||||
<div class="container">
|
||||
{block name="breadcrumb"}{/block}
|
||||
<div id="content">{block name="main-content"}{/block}</div>
|
||||
</div><!-- /.container -->
|
||||
</main><!-- /.main-container -->
|
||||
|
||||
<section class="footer-container" itemscope itemtype="http://schema.org/WPFooter">
|
||||
|
||||
<section class="footer-block">
|
||||
<div class="container">
|
||||
<div class="blocks block-col-3">
|
||||
<div class="col">
|
||||
<section class="block block-default">
|
||||
<div class="block-heading"><h3 class="block-title">{intl l="Informations"}</h3></div>
|
||||
<div class="block-content">
|
||||
<ul>
|
||||
{loop type="content" name="cgv" id=#id_contenu_cgv#}
|
||||
<li>
|
||||
<a href="{$URL}">{$TITLE}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
{loop type="content" name="cgv" id=#id_contenu_mentions#}
|
||||
<li>
|
||||
<a href="{$URL}">{$TITLE}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col">
|
||||
<section class="block block-default">
|
||||
<div class="block-heading"><h3 class="block-title">{intl l="Useful links"}</h3></div>
|
||||
<div class="block-content">
|
||||
<ul>
|
||||
{loop name="footer_links" type="content" folder="2"}
|
||||
<li><a href="{$URL}">{$TITLE}</a></li>
|
||||
{/loop}
|
||||
{loop type="auth" name="customer_is_logged" role="CUSTOMER"}
|
||||
<li><a href="{url path="/logout"}" class="logout">{intl l="Log out!"}</a></li>
|
||||
<li><a href="{url path="/account"}" class="account">{intl l="My Account"}</a></li>
|
||||
{/loop}
|
||||
{elseloop rel="customer_is_logged"}
|
||||
<li><a href="{url path="/login"}">{intl l="Login"}</a></li>
|
||||
<li><a href="{url path="/register"}">{intl l="Register"}</a></li>
|
||||
{/elseloop}
|
||||
<li><a href="{url path="/cart"}">{intl l="Cart"}</a></li>
|
||||
<li><a href="{url path="/order/delivery"}">{intl l="Checkout"}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<section class="block block-contact" itemscope itemtype="http://schema.org/Organization">
|
||||
<div class="block-heading"><h3 class="block-title">{intl l="Contact Us"}</h3></div>
|
||||
<div class="block-content">
|
||||
<meta itemprop="name" content="{$store_name}">
|
||||
<ul>
|
||||
<li class="contact-address">
|
||||
<address class="adr" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
||||
<span class="street-address" itemprop="streetAddress">{config key="store_address1"} {config key="store_address2"} {config key="store_address3"}</span><br>
|
||||
<span class="postal-code" itemprop="postalCode">{config key="store_zipcode"}</span>
|
||||
<span class="locality" itemprop="addressLocality">
|
||||
{config key="store_city"}
|
||||
{if {config key="store_country"} }
|
||||
{loop type="country" name="address.country.title" id={config key="store_country"}}, <span class="country-name">{$TITLE}</span>{/loop}
|
||||
{/if}
|
||||
</span>
|
||||
</address>
|
||||
</li>
|
||||
{if {config key="store_phone"} }
|
||||
<li class="contact-phone" title="{intl l="Téléphone"}">
|
||||
<span class="tel" itemprop="telephone">{config key="store_phone"}</span>
|
||||
</li>
|
||||
{/if}
|
||||
{if {config key="store_fax"} }
|
||||
<li class="contact-fax" title="{intl l="Fax"}">
|
||||
<span class="tel" itemprop="fax">{config key="store_fax"}</span>
|
||||
</li>
|
||||
{/if}
|
||||
{if {config key="store_email"} }
|
||||
<li class="contact-email">
|
||||
{mailto address={config key="store_email"} encode="hex" extra='class="email" itemprop="email"'}
|
||||
</li>
|
||||
{/if}
|
||||
<li class="contact-message">
|
||||
<a href="{url path="/contact"}">{intl l="Send us a message"}</a></li>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section><!-- /.footer-block -->
|
||||
|
||||
|
||||
<footer class="footer-info" role="contentinfo">
|
||||
<div class="container">
|
||||
<div class="info">
|
||||
<section class="copyright text-center">{intl l="Copyright"} © <time datetime="{'Y-m-d'|date}">{'Y'|date}</time> Alain Monfreux</section>
|
||||
</div>
|
||||
</div>
|
||||
</footer><!-- /.footer-info -->
|
||||
|
||||
</section><!-- /.footer-container -->
|
||||
|
||||
</div><!-- /.page -->
|
||||
|
||||
{block name="before-javascript-include"}{/block}
|
||||
<!-- JavaScript -->
|
||||
<!--[if lt IE 9]><script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <![endif]-->
|
||||
<!--[if (gte IE 9)|!(IE)]><!--><script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <!--<![endif]-->
|
||||
<script>
|
||||
if (typeof jQuery == 'undefined') {
|
||||
{javascripts file='assets/js/libs/jquery.js'}
|
||||
document.write(unescape("%3Cscript src='{$asset_url}' %3E%3C/script%3E"));
|
||||
{/javascripts}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||
|
||||
|
||||
{javascripts file='assets/js/bootstrap/bootstrap.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/js/plugins/bootbox/bootbox.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{block name="after-javascript-include"}{/block}
|
||||
|
||||
{block name="javascript-initialization"}{/block}
|
||||
|
||||
<!-- Custom scripts -->
|
||||
{javascripts file='assets/js/script.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{literal}
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-54409521-1', 'auto');
|
||||
ga('require', 'linkid', 'linkid.js');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
</body>
|
||||
</html>
|
||||
<!doctype html>
|
||||
<!--
|
||||
______ __ __ ______ __ __ ______
|
||||
/\__ _\ /\ \_\ \ /\ ___\ /\ \ /\ \ /\ __ \
|
||||
\/_/\ \/ \ \ __ \ \ \ __\ \ \ \____ \ \ \ \ \ __ \
|
||||
\ \_\ \ \_\ \_\ \ \_____\ \ \_____\ \ \_\ \ \_\ \_\
|
||||
\/_/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_/\/_/
|
||||
|
||||
|
||||
Copyright (c) OpenStudio
|
||||
email : info@thelia.net
|
||||
web : http://www.thelia.net
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the
|
||||
GNU General Public License : http://www.gnu.org/licenses/
|
||||
-->
|
||||
|
||||
{* Declare assets directory, relative to template base directory *}
|
||||
{declare_assets directory='assets'}
|
||||
{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *}
|
||||
{default_translation_domain domain='fo.sterivein'}
|
||||
|
||||
{* -- Define some stuff for Smarty ------------------------------------------ *}
|
||||
{config_load file='variables.conf'}
|
||||
{block name="init"}{/block}
|
||||
{block name="no-return-functions"}{/block}
|
||||
{assign var="store_name" value="{config key="store_name"}"}
|
||||
{assign var="store_description" value="{config key="store_description"}"}
|
||||
{if not $store_name}{assign var="store_name" value="{intl l='Thelia V2'}"}{/if}
|
||||
{if not $store_description}{assign var="store_description" value="$store_name"}{/if}
|
||||
|
||||
{* paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither *}
|
||||
<!--[if lt IE 7 ]><html class="no-js oldie ie6" lang="{lang attr="code"}"> <![endif]-->
|
||||
<!--[if IE 7 ]><html class="no-js oldie ie7" lang="{lang attr="code"}"> <![endif]-->
|
||||
<!--[if IE 8 ]><html class="no-js oldie ie8" lang="{lang attr="code"}"> <![endif]-->
|
||||
<!--[if (gte IE 9)|!(IE)]><!--><html lang="{lang attr="code"}" class="no-js"> <!--<![endif]-->
|
||||
<head>
|
||||
|
||||
{* Test if javascript is enabled *}
|
||||
<script>(function(H) { H.className=H.className.replace(/\bno-js\b/,'js') } )(document.documentElement);</script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
{* Page Title *}
|
||||
<title>{block name="page-title"}{strip}{if $page_title}{$page_title}{elseif $breadcrumbs}{foreach from=$breadcrumbs|array_reverse item=breadcrumb}{$breadcrumb.title|unescape} - {/foreach}{$store_name}{/if}{/strip}{/block}</title>
|
||||
|
||||
{* Meta Tags *}
|
||||
<meta name="generator" content="{intl l='Thelia V2'}">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
{block name="meta"}
|
||||
<meta name="description" content="{if $page_description}{$page_description}{else}{$store_description|strip|truncate:120}{/if}">
|
||||
{/block}
|
||||
|
||||
{* Stylesheets *}
|
||||
{*
|
||||
{stylesheets file='assets/css/styles.css'}
|
||||
<link rel="stylesheet" href="{$asset_url}">
|
||||
{/stylesheets}
|
||||
*}
|
||||
{stylesheets file='assets/less/styles.less' filters="less"}
|
||||
<link rel="stylesheet" href="{$asset_url}">
|
||||
{/stylesheets}
|
||||
|
||||
{block name="stylesheet"}{/block}
|
||||
|
||||
{* Favicon *}
|
||||
{images file='assets/img/favicon.ico'}<link rel="shortcut icon" type="image/x-icon" href="{$asset_url}">{/images}
|
||||
{images file='assets/img/favicon.png'}<link rel="icon" type="image/png" href="{$asset_url}" />{/images}
|
||||
|
||||
{* Feeds *}
|
||||
<link rel="alternate" type="application/rss+xml" title="{intl l='All products'}" href="{url path="/feed/catalog/{lang attr="locale"}"}" />
|
||||
<link rel="alternate" type="application/rss+xml" title="{intl l='All contents'}" href="{url path="/feed/content/{lang attr="locale"}"}" />
|
||||
<link rel="alternate" type="application/rss+xml" title="{intl l='All brands'}" href="{url path="/feed/brand/{lang attr='locale'}"}" />
|
||||
{block name="feeds"}{/block}
|
||||
|
||||
{* HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries *}
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
{hook name="recaptcha.js"}
|
||||
</head>
|
||||
|
||||
<body class="{block name="body-class"}{/block}" itemscope itemtype="http://schema.org/WebPage">
|
||||
|
||||
<!-- Accessibility -->
|
||||
<a class="sr-only" href="#content">{intl l="Skip to content"}</a>
|
||||
|
||||
<div class="page" role="document">
|
||||
|
||||
<div class="header-container" itemscope itemtype="http://schema.org/WPHeader">
|
||||
|
||||
<header class="container" role="banner">
|
||||
<div class="header">
|
||||
<h1 class="logo">
|
||||
<a href="{navigate to="index"}" title="{$store_name}">
|
||||
<span class='site-logo'>S<span>TERIVEIN<span class="reg">®</span></span></span>
|
||||
</a>
|
||||
<a href="{navigate to="index"}" title="{$store_name}">
|
||||
<span class='site-logo site-logo-sclerivein'>S<span>CLERIVEIN<span class="reg">®</span></span></span>
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
</header><!-- /.header -->
|
||||
|
||||
<div class="navbar navbar-menu" itemscope itemtype="http://schema.org/SiteNavigationElement">
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar-header">
|
||||
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-main-1">
|
||||
<span class="sr-only">{intl l="Toggle navigation"}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{navigate to="index"}">{$store_name}</a>
|
||||
</div>
|
||||
|
||||
<nav class="navbar-collapse collapse nav-main-1" role="navigation" aria-label="{intl l="Main Navigation"}">
|
||||
|
||||
<ul class="nav navbar-nav navbar-categories">
|
||||
<li><a href="{navigate to="index"}">{intl l="Home"}</a></li>
|
||||
|
||||
<li class="dropdown">
|
||||
{loop type="category" name="menu-cat" id=#id_categorie_boutique#}
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{$TITLE}</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
{loop type="product" name="menu-prod" category=#id_categorie_boutique# order="manual"}
|
||||
<li><a href="{$URL}">{intl l="Commander"} {$TITLE}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/loop}
|
||||
</li>
|
||||
|
||||
{loop type="folder" name="main-menu" parent=#id_dossier_menu#}
|
||||
<li>
|
||||
{ifloop rel="sub-folders"}
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{$TITLE}</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
{loop name="sub-folders" type="folder" parent=$ID order="manual"}
|
||||
<li><a href="{$URL}">{$TITLE}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
{elseloop rel="sub-folders"}
|
||||
<a href="{$URL}">{$TITLE}</a>
|
||||
{/elseloop}
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
<li><a href="{url path="/contact"}">{intl l="Contact"}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navbar navbar-tools" itemscope itemtype="http://schema.org/SiteNavigationElement">
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar-header">
|
||||
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-main">
|
||||
<span class="sr-only">{intl l="Toggle navigation"}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{navigate to="index"}">{intl l="Navigation"}</a>
|
||||
</div>
|
||||
|
||||
<!-- Place everything within .nav-collapse to hide it until above 768px -->
|
||||
<nav class="navbar-collapse collapse nav-main" role="navigation" aria-label="{intl l="Main Navigation"}">
|
||||
{nocache}
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li>
|
||||
<a class="current dropdown-toggle" data-toggle="dropdown" href="{url path="/language"}">{images file="assets/img/flags/{lang attr="code"}.png"}<img src="{$asset_url}" alt="{$CODE}">{/images} {lang attr="title"}</a>
|
||||
<ul class="select dropdown-menu">
|
||||
{loop type="lang" name="lang_available" exclude="{lang attr="id"}"}
|
||||
<li>
|
||||
<a href="{url path="{navigate to="current"}" lang={$CODE}}">{images file="assets/img/flags/{$CODE}.png"}<img src="{$asset_url}" alt="{$CODE}">{/images} {$TITLE}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-cart navbar-right">
|
||||
{loop type="auth" name="customer_info_block" role="CUSTOMER"}
|
||||
<li><a href="{url path="/logout"}" class="logout">{intl l="Log out!"}</a></li>
|
||||
<li><a href="{url path="/account"}" class="account">{intl l="My Account"}</a></li>
|
||||
{/loop}
|
||||
{elseloop rel="customer_info_block"}
|
||||
<li><a href="{url path="/register"}" class="register">{intl l="Register!"}</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="{url path="/login"}" class="login">{intl l="Log In!"}</a>
|
||||
<div class="dropdown-menu">
|
||||
{form name="thelia.front.customer.login"}
|
||||
<form id="form-login-mini" action="{url path="/login"}" method="post" {form_enctype form=$form}>
|
||||
{form_hidden_fields form=$form}
|
||||
{form_field form=$form field="success_url"}
|
||||
<input type="hidden" name="{$name}" value="{navigate to="current"}">
|
||||
{/form_field}
|
||||
{form_field form=$form field="email"}
|
||||
<div class="form-group group-email">
|
||||
<label for="{$label_attr.for}-mini">{intl l="Email address"}</label>
|
||||
<input type="email" name="{$name}" id="{$label_attr.for}-mini" class="form-control" maxlength="255" aria-required="true" required>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field="password"}
|
||||
<div class="form-group group-password">
|
||||
<label for="{$label_attr.for}-mini">{intl l="Password"}</label>
|
||||
<input type="password" name="{$name}" id="{$label_attr.for}-mini" class="form-control" maxlength="255" aria-required="true" required>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field="account"}
|
||||
<input type="hidden" name="{$name}" value="1">
|
||||
{/form_field}
|
||||
<div class="group-btn">
|
||||
<button type="submit" class="btn btn-login-mini">{intl l="Sign In"}</button>
|
||||
<a href="{url path="/register"}" class="btn btn-register-mini">{intl l="Register"}</a>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</li>
|
||||
{/elseloop}
|
||||
{include file="includes/mini-cart.html" nocache}
|
||||
</ul>
|
||||
{/nocache}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.header-container -->
|
||||
|
||||
<main class="main-container" role="main">
|
||||
<div class="container">
|
||||
{block name="breadcrumb"}{/block}
|
||||
<div id="content">{block name="main-content"}{/block}</div>
|
||||
</div><!-- /.container -->
|
||||
</main><!-- /.main-container -->
|
||||
|
||||
<section class="footer-container" itemscope itemtype="http://schema.org/WPFooter">
|
||||
|
||||
<section class="footer-block">
|
||||
<div class="container">
|
||||
<div class="blocks block-col-3">
|
||||
<div class="col">
|
||||
<section class="block block-default">
|
||||
<div class="block-heading"><h3 class="block-title">{intl l="Informations"}</h3></div>
|
||||
<div class="block-content">
|
||||
<ul>
|
||||
{loop type="content" name="cgv" id=#id_contenu_cgv#}
|
||||
<li>
|
||||
<a href="{$URL}">{$TITLE}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
{loop type="content" name="cgv" id=#id_contenu_mentions#}
|
||||
<li>
|
||||
<a href="{$URL}">{$TITLE}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col">
|
||||
<section class="block block-default">
|
||||
<div class="block-heading"><h3 class="block-title">{intl l="Useful links"}</h3></div>
|
||||
<div class="block-content">
|
||||
<ul>
|
||||
{loop name="footer_links" type="content" folder="2"}
|
||||
<li><a href="{$URL}">{$TITLE}</a></li>
|
||||
{/loop}
|
||||
{loop type="auth" name="customer_is_logged" role="CUSTOMER"}
|
||||
<li><a href="{url path="/logout"}" class="logout">{intl l="Log out!"}</a></li>
|
||||
<li><a href="{url path="/account"}" class="account">{intl l="My Account"}</a></li>
|
||||
{/loop}
|
||||
{elseloop rel="customer_is_logged"}
|
||||
<li><a href="{url path="/login"}">{intl l="Login"}</a></li>
|
||||
<li><a href="{url path="/register"}">{intl l="Register"}</a></li>
|
||||
{/elseloop}
|
||||
<li><a href="{url path="/cart"}">{intl l="Cart"}</a></li>
|
||||
<li><a href="{url path="/order/delivery"}">{intl l="Checkout"}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<section class="block block-contact" itemscope itemtype="http://schema.org/Organization">
|
||||
<div class="block-heading"><h3 class="block-title">{intl l="Contact Us"}</h3></div>
|
||||
<div class="block-content">
|
||||
<meta itemprop="name" content="{$store_name}">
|
||||
<ul>
|
||||
<li class="contact-address">
|
||||
<address class="adr" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
||||
<span class="street-address" itemprop="streetAddress">{config key="store_address1"} {config key="store_address2"} {config key="store_address3"}</span><br>
|
||||
<span class="postal-code" itemprop="postalCode">{config key="store_zipcode"}</span>
|
||||
<span class="locality" itemprop="addressLocality">
|
||||
{config key="store_city"}
|
||||
{if {config key="store_country"} }
|
||||
{loop type="country" name="address.country.title" id={config key="store_country"}}, <span class="country-name">{$TITLE}</span>{/loop}
|
||||
{/if}
|
||||
</span>
|
||||
</address>
|
||||
</li>
|
||||
{if {config key="store_phone"} }
|
||||
<li class="contact-phone" title="{intl l="Téléphone"}">
|
||||
<span class="tel" itemprop="telephone">{config key="store_phone"}</span>
|
||||
</li>
|
||||
{/if}
|
||||
{if {config key="store_fax"} }
|
||||
<li class="contact-fax" title="{intl l="Fax"}">
|
||||
<span class="tel" itemprop="fax">{config key="store_fax"}</span>
|
||||
</li>
|
||||
{/if}
|
||||
{if {config key="store_email"} }
|
||||
<li class="contact-email">
|
||||
{mailto address={config key="store_email"} encode="hex" extra='class="email" itemprop="email"'}
|
||||
</li>
|
||||
{/if}
|
||||
<li class="contact-message">
|
||||
<a href="{url path="/contact"}">{intl l="Send us a message"}</a></li>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section><!-- /.footer-block -->
|
||||
|
||||
|
||||
<footer class="footer-info" role="contentinfo">
|
||||
<div class="container">
|
||||
<div class="info">
|
||||
<section class="copyright text-center">{intl l="Copyright"} © <time datetime="{'Y-m-d'|date}">{'Y'|date}</time> Alain Monfreux</section>
|
||||
</div>
|
||||
</div>
|
||||
</footer><!-- /.footer-info -->
|
||||
|
||||
</section><!-- /.footer-container -->
|
||||
|
||||
</div><!-- /.page -->
|
||||
|
||||
{block name="before-javascript-include"}{/block}
|
||||
<!-- JavaScript -->
|
||||
<!--[if lt IE 9]><script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <![endif]-->
|
||||
<!--[if (gte IE 9)|!(IE)]><!--><script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <!--<![endif]-->
|
||||
<script>
|
||||
if (typeof jQuery == 'undefined') {
|
||||
{javascripts file='assets/js/libs/jquery.js'}
|
||||
document.write(unescape("%3Cscript src='{$asset_url}' %3E%3C/script%3E"));
|
||||
{/javascripts}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||
|
||||
|
||||
{javascripts file='assets/js/bootstrap/bootstrap.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/js/plugins/bootbox/bootbox.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{block name="after-javascript-include"}{/block}
|
||||
|
||||
{block name="javascript-initialization"}{/block}
|
||||
|
||||
<!-- Custom scripts -->
|
||||
{javascripts file='assets/js/script.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{literal}
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-54409521-1', 'auto');
|
||||
ga('require', 'linkid', 'linkid.js');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
{* Body Class *}
|
||||
{block name="body-class"}page-password{/block}
|
||||
|
||||
{* Breadcrumb *}
|
||||
{block name='no-return-functions' append}
|
||||
{$breadcrumbs = [
|
||||
['title' => {intl l="Password"}, 'url'=>{url path="/password"}]
|
||||
]}
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="main">
|
||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||
<h1 id="main-label" class="page-header">{intl l="Password Forgotten"}</h1>
|
||||
{form name="thelia.front.customer.lostpassword"}
|
||||
<form id="form-forgotpassword" action="{url path="/password"}" method="post">
|
||||
{form_hidden_fields form=$form}
|
||||
<p>{intl l="Please enter your email address below."} {intl l="You will receive a link to reset your password."}</p>
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
{form_field form=$form field="email"}
|
||||
<div class="form-group group-email {if $error}has-error{elseif !$error && $value != ""}has-success{/if}">
|
||||
<label for="{$label_attr.for}">{$label}</label>
|
||||
<div class="control-input">
|
||||
<input type="email" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="255" aria-required="true" autofocus required>
|
||||
{if $error}
|
||||
<span class="help-block">{$message}</span>
|
||||
{elseif !$error && $value != ""}
|
||||
<span class="help-block"><span class="icon-ok"></span> {intl l="You will receive a link to reset your password."}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
<div class="group-btn">
|
||||
<a href="{url path="/login"}" class="btn btn-cancel">{intl l="Cancel"}</a>
|
||||
<button type="submit" class="btn btn-forgot">{intl l="Send"}</button>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
</article>
|
||||
</div>
|
||||
{/block}
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
{* Body Class *}
|
||||
{block name="body-class"}page-password{/block}
|
||||
|
||||
{* Breadcrumb *}
|
||||
{block name='no-return-functions' append}
|
||||
{$breadcrumbs = [
|
||||
['title' => {intl l="Password"}, 'url'=>{url path="/password"}]
|
||||
]}
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="main">
|
||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||
<h1 id="main-label" class="page-header">{intl l="Password Forgotten"}</h1>
|
||||
{form name="thelia.front.customer.lostpassword"}
|
||||
<form id="form-forgotpassword" action="{url path="/password"}" method="post">
|
||||
{form_hidden_fields form=$form}
|
||||
<p>{intl l="Please enter your email address below."} {intl l="You will receive a link to reset your password."}</p>
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
{form_field form=$form field="email"}
|
||||
<div class="form-group group-email {if $error}has-error{elseif !$error && $value != ""}has-success{/if}">
|
||||
<label for="{$label_attr.for}">{$label}</label>
|
||||
<div class="control-input">
|
||||
<input type="email" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="255" aria-required="true" autofocus required>
|
||||
{if $error}
|
||||
<span class="help-block">{$message}</span>
|
||||
{elseif !$error && $value != ""}
|
||||
<span class="help-block"><span class="icon-ok"></span> {intl l="You will receive a link to reset your password."}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
<div class="group-btn">
|
||||
<a href="{url path="/login"}" class="btn btn-cancel">{intl l="Cancel"}</a>
|
||||
<button type="submit" class="btn btn-forgot">{intl l="Send"}</button>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
</article>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
Reference in New Issue
Block a user