Skip to main content

Curl & onPaymentNotification()

More
15 years 1 month ago #22544 by nicolas
In order to empty the cart, you need to have the line below in the onAfterOrderConfirm function:
$this->removeCart = true;

And HikaShop will handle that for you.

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

More
15 years 1 month ago - 15 years 1 month ago #22545 by bars92
ok thats good, but the problem is that i sometimes dont want to empty it, but somewhere it does that anyway so after the end.php i cant do anything because the cart has already emptied.

How can i disable empty cart at that step, since there is no "$this->removeCart = true;" at my onAfterOrderConfirm() but it is still emptied?
Last edit: 15 years 1 month ago by bars92.

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

More
15 years 1 month ago #22562 by nicolas
If it still empties the cart even though you don't have that code in the onAfterOrderConfirm function, I suppose that it's because you don't have the latest version of HikaShop.
Prior to that, the cart was always emptied when the order was created. We now moved the decision on whether to remove the cart or not to the payment plugins so that you can do just that.

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

More
15 years 1 month ago #22564 by bars92
Ok so i found that in the checkout configuration.. and i check i got the lastest stable version :S
Last question hopefully:
Can i run the function onAfterOrderConfrim() again from herself? (i need to have a form and then after submitting it going back to run the function).

thanks in advance.

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

More
15 years 1 month ago #22589 by nicolas
Mmm. When you submit a form, the browser goes to the URL defined in the action attribute of the form tag. So it depends where that goes. However, you should be able to trigger again onAfterOrderConfrim once a checkout has been finished by just redirecting to the URL:
index.php?option=com_hikashop&ctrl=order&task=pay&order_id=XXX
where XXX is the order id.

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

More
15 years 1 month ago #22617 by bars92
Working perfectly. thanks :)

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

Time to create page: 0.180 seconds
Powered by Kunena Forum