Author Topic: Include Order Status Description on email to client or...  (Read 4399 times)

marcoj

  • Beginner
  • *
  • Posts: 7
Include Order Status Description on email to client or...
« on: April 17, 2012, 23:03:14 pm »
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
Code: [Select]
<?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

  • Jr. Member
  • **
  • Posts: 169
  • vm supporter member
  • VirtueMart Version: vm 3.0.x and jml 3.4.5
Re: Include Order Status Description on email to client or...
« Reply #1 on: July 02, 2012, 18:24:03 pm »
Would appreciate any information on that too.

loke

  • Beginner
  • *
  • Posts: 5
  • VirtueMart Version: Currently using VirtueMart 3.4.2 on Joomla! 3.9.10 - PHP 7.2.21 - MySQL 5.7.4-m14-log
Re: Include Order Status Description on email to client or...
« Reply #2 on: December 17, 2012, 10:21:12 am »
I solved this problem by editing two files.

The first file.
[mail_html_shopper.php] like you did.
Code: [Select]
<?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

Code: [Select]
s.order_status_name to
Code: [Select]
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

  • Beginner
  • *
  • Posts: 2
Re: Include Order Status Description on email to client or...
« Reply #3 on: September 18, 2013, 13:55:20 pm »
Maybe someone knows how to make these two parameters available ?
I'm trying but ....

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2660
Re: Include Order Status Description on email to client or...
« Reply #4 on: September 18, 2013, 20:25:17 pm »
[orders.php] from the / administrator / components / com_virtuemart / models / orders.php on line
Probably here?

majkelm

  • Beginner
  • *
  • Posts: 2
Re: Include Order Status Description on email to client or...
« Reply #5 on: October 02, 2013, 15:14:14 pm »
i made it
in \administrator\components\com_virtuemart\models\orders.php line 179
Code: [Select]
// Get the order details
$q = "SELECT  u.*,o.*,
   s.order_status_name
changed to
Code: [Select]
// 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
Code: [Select]
<?php echo $this->orderDetails['details']['BT']->order_status_description ?>

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2660
Re: Include Order Status Description on email to client or...
« Reply #6 on: October 03, 2013, 16:51:29 pm »
Thank you for sharing.

mahootshop

  • Beginner
  • *
  • Posts: 33
  • Store with 15,000 product
    • MAHOOT Store
  • VirtueMart Version: 3.2.4
Re: Include Order Status Description on email to client or...
« Reply #7 on: August 21, 2016, 15:28:57 pm »
i made it
in \administrator\components\com_virtuemart\models\orders.php line 179
Code: [Select]
// Get the order details
$q = "SELECT  u.*,o.*,
   s.order_status_name
changed to
Code: [Select]
// 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
Code: [Select]
<?php echo $this->orderDetails['details']['BT']->order_status_description ?>

extra )  in your code

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10022
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Include Order Status Description on email to client or...
« Reply #8 on: August 21, 2016, 20:29:08 pm »
corrected
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

sirius

  • Jr. Member
  • **
  • Posts: 63
    • OCTeam
  • VirtueMart Version: 3.8.6
Re: Include Order Status Description on email to client or...
« Reply #9 on: December 11, 2020, 18:59:43 pm »
Hi all,
just an update to make it works ok with VM3.8.6

in /administrator/components/com_virtuemart/models/orders.php line 229

Code: [Select]
// 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
Code: [Select]
// 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

Code: [Select]
  <?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.9.24 | PHP7.4.13 + APC + Opcode