Jump to content
thirty bees forum
  • 0

add $other from invoice and delivery adr to invoice if customer fills field in customer data/registration


Question

Posted

I added into HTMLTemplateInvoice.php /classes/pdf/

$data = [
            'order'                      => $this->order,
            'order_invoice'              => $this->order_invoice,
            'order_details'              => $orderDetails,
            'carrier'                    => $carrier,
            'cart_rules'                 => $cartRules,
            'delivery_address'           => $formattedDeliveryAddress,
            'invoice_address'            => $formattedInvoiceAddress,
            'addresses'                  => ['invoice' => $invoiceAddress, 'delivery' => $deliveryAddress],
            'tax_excluded_display'       => $taxExcludedDisplay,
            'display_product_images'     => $displayProductImages,
            'layout'                     => $layout,
            'customer'                   => $customer,
            'footer'                     => $footer,
            'legal_free_text'            => $legalFreeText,
            'addnote_invoiceadr'     => $invoiceAddress->other, 
            'addnote_deliveryadr'    => $deliveryAddress->other 
        ];
        $this->smarty->assign($data);

Then I added different infomartion into the field "other" in invoice and delivery adress of the customer. But problem is that the invoice shows only the data from the inoice fields.

my template: 

			
				{if $addresses.invoice->other}
					<tr>
					<td class="payment left small grey bold" width="44%">{l s='Zusatzangabe' pdf='true'}</td>
					<td class="payment left white" width="56%">
						<table width="100%" border="0">				
								<tr>
									<td class="right small">
									{$addnote_invoiceadr}
									</td>							
								</tr>				
						</table>
					</td>
					</tr>	
				{/if}
				{if $addresses.delivery->other}
					<tr>
					<td class="payment left small grey bold" width="44%">{l s='Zusatzangabe' pdf='true'}</td>
					<td class="payment left white" width="56%">
						<table width="100%" border="0">				
								<tr>
									<td class="right small">{$addnote_deliveryadr}
									</td>
									
								</tr>				
						</table>
					</td>
					</tr>	
				{/if}

 

What am I missing? 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...