PDF Invoice custom text based on status.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
6 years 3 months 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: 6 years 3 months ago by SnoozeULooze.co.za.

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

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
6 years 3 months 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: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
6 years 3 months 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.055 seconds
Powered by Kunena Forum