Hello,
Joomla! 2.5.18 & VirtueMart 2.0.26 here.
I need to include specified comments on banking details in order status in email sent to customer.
I tried to accomplish this by applying this method:
Quote from: loke on December 17, 2012, 10:21:12 AM
editing two files:
The first file.
[mail_html_shopper.php]
<?php echo JText::sprintf('COM_VIRTUEMART_MAIL_ORDER_STATUS',$this->orderDetails['details']['BT']->order_status_description) ; ?>
and second file
[orders.php] from the / administrator / components / com_virtuemart / models / orders.php on line 130 i changed
s.order_status_name
to
s.order_status_description
Thread link: http://forum.virtuemart.net/index.php?topic=101447.msg373035#msg373035
Unfortunately it did not work, order status space simply empty now in email.
I tried to include my personalized comments into the status name, but taht field is limited to certain number of characters, so lifting up that limit would be another solution.
Any help appreciated,
Thank you!
Hi all,
just an update to make it works with VM3.8.6
in /administrator/components/com_virtuemart/models/orders.php line 229
// Get the order details
$q = "SELECT o.*, o.created_on as order_created, o.modified_on as order_modified, u.*, s.order_status_name
changed to
// Get the order details
$q = "SELECT o.*, o.created_on as order_created, o.modified_on as order_modified, u.*, s.order_status_name, s.order_status_description
now in /components/com_virtuemart/views/invoice/tmpl/mail_html_shopper.php
Between line 75 and 76 just added
<?php if(!empty($this->orderDetails['details']['BT']->order_status_description)){ ?>
<tr>
<td colspan="3" align="left" style="border: 1px solid #CCCCCC;">
<?php echo nl2br(html_entity_decode($this->orderDetails['details']['BT']->order_status_description)); ?>
</td>
</tr>
<?php } ?>
Nice! Thanks!
sirius - nice :-)
Not wanting to be rude - but maybe simpler to get all orderstates data
$q = "SELECT o.*, o.created_on as order_created, o.modified_on as order_modified, u.*, s.*
I will suggest to core - to see if we can stop having to override this at every VM update