- Posts: 2
- Thank you received: 0
Display invoice at checkout end
I am using "Credit Card" as my payment. I am unable to make the thank you page change.
I have added into: /plugins/hikashoppayment/creditcard/creditcard_end.php
I have also tried the same code in: Display -> views -> checkout | after_end (yes under my templates theme)
Any ideas what I am doing wrong?
Please Log in or Create an account to join the conversation.
The <div> and <span> sections with "class=hikashop_creditcard_end" have been added by you ? If yes, can you try without these tags ?
Regards
Please Log in or Create an account to join the conversation.
The span and div were already in there when I opened the file. But I can try to remove them.
Please Log in or Create an account to join the conversation.
And what result do you have ?
For what i can see in your code ; you're using "$app" which is an undefined variable.
So it can't work and it will generate a PHP fatal error.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
I need redirect after checkout page - to show this order details.
So in the file /plugins/hikashoppayment/purchaseorder/purchaseorder_end.php
i added some code from this issue:
But it dont work. Its redirect me to the order, but with previous ID.. not to the last order page. Its create new order in the list with all orders... but my last order remains to lay in the basket ....
Where I have the mistake?
Please Log in or Create an account to join the conversation.
Since HikaShop 3.0.0, you can't use $app->getUserState('com_hikashop.order_id') to get the id of the order in the end file of the payment plugins.
However, you now have access to it directly in $this->order->order_id
So you can simply the code:
Please Log in or Create an account to join the conversation.
Warning: Invalid argument supplied for foreach() in E:\*****\administrator\components\com_hikashop\classes\cart.php on line 2121
My Hikashop is 3.2.0 version Business
Can you check please why it can be?
Please Log in or Create an account to join the conversation.
Replace the text "usable_methods_payment" by "usable_methods->payment" and it should work properly.
Please Log in or Create an account to join the conversation.
Thank you, it helped with previous error "Warning: Invalid argument supplied for foreach()... " but its still didnt get the ID of the current order...
Now this part of code
redirect me to the page with all orders because i got the link like this view:
http://localhost/e-post/checkout/order/show/cid-
without ID at the end
Please Log in or Create an account to join the conversation.
I've had a closer look and the purchaseorder, unlike other payment plugins, is missing the line:
parent::onAfterOrderConfirm($order, $methods, $method_id);
after the line:
public function onAfterOrderConfirm(&$order, &$methods, $method_id) {
in the file plugins/hikashoppayment/purchaseorder/purchaseorder.php
That's why $this->order is missing there which should normally not be the case.
We'll add that on our end to the next version.
Please Log in or Create an account to join the conversation.
Its helped!! And after checkout finish page - user redirected to the current order page.
But there is one more moment. After that the basket does not become empty. I got new order and right redirecting, but full basket.
As if the basket does not fix the last order.
Please check, I will be very grateful.
Please Log in or Create an account to join the conversation.
Then make sure that you have the "clean cart after order is" setting set to "created" in the HikaShop configuration.
Please Log in or Create an account to join the conversation.
Yes, in my settings everything is correct (added in the attachment).
The fact is that when I remove the redirecting code
from the file /plugins/hikashoppayment/purchaseorder/purchaseorder_end.php
all begin work correctly, and basket become empty after checkout finish step.
Please check where can be mistake.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
In that case, using that kind of code just before the redirection code will probably do the job :
Please Log in or Create an account to join the conversation.
Mohamed, thank you! Yes, it work!
Please Log in or Create an account to join the conversation.