View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001438 | OXID eShop (all versions) | 1.05. Users | public | 2009-11-02 18:19 | 2010-03-05 17:58 |
Reporter | tomas_liubinas | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 4.3.0 revision 26948 | ||||
Summary | 0001438: Order and newsletter emails show MR or MRS instead of localized salutation | ||||
Description | Order and newsletter emails show internal MR or MRS salutation value instead of localized salutation. Should show "Herr"/"Frau" or "Mr/Mrs" in original language. | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.2.6 | ||||
Database Version | 5.0.33 | ||||
related to | 0000535 | closed | tomas_liubinas | OXID eShop (all versions) | if user registers as female in DE lang, after switching to EN she will be shown as male |
has duplicate | 0001439 | closed | OXID eShop (all versions) | New salutation implementation is missing in E-Mail Templates and oxorder table | |
related to | 0001665 | resolved | arvydas_vapsva | module PayPal | PayPal-Express - user has no salutation |
|
[UPDATE 2010-05-31: This behavior is deprecated please check the final solution below] The way to solve this problem: Replacing [{ $order->oxorder__oxbillsal->value }] with [{assign var=_sal value=$order->oxorder__oxbillsal->value}] [{oxmultilang ident="SALUTATION_$_sal" noerror="yes" alternative=$_sal }] in email templates and 'oxordersendplainemail', 'oxordersendemail' CMS templates. Similary you should replace: [{ $user->oxuser__oxsal->value }] with [{assign var=_sal value=$user->oxuser__oxsal->value}] [{oxmultilang ident="SALUTATION_$_sal" noerror="yes" alternative=$_sal }] in 'oxnewsletteremail', 'oxnewsletterplainemail', 'oxregisteremail', 'oxregisterplainemail', 'oxupdatepassinfoemail' and 'oxupdatepassinfoplainemail' CMS pages. Also you should use translations with any salutation fields (oxuser__oxsal, oxorder__oxbillsal, oxorder__oxsal) |
|
Hello tomas, your solution works in the tempalte files but this don´t work in the cms pages. the salutation in emails is "MR", it´s should show "Herr". |
|
The problem occurs in pdf generator too. The following code solved it: protected function _setBillingAddressToPdf( $oPdf ) { $oPdf->setFont( 'Arial', '', 10 ); if (strtolower($this->oxorder__oxbillsal->value) == 'mr') $sText = $this->translate( 'GENERAL_SALUTATION_MR' ); elseif (strtolower($this->oxorder__oxbillsal->value) == 'mrs') $sText = $this->translate( 'GENERAL_SALUTATION_MRS' ); else $sText = $this->oxorder__oxbillsal->value; $oPdf->text( 15, 59, $sText ); $oPdf->text( 15, 63, $this->oxorder__oxbilllname->value.' '.$this->oxorder__oxbillfname->value ); $oPdf->text( 15, 67, $this->oxorder__oxbillcompany->value ); $oPdf->text( 15, 71, $this->oxorder__oxbillstreet->value.' '.$this->oxorder__oxbillstreetnr->value ); $oPdf->setFont( 'Arial', 'B', 10 ); $oPdf->text( 15, 75, $this->oxorder__oxbillzip->value.' '.$this->oxorder__oxbillcity->value ); $oPdf->setFont( 'Arial', '', 10 ); $oPdf->text( 15, 79, $this->oxorder__oxbillcountry->value ); } protected function _setDeliveryAddressToPdf( $oPdf ) { $oPdf->setFont( 'Arial', '', 6 ); $oPdf->text( 15, 87, $this->translate( 'ORDER_OVERVIEW_PDF_DELIVERYADDRESS' ) ); $oPdf->setFont( 'Arial', '', 10 ); if (strtolower($this->oxorder__oxdelsal->value) == 'mr') $sText = $this->translate( 'GENERAL_SALUTATION_MR' ); elseif (strtolower($this->oxorder__oxdelsal->value) == 'mrs') $sText = $this->translate( 'GENERAL_SALUTATION_MRS' ); else $sText = $this->oxorder__oxdelsal->value; $oPdf->text( 15, 91, $sText ); $oPdf->text( 15, 95, $this->oxorder__oxdellname->value.' '.$this->oxorder__oxdelfname->value ); $oPdf->text( 15, 99, $this->oxorder__oxdelcompany->value ); $oPdf->text( 15, 103, $this->oxorder__oxdelstreet->value.' '.$this->oxorder__oxdelstreetnr->value ); $oPdf->setFont( 'Arial', 'B', 10 ); $oPdf->text( 15, 107, $this->oxorder__oxdelzip->value.' '.$this->oxorder__oxdelcity->value ); $oPdf->setFont( 'Arial', '', 10 ); $oPdf->text( 15, 111, $this->oxorder__oxdelcountry->value ); } |
|
--> The problem occurs in pdf generator too. The following code solved it: ... in which file??? Thank you. |
|
excuse me all ;-) it is in modules/invoicepdf/myorder.php now changed it works. thx D3 |
|
problem exists for shipping address in order -> Main tab and order -> addresses tab |
|
See this forum post for a possible solution as well: http://www.oxid-esales.com/forum/showthread.php?p=25797#post25797 |
|
SO the final solution for templates should be this: Replacing [{ $order->oxorder__oxbillsal->value }] with [{ $order->oxorder__oxbillsal->value|oxmultilangsal }] |