PDF plugin questions

  • Posts: 113
  • Thank you received: 18
12 years 1 month ago #66835

When the billing and shipping address are both printed, they're not aligned. The shipping address to the right is a little above the billing address. How can I align them?

Is there any way, or are there plans to include product images in the invoice?
Any easy way to modify the appearance of the PDF invoice?

Please Log in or Create an account to join the conversation.

  • Posts: 82728
  • Thank you received: 13343
  • MODERATOR
12 years 1 month ago #67088

We don't have alignment problem on the billing/shipping address on our end.

Could you give a PDF ?
Did you change something in the invoice code ?
There is no plan yet to include images for now.
But we can add that to the todo list.

If you want to change the PDF file appearance, you need to edit the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php

Please Log in or Create an account to join the conversation.

  • Posts: 113
  • Thank you received: 18
12 years 1 month ago #67233

Sample invoice attached.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82728
  • Thank you received: 13343
  • MODERATOR
12 years 1 month ago #67252

Please try to change the code:

if(empty($order->$oneAddress)) continue; ?>
<td>

to:
if(empty($order->$oneAddress)) continue; ?>
<td valign="top">

in the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php and that should help for the alignment

Please Log in or Create an account to join the conversation.

  • Posts: 113
  • Thank you received: 18
12 years 1 month ago #67369

Edit made, but it did not fix the alignment.

Last edit: 12 years 1 month ago by csymmonds.

Please Log in or Create an account to join the conversation.

  • Posts: 82728
  • Thank you received: 13343
  • MODERATOR
12 years 1 month ago #67382

It works fine for us. Can you please provide the whole code you have now in the invoice.php file ?

Last edit: 12 years 1 month ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 113
  • Thank you received: 18
12 years 1 month ago #67405

Attached, renamed to .txt extension

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82728
  • Thank you received: 13343
  • MODERATOR
12 years 1 month ago #67654

Mmm. I don't see why you would have that problem with that code.

Maybe you could try to change the line:
<td valign="top">

to:
<td valign="top"><br/>

but I don't have much ideas...

Please Log in or Create an account to join the conversation.

  • Posts: 113
  • Thank you received: 18
12 years 1 month ago #67827

That didn't fix the alignment either.

Unrelated - I edited the address_template (front-end and backend templates), but the PDF address doesn't match the template.
Is there someplace else I need to edit the address format for the PDF to use the correct format?

Last edit: 12 years 1 month ago by csymmonds.

Please Log in or Create an account to join the conversation.

  • Posts: 82728
  • Thank you received: 13343
  • MODERATOR
12 years 1 month ago #67929

I'm out of ideas on the alignment of the addresses on your PDF.

The PDF invoice cannot user the address_template view file.
So you need to change it in the same file plugins/hikashop/attachinvoice/attachinvoice/invoice.php

It's that block of code:

<?php
					if(!empty($order->$oneAddress->address_company)) echo $order->$oneAddress->address_company.'<br/>';
					echo $order->$oneAddress->address_title.' '.$order->$oneAddress->address_firstname.' '.$order->$oneAddress->address_lastname.'<br/>';
					echo $order->$oneAddress->address_street.'<br/>';
					echo $order->$oneAddress->address_post_code.' '.$order->$oneAddress->address_city.' '.$order->$oneAddress->address_state.'<br/>';
					echo $order->$oneAddress->address_country.'<br/>';
					if(!empty($order->$oneAddress->address_telephone)) echo JText::sprintf('TELEPHONE_IN_ADDRESS',$order->$oneAddress->address_telephone).'<br/>';
					if(!empty($order->$oneAddress->address_vat)) echo JText::_('VAT_NUMBER').' : '.$order->$oneAddress->address_vat.'<br/>';
					?>

The following user(s) said Thank You: csymmonds

Please Log in or Create an account to join the conversation.

  • Posts: 113
  • Thank you received: 18
12 years 1 month ago #67948

Strange...commenting out the country fixed the alignment.

// echo $order->$oneAddress->address_country.'<br/>';

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
11 years 2 days ago #130758

Joomla - 2.5
HikaShop - 2.2.2.

I have a similar problem... The Billing and Shipping addresses on the invoices do not align with quest registrations... however they do with Registered Users to the site. I have tried the tips on the thread with no success.

FYI... I have the "Add Invoice Plugin" installed and I am using the "Quest/ Registered switch" at checkout.

Attachments:
Last edit: 11 years 2 days ago by oxheadproductions.

Please Log in or Create an account to join the conversation.

  • Posts: 113
  • Thank you received: 18
11 years 1 day ago #130781

Try reducing the padding for .addresses, e.g.

change....
.addresses td{padding-left:50px;}
to:
.addresses td{padding-left:25px;}

The following user(s) said Thank You: nicolas, oxheadproductions

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
11 years 1 day ago #130878

thanks for the reply... however I can't find the file to edit.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 1 day ago #130907

Hi,

The file to edit is: plugins/hikashop/attachinvoice/attachinvoice/invoice.php
You have to edit the css code at the top of the file.

The following user(s) said Thank You: oxheadproductions

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
11 years 1 day ago #130908

BINGO... thanks again for the excellent support. Works great.

Please Log in or Create an account to join the conversation.

Time to create page: 0.105 seconds
Powered by Kunena Forum