- Posts: 103
- Thank you received: 0
Custom Product Field in the Invoice
13 years 10 months ago #77908
by SuzyBGood
Custom Product Field in the Invoice was created by SuzyBGood
Hi Guys,
In the orders there is an "Additional Information" bit I can see one of my custom fields for the order.. but I can't see how to put on a custom field that I've attached to each product.
Thoughts? Hmm I bet it's in one of the Display Views.
Thanks!
In the orders there is an "Additional Information" bit I can see one of my custom fields for the order.. but I can't see how to put on a custom field that I've attached to each product.
Thoughts? Hmm I bet it's in one of the Display Views.
Thanks!
Please Log in or Create an account to join the conversation.
13 years 10 months ago #77924
by Xavier
Replied by Xavier on topic Custom Product Field in the Invoice
Hi,
To add the product custom field in the order, you will have to edit the view "order / show".
And display the values wanted in the foreach.
To add the product custom field in the order, you will have to edit the view "order / show".
And display the values wanted in the foreach.
Please Log in or Create an account to join the conversation.
13 years 10 months ago - 13 years 10 months ago #78373
by SuzyBGood
Replied by SuzyBGood on topic Custom Product Field in the Invoice
Hi Xavier,
I have added the following lines in both order/show and order/invoice
where "fundstocharity" is my column name in my table product. (text field) also I have enabled backend listing but I still can't see it when I click on existing orders or when I click on the invoice button.. and I even created a new order worrying that maybe it dodn't fix it to existing ones. Thoughts? My PHP skills are less-than-standard.
THANKS!
I have added the following lines in both order/show and order/invoice
Code:
<span class="hikashop_product_code_order"><?php echo $product->order_product_code; ?></span>
/* NEW LINES ADDED BELOW */
<?php $class=hikashop_get('class.product');
$prod = $class->get($product->product_id);
echo $prod->fundstocharity;
?>
THANKS!
Last edit: 13 years 10 months ago by Jerome.
Please Log in or Create an account to join the conversation.
13 years 10 months ago #78392
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom Product Field in the Invoice
Hi,
You code looks good.
Are you sure that you have edit the view for the right backend template ?
You can check it by writing
Regards,
You code looks good.
Are you sure that you have edit the view for the right backend template ?
You can check it by writing
Code:
echo 'Funds to charity: ' . $prod->fundstocharity;
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
13 years 10 months ago #78473
by SuzyBGood
Replied by SuzyBGood on topic Custom Product Field in the Invoice
Hi Jerome,
Tried that.. can't see it printed anywhere.. double checked I have the correct column name.. took the column bit out and just tried to echo 'Funds to Charity'; no luck
Here is a screen print of what views I customized with the code.. you can see I have it on my ju_joomla template trying it in both order/show and order/invoice.. (did different)..
Hmmmm
Tried that.. can't see it printed anywhere.. double checked I have the correct column name.. took the column bit out and just tried to echo 'Funds to Charity'; no luck
Here is a screen print of what views I customized with the code.. you can see I have it on my ju_joomla template trying it in both order/show and order/invoice.. (did different)..
Hmmmm
Please Log in or Create an account to join the conversation.
13 years 10 months ago #78477
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom Product Field in the Invoice
Hi,
I don't know for your frontend template but your backend template is "bluestork".
Regards,
I don't know for your frontend template but your backend template is "bluestork".
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: SuzyBGood
Please Log in or Create an account to join the conversation.
13 years 10 months ago #78479
by SuzyBGood
Replied by SuzyBGood on topic Custom Product Field in the Invoice
THANK YOU! I started editing after I thought about your hint about the correct template.. I have never edited a display that was "back end" before. Didn't really think it had a different template.
All I can add to this is "DUH"
THANK YOU THANK YOU
All I can add to this is "DUH"
THANK YOU THANK YOU
Please Log in or Create an account to join the conversation.
13 years 10 months ago #78617
by SuzyBGood
Replied by SuzyBGood on topic Custom Product Field in the Invoice
Ok, obviously I haven't learned my lesson...
I have it working.. I KNOW I am editing the right template. But I am trying to do the right thing and put the title in the LANGUAGE file.
Entry in language looks like this:
FUNDS="Donation"
and the echo entry in my code is:
echo JText::_('FUNDS') . $prod->fundstocharity;
but in my invoice it just reads FUNDS $3.00 etc.. it isn't using the language file to translate?
I have it working.. I KNOW I am editing the right template. But I am trying to do the right thing and put the title in the LANGUAGE file.
Entry in language looks like this:
FUNDS="Donation"
and the echo entry in my code is:
echo JText::_('FUNDS') . $prod->fundstocharity;
but in my invoice it just reads FUNDS $3.00 etc.. it isn't using the language file to translate?
Please Log in or Create an account to join the conversation.
13 years 10 months ago #78621
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom Product Field in the Invoice
Hi,
Do your modify the language file or do you use the "override" section ?
The "override" part could not be loaded by Joomla sometimes, it is a limitation that we are trying to bypass.
Which Joomla version are you using ? It would help us for our tests.
Regards,
Do your modify the language file or do you use the "override" section ?
The "override" part could not be loaded by Joomla sometimes, it is a limitation that we are trying to bypass.
Which Joomla version are you using ? It would help us for our tests.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
13 years 10 months ago #78622
by SuzyBGood
Replied by SuzyBGood on topic Custom Product Field in the Invoice
Hi,
I am using the Override section. I have had success with this in other areas on other templates. I can put the words in for now.. just was wondering what I was missing. I am using the last latest version (prior to the upgrade a couple of weeks ago, 2.5 sounds right but that could be Joomla) Business Edition. I just got it all working so I am afraid to upgrade!!
Cheers
I am using the Override section. I have had success with this in other areas on other templates. I can put the words in for now.. just was wondering what I was missing. I am using the last latest version (prior to the upgrade a couple of weeks ago, 2.5 sounds right but that could be Joomla) Business Edition. I just got it all working so I am afraid to upgrade!!
Cheers
Please Log in or Create an account to join the conversation.
13 years 10 months ago #78624
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom Product Field in the Invoice
Hi,
Please try to add your translation in the "language" part.
As I said, the "override" part would not work everywhere, specially in emails (due a language context switch).
Regards,
Please try to add your translation in the "language" part.
As I said, the "override" part would not work everywhere, specially in emails (due a language context switch).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: SuzyBGood
Please Log in or Create an account to join the conversation.
Time to create page: 0.210 seconds