• Resolved orilpik

    (@orilpik)


    Hi, I’m getting this error when personalizing the Invoice. The code is the following

    <table class="order-data-addresses">
    	<tr>
    		<td class="address billing-address">
    		<h3>Propietari/Arrendador</h3><br>
    	Nom i Cognoms: Noèlia Aurora Vilanova Sabau<br>
    	Adre?a: c/Magí Morera, 8, 25006 Lleida (Lleida)<br>
    	NIF: 43732713-F<br>
    	Telèfon: +34 659 464 614 (I?aki)<br>
    	e-mail: [email protected]<br>
    
    	<?php 
    foreach ( $this->get_order_items() as $item_id => $item ) : 
    ?>	
        <span class="item-name">
        <?php 
        if ($item['name'] == 'La Matrix') { 
            echo 'Vehicle: Citr?en-Adria Matrix Axess Matrícula: 3638-LWW<br>Asseguran?a: Liberty Seguros NoPòlissa: 04 Z21 3597620<br>'; 
        }elseif($item['name'] == 'La Coral'){
    		echo 'Vehicle: Citr?en-Adria Coral XL 600DP   Matrícula: 2104-LWG<br>Asseguran?a: Liberty Seguros NoPòlissa: 04 Z21 3572740<br>';
    	} 
        ?> 
        </span>					
    <?php 
    endforeach; 
    ?>
    
    	
    	Assistència 24h des d’Espanya: 900 404 028<br>
    	Assistència 24h des de l’estranger: +34 934 955 125
    		</td>
    		<td class="address billing-address">
    		<h3>Informació del Lloguer</h3>
    		<table>
    		<?php foreach ( $this->get_order_items() as $item_id => $item ) : ?>
    			<tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class', 'item-'.$item_id, esc_attr( $this->get_type() ), $this->order, $item_id ); ?>">
    				<td class="product">
    					<?php $description_label = __( 'Description', 'woocommerce-pdf-invoices-packing-slips' ); // registering alternate label translation ?>
    					<span class="item-name"><?php echo $item['name']; ?></span>
    					<?php do_action( 'wpo_wcpdf_before_item_meta', $this->get_type(), $item, $this->order  ); ?>
    					<span class="item-meta"><?php echo $item['meta']; ?></span>
    					<dl class="meta">
    						<?php $description_label = __( 'SKU', 'woocommerce-pdf-invoices-packing-slips' ); // registering alternate label translation ?>
    						<?php if ( ! empty( $item['sku'] ) ) : ?><dt class="sku"><?php _e( 'SKU:', 'woocommerce-pdf-invoices-packing-slips' ); ?></dt><dd class="sku"><?php echo esc_attr( $item['sku'] ); ?></dd><?php endif; ?>
    						<?php if ( ! empty( $item['weight'] ) ) : ?><dt class="weight"><?php _e( 'Weight:', 'woocommerce-pdf-invoices-packing-slips' ); ?></dt><dd class="weight"><?php echo esc_attr( $item['weight'] ); ?><?php echo esc_attr( get_option( 'woocommerce_weight_unit' ) ); ?></dd><?php endif; ?>
    					</dl>
    					<?php do_action( 'wpo_wcpdf_after_item_meta', $this->get_type(), $item, $this->order  ); ?>
    				</td>
    				<td class="quantity"><?php echo $item['quantity']; ?></td>
    				<td class="price"><?php echo $item['order_price']; ?></td>
    			</tr>
    		<?php endforeach; ?>
    						</table>
    		</td>
    	</tr>
    </table>

    Can anyone help?

Viewing 1 replies (of 1 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @orilpik,

    Please note that we do not provide free support for custom PDF templates, even if you have a valid license for Professional extension or the Professional extension, but this is offered as a custom job for a fee instead. That said, I would like to give you some advice as a courtesy, to try to help you.

    The error you have reported seems to be related with an error in the HTML produced from your template, which cause that the PDF engine to crash (we use dompdf by default).

    You can enable the Output to HTML option in the plugin’s Status tab settings, and look at the HTML source to see if you can find anything unusual. You could also try checking the template output through an HTML validator (like?https://validator.w3.org/#validate_by_input).

    Hope it helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Error trying to generate document: Min/max width is undefined for table rows’ is closed to new replies.