- Posts: 23
- Thank you received: 0
product code in pdf invoice
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.2
-- PHP version -- : 5.5.11
-- Browser(s) name and version -- : Firefox 31.0
Hi
I use the pdf invoice plugin.
I'd like to display the product code in my pdf invoice.
I'd lke to have the product code with the product name.
I do have the product code in the email but not in the pdf invoice.
What do I need to add?
Thanks in advance
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Note that the display of the PDF invoice is customizable through the file: "plugins/hikashop/attachinvoice/attachinvoice/invoice.php".
Please Log in or Create an account to join the conversation.
Yes I've already customized the invoice but I'm not really good with php coding... So I'm wondering if someone already did that by the past and could give me the piece of code to add in the file.
Please Log in or Create an account to join the conversation.
In that file you just have to add:
Please Log in or Create an account to join the conversation.
I tried implementing
....and both times it gives me an error.
Any solution ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
But I need the Product Code to display in these invoices ?
It use to work with an earlier version like described in this thread. But not with the latest version.
Please Log in or Create an account to join the conversation.
Just add :
echo $product->order_product_code;
where you except to see the code in plugins/hikashop/attachinvoice/attachinvoice/invoice.php
Please Log in or Create an account to join the conversation.
Are you sure that you are editing the file correctly, that there is no other override ?
The given code must still be working, there was no changes in the plugin.
You have maybe added the code at teh wrong place, please try to change the code position and not in a if condition.
Please Log in or Create an account to join the conversation.
ip-studio wrote: Hi
Just add :
echo $product->order_product_code;
where you except to see the code in plugins/hikashop/attachinvoice/attachinvoice/invoice.php
This works fine, and my product code(red underlined) is displaying like this in the invoice:
I need it do display like this (red underline), on a separate line.
Any advice on how to fix this ?
Please Log in or Create an account to join the conversation.
echo '<br/>'.$product->order_product_code;
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
nicolas wrote: It's more complex:
Code:$productClass = hikashop_get('class.product'); $productData = $productClass->get($product->product_id); $categoryClass = hikashop_get('class.category'); $category = $categoryClass->get($productData->product_manufacturer_id); echo $category->category_name;
Note: Hikashop version: 2.6
OK this works fine, but I have a little problem.
When the products has Characteristics/with variants the brand name does not display.
When the product has no variants the brand name display's just fine.
In the product with variants I use different product codes. i.e:
Original product code: 660021_01
Variant a product code: 660021
Variant b product code: 660022
The invoice is displaying the correct product code, but I am missing the brand name with the products with "variants"
Any advice ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
OK I will just continue using this thread since I am probarly the only person with this request.
It is possible to include the product quantity or a message saying: "Product on stock" in the product invoice.
Like this:
I only need this message to be displayed if the quantity of the product is 1 or above.
I have some products the have Quantity: Unlimited, but on these products I do not need the message to be displayed since these products are not in my own warehouse.
Looking forward to hear from you.
Please Log in or Create an account to join the conversation.
You can do like that:
Please Log in or Create an account to join the conversation.