Ok i found ! i use this code to collect informations from database and to use in my quote template:
global $wpdb;
$req_id_quote = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}postmeta WHERE post_id=”.$_POST[‘zbs_quote_id’].” AND meta_key = ‘zbsid'”) ;
// Parcours des resultats obtenus
foreach ($req_id_quote as $post) {
$id_quote = $post->meta_value;
}
$req_id_contact = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}postmeta WHERE post_id=”.$_POST[‘zbs_quote_id’].” AND meta_key = ‘zbs_customer_quote_customer'”) ;
foreach ($req_id_contact as $post) {
$id_contact = $post->meta_value;
}
$req_adress_contact = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}zbs_contacts WHERE ID=”.$id_contact.””) ;
foreach ($req_adress_contact as $post) {
$address1 = $post->zbsc_addr1;
$address2 = $post->zbsc_addr2;
$city = $post->zbsc_city;
$country = $post->zbsc_county;
$postcode = $post->zbsc_postcode;
}
$html = str_replace(‘###COUNTRY###’,$city,$html);
$html = str_replace(‘###CITY###’,$city,$html);