Welcome, Guest
Username: Password: Remember me

TOPIC: Invoice payment plugin.

Invoice payment plugin. 2 years 2 months ago #69185

  • jansuhr
  • jansuhr's Avatar
  • OFFLINE
  • Posts: 182
  • Thank you received: 13
I have made an Invoice payment plugin from the check payment plugin.

Just changed the name and references to invoice instead of check.

It works as expected except for the plugins _end-page that will not show the $amount and the $order_number.

$information is shown properly.

I checked with var_dump($order) and the values for order_number is there and everything else.

The code for onAfterOrderConfirm function is exactly the same for my invoice.php as in the check.php.

With the payment method check the $amount and $order_number works.

Could you please check and see why this isn't working?


File Attachment:

File Name: invoice.zip
File Size: 4 KB



Thanks


Jan
The administrator has disabled public write access.

Re: Invoice payment plugin. 2 years 2 months ago #69290

  • Xavier
  • Xavier's Avatar
  • OFFLINE
  • Posts: 10033
  • Thank you received: 1682
  • MODERATOR
Hi jansuhr,

To create this kind of payment, you can too edit the "Bank transfer" payment method.
Just change the name and the informations, and this will work as wanted.
The administrator has disabled public write access.

Re: Invoice payment plugin. 2 years 2 months ago #69304

  • jansuhr
  • jansuhr's Avatar
  • OFFLINE
  • Posts: 182
  • Thank you received: 13
Yes I know that but both the Check and BankTranser plugins are used for those payment methods. I need one more for Invoices and more or less duplicated the BankTransfer plugin.

Jan
The administrator has disabled public write access.

Re: Invoice payment plugin. 2 years 2 months ago #69319

  • Xavier
  • Xavier's Avatar
  • OFFLINE
  • Posts: 10033
  • Thank you received: 1682
  • MODERATOR
Do you just copy the files of the BankTransfer plugin and edit the name of the plugin ?

If yes, I don't really know why this is not working.
The administrator has disabled public write access.

Re: Invoice payment plugin. 2 years 2 months ago #69344

  • jansuhr
  • jansuhr's Avatar
  • OFFLINE
  • Posts: 182
  • Thank you received: 13
Well I didn't just change the name of it.

I did a search and replace in the file and changed all instances of "banktransfer" to "invoice".
Also changed the language strings to be able to have other, more relevant text in the plugin.

But if I compare the files there is no other changes made.

The ZIP-file I enclosed can be installed and used, you can test it if you like.

The strange thing is that the variable for Information works but not the others.

JAn
The administrator has disabled public write access.

Re: Invoice payment plugin. 2 years 2 months ago #69355

  • nicolas
  • nicolas's Avatar
  • NOW ONLINE
  • Posts: 40285
  • Thank you received: 4451
  • MODERATOR
Note that you can use the westernunion payment plugin for your invoice plugin since it's also a simple payment plugin like bank transfer and check.

I checked your code but it sounds correctso I have no clue as to why it doesn't work.
The administrator has disabled public write access.

Re: Invoice payment plugin. 2 years 1 month ago #74822

  • jansuhr
  • jansuhr's Avatar
  • OFFLINE
  • Posts: 182
  • Thank you received: 13
I finally got some time to check this out again.

If I changed the code I got it to work, here is the solution:
<div class="hikashop_invoice_end" id="hikashop_invoice_end">
	<span class="hikashop_invoice_end_message" id="hikashop_invoice_end_message">
		<?php echo JText::_('ORDER_IS_COMPLETE').'<br/>'.
		JText::sprintf('INVOICE_MESSAGE');
		echo " $amount<br/>";
		echo "$information<br/><br/>";
		echo JText::sprintf('INVOICE_ORDER_NUMBER');
		echo "$order_number<br/>";
		echo JText::_('THANK_YOU_FOR_PURCHASE');
		?>
	</span>
</div>


Jan
The administrator has disabled public write access.
The following user(s) said Thank You: nicolas
Time to create page: 0.328 seconds
Powered by Kunena Forum