fix changement delivery address

This commit is contained in:
Marion Muszynski 2016-11-25 11:50:52 +01:00
parent afa5bc8d65
commit cc725c4d89
2 changed files with 12 additions and 3 deletions

View File

@ -112,7 +112,16 @@ $html .= '</div>
<div>
<h5>Paiement</h5>
<p class="order_total">Total à régler <span class="price price_total">'.Tools::displayPrice($cart->getOrderTotal(TRUE),$currency).'</span></p>
</div>';
</div>
<script>
$(document).ready(function () {
$("#modif_address").click(function(){
url = $(this).data("url");
var p = window.open(url, "Modification SoColissimo", "width=720, height=360, resizable=1, scrollbars=1");
return false;
});
});
</script>';
if(!empty($html)) {
echo $html;

View File

@ -273,10 +273,10 @@ class BlockOrderSummary extends Module {
<div>
<h5>'.$this->l('My shipping address').' '.
(
($currentState->id != 8 && $currentState->id != 18 && in_array((int)$order->id_carrier, $carrier_socol))
($currentState->id != 8 && $currentState->id != 18 && in_array((int)$params['order']->id_carrier, $carrier_socol))
?'<a id="modif_address" data-url="scaddressedit.php?id_cart='.(int)$params['order']->id_cart.'"><span class="anticon anticon-pencil" style="font-size: 16px; vertical-align: baseline;cursor:pointer;"></span></a>'
:(
($currentState->id != 8 && $currentState->id != 18 && !in_array((int)$order->id_carrier, $carrier_socol))
($currentState->id != 8 && $currentState->id != 18 && !in_array((int)$params['order']->id_carrier, $carrier_socol))
?'<a href="?tab=AdminAddresses&id_address='.$addressDelivery->id.'&addaddress&realedit=1&id_order='.$params['order']->id.($addressDelivery->id == $addressInvoice->id ? '&address_type=1' : '').'&token='.Tools::getAdminToken('AdminAddresses'.(int)(Tab::getIdFromClassName('AdminAddresses')).(int)($cookie->id_employee)).'&back='.urlencode($_SERVER['REQUEST_URI']).'"><span class="anticon anticon-pencil" style="font-size: 16px; vertical-align: baseline;cursor:pointer;"></span></a>'
:''
)