News:

Looking for documentation? Take a look on our wiki

Main Menu

Include Order Status Description on email to client or...

Started by marcoj, April 17, 2012, 23:03:14 PM

Previous topic - Next topic

marcoj

Hi guys,

I need help to solve something here

I want to include the order status description in the email sent to the client. I tried something like <?php echo JText::sprintf('COM_VIRTUEMART_MAIL_ORDER_STATUS',$this->orderDetails['details']['BT']->order_status_description) ; ?> on mail_html_shopper.php, but that didn't work.
Another option would be to detect the order status id or code and if it was equal to something show the content I want.

Any help on this?

Thanks in advance!

slammy


loke

I solved this problem by editing two files.

The first file.
[mail_html_shopper.php] like you did.
<?php echo JText::sprintf('COM_VIRTUEMART_MAIL_ORDER_STATUS',$this->orderDetails['details']['BT']->order_status_description) ; ?>

and second file i edit was.
[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

it can not print the order status name out now. but I've written order status name in the description field. I can now insert bank account and conditions for bank payment in a separate order status like pending. and choose to only customers who pay by bank transfer are the only ones who get information about bank transfer with bank account number and payment details for this kind of payment.

majkelm

Maybe someone knows how to make these two parameters available ?
I'm trying but ....

Maxim Pishnyak

Quote from: loke on December 17, 2012, 10:21:12 AM
[orders.php] from the / administrator / components / com_virtuemart / models / orders.php on line
Probably here?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

majkelm

#5
i made it
in \administrator\components\com_virtuemart\models\orders.php line 179
// Get the order details
$q = "SELECT  u.*,o.*,
   s.order_status_name

changed to
// Get the order details
$q = "SELECT  u.*,o.*,
   s.order_status_name,
   s.order_status_description


now in \components\com_virtuemart\views\invoice\tmpl\mail_html_shopper.php
just added
<?php echo $this->orderDetails['details']['BT']->order_status_description ?>


Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

mahootshop

#7
Quote from: majkelm on October 02, 2013, 15:14:14 PM
i made it
in \administrator\components\com_virtuemart\models\orders.php line 179
// Get the order details
$q = "SELECT  u.*,o.*,
   s.order_status_name

changed to
// Get the order details
$q = "SELECT  u.*,o.*,
   s.order_status_name,
   s.order_status_description


now in \components\com_virtuemart\views\invoice\tmpl\mail_html_shopper.php
just added
<?php echo $this->orderDetails['details']['BT']->order_status_description ?>

extra )  in your code

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

sirius

Hi all,
just an update to make it works ok 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 ?>
J3.10.12 | PHP 7.4.33 + APC + memcached + Opcode
VM Prod : 3.8.6 | VM Test : 4.0.12.10777