PDF Plugin - Userpoints
10 years 3 days ago #251340
by Joomill
PDF Plugin - Userpoints was created by Joomill
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6
Hi,
I use the Attachinvoice PDF Plugin and Hikashop Userpoints.
When someone pay with userpoints you see this in the backend invoice.
The userpoints don't appear on the PDF invoice.
Is it possible to add it to the plugin or guide us how to add it.
Besides this i would like to show the total collected userpoints on the invoice, is this possible?
Thank you!
-- Joomla version -- : 3.6
Hi,
I use the Attachinvoice PDF Plugin and Hikashop Userpoints.
When someone pay with userpoints you see this in the backend invoice.
The userpoints don't appear on the PDF invoice.
Is it possible to add it to the plugin or guide us how to add it.
Besides this i would like to show the total collected userpoints on the invoice, is this possible?
Thank you!
Please Log in or Create an account to join the conversation.
10 years 3 days ago #251373
by nicolas
Replied by nicolas on topic PDF Plugin - Userpoints
Hi,
The PDF invoice does display the user points used for the payment like in the backend invoice on my end.
It's done thanks to the code:
in the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php
So make sure that you have that code in your PDF invoice file. If you do then either we're talking about something else or you're in a particular case where it's not working properly. So please provide a screenshot of the PDF invoice and of the backend invoice so that we can see the difference.
Regarding the collected amount of points, you should be able to find them in the variable $order->order_payment_params->userpoints->earn_points in that file. so you could just echo it there.
The PDF invoice does display the user points used for the payment like in the backend invoice on my end.
It's done thanks to the code:
Code:
if(!empty($order->additional)) {
$exclude_additionnal = explode(',', $config->get('order_additional_hide', ''));
foreach($order->additional as $additional) {
if(in_array(@$additional->name, $exclude_additionnal)) continue;
echo '<tr><td colspan="3" class="newarea">'. JText::_($additional->order_product_name).'</td><td class="price">';
if(!empty($additional->order_product_price) || empty($additionaltionnal->order_product_options)) {
if($config->get('price_with_tax')){
echo $currencyHelper->format($additional->order_product_price+@$additional->order_product_tax, $order->order_currency_id);
}else{
echo $currencyHelper->format($additional->order_product_price, $order->order_currency_id);
}
} else {
echo $additional->order_product_options;
}
echo '</td></tr>';
}
}
So make sure that you have that code in your PDF invoice file. If you do then either we're talking about something else or you're in a particular case where it's not working properly. So please provide a screenshot of the PDF invoice and of the backend invoice so that we can see the difference.
Regarding the collected amount of points, you should be able to find them in the variable $order->order_payment_params->userpoints->earn_points in that file. so you could just echo it there.
Please Log in or Create an account to join the conversation.
9 years 11 months ago #251802
by Joomill
Replied by Joomill on topic PDF Plugin - Userpoints
I checked it and the code is indeed in the invoice.php
hereby the screenshots
hereby the screenshots
Attachment not found
Attachment not found
Please Log in or Create an account to join the conversation.
9 years 11 months ago #251895
by nicolas
Replied by nicolas on topic PDF Plugin - Userpoints
Hi,
I'm not able to reproduce the problem. Do you have it displaying properly if you deactivate the PDF plugin ?
Also, It seems that you customized the invoice.php
Did you make an override of the file ? In that case, you would need to look for the code of my previous message in the override invoice.php file and not the default one.
If that doesn't help either, then we'll have to have a FTP and backend access in order to look deeper into it.
I'm not able to reproduce the problem. Do you have it displaying properly if you deactivate the PDF plugin ?
Also, It seems that you customized the invoice.php
Did you make an override of the file ? In that case, you would need to look for the code of my previous message in the override invoice.php file and not the default one.
If that doesn't help either, then we'll have to have a FTP and backend access in order to look deeper into it.
Please Log in or Create an account to join the conversation.
Time to create page: 0.222 seconds