Skip to main content

Add column in invoice product list?

More
14 years 3 months ago #54436 by glemon
I have a custom field in product that i would like to show on the shipping invoice. How can I show this custom field?

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #54484 by nicolas
You will have to edit the file "invoice" of the view "order" for your back end template via the menu Display->Views and add your code there to add the custom field column.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #54552 by glemon
I have tried, as described in this thread: www.hikashop.com/en/forum/2-general-talk...g-invoice.html#38726

But i don't know where to insert the code. My PHP-skills are not good, but I made an extra column in the product list, but it will not show the values of my custom field. The column I insert is blank. The heading is ok.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #54576 by nicolas
Please give more information so that we can help you.
What code did you add so far ?
What custom field are you trying to display (could you do a screenshot of its options?) ?

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #75121 by glemon
I have a custum field called "Lokasjon" in the product table. I want to show this field in the invoice.
I know i should insert the code in the file "invoice" of the view "order".
But I cannot understand where to insert, and what code to add.

In the product list in the invoice I want this field "Lokasjon" to be before or after the excisting field "Product".

This is my settings for the field "Lokasjon":

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago - 13 years 10 months ago #75456 by nicolas
The product name is displayed by this line in the invoice:
<?php echo $product->order_product_name.' '.$product->order_product_code;?>

just add after it the code:
<?php $productClass = hikashop_get('class.product');
$productData = $productClass->get($product->product_id);
echo $productData ->lokasjon; ?>
Last edit: 13 years 10 months ago by nicolas.

Please Log in or Create an account to join the conversation.

Time to create page: 0.190 seconds
Powered by Kunena Forum