Jump to content

Afficher message client sur la facture


Recommended Posts

Bonjour,

J'ai trouvé quelques topics sur le sujet mais quand j'applique leur modification, j'ai l'impression que le message du client n'est pas récupéré.

Voici le code que j'utilise :

Je copie le fichier /classes/order/OrderInvoice.php dans override/classes/order/ à la ligne 178 je rajoute ça

foreach ($products as $row) {
            // hack start
			if( end($products) === $row ) { 
                $row['first_order_message'] = nl2br($order->getFirstMessage());
                $CustomerThread_messagelar = CustomerMessage::getMessagesByOrderId($order->id, $private = false); 	// last Customer Message private = false
                $row['CustomerThread_message'] = $CustomerThread_messagelar[0][message];							// last Customer Message		
    
    
            // Change qty if selected

et ensuite dans pdf/ je modifie invoice.tpl et je rajoute ce morceaux de code après

<!-- Message client -->
<tr>
  <td colspan="12">
    {$order_detail.CustomerThread_message}

  </td>
</tr>

 

Share this post


Link to post
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More