PDF Invoice custom text based on status.

  • Posts: 81
  • Thank you received: 0
  • Hikashop Business
2 years 2 weeks ago #295632

-- 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: 2 years 2 weeks ago by SnoozeULooze.co.za.

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

  • Posts: 70149
  • Thank you received: 10504
  • MODERATOR
2 years 2 weeks ago #295646

Hi,

The code would look like that:

// 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.

  • Posts: 81
  • Thank you received: 0
  • Hikashop Business
2 years 2 weeks ago #295666

nicolas wrote: Hi,

The code would look like that:

// 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.
<?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.057 seconds
Powered by Kunena Forum