View Issue Details

IDProjectCategoryView StatusLast Update
0001438OXID eShop (all versions)1.05. Userspublic2010-03-05 17:58
Reportertomas_liubinas Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Fixed in Version4.3.0 revision 26948 
Summary0001438: Order and newsletter emails show MR or MRS instead of localized salutation
DescriptionOrder and newsletter emails show internal MR or MRS salutation value instead of localized salutation. Should show "Herr"/"Frau" or "Mr/Mrs" in original language.
TagsNo tags attached.
Theme
BrowserAll
PHP Version5.2.6
Database Version5.0.33

Relationships

related to 0000535 closedtomas_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 resolvedarvydas_vapsva module PayPal PayPal-Express - user has no salutation 

Activities

tomas_liubinas

2009-11-02 18:31

reporter   ~0001992

Last edited: 2010-05-31 10:10

[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)

storage

2009-11-04 13:46

reporter   ~0002003

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".

d3

2009-11-27 10:59

reporter   ~0002133

Last edited: 2009-12-01 09:30

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 );
    }

dcbits

2009-12-11 19:04

reporter   ~0002204

--> The problem occurs in pdf generator too. The following code solved it: ...

in which file???

Thank you.

dcbits

2009-12-11 21:28

reporter   ~0002205

excuse me all ;-)

it is in modules/invoicepdf/myorder.php

now changed it works.

thx D3

birute_meilutyte

2010-02-04 13:56

reporter   ~0002336

problem exists for shipping address in order -> Main tab and order -> addresses tab

marco_steinhaeuser

2010-02-26 15:20

reporter   ~0002374

See this forum post for a possible solution as well:
http://www.oxid-esales.com/forum/showthread.php?p=25797#post25797

tomas_liubinas

2010-03-05 17:57

reporter   ~0002382

SO the final solution for templates should be this:

Replacing
[{ $order->oxorder__oxbillsal->value }]
with
[{ $order->oxorder__oxbillsal->value|oxmultilangsal }]