I have the following code in shopping-cart.tpl
:
$(document).ready(function(){
$.ajax({
url: document.location.origin+"/univers/themes/leostyl/shopping-cart.php",
type: 'get',
success: function(data){
var array = $.parseJSON(data);
ch='<select class="form-control" id="customer-id" onchange="myFunction()">';
for (var i=0;i<array['results'].length;i++) {
if(array['results'][i].id_default_group== 3)
ch=ch+'<option id='+array['results'][i].id_customer+'> '+array['results'][i].firstname+' '+array['results'][i].lastname+'</option>';
}
ch=ch+'</select>';
$( ".customer" ).append(ch);
},
error: function (xhr, ajaxOptions, thrownError) {
}
});
});
how can i modify the value of $order->id_customer
in PaymentModule.php by creating a variable in shopping-cart.tpl?
$order->id_customer = (int)$this->context->cart->id_customer;