Hello,

Can you tell me how I can edit the template so that I can put my bank details in on the bottom line, rather than "foobank" etc. Also, is it possible to edit the order of fields in the address so that the postcode comes after the city, as is usual in the UK?

Thanks,

Comments

edrob06’s picture

I have spent a lot of time customizing the template and module itself.

If you go to the module folder then go templates folder then the template files are there.

If you are worried about messing the template up you can copy the two file there and rename them.

As for your specific example I changed the order as well as added a state field as well as I am in the US and that is part of our postal code.

I also added some code at the top that formats the name/company so that if it is a Company name is present it is large and bold, if there is a fullname it is smaller and directly below company. If there is no company name it sets the full name to be large and bold as the company name was. I think this looks a lot more professional.

    <td class="one">
     
     <div class="client-wrapper">';
	 
		//If there is a company name
       if (!empty($invoice->customer['company_name'])) {
			if (!empty($invoice->customer['fullname'])) {
				//If there is a fullname
				echo '<div class="company-name">'. $invoice->customer['company_name'] .'</div>';
				echo '<div class="fullname break">'. $invoice->customer['fullname'] .'</div>';
			}
			else{
				echo '<div class="company-name break">'. $invoice->customer['company_name'] .'</div>';
			}
       }
	   else{
	   //if there is not a company name
	    echo '<div class="fullnameOnly break">'. $invoice->customer['fullname'] .'</div>';
	   }

  echo '
       <div class="address"><span class="street">'. $invoice->customer['street'] .'</span> <span class="building-number">'. $invoice->customer['building_number'] .'</span></div>
       <div class="zipcode-city"><span class="city">'. $invoice->customer['city'] .', </span><span class="state">'. $invoice->customer['state'] .'. </span><span class="zipcode">'. $invoice->customer['zipcode'] .'</span> </div>
       <div class="country break">'. $invoice->customer['country'] .'</div>
       <div class="description">'. $invoice->customer['description'] .'</div>
     </div>
    </td>

So the sections of code which look like this <span class="street">'. $invoice->customer['street'] .'</span> are the ones you want to move, be careful to keep the tags together correctly or you will get some errors or bad formatting. The spans allows for formatting of specific fields.

Also be sure to remove this <span class="state">'. $invoice->customer['state'] .'. </span> unless you add a state field to the module.

pietervogelaar’s picture

Status: Active » Closed (won't fix)