- Posts: 10
- Thank you received: 0
Display custom fields (textarea) on invoices
10 years 10 months ago #223151
by N1G3L
Display custom fields (textarea) on invoices was created by N1G3L
-- HikaShop version -- : 2.7
-- Joomla version -- : 2.5
Hi,
I have added a custom field (textarea) for a customer to add Shipping notes during checkout. I want the data from this textarea to show up on the invoices. I have tried adding the code to the invoice template:
<?php echo "Shipping Notes: ".$this->order->shippingnotes; ?>
where 'shippingnotes' is the column name. When I add this to the invoice template it only shows the string 'Shipping Notes:' but does not show the info that the customer filled out.
Any ideas?
-- Joomla version -- : 2.5
Hi,
I have added a custom field (textarea) for a customer to add Shipping notes during checkout. I want the data from this textarea to show up on the invoices. I have tried adding the code to the invoice template:
<?php echo "Shipping Notes: ".$this->order->shippingnotes; ?>
where 'shippingnotes' is the column name. When I add this to the invoice template it only shows the string 'Shipping Notes:' but does not show the info that the customer filled out.
Any ideas?
Please Log in or Create an account to join the conversation.
10 years 10 months ago #223198
by nicolas
Replied by nicolas on topic Display custom fields (textarea) on invoices
Hi,
In which file exactly are you adding that code ?
Do you use the PDF invoice plugin ?
Could you provide a screenshot of the settings of your custom field ?
In which file exactly are you adding that code ?
Do you use the PDF invoice plugin ?
Could you provide a screenshot of the settings of your custom field ?
Please Log in or Create an account to join the conversation.
10 years 10 months ago #223233
by N1G3L
Replied by N1G3L on topic Display custom fields (textarea) on invoices
Hi Nicolas,
I am editing the invoice file under Display>Views. I am not using the PDF invoice plugin
Attached (screenshot.jpg) is an image of how my custom field is set up. And screenshot1.jpg is how it is showing up on the invoice
I am editing the invoice file under Display>Views. I am not using the PDF invoice plugin
Attached (screenshot.jpg) is an image of how my custom field is set up. And screenshot1.jpg is how it is showing up on the invoice
Please Log in or Create an account to join the conversation.
10 years 9 months ago #223235
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Display custom fields (textarea) on invoices
Hi,
Your custom field is an "address" custom field ; so you won't be able to access to the data through " $this->order->shippingnotes " because it is not an order custom field.
You should read the content in the shipping address data of the order.
Regards,
Your custom field is an "address" custom field ; so you won't be able to access to the data through " $this->order->shippingnotes " because it is not an order custom field.
You should read the content in the shipping address data of the order.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: huwhuw
Please Log in or Create an account to join the conversation.
10 years 9 months ago #223420
by N1G3L
Replied by N1G3L on topic Display custom fields (textarea) on invoices
And how would I go about doing that?
I've tried: <?php echo "Shipping Notes: ".$this->shipping_address->shippingnotes; ?>
and : <?php echo "Shipping Notes: ".$this->address->shippingnotes; ?>
Am I missing something?
I've tried: <?php echo "Shipping Notes: ".$this->shipping_address->shippingnotes; ?>
and : <?php echo "Shipping Notes: ".$this->address->shippingnotes; ?>
Am I missing something?
Please Log in or Create an account to join the conversation.
10 years 9 months ago #223421
by N1G3L
Replied by N1G3L on topic Display custom fields (textarea) on invoices
Actually I got it to display by adding {shippingnotes} to the address_template file, but what I really want to do is have it displayed at the bottom of the invoice under Shipping method, Payment method (see attachment)
Please Log in or Create an account to join the conversation.
10 years 9 months ago #223455
by nicolas
Replied by nicolas on topic Display custom fields (textarea) on invoices
Hi,
Custom address fields are there to complete the addresses.
If you want fields related to the whole order, then you should instead create custom fields of the table "order" via the menu Display>Custom fields.
The customer will also be able to fill them during the checkout and they will appear where you want on your invoices.
Custom address fields are there to complete the addresses.
If you want fields related to the whole order, then you should instead create custom fields of the table "order" via the menu Display>Custom fields.
The customer will also be able to fill them during the checkout and they will appear where you want on your invoices.
Please Log in or Create an account to join the conversation.
Time to create page: 0.188 seconds