Skip to main content

Checkout Redirect Loop Solution

11 years 10 months ago #182612 by cruz777
Just thought I would post a fix I came across.

On the checkout page (/checkout) - on cart empty - I wanted the page to redirect to itself (/checkout), so as to show an "empty cart".

When I put the url in the force URL option on empty of Hikashop I was getting redirect loops.

So I decided to edit the controllers/checkout.php
- Removed the line: $this->setRedirect( $this->redirect_url, JText::_('CART_EMPTY'));
From the function step()

Figured it might have something to do with the way I've set up my checkout workflow - as I have Cart on the first step.

It is now redirecting perfectly without any redirect loop errors.

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

Time to create page: 0.091 seconds
Powered by Kunena Forum