Normal operation of invoices

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
2 years 10 months ago #333003

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.26
-- PHP version -- : 7.3.28

I'm confused as to the normal invoicing process for Hikashop. It seems that according to this post , an invoice is only created after the order is "confirmed", but for my instance, the order is only confirmed after payment has been made. In my business, a client either pays by credit card OR requests an invoice so they can pay by check. So with this type of situation, "Invoice" would need to be a payment option type.

Is there a way to set up Hikashop to work like this?

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
2 years 10 months ago #333023

Hi,

That's not a problem. If you create a payment method with the HikaShop check payment plugin, via the "new" button of the System>Payment methods menu, you'll find an "order status" setting there which allows you to have the orders' status be "confirmed" at the order creation, when that payment method is chosen, and thus the invoice will be available directly after the checkout, before any payment is made, while it will still work normally for your credit card payment method.

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

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
2 years 10 months ago #333050

Thanks! That worked! Can you tell me how I can then put a link to download the invoice on that confirmation page?

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
2 years 10 months ago #333057

Hi,

You can copy the file plugins/hikashoppayment/check/check_end.php to templates/YOUR_TEMPLATE/hikashoppayment/check_end.php via FTP to create an override of that page.
Then, you can directly edit the content of that file to add your custom code to generate the link that you can get when you edit the order via the orders listing of the frontend.
So something like that:

<?php global $Itemid; $url_itemid = (!empty($Itemid) ? '&Itemid=' . $Itemid : ''); ?>
<a href="<?php echo hikashop_completeLink('order&task=invoice&order_token='.$this->order->order_token.'&order_id='. $this->order->order_id.$url_itemid); ?>">Invoice is here</a>

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

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
2 years 10 months ago #333099

Thank you!

And a note to anyone else who is doing something similar: Once you set up the Check payment option, you can set the "Order status" field to "invoiced". Now, when a user uses the code above, they can download their invoice, and on the back-end, it will show up as "invoiced".

The following user(s) said Thank You: nicolas

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

Time to create page: 0.055 seconds
Powered by Kunena Forum