News:

Support the VirtueMart project and become a member

Main Menu

Set a default message for order status "Confirmed"

Started by xamonix, November 27, 2016, 19:03:02 PM

Previous topic - Next topic

xamonix

Hi guys

Which files should I edit to set a default message on order update status "Confirmed"?
More specifically, I want to set a default message, so everytime I change the order status to "Confirmed" there is no need to type the same message over and over again.
I only need to know wich files should I edit.
Thank you for your help.

Joomla: 2.5
Virtuemart: 2.6.8

GJC Web Design

add directly in the

<textarea rows="6" cols="35" name="comments"></textarea>

administrator\components\com_virtuemart\views\orders\tmpl\order_editstatus.php
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

xamonix

#2
No... it doesn't work that way.
This is the code I'm trying to implemnet:

<?php
        $confirmed 
"We received your order's payment confirmation.";
        if (
$order_status_name "Confirmed"
        {
        echo 
"<textarea rows='6' cols='35' name='comments'>"$confirmed."</textarea>";
}
?>


Somehow Virtuemart seems to ignore the text  when I try to set the text directly (no php) between <textarea> tags.
Any other solution? Thanks anyway.

Studio 42

Hi,
Perhaps a better idea is to overide this file : ROOT\components\com_virtuemart\views\invoice\tmpl\mail_html_shopper.php
And do the changes near
line <?php echo  nl2br($this->orderDetails['history'][$nb-1]->comments); ?>

xamonix

Hummm... not sure about your sugestion.
I want to send the message at the same time I update the order. So, if I update the order to "confirmed" the message is sent  away.  The file you sugested to edit seems to read data from the database, so there is no chance to send anything at all. Correct me if I'm wrong!
Thanks for your time...

Studio 42

This load comment, but what you add is the comment in the database, and this get send to the user.

So you can for eg, check the statut = confirmed(or other) + comment empty or not, and if it's empty, add your own comment(and why not using a language key for multilanguage sites)