- Posts: 108
- Thank you received: 2
Cart Is Not Been Emptied
15 years 1 month ago #22668
by bars92
Cart Is Not Been Emptied was created by bars92
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?
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.
15 years 1 month ago #22677
by nicolas
Replied by nicolas on topic Re: Cart Is Not Been Emptied
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;
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.
15 years 1 month ago #22728
by bars92
Replied by bars92 on topic Re: Cart Is Not Been Emptied
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.
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.
15 years 1 month ago #22729
by nicolas
Replied by nicolas on topic Re: Cart Is Not Been Emptied
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.
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.169 seconds