Curl & onPaymentNotification()

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 3 months ago #22544

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.

  • Posts: 108
  • Thank you received: 2
13 years 3 months ago #22545

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: 13 years 3 months ago by bars92.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 3 months ago #22562

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.

  • Posts: 108
  • Thank you received: 2
13 years 3 months ago #22564

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.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 3 months ago #22589

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.

  • Posts: 108
  • Thank you received: 2
13 years 3 months ago #22617

Working perfectly. thanks :)

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

Time to create page: 0.050 seconds
Powered by Kunena Forum