VM 2, latest and greatest, same for Joomla
So, I have comments in an invoice, when the invoice is toggled to "shipped" a comment is added with shipping/tracking info, I can see it in the backend Order administration, but the comment never gets populated into the html email that's sent.
I have some overrides in place, but I haven't touched the <tr> that's supposed to populate with order comments. I see this in the mail_html_shopper.php file:
<?php $nb=count($this->orderDetails['history']);
if($this->orderDetails['history'][$nb-1]->customer_notified && !(empty($this->orderDetails['history'][$nb-1]->comments))) { ?>
<tr>
<td>
<?php echo nl2br($this->orderDetails['history'][$nb-1]->comments); ?>
</td>
</tr>
<?php } ?>
<?php if(!empty($this->orderDetails['details']['BT']->customer_note)){ ?>
<tr>
<td>
<?php echo JText::sprintf('COM_VIRTUEMART_MAIL_SHOPPER_QUESTION',nl2br($this->orderDetails['details']['BT']->customer_note)) ?>
</td>
</tr>
<?php } ?>
basically... I'd like to "dumb it down" -- I don't care if it spits out all the order comments, I only care that the shipping info gets in there... could someone help me with the code that very simply spits out either the current/most recent order comment or ALL the order comments?
Thanks in advance!
Hi, Blizam.
I'm not sure if I understand what is your issue here.
Your comment is not added to email or it comes without html?
I've came across similar issue: comment wasn't posted with html. Comments in db are stored with html converted to html entities. So I changed this:
<?php echo nl2br($this->orderDetails['history'][$nb-1]->comments); ?>
to this:
<?php echo html_entity_decode($this->orderDetails['history'][$nb-1]->comments); ?>
Now my comments are displayed as html.
Does it helps?