Cart Is Not Been Emptied

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

I cant seem to empty the cart after confirm status (the checkout configuration is set to Clean cart when order is confirm and im sure order has been set to confirm)

I elso tried to clean manualy by "$this->removeCart = true;" at the OnAfterPaymentConfiguration() and at OnPaymentNotification() but both does not work.

What should i do?

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

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

That's normal. When you are in that mode, you need to redirect the user to the after_end task of the checkout controller (like all the other payment plugins do) when the payment is successful.
Normally, the payment gateway allows you to provide a success url in onAfterOrderConfirm.

For example, in the paypal payment plugin, you have the code:
$return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id='.$order->order_id.$url_itemid;

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

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

Great its working now, but i noticed that when i am redirecting to a thank you page with this parameters (Success URL), then i get only Joomla! thank you for purches and the cart is still in the same condition, only when i move to a different page it's been emptied.
What can i do to display my page without the Joomla! thank you and to visiable the cart at the same page as empty?

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 #22729

You need to add a return url option, like there is for all the other payment plugins.
The task after_end of the checkout controller will automatically redirect to the URL specified in that option if anything is entered there.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum