VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: rage76 on April 15, 2019, 17:30:30 PM

Title: Change in "Shipped Order" Email
Post by: rage76 on April 15, 2019, 17:30:30 PM
hi, I want to include shipping details (like tracking code / docket number" in the "shipped order email"

I add the details in the comment but it does not show in the mail. How do I do that?

J 3.9.5
VM 3.4.2
Title: Re: Change in "Shipped Order" Email
Post by: Jörgen on April 15, 2019, 20:11:26 PM

<?php
$nb
=count($this->orderDetails['history']);
if(
$this->orderDetails['history'][$nb-1]->customer_notified && !(empty($this->orderDetails['history'][$nb-1]->comments))) { 
    echo 
vmText::sprintf('COM_VIRTUEMART_ORDER_COMMENT_WITH_LAST_COMMENT'nl2br($this->orderDetails['history'][$nb-1]->comments));
}
?>


If You mean customer note:

<?php
if(!empty($this->orderDetails['details']['BT']->customer_note)){
   echo 
vmText::sprintf('COM_VIRTUEMART_MAIL_SHOPPER_QUESTION',nl2br($this->orderDetails['details']['BT']->customer_note))

?>



Place it in the right place in Your mail overrides. templates/your-template/html/co_virtuemart/invoice

Jörgen @ Kreativ Fotografi
Title: Re: Change in "Shipped Order" Email
Post by: rage76 on April 16, 2019, 12:38:27 PM
Thank you Jörgen but I couldn't find the folder named "invoice" in the template overrides.

I did find a folder in the main virtuemart component under "views" folder though. Please guide.
Title: Re: Change in "Shipped Order" Email
Post by: Jörgen on April 16, 2019, 12:54:33 PM
Start here to learn about overrides:
https://docs.joomla.org/J3.x:How_to_use_the_Template_Manager (https://docs.joomla.org/J3.x:How_to_use_the_Template_Manager)

Jörgen @ Kreativ Fotografi