[TomatoCart] Invalid Address Format of Invoice and Packing Slip for US

Some users from United States complain that they are unable to use the INVOICE and PACKING SLIP because the address format is invalid. 

Currently the format of the address on these documents is:

Name
Address
Zip City
United States of America
email address

The address for the invoice and packing slip in the USA should be:

Name
Address
City State Zip

Snip20140727_5

Usually the Phone – Email – Country are not included on the address label, however they could be.

Now, I will teach you how to remove the redundant information such as email address and phone from invoice and packing slip.

Step 1. Go to admin > includes > classes > toc_pdf.php.

Step 2. Find following code snippet:

      $this->MultiCell(100, 4, $this->_customer_info['name'] . "\n" . 
                               $this->_customer_info['street_address'] . " " . $this->_customer_info['suburb'] . "\n" .
                               $this->_customer_info['postcode'] . " " . $this->_customer_info['city'] . "\n" .
                               $this->_customer_info['country_title']  . "\n" . 
                               $this->_customer_info['email_address'], 0, 'L');

Step 3. Please replace above code with following code snippet:

$this->SetFont(TOC_PDF_FONT, 'B', TOC_PDF_HEADER_BILLING_INFO_FONT_SIZE);
      $this->SetY(TOC_PDF_POS_ADDRESS_INFO_Y);
      $this->MultiCell(100, 4, $this->_customer_info['name'] . "\n" . 
                               $this->_customer_info['street_address'] . " " . $this->_customer_info['suburb'] . "\n" .
                               $this->_customer_info['city'] . ' ' . $this->_customer_info['state'] . ' ' . $this->_customer_info['postcode'] . "\n");

Step 4. Go to admin > includes > modules > pdf > packagingslip.php.

Step 5. Find following code snippet:

$this->_pdf->MultiCell(100, 4, $shipping_address['name'] . "\n" . $shipping_address['street_address'] . " " . $shipping_address['suburb'] . "\n" . $shipping_address['postcode'] . " " . $shipping_address['city'] . "\n" . $shipping_address['country_title']  . "\n" . $shipping_address['email_address'], 0, 'L');

Step 6. Replace above code with following code:

$this->_pdf->MultiCell(55, 4, $osC_Language->get('operation_heading_invoice_number') . ':' . "\n" . $osC_Language->get('operation_heading_invoice_date') . ':' . "\n" . $osC_Language->get('operation_heading_order_id') . ':' , 0, 'L');

Now, both the pdf format for invoice and packing slip will be correct for US users.

Snip20140727_5

Snip20140727_6

That’s it.

If you can’t apply the code changes for your store by yourself, please just contact support@tomatocart.com to get technical support. We provide free technical support service for arvixe users.

Looking for quality web hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , | Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

2 Comments on [TomatoCart] Invalid Address Format of Invoice and Packing Slip for US

  1. ramachandran says:

    sir, i want work in mturk site, please help me sir,

    what i to do sir?

    • Jack Yin Jack Yin says:

      Hi,

      Please find a developer in the community to adjust the code for you based on this article. If you can’t find anyone to do it, please contact me via waring3yin@icloud.com. I will do utmost to apply the code for your store. But, i have to spend my valuable work time on it. So, i have to charge $10 – $20 as service fee for it. Is it acceptable for you?

Leave a Reply

Your email address will not be published. Required fields are marked *