Skip to main content

PDF Invoice custom text based on status.

More
8 years 2 months ago - 8 years 2 months ago #295632 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.
Last edit: 8 years 2 months ago by SnoozeULooze.co.za.

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #295646 by nicolas
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'; }

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #295666 by SnoozeULooze.co.za

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
Powered by Kunena Forum