Author Topic: Order Status Email with Order Status Description  (Read 42023 times)

_fD_

  • Jr. Member
  • **
  • Posts: 118
    • Printdesign :: Joomla! CMS Webdesign :: Apple Computer Support
Order Status Email with Order Status Description
« on: May 04, 2008, 17:25:59 pm »
Hello all

For easier management of order status i made a hack in the ps_order.php to send the text from order_status_description also in the email:

VirtueMart 1.1.3 ps_order.php (The file is attached as txt):

Line 308:
Original:
Quote
      $q = "SELECT first_name,last_name,user_email,order_status_name FROM #__{vm}_order_user_info,#__{vm}_orders,#__{vm}_order_status ";

New with order status description:
Quote
      $q = "SELECT first_name,last_name,user_email,order_status_name,order_status_description FROM #__{vm}_order_user_info,#__{vm}_orders,#__{vm}_order_status ";

Lines 317 to 335:
Original:
Quote
      $message = $VM_LANG->_('HI',false) .' '. $db->f("first_name") . ($db->f("middle_name")?' '.$db->f("middle_name") : '' ). ' ' . $db->f("last_name") . ",\n\n";
      $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_1',false)."\n\n";

      if( !empty($d['include_comment']) && !empty($d['order_comment']) ) {
         $message .= $VM_LANG->_('PHPSHOP_ORDER_HISTORY_COMMENT_EMAIL',false).":\n";
         $message .= $d['order_comment'];
         $message .= "\n____________________________________________________________\n\n";
      }

      $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_2',false)."\n";
      $message .= "____________________________________________________________\n\n";
      $message .= $db->f("order_status_name");
      $message .= "\n____________________________________________________________\n\n";
      $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_3',false)."\n";
      $message .= $url;
      $message .= "\n\n____________________________________________________________\n";
      $message .= $dbv->f("vendor_name") . " \n";
      $message .= $mosConfig_live_site."\n";
      $message .= $dbv->f("contact_email");

New with order status description and put the comment under this text:
Quote
      $message = $VM_LANG->_('HI',false) .' '. $db->f("first_name") . ($db->f("middle_name")?' '.$db->f("middle_name") : '' ). ' ' . $db->f("last_name") . ",\n\n";
      $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_1',false) .' '. $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_2',false)."\n\n";
      $message .= $db->f("order_status_name")."\n\n";
      $message .= $db->f("order_status_description")."\n\n";
      if( !empty($d['include_comment']) && !empty($d['order_comment']) ) {
         $message .= $VM_LANG->_('PHPSHOP_ORDER_HISTORY_COMMENT_EMAIL',false).":\n";
         $message .= $d['order_comment'];
         $message .= "\n____________________________________________________________\n\n";
      }
      $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_3',false)."\n";
      $message .= $url;
      $message .= "\n\n____________________________________________________________\n";
      $message .= $dbv->f("vendor_name") . " \n";
      $message .= $mosConfig_live_site."\n";
      $message .= $dbv->f("contact_email");

Now you can fill in some status text in the order status description and for individuell comments you fill in a comment.

Hope you like it and take it in to the core  :P.

Best Regards, Urs

[attachment cleanup by admin]

RedLight Traitor

  • Jr. Member
  • **
  • Posts: 50
  • Hooray for Joomla!
    • Los Angeles Joomla Website Development and SEO Services
Re: Order Status Email with Order Status Description
« Reply #1 on: June 03, 2008, 02:00:19 am »
Wow thanks! You would think they would have made this link already. Good job.
www.shopknowlabel.com
www.chickarita.org
www.coverplayard.com

If I can be of any assistance to you, please don't  hesitate to skype me at "redlighttraitor" Thanks for all who have helped me! - Johnny
Joomla Website Development and Los Angeles SEO Services
www.redlightfusion.com

_fD_

  • Jr. Member
  • **
  • Posts: 118
    • Printdesign :: Joomla! CMS Webdesign :: Apple Computer Support
Re: Order Status Email with Order Status Description
« Reply #2 on: November 24, 2008, 22:54:08 pm »
Hello all,

here is the actual file for VM 1.1.2 @version $Id: ps_order.php 1529.

Please add it to the core ;-).

Best regards, Urs



[attachment cleanup by admin]

bulesz

  • Jr. Member
  • **
  • Posts: 194
Re: Order Status Email with Order Status Description
« Reply #3 on: January 03, 2009, 10:54:13 am »
Will try, thanks for this bro! ;)

BASiK

  • Beginner
  • *
  • Posts: 6
Re: Order Status Email with Order Status Description
« Reply #4 on: September 03, 2009, 03:53:29 am »
Dude your epic! EXACTLY what I needed, you rock!

ThestraL

  • Beginner
  • *
  • Posts: 10
allowing HTML in Order Status Descriptions
« Reply #5 on: September 06, 2009, 00:49:30 am »
That's what i was looking for. Many thanks bro :)

Btw ppl, If you are interested in allowing HTML in Order Status Descriptions, you can find the solution at my topic ;)

---> http://forum.virtuemart.net/index.php?topic=59977.msg197214#msg197214

dj_hardbeat

  • Beginner
  • *
  • Posts: 24
Re: Order Status Email with Order Status Description
« Reply #6 on: October 11, 2009, 03:53:07 am »
Thank you very much! Very helpfull hack!  :)

Should be implemented in the new version!

_fD_

  • Jr. Member
  • **
  • Posts: 118
    • Printdesign :: Joomla! CMS Webdesign :: Apple Computer Support
Re: Order Status Email with Order Status Description
« Reply #7 on: November 24, 2009, 09:39:07 am »
Welcome Guys  ;D

With the best wishes for all. Urs

Lylene

  • Jr. Member
  • **
  • Posts: 118
Re: Order Status Email with Order Status Description
« Reply #8 on: November 24, 2009, 17:57:52 pm »
Hello fD !

Thanks for this great hack that I just installed on production site !
Very helpfull !

I have a little last question if you don't mind : I'm using SH404SEF and made some changes on the link that leads to the detailed order page on web site :

I changed from :

$url = SECUREURL."index.php?option=com_virtuemart&page=account.order_details&order_id=".urlencode($d["order_id"]).'&Itemid='.$sess->getShopItemid();

to a more "readable" url :

$url = SECUREURL."See_my_order-id".urlencode($d["order_id"].".html");

But, there is a but :)

Some clients clicks on it without beeing connected, and sometimes if this URL is not know by sh404SEF, they get a 404 ...


So my question is : is there a way to "hide" the big ugly URL and link it to a text like :

"Click here for your detailed order"

Like it is with the order confirmation email :
$footer_html = '<a title="'.$VM_LANG->_('PHPSHOP_CHECKOUT_EMAIL_SHOPPER_HEADER5').'" href="'.$order_link.'">'
. $VM_LANG->_('PHPSHOP_CHECKOUT_EMAIL_SHOPPER_HEADER5').'</a>';


--> But I can't make it work that way

Thakns in advance

Lylene

BillRayDrums

  • Beginner
  • *
  • Posts: 13
Re: Order Status Email with Order Status Description
« Reply #9 on: December 15, 2009, 00:24:51 am »
Hello all

I've implemented the hack to allow the status message change to display the status change description. Now I'd like to bug a little further and ask for assistance in how do I format that email with the company name and header at the top?

I'm somewhat new to PHP but am rapidly absorbing it's power. :D

Any help is greatly appreciated.

billysundar

  • Beginner
  • *
  • Posts: 2
Re: Order Status Email with Order Status Description
« Reply #10 on: January 25, 2010, 03:07:40 am »
Is there a way to send the Order Confirmation email when the order status change? We have a need to send the item descriptions and the order information as well.

Cheers.

ZS

  • Beginner
  • *
  • Posts: 4
Re: Order Status Email with Order Status Description
« Reply #11 on: February 03, 2010, 13:19:48 pm »
Looks like an awesome hack. Does it work with Vmart 1.1.4?

_fD_

  • Jr. Member
  • **
  • Posts: 118
    • Printdesign :: Joomla! CMS Webdesign :: Apple Computer Support
Re: Order Status Email with Order Status Description
« Reply #12 on: February 10, 2010, 15:45:49 pm »
Hello Guys,

you can download the file for Virtuemart 1.1.4 following:

http://www.frefeldigital.com/index.php?option=com_content&view=article&id=140:virtuemart-hacks&catid=88&Itemid=184

Best regards
Urs


thomas80

  • Beginner
  • *
  • Posts: 17
Re: Order Status Email with Order Status Description
« Reply #13 on: April 07, 2010, 22:07:19 pm »
Hallo Urs,
sorry... veeery stupid question from a newbie...
And where can i find the ps_order.php to replace it?
Thanks for your help,
Thomas

... just found it...
/administrator/components/com_virtuemart/classes

vitovito

  • Beginner
  • *
  • Posts: 31
Re: Order Status Email with Order Status Description
« Reply #14 on: May 17, 2010, 16:33:52 pm »
Is there anybody cn pass me the hack to apply since I got other hack I can not just use the ps order file you posted.
Virtuemart 1.1.4
Many thanks great hack