- Posts: 104
- Thank you received: 2
PDF Invoice custom text based on status.
- SnoozeULooze.co.za
-
Topic Author
- Offline
Less
More
8 years 2 months ago - 8 years 2 months ago #295632
by SnoozeULooze.co.za
PDF Invoice custom text based on status. was created by SnoozeULooze.co.za
-- HikaShop version -- : 3.5
-- Joomla version -- : 3.8.8
-- PHP version -- : 7.0
Hi,
I have purchased the PDF invoice plugin.
Is it possible to display the payment status "Created" or "Confirmed" on the invoice?
Also is it possible to display custom text based on the status, I would like to display "Proforma Invoice" on the invoice when it is unpaid (Created) and "Tax Invoice" when payment has been made and the order has been confirmed.
If this is possible, how would the code look?
Thank you.
-- Joomla version -- : 3.8.8
-- PHP version -- : 7.0
Hi,
I have purchased the PDF invoice plugin.
Is it possible to display the payment status "Created" or "Confirmed" on the invoice?
Also is it possible to display custom text based on the status, I would like to display "Proforma Invoice" on the invoice when it is unpaid (Created) and "Tax Invoice" when payment has been made and the order has been confirmed.
If this is possible, how would the code look?
Thank you.
Last edit: 8 years 2 months ago by SnoozeULooze.co.za.
Please Log in or Create an account to join the conversation.
8 years 2 months ago #295646
by nicolas
Replied by nicolas on topic PDF Invoice custom text based on status.
Hi,
The code would look like that:
The code would look like that:
Code:
// display the order status:
echo hikashop_orderStatus($order->order_status);
if($order->order_status == 'created') {
echo 'my text only for created orders';
}
Please Log in or Create an account to join the conversation.
- SnoozeULooze.co.za
-
Topic Author
- Offline
Less
More
- Posts: 104
- Thank you received: 2
8 years 2 months ago #295666
by SnoozeULooze.co.za
Thanks, Nicolas
All I needed to do was to modify it to look like this and now it works perfectly.
Replied by SnoozeULooze.co.za on topic PDF Invoice custom text based on status.
nicolas wrote: Hi,
The code would look like that:Code:// display the order status: echo hikashop_orderStatus($order->order_status); if($order->order_status == 'created') { echo 'my text only for created orders'; }
Thanks, Nicolas
All I needed to do was to modify it to look like this and now it works perfectly.
Code:
<?php
if($order->order_status == 'created') {
echo '<b>Proforma Tax Invoice</b>';
}
elseif($order->order_status == 'confirmed') {
echo '<b>Tax Invoice</b>';
}
?>
Please Log in or Create an account to join the conversation.
Time to create page: 0.182 seconds