secondary product code

I’m trying to add a custom field on skins/admin/product_update.tpl because I need to have 2 product codes and, searching the forums, I found the following thread:


…but I’m having some problem with it! It works fine on both product update page and also in storefront, correctly displaying the new product code, but it doesn’t show up in invoice slip neither in email notification… where I do really need it :frowning:

do you have any suggestion please?

just taking a shot in the dark here

you would need to modify the templates for email notification and invoice

by inserting the code to display your values in those locations.

depending on your version, they are both in the same folders i think.

Hi MikeFold, thank you for your reply.

Actually I inserted the code both on invoice and email template but nothing shows up.

Adding the same code in storefront and admin template it works, but not in invoice and email notification.

nobody can help on this matter? :frowning:

The invoice uses different variables than those used in the product details page. On the product details page it might be $products.custom_id and on the invoice it might be $oi.custom_id, or something like that. You’ll also need to make sure that the variables are being pulled from the database. If you enable the Template Debugger in the backend you’ll be able to see what variables are available. By the way you’ll have to be logged in as admin on the store front to be able to see the debug console.

I was looking for instructions on how to create new variable when I came across this post.

What I try to do is to add new info to the invoice, instead of the company name I need to write there the name of the store owner plus I need to also add the owner’s id (it is compulsory for invoices in my country) and I guess I will have to create new variables. How do I do this?

Note: I know I may change the store name for the owner’s name but that’s not really what I want. I just want the owners name to appear in the invoice, together with his id number (tax number)

Could you help me with this?