Magento: Use customer suffix as salutation

http://www.panticz.de/sites/default/files/magento/salutation/Abstract.php.salutation.diff

--- ./app/code/core/Mage/Customer/Model/Address/Abstract.php.org	2011-01-24 16:10:06.000000000 +0100
+++ ./app/code/core/Mage/Customer/Model/Address/Abstract.php	2011-01-24 16:10:30.000000000 +0100
@@ -53,14 +53,14 @@
         if ($this->getPrefix()) {
             $name .= $this->getPrefix() . ' ';
         }
+        if ($this->getSuffix()) {
+            $name .= $this->getSuffix() . ' ';
+        }
         $name .= $this->getFirstname();
         if ($this->getMiddlename()) {
             $name .= ' ' . $this->getMiddlename();
         }
         $name .=  ' ' . $this->getLastname();
-        if ($this->getSuffix()) {
-            $name .= ' ' . $this->getSuffix();
-        }
         return $name;
     }
 
1

http://www.panticz.de/sites/default/files/magento/salutation/Customer.php.salutation.diff

--- ./app/code/core/Mage/Customer/Model/Customer.php.org	2011-01-19 14:49:48.000000000 +0100
+++ ./app/code/core/Mage/Customer/Model/Customer.php	2011-01-19 16:39:12.000000000 +0100
@@ -182,14 +182,14 @@
         if ($this->getPrefix()) {
             $name .= $this->getPrefix() . ' ';
         }
+        if ($this->getSuffix()) {
+            $name .= $this->getSuffix() . ' ';
+        }
         $name .= $this->getFirstname();
         if ($this->getMiddlename()) {
             $name .= ' ' . $this->getMiddlename();
         }
         $name .=  ' ' . $this->getLastname();
-        if ($this->getSuffix()) {
-            $name .= ' ' . $this->getSuffix();
-        }
         return $name;
     }
 
1

http://www.panticz.de/sites/default/files/magento/salutation/config.xml.salutation.diff

--- ./app/code/core/Mage/Customer/etc/config.xml.org	2011-01-25 12:35:25.000000000 +0100
+++ ./app/code/core/Mage/Customer/etc/config.xml	2011-01-25 12:53:54.000000000 +0100
@@ -101,7 +101,7 @@
                     
                         Text
                         Text One Line
                         true
                         
-
+
                         
                     
                     
                         HTML
                         true
                         
+{{depend prefix}}{{var prefix}} {{/depend}}{{depend suffix}}{{var suffix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}
 {{depend company}}{{var company}}{{/depend}}
 {{if street1}}{{var street1}}{{/if}}
 {{depend street2}}{{var street2}}{{/depend}}
@@ -140,7 +140,7 @@
                     
                         PDF
                         
                     
                         Javascript Template
-                        #{company}#{street0}#{street1}#{street2}#{street3}#{city}, #{region}, #{postcode}#{country_id}T: #{telephone}F: #{fax}]]>
+                        #{company}#{street0}#{street1}#{street2}#{street3}#{city}, #{region}, #{postcode}#{country_id}T: #{telephone}F: #{fax}]]>
                     
                 
             
1

OPTIONAL: fix address block
http://www.panticz.de/sites/default/files/magento/salutation/config.xml.address.diff

--- ./app/code/core/Mage/Customer/etc/config.xml.org	2011-01-25 12:35:25.000000000 +0100
+++ ./app/code/core/Mage/Customer/etc/config.xml	2011-01-25 16:22:52.000000000 +0100
@@ -108,17 +108,17 @@
 {{depend street2}}{{var street2}}{{/depend}}
 {{depend street3}}{{var street3}}{{/depend}}
 {{depend street4}}{{var street4}}{{/depend}}
-{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
+{{if postcode}}{{var postcode}}{{/if}}{{if city}} {{var city}}{{/if}}{{if region}}, {{var region}}{{/if}}
 {{var country}}
-T: {{var telephone}}
-{{depend fax}}F: {{var fax}}{{/depend}}
+Tel: {{var telephone}}
+{{depend fax}}Fax: {{var fax}}{{/depend}}
                         ]]>
                     
                     
                         Text One Line
                         true
                         
-
+
                         
                     
                     
@@ -131,10 +131,10 @@
 {{depend street2}}{{var street2}}{{/depend}}
 {{depend street3}}{{var street3}}{{/depend}}
 {{depend street4}}{{var street4}}{{/depend}}
-{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
+{{if postcode}}{{var postcode}}{{/if}}{{if city}} {{var city}}{{/if}}{{if region}}, {{var region}}{{/if}}
 {{var country}}
-{{depend telephone}}T: {{var telephone}}{{/depend}}
-{{depend fax}}F: {{var fax}}{{/depend}}
+{{depend telephone}}Tel: {{var telephone}}{{/depend}}
+{{depend fax}}Fax: {{var fax}}{{/depend}}
             ]]>
                     
                     
@@ -147,15 +147,15 @@
 {{depend street2}}{{var street2}}|{{/depend}}
 {{depend street3}}{{var street3}}|{{/depend}}
 {{depend street4}}{{var street4}}|{{/depend}}
-{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}|
+{{if postcode}}{{var postcode}}{{/if}}{{if city}} {{var city}}{{/if}}{{if region}}, {{var region}}{{/if}}|
 {{var country}}|
-{{depend telephone}}T: {{var telephone}}{{/depend}}|
-{{depend fax}}F: {{var fax}}{{/depend}}|
+{{depend telephone}}Tel: {{var telephone}}{{/depend}}|
+{{depend fax}}Fax: {{var fax}}{{/depend}}|
             ]]>
                     
                     
                         Javascript Template
-                        #{company}#{street0}#{street1}#{street2}#{street3}#{city}, #{region}, #{postcode}#{country_id}T: #{telephone}F: #{fax}]]>
+                        #{company}#{street0}#{street1}#{street2}#{street3}#{postcode}, #{city}, #{region}#{country_id}T: #{telephone}F: #{fax}]]>
                     
                 
             
1

Links
http://www.magentocommerce.com/boards/v../viewthread/37850/P0/
http://www.magentocommerce.com/boards/viewthread/176907/#t224666
http://www.magentocommerce.com/magento-connect/mxperts/extension/1603/mxperts--customeraddress