X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Invoice address mod for 4.3.2 (https://forum.x-cart.com/showthread.php?t=55651)

Sisom 09-21-2010 11:05 PM

Invoice address mod for 4.3.2
 
Hi, for some strange reason, Qualiteam coded the invoice so that it displayed address lines one and two as part of the same table cell, with a line break, so that I had:

Address (Line 1): 10 High Street
Fulchester
Address (Line 3): Manchester
City: Etc.


(I had changed my address labels to say "Address (Line 1)" "Address (Line 2)" and "Address (Line 3)", because some customers have addresses that don't fit into the standard terminology.)

So I came up with the following mod., which displays the addresses like this:

Address (Line 1): 10 High Street
Address (Line 2): Fulchester
Address (Line 3): Manchester

and also doesn't display "Address (Line X):" if there is no address data there (normally this will be Line 3).


Edit skin1\mail\html\order_invoice.tpl, from line 188 to about line 295, pasting the following RED bits of code over what used to be there for the address fields:

Code:

{if $_userinfo.default_fields.b_address}
                <tr>
                  <td><strong>{$lng.lbl_address}:</strong> </td>
                  <td>{$order.b_address}</td>
                </tr>
              {/if}

              {if $order.b_address_2}
                <tr>
                  <td><strong>{$lng.lbl_address_2}:</strong> </td>
                  <td>{$order.b_address_2}</td>
                </tr>
              {/if}
             
              {if $order.b_city}
                <tr>
                  <td><strong>{$lng.lbl_city}:</strong> </td>
                  <td>{$order.b_city}</td>
                </tr>
              {/if}


              {if $_userinfo.default_fields.b_county && $config.General.use_counties eq 'Y'}
                <tr>
                  <td><strong>{$lng.lbl_county}:</strong> </td>
                  <td>{$order.b_countyname}</td>
                </tr>
              {/if}

              {if $_userinfo.default_fields.b_state}
                <tr>
                  <td><strong>{$lng.lbl_state}:</strong> </td>
                  <td>{$order.b_statename}</td>
                </tr>
              {/if}

              {if $_userinfo.default_fields.b_country}
                <tr>
                  <td><strong>{$lng.lbl_country}:</strong> </td>
                  <td>{$order.b_countryname}</td>
                </tr>
              {/if}

              {if $_userinfo.default_fields.b_zipcode}
                <tr>
                  <td><strong>{$lng.lbl_zip_code}:</strong> </td>
                  <td>{$order.b_zipcode}</td>
                </tr>
              {/if}

              {foreach from=$_userinfo.additional_fields item=v}
                {if $v.section eq 'B'}
                  <tr>
                    <td><strong>{$v.title}:</strong></td>
                    <td>{$v.value}</td>
                  </tr>
                {/if}
              {/foreach}

            </table>

          </td>
          <td>&nbsp;</td>
          <td>

            <table cellspacing="0"{if $is_nomail ne 'Y'} cellpadding="0" width="100%" border="0"{/if} summary="{$lng.lbl_shipping_address|escape}">

              {if $_userinfo.default_fields.s_title}
                <tr>
                  <td><strong>{$lng.lbl_title}:</strong></td>
                  <td>{$order.s_title}</td>
                </tr>
              {/if}

              {if $_userinfo.default_fields.s_firstname}
                <tr>
                  <td><strong>{$lng.lbl_first_name}:</strong> </td>
                  <td>{$order.s_firstname}</td>
                </tr>
              {/if}

              {if $_userinfo.default_fields.s_lastname}
                <tr>
                  <td><strong>{$lng.lbl_last_name}:</strong> </td>
                  <td>{$order.s_lastname}</td>
                </tr>
              {/if}

              {if $_userinfo.default_fields.s_address}
                <tr>
                  <td><strong>{$lng.lbl_address}:</strong> </td>
                  <td>{$order.s_address}</td>
                  </tr>
              {/if}
             
              {if $order.s_address_2}
                <tr>
                  <td><strong>{$lng.lbl_address_2}:</strong> </td>
                  <td>{$order.s_address_2}</td>
                </tr>
              {/if}
             

              {if $order.s_city}
                <tr>
                  <td><strong>{$lng.lbl_city}:</strong> </td>
                  <td>{$order.s_city}</td>
                </tr>
              {/if}


The parts in red are the new parts.


All times are GMT -8. The time now is 02:29 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.