Forum Replies Created

Viewing 15 replies - 16 through 30 (of 779 total)
  • Plugin Contributor kluver

    (@kluver)

    Hi @rupalu,

    Are you sure this is related to our PDF Invoices plugin? All our plugin does is generate a PDF invoice (or packing slip) based on the WooCommerce order. It is not responsible for adding any product meta data.

    Plugin Contributor kluver

    (@kluver)

    @williandimas Custom code like the code snippets above should be be added to the functions.php of your child theme or via plugin like Code Snippets. If you haven’t worked with functions.php or code snippets before please read this: How to use filters

    Plugin Contributor kluver

    (@kluver)

    Too bad. A 503 is a generic ‘service unavailable’ issue so it indeed has a small chance of triggering the PHP error log. But thank you for checking it.

    We’ve seen issues like this in the past and those had to do with a large header logo that caused the 503 error. Could you tell me the size of your logo or if you are using any other large image files in your documents?

    Plugin Contributor kluver

    (@kluver)

    Hey @essiej,

    That is unfortunate. Could you check if you get any specific errors in your error log? You can check your logs via WooCommerce > Status > Logs. Please check for a log starting with wpo-wcpdf- that has a timestamp that corresponds with the time you tried to open your PDF document. Let us know what you find!

    • This reply was modified 4 years, 9 months ago by kluver.
    Plugin Contributor kluver

    (@kluver)

    Hi @agricamper,

    Could you check for any specific errors in your logs when creating invoices in bulk? You can check your error logs via WooCommerce > Status > Logs. Check for an error log that starts with wpo_wcpdf_ and a timestamp that corresponds with when you tried to create the invoices. Let us know what you find.

    Plugin Contributor kluver

    (@kluver)

    Hi @meganmedia,

    To display prices excluding tax in your product table and in your subtotal you will need our Premium Templates extension. This will give you access to the Customizer that will let you set this up. Simply set the ‘Price’ and ‘Subtotal’ blocks to ‘Excluding tax’.

    Plugin Contributor kluver

    (@kluver)

    Hi @nsartore,

    Right now you are trying to output your data in a table row (<tr>). This will work for the wpo_wcpdf_after_order_data hook as this will output the data inside the order data table.

    If you want to use the wpo_wcpdf_after_order_details though your code should look something like this:

    add_action( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_order_comments', 10, 2 );
    function wpo_wcpdf_order_comments ($template_type, $order) {
        $document = wcpdf_get_document( $template_type, $order );
        if ($template_type == 'packing-slip') {
            ?>
            <p class="order-comments">Order Notes: <?php $document->custom_field('order_comments'); ?></p>
            <?php
        }
    }

    If you are still having trouble displaying your field check if you are using the correct meta key. If you are having trouble finding the correct meta key read the following guide: Finding WooCommerce custom fields

    Also note that in your code example you are using a combination of smart and straight quotes. This can also crash your code.

    • This reply was modified 4 years, 9 months ago by kluver.
    Plugin Contributor kluver

    (@kluver)

    @completegraphics You can also send us the WP2print plugin so we can have a look at their code. Probably the changes required to make this work smoothly are not that big. And we can send a fix to the developers. So all they have to do is incorporate it in their next release.

    If you can find the time to send us the plugin you can send it, zipped, via a cloud service like WeTransfer.com (our firewall blocks zipped attachments that include scripts) to support@wpovernight.com

    Plugin Contributor kluver

    (@kluver)

    Hi @completegraphics,

    This indeed due to the WP2print plugin. We’ve had another customer with the same issue. As my colleague mentioned it seems they are utilizing filters that are not enabled in all contexts.

    I would suggest contacting their support as this is not something we can fix on our end unfortunately.

    • This reply was modified 4 years, 9 months ago by kluver.
    Plugin Contributor kluver

    (@kluver)

    Hi @eforests,

    Unfortunately we are not allowed to give premium support (for our paid plugins like the Premium Templates extension) on this forum. I would have to kindly ask you to redirect your question to support@wpovernight.com and include your license key in the email. Thank you in advance!

    Plugin Contributor kluver

    (@kluver)

    Hi @remij89,

    You can add an extra line to the order data table on your packing slip, based on the _stock_status order meta, via the following code snippet:

    add_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_add_pre_order_status', 10, 2 );
    function wpo_wcpdf_add_pre_order_status( $template_type, $order ) {
    	if ( $template_type == 'packing-slip' && $order->get_meta( '_stock_status' == 'pre_order' ) ) {
    		?>
    		<tr class="pre-order-status">
    			<th><?php _e( 'Pre-order:', 'woocommerce-pdf-invoices-packing-slips' ); ?></th>
    			<td><?php _e( 'Yes', 'woocommerce-pdf-invoices-packing-slips' ); ?></td>
    		</tr>
    		<?php
    	}
    }

    This code snippet should be added to the functions.php of your child theme or via a plugin like Code Snippets. If you haven’t worked with code snippets or functions.php before please read the following guide: How to use filters

    Also, you mention you are also using our Premium Templates extension. Since we are not allowed to give paid support on this forum I will have to kindly ask you to redirect all future support questions to: support@wpovernight.com

    Plugin Contributor kluver

    (@kluver)

    Hi @sidddddddd,

    Correct. Adding thumbnails to your PDF document is a feature of our Premium Templates extension.

    Plugin Contributor kluver

    (@kluver)

    Hi @kristinubute,

    If you want to leave the existing invoice numbers as they are, and simply want to set your next invoice number to 6000, you can go to WooCommerce > PDF Invoices > Documents > Invoice > Next invoice number.

    If you want to renumber your existing invoices, starting from 6000, we offer a small tool that can help you achieve this. You can download it here: WooCommerce PDF Invoices & Packing Slips Number Tools

    After installing and activating the add-on you will have an extra tab called ‘Number Tools’ in your PDF invoices settings (WooCommerce > PDF Invoices > Number Tools). If you click on ‘Tools’ you will see the option to renumber existing invoices within a certain timeframe. Before renumbering you will first have to set the next invoice number to 6000. Then set your timeframe and click on ‘Renumber invoices’.

    You can set the invoice number to be equal to the order number via WooCommerce > PDF Invoices > Documents > Invoice > Display invoice number. But this means you will not be able to set it to start at 6000 and that gaps can occur in your invoice number sequence, which in most countries is illegal.
    To understand the difference between order numbers and invoice numbers, and why we would always suggest to use our separate invoice number sequence, please read the following article: Invoice numbers explained

    Plugin Contributor kluver

    (@kluver)

    Hi @christianguevara,

    You can use the wpo_wcpdf_custom_attachment_condition filter do determine if a document should be attached to an email or not. You will need the field name (meta key) of your custom checkout field and its value when the customer selects ‘Yes’.

    So for instance when your field name is attach_pdf_invoice and the value is 1 when the customer wants an invoice your filter would look like this:

    add_filter( 'wpo_wcpdf_custom_attachment_condition', 'wpo_wcpdf_send_invoice_on_customer_request', 100, 4 );
    function wpo_wcpdf_send_invoice_on_customer_request( $condition, $order, $status, $template_type ) {
    	if ( $template_type == 'invoice' ) {
    		$condition = $order->get_meta( 'attach_pdf_invoice' ) == 1 ? true : false;
    	}
    }

    If you are having trouble finding the correct meta key and value for your custom field please read the following guide: Finding WooCommerce custom fields

    The above code snippet should be added to the functions.php of your child theme or via a plugin like Code Snippets. If you have never worked with code snippets or functions.php before please read this: How to use filters

    The above filter will only prevent automatically generating and attaching of the invoice to the emails. If you want to prevent all invoice creation, so also prevent it from being manually created, you will need the wpo_wcpdf_document_is_allowed filter. You can apply the same logic:

    add_filter( 'wpo_wcpdf_document_is_allowed', 'wpo_wcpdf_allow_invoice_on_customer_request', 10, 2 );
    function wpo_wcpdf_allow_invoice_on_customer_request( $allowed, $document ) {
    	if ( $document->type == 'invoice' && !empty( $order = $document->order ) ) {
    		$allowed = $order->get_meta( 'attach_pdf_invoice' ) == 1 ? true : false;
    	}
    	return $allowed;
    }
    Plugin Contributor kluver

    (@kluver)

    Hi @supportvdes,

    I think the best course of action is to create a custom template but not copy the whole invoice template to the packing slip template. As this might trigger invoice number creation when you do not want it.

    Simply copy the <tfoot> in the order-details table from the invoice template and add it below the <tbody> in the order-details table of the packing slip template. It will need some slight changes for styling and will look like this:

    <tfoot>
    	<tr class="no-borders">
    		<td class="no-borders"></td>
    		<td class="no-borders" style="width:40%;">
    			<table class="totals">
    				<tfoot>
    					<?php foreach( $this->get_woocommerce_totals() as $key => $total ) : ?>
    					<tr class="<?php echo $key; ?>">
    						<th class="description"><?php echo $total['label']; ?></th>
    						<td class="price"><span class="totals-price"><?php echo $total['value']; ?></span></td>
    					</tr>
    					<?php endforeach; ?>
    				</tfoot>
    			</table>
    		</td>
    	</tr>
    </tfoot>

    Now the totals will also display on your packing slip with the same delivery information as on the invoice.

    If you want this data in the order data table instead of in the totals section you will have to check in the delivery plugin how they are adding this to the totals section in this specific format. And use the same logic within the wpo_wcpdf_before_order_data filter.

Viewing 15 replies - 16 through 30 (of 779 total)