Merge branch 'develop' of gitlab.antadis.net:dev-antadis/bebeboutik into develop

This commit is contained in:
root 2017-06-23 12:25:25 +02:00
commit db51080165
8 changed files with 239 additions and 13 deletions

View File

@ -711,6 +711,54 @@ class AdminAntReturnprocess extends AdminTab
} else {
HelperFormBootstrap::displayWarning('Aucune quantité renseignée');
}
} elseif(Tools::isSubmit('submitDetails') && Tools::getValue('id_order_return') && Tools::getValue('id_order_detail')){
$id_order_return = (int) Tools::getValue('id_order_return');
$id_order_detail = (int) Tools::getValue('id_order_detail');
$id_instruction = (int) Tools::getValue('instruction');
$id_reason = (int) Tools::getValue('reason');
Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'order_return_detail_qty`
SET reason = '.$id_reason.', instruction='.$id_instruction.'
WHERE id_order_detail='.$id_order_detail.' AND id_order_return='.$id_order_return.'
');
HelperFormBootstrap::displaySuccess('Mise à jour effectuée');
} elseif(Tools::isSubmit('submitComment') && Tools::getValue('id_order_return')){
$id_order_return = (int) Tools::getValue('id_order_return');
$comment = Tools::getValue('comment');
$return_link = Db::getInstance()->getRow('
SELECT *
FROM `'._DB_PREFIX_.'order_return_link`
WHERE id_order_return='.$id_order_return.'
');
if($return_link){
$ok = Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'order_return_link`
SET return_comment = "'.pSQL($comment).'"
WHERE id_order_return='.$id_order_return.'
');
} else {
$ok = Db::getInstance()->execute('
INSERT INTO `'._DB_PREFIX_.'order_return_link`
VALUES (
'.(int) $id_order_return.',
'.(int) $cookie->id_employee.',
NOW(),
1,
0.0,
"mondialrelay",
"0",
"",
"'.pSQL($comment).'"
)
');
}
if($ok) {
HelperFormBootstrap::displaySuccess('Mise à jour effectuée');
} else {
HelperFormBootstrap::displayErrors('La mise à jour n\'a pas pu s\'effectuer');
}
}
}
@ -893,11 +941,85 @@ class AdminAntReturnprocess extends AdminTab
6 => "anticon anticon-warning text-danger",
);
$return_link = Db::getInstance()->getRow('
SELECT `return_number`, `link`, `return_comment`
FROM `'._DB_PREFIX_.'order_return_link`
WHERE `id_order_return` = '.(int) $id_order_return.'
');
$helper = new HelperFormBootstrap();
$helper->_select2 = true;
$helper->_inputMask = true;
$html = $helper->renderStyle();
$html .= '
<div class="modal fade" tabindex="-1" role="dialog" id="returnDetailModal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="'.$currentIndex.'&submitDetails=1&updateorder_return&id_order_return='.(int)$id_order_return.'&token='.$this->token.'" method="post">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Changer les informations pour ce produit</h4>
</div>
<div class="modal-body">
<input type="hidden" value="'.$id_order_return.'" id="id_order_return" name="id_order_return">
<input type="hidden" value="0" id="id_order_detail" name="id_order_detail">
<div class="form-group">
<select class="form-control" id="reason" name="reason">
<option value="0">Changer les instructions</option>
<option value="2">CLIENT : Rétractation post-envoi</option>
<option value="11">CLIENT : Annulation pour -achat</option>
<option value="4">FEUR : Problème SAV</option>
<option value="5">FEUR : Produit manquant</option>
<option value="3">BBB : Erreur Achat / Prod</option>
<option value="6">BBB : Erreur Logistique</option>
<option value="8">BBB : Pbme Site / Paiment</option>
<option value="12">BBB : Suspicion de fraude</option>
<option value="9">TRANS : Colis détruit</option>
<option value="10">TRANS : Colis perdu</option>
<option value="7">Autre</option>
</select>
</div>
<div class="form-group">
<select class="form-control" id="instruction" name="instruction">
<option value="0">Changer la Raison</option>
<option value="1">Remboursement + Mise en stock</option>
<option value="2">Échange</option>
<option value="3">Défectueux</option>
<option value="4">Commande à -expédier</option>
<option value="5">Commande à rembourser</option>
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>
<button type="submit" class="btn btn-primary" name="submitDetails">Enregistrer</button>
</div>
</form>
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="returnCommentModal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="'.$currentIndex.'&submitComment=1&updateorder_return&id_order_return='.(int)$id_order_return.'&token='.$this->token.'" method="post">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Modifier le commentaire</h4>
</div>
<div class="modal-body">
<input type="hidden" value="'.$id_order_return.'" id="id_order_return" name="id_order_return">
<div class="form-group">
<textarea class="form-control" rows="4" name="comment">'.($return_link && !empty($return_link['return_comment'])?$return_link['return_comment']:'').'</textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>
<button type="submit" class="btn btn-primary" name="submitComment">Enregistrer</button>
</div>
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel">
@ -910,13 +1032,7 @@ class AdminAntReturnprocess extends AdminTab
<div class="row">
<div class="col-md-7">
<div>';
$return_link = Db::getInstance()->getRow('
SELECT `return_number`, `link`, `return_comment`
FROM `'._DB_PREFIX_.'order_return_link`
WHERE `id_order_return` = '.(int) $id_order_return.'
');
$html .= '<p class="text-purple-dark" style="font-weight:bold;"><span class="anticon anticon-qrcode"></span> Lien retour Etiquette MR : '.($return_link? '<a style="color:#444;" href="'.$return_link['link'].'" onclick="window.open(this.href); return false;">'.$return_link['return_number'].'</a> <a class="text-purple-dark" title="Renvoyer les instructions retour" href="'.$currentIndex.'&send_return_instruction=1&updateorder_return&id_order_return='.$id_order_return.'&id_order='.(int)$order->id.'&token='.$this->token.'"><i class="glyphicon glyphicon-send"></i></a>':'Pas de lien retour').'<p>';
$html .= '<p class="text-purple-dark" style="font-weight:bold;">'.(($return_link && !empty($return_link['return_comment']))?'Commentaire : " '.$return_link['return_comment'].' "':'Sans commentaire').'<p>';
$html .= '<p class="text-purple-dark" style="font-weight:bold;"><span class="anticon anticon-qrcode"></span> Lien retour Etiquette MR : '.($return_link && !empty($return_link['link'])? '<a style="color:#444;" href="'.$return_link['link'].'" onclick="window.open(this.href); return false;">'.$return_link['return_number'].'</a> <a class="text-purple-dark" title="Renvoyer les instructions retour" href="'.$currentIndex.'&send_return_instruction=1&updateorder_return&id_order_return='.$id_order_return.'&id_order='.(int)$order->id.'&token='.$this->token.'"><i class="glyphicon glyphicon-send"></i></a>':'Pas de lien retour').'<p>';
$html .= '</div>
<table class="table">
<thead>
@ -965,6 +1081,7 @@ class AdminAntReturnprocess extends AdminTab
<td align="center" style="vertical-align:middle;color:#444;">
<a style="color:#504d8b;" href="'.$currentIndex.'&deleteorder_return_detail&id_order_detail='.$product['id_order_detail'].'&id_order_return='.$orderReturn->id.'&token='.$this->token.'"><span class="anticon anticon-bin"></span></a>
<a style="cursor:pointer;color:#504d8b;" data-container="body" data-toggle="popover" data-placement="bottom" data-content="'.$reasons[(int)$return_details['reason']].'"><i class="glyphicon glyphicon-info-sign"></i></a>
<a style="cursor:pointer;color:#504d8b;" data-toggle="modal" data-target="#returnDetailModal" data-detail="'.$product['id_order_detail'].'" data-instruction="'.$return_details['instruction'].'" data-reason="'.$return_details['reason'].'"><i class="glyphicon glyphicon-edit"></i></a>
</td>
</tr>';
}
@ -972,7 +1089,13 @@ class AdminAntReturnprocess extends AdminTab
$html .='</tbody>
</table>
</div>
<div class="col-md-offset-1 col-md-4">';
<div class="col-md-offset-1 col-md-4">
<h5 style="background:#504D8B;color:#fff;padding:5px; text-align:center;">
'.$this->l('Commentaire').'
<a style="cursor:pointer;color:#fff;" class="pull-right" data-toggle="modal" data-target="#returnCommentModal"><i class="glyphicon glyphicon-edit"></i></a>
</h5>
<p class="" style="margin-bottom:20px; padding:0 10px;">'.(($return_link && !empty($return_link['return_comment']))?$return_link['return_comment']:'Sans commentaire').'<p>';
if($return_history && !empty($return_history)) {
$html .= '
<h5 style="background:#504D8B;color:#fff;padding:5px; text-align:center;">
@ -1558,6 +1681,18 @@ class AdminAntReturnprocess extends AdminTab
return false;
});
$(\'[data-toggle="popover"]\').popover();
$("#returnDetailModal").on("show.bs.modal", function (event) {
var button = $(event.relatedTarget);
var id_order_detail = button.data("detail");
var id_instruction = button.data("instruction");
var id_reason = button.data("reason");
console.log(button, id_order_detail, id_instruction, id_reason)
var modal = $(this);
modal.find(".modal-body input#id_order_detail").val(id_order_detail);
modal.find(".modal-body select#instruction option[value=\'"+id_instruction+"\']").attr("selected","selected");
modal.find(".modal-body select#reason option[value=\'"+id_reason+"\']").attr("selected","selected");
});
});
</script>
';

View File

@ -60,13 +60,18 @@ $(document).ready(function() {
<div class="psales">
{$HOOK_PRIVATESALES_CATEGORY}
</div>
{if $sale->id == 7086}
<div class="sale_promo"></div>
<div class="clearfix"></div>
{/if}
{/if}
{if $sale}
{$sale->getMobileMenu()}
{/if}
{*
{if $scenes}

View File

@ -5306,3 +5306,83 @@ h3.gift_title {
#cookiesinfo .close{
display: none;
}
/* Bandeau promotionnel */
.promo_bandeau{
background: url(../img/bandeau_promo.jpg) no-repeat left center;
width: 100%;
min-height: 142px;
margin-bottom: 20px;
-webkit-background-size: auto 100%;
background-size: auto 100%;
}
.promo_bandeau_es{
background: url(../img/bandeau_promo_es.jpg) no-repeat left center;
width: 100%;
min-height: 142px;
margin-bottom: 20px;
-webkit-background-size: auto 100%;
background-size: auto 100%;
}
.sale_promo{
background: url(../img/bandeau_promo_braderie.jpg) no-repeat center center;
width: 100%;
min-height: 142px;
margin-bottom: 20px;
-webkit-background-size: auto 100%;
background-size: auto 100%;
}
@media (min-width:426px) {
.promo_bandeau_es{
background: url(../img/bandeau_promo_es.jpg) no-repeat center center;
width: 100%;
min-height: 160px;
margin-bottom: 20px;
-webkit-background-size: contain;
background-size: contain;
}
.sale_promo{
background: url(../img/bandeau_promo_braderie.jpg) no-repeat center center;
width: 100%;
min-height: 160px;
margin-bottom: 20px;
-webkit-background-size: contain;
background-size: contain;
}
}
@media (min-width:480px) {
.promo_bandeau{
background: url(../img/bandeau_promo_2.jpg) no-repeat left center;
width: 100%;
min-height: 182px;
-webkit-background-size: 100%;
background-size: 100%;
}
.promo_bandeau_es{
background: url(../img/bandeau_promo_es.jpg) no-repeat center center;
width: 100%;
min-height: 182px;
-webkit-background-size: 100%;
background-size: 100%;
}
.sale_promo{
background: url(../img/bandeau_promo_braderie.jpg) no-repeat center center;
width: 100%;
min-height: 182px;
-webkit-background-size: 100%;
background-size: 100%;
}
}
@media (min-width:430px) {
.promo_bandeau{
background: url(../img/bandeau_promo_2.jpg) no-repeat left center;
width: 100%;
min-height: 162px;
-webkit-background-size: 100%;
background-size: 100%;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -36,10 +36,10 @@
{* Log in pop up *}
{if !$cookie->isLogged() AND !$showtoguests}
<div class="modalbox_shadow" style="display: none;"></div>
<div class="modalbox_login" style="display: none;">
<div class="modalbox_login" style="display: none;">
<a class="close_button" title="{l s='fermer' mod='privatesales'}"></a>
<p>{l s='You need to login' mod='privatesales'}</p>
{*
<form action="{$link->getPageLink('authentication.php', true)}" method="post" id="login_form" class="std">
<fieldset>
@ -72,13 +72,19 @@
<div id="privatesales_block">
<div id="block_sales_home">
<div class="content clearfix">
{if $cookie->id_lang == 3}
<div class="promo_bandeau_es"></div>
{else}
<div class="promo_bandeau"></div>
{/if}
{if count($sales) > 0}
{assign var=extrafields value=$HOOK_PRIVATESALES_LISTING|unserialize}
<ul>
{foreach $sales as $sale name=sales}
{if count(array_intersect($customer_groups, $sale->groups))>0}
<li onclick="{if $cookie->isLogged() OR $showtoguests}window.location.href='{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}';{/if}">
{include file="./themes/site_mobile/delay.tpl" delivery_delay=$sale->delivery_delay}
<a href="{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}" class="img_link"><img class="background" alt="{$sale->title[$cookie->id_lang]}" src="{$path}img/{$sale->id}/liston_{$cookie->id_lang}.jpg" /></a>
<div class="links">