Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi NW,
    In the default WooCommerce checkout, there’s only a billing address and a shipping address, but not an alternative shipping address.

    As such, the invoices use the billing address (this is the person that pays/receives the invoice), and the packing slip uses the shipping address (this is the person that receives the order).

    If you want to print the default woocommerce shipping address on the invoice, you can use the following code:

    <?php $wpo_wcpdf->shipping_address(); ?>

    If you have configured your checkout differently, with an alternative shipping address, you will need to fetch this information manually from the order meta.

    Kind regards,
    Ewout

    Plugin Contributor Ewout

    (@pomegranate)

    @niwin, let me know if the above answers your question or if you need any help!

    Thread Starter Sinkadus

    (@niwin)

    Hi Ewout

    Thanks for your help, but in the end I turned to another invoice to pdf-plugin. It suited my needs better.

    All the best!

    Plugin Contributor Ewout

    (@pomegranate)

    Hi Niwin,
    I’m always looking to improve this plugin, can you tell me what aspect of the other invoice plugin suits your needs better? Thanks in advance!

    Ewout

    Thread Starter Sinkadus

    (@niwin)

    Well… it feels a bit simpler. I like the layout better, plus the fact that I more easily could alter the css to my needs. Also it retrieves both invoice and shipping address as default, whick I like 🙂

    The one thing that it lacks, that yours have, is the WooCommerce order number.

    I suppose that one thing that might make me reconsider, apart from the ability to change the style more easily, is if you would add a text field below the price table. So it would be easier to spread the company info on the invoice.

    But I respect that that kind of customizations are limited to pro templates.

    FYI, links to my invoices:

    Yours: https://www.dropbox.com/s/9emwaj4lioeide6/faktura-479.pdf
    Other: https://www.dropbox.com/s/b9w32sn6vh63jb2/14-0066.pdf

    As you can se, the other layout suits my content better.

    I dont know if this was helpful to you, but I hope it was.

    Thanks again!

    Plugin Contributor Ewout

    (@pomegranate)

    Hi Niwin,
    That’s definitely helpful!

    I have designed the plugin in such a way that it’s very easy to modify the template to your needs: change colors, fonts, images, etc, without the risk of those things being overwritten when you update the plugin (instructions on the settings page). That’s definitely not limited to pro templates. If you want to use the extra fields from the template settings page to display a text field below the price table, you can just insert the following line on line 108 of invoice.php:

    <?php $wpo_wcpdf->extra_1(); ?>

    in that same template you can change billing_address() in line 61 into shipping_address().

    Can you tell me which part of the styles you find hard to change?

    Thread Starter Sinkadus

    (@niwin)

    Okay, you got me to switch back to your plugin 🙂

    Been tweaking my custom template, and got it almost the way I want it. Mayhap you can help me with the last push?

    this is my current pdf: https://www.dropbox.com/s/3y446jbui0r0sgk/faktura-489.pdf

    Now, I’m trying to

    1. Center the logo

    Added a center tag to the class:

    td.header img {
    max-height: 3cm;
    width: auto;
    text-align: center;
    }
    But no effect 🙁

    2. Set the second <tr> as 50% witdh – and left center the text of the second <td>, tried this:

    td.document-type-label {
    width: 50%;
    text-align: right;
    }

    But its not working 🙁

    3. Set the third <tr> as 50% width, tried adding a shipping class and then added this:

    td.shipping-address {
    width: 50%;
    }

    But also not working. Any help would be much appriciated 🙂

    Thanks!

    Plugin Contributor Ewout

    (@pomegranate)

    in your case it’s probably easier add inline styles in the invoice directly, like this:

    <td class="header" align="center">

    and

    <td width="50%">

    1) is not working because you’re trying to change the img while you need to change the cell (just td.header would probably work)
    2) is not working because you’re trying to change the h3, but you need to change the td (doesn’t have a class by default)
    3) not sure where you added the class, but it should be in the td.

    Thread Starter Sinkadus

    (@niwin)

    Sorry for taking up so much of your time – i managed to fix everything but the logo by myself. Was just about to edit my post when I got your answer.

    Will have a go with centering the logo.

    Your help is much appriciated!

    Thanks again 🙂

    Plugin Contributor Ewout

    (@pomegranate)

    You’re welcome! A review would be much appreciated :o)

    Thread Starter Sinkadus

    (@niwin)

    Absolutely – will do it right after this comment.

    I haven’t been able to center the logo, but it doesn’t matter – I made it bigger instead.

    But now there is an other isse: the 50% division of

    billing address <—> shipping adress.

    When I added a middle table to make room for <hr> tags, the width that worked before doesn’t do the job anymore. As you can se here:

    https://www.dropbox.com/s/dhev6qx77ktr2yy/faktura-518.pdf

    My css for these classes are:

    .shipping-address,
    .recipient-address {
    width: 50%;
    }

    Well, if you can make sense of my problem – I’d be very happy. If not, I’ll still give you 5 stars 🙂

    Plugin Contributor Ewout

    (@pomegranate)

    Thanks! I’m afraid I don’t understand. In the PDF you link, I think everything is 50%? Just the order information is aligned right instead of left. Also, did you apply the styles inline as I suggested? Works for me…

    <tr>
    	<td colspan="2" class="header" align="center">
    	<?php $wpo_wcpdf->header_logo(); ?>
    	</td>
    </tr>

    This is the same code as the default simple template, only without the if statement (since you’re using the image anyway). Note the colspan=”2″, since you’re only using one table cell in that row.

    Thread Starter Sinkadus

    (@niwin)

    Well, there are actually two things I don’t get straight:

    1. The invoice info has a limited area instead of all of the 50% (you can se this on the date, that needs two rows to fit).

    2. My shipping address doesn’s align with the “Amount” below. It is somehow only 40% of the whole width.

    Been trying to fix this, but cant get it done :/

    This is the best I can do:

    https://www.dropbox.com/s/9wb9mopo5g04b16/faktura-522.pdf

    If you know what I am doing wrong – dont hesitate to let me know 🙂

    Plugin Contributor Ewout

    (@pomegranate)

    1) I think you might have an additional td in there (the default empty one with  ?)
    2) No idea. If you want everything to align, the best thing to do is use a single table.

    Thread Starter Sinkadus

    (@niwin)

    I managed to fix the date on one row (not sure how though :))

    Also – the header thing worked perfectly – thanks.

    If you dont have a great idea to get my shipping address to align at 50%, I can live with it as it is now.

    Once again – thank you for your great support!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Alt. shipping address not showing up on invoice’ is closed to new replies.