Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][PHP]Zamówienia email
mrk9109
post
Post #1





Grupa: Zarejestrowani
Postów: 445
Pomógł: 3
Dołączył: 4.06.2010

Ostrzeżenie: (0%)
-----


Witam mam taką funkcję która odpowiada w moim sklepie za wysyłanie maili

  1. public function sendEmailWithOrderDetails( $iOrder ){
  2. global $lang, $config;
  3.  
  4. $aData = $this->throwOrder( $iOrder );
  5. $aUrls = throwSiteUrls( );
  6. $sOrderUrlEmail = $aUrls['sHomeUrl'].$GLOBALS['oPage']->aPages[$config['order_print']]['sLinkName'].'&sKey='.$this->throwOrderKey( $aData );
  7. $sMailContent = str_replace( '|n|', "\n", $lang['Order_customer_email_head']."\n------------------------\n".$lang['Order_customer_personal']."\n------------------------\n".$aData['sFirstName'].' '.$aData['sLastName'].( isset( $aData['sCompanyName'] ) ? "\n".$aData['sCompanyName'] : null )."\n".$aData['sStreet']."\n".$aData['sZipCode'].' '.$aData['sCity']."\n".$aData['sPhone']."\n".$aData['sEmail'].( isset( $aData['sComment'] ) ? "\n\n".$lang['Comment'].': '.$aData['sComment'] : null )."\n------------------------\n".$lang['Order_customer_products']."\n------------------------".$this->listProducts( $iOrder, true )."\n------------------------\n".( isset( $aData['iShipping'] ) ? $lang['Order_customer_shipping']."\n------------------------\n".$aData['mShipping'].' ('.$aData['mPayment'].') = '.$this->aOrders[$iOrder]['sPaymentShippingPrice'].' '.$config['currency_symbol']."\n\n" : null ).$lang['Summary_cost'].': '.$this->aOrders[$iOrder]['sOrderSummary'].' '.$config['currency_symbol']."\n------------------------\n".$lang['Check_order_status_url']."\n".$sOrderUrlEmail."\n-------------------\n".$lang['Order_customer_email_foot'] );
  8.  
  9. // the following phrase must be present in the email's content. See the license - <a href="http://opensolution.org/licenses.html" target="_blank">http://opensolution.org/licenses.html</a>
  10. $sMailContent .= "\n\n".( LANGUAGE == 'pl' ) ? 'Wysłane przez program Quick.Cart' : 'Sent by the Quick.Cart program';
  11.  
  12. if( $config['send_customer_order_details'] === true ){
  13. @mail( $aData['sEmail'], '=?UTF-8?B?'.base64_encode( $lang['Order_customer_info_title'].$iOrder ).'?=', $sMailContent, 'MIME-Version: 1.0'."\r\n".'Content-type: text/plain; charset=UTF-8'."\r\n".( ( $config['emails_from_header_option'] == 2 ) ? 'Reply-to: '.$config['orders_email'] : 'From: '.$config['orders_email'] ) );
  14. }
  15.  
  16. @mail( $config['orders_email'], '=?UTF-8?B?'.base64_encode( $lang['Order_customer_info_title'].$iOrder ).'?=', $sMailContent, 'MIME-Version: 1.0'."\r\n".'Content-type: text/plain; charset=UTF-8'."\r\n".( ( $config['order_details_from_customer'] === true && $config['emails_from_header_option'] == 1 ) ? 'From: '.$aData['sEmail'] : ( ( $config['emails_from_header_option'] == 1 ) ? 'From: '.$config['orders_email'] : 'Reply-to: '.$aData['sEmail'] ) ) );
  17. }

Moje pytanie brzmi jak przerobić Mailcontent aby zrobić to ładnie estetycznie w htmlu
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.09.2025 - 09:14