[SOLVED] ADDRESS Step is Skipped After Login

  • Posts: 284
  • Thank you received: 6
11 years 8 months ago #123341

-- url of the page with the problem -- : www.stacecosmetics.com/
-- HikaShop version -- : HikaShop Business: 2.2.1
-- Joomla version -- : Joomla! 2.5.14
-- PHP version -- : 5.3.26
-- Browser(s) name and version -- : any
-- Error-message(debug-mod must be tuned on) -- : n/a

When a returning customer goes to checkout, after they login they are then redirected to the SHIPPING step.
This is skipping the ADDRESS step which would allow them to select which address they want.
(see screenshot of our checkout steps)

Sometimes clicking on the ADDRESS step in the checkout bar will result in the LOGIN box being displayed instead of the addresses.

Attachments:
Last edit: 11 years 8 months ago by MSTACE.

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

  • Posts: 284
  • Thank you received: 6
11 years 8 months ago #123346

Additional Info:

The customer we are having problems with has TWO shipping addresses listed in their account.

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

  • Posts: 12953
  • Thank you received: 1778
11 years 8 months ago #123360

Hi,
firstly can you show me some screenshots of how did you configured your checkout configuration page ("HIkashop->System->Configuration->'Checkout'") ?

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

  • Posts: 284
  • Thank you received: 6
11 years 8 months ago #123371

Screenshot attached.

The customer deleted the 2nd address and now everything is working as should be.

Attachments:
Last edit: 11 years 8 months ago by MSTACE.
The following user(s) said Thank You: Mohamed Thelji

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

  • Posts: 284
  • Thank you received: 6
11 years 8 months ago #123512

I just did another test with my own account.

The ADDRESS step is being skipped each time after login.

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

  • Posts: 26251
  • Thank you received: 4040
  • MODERATOR
11 years 8 months ago #123530

Hi,

Please edit the controller checkout "components/com_hikashop/controllers/checkout.php" and replace the "before_login" function using this one:

	function before_login(){
		if(count($this->controllers) == 1) {
			$user = JFactory::getUser();
			$app = JFactory::getApplication();
			$user_id = $app->getUserState( HIKASHOP_COMPONENT.'.user_id' );
			if(!$user->guest || $user_id){
				$controllersCheck = trim($this->steps[$this->previous]);
				$controllersCheck = explode('_', $controllersCheck);
				$current = $this->current + 1;
				if(count($controllersCheck) == 1 && $controllersCheck[0] == 'login')
					$current = $this->previous + 1;

				JRequest::setVar('step', $current);
				JRequest::setVar('previous', 0);

				$this->step();
			}
		}
		return true;
	}
It will solve the problem.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 284
  • Thank you received: 6
11 years 8 months ago #123610

Yes. Perfect.

Thank you!

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

Time to create page: 0.098 seconds
Powered by Kunena Forum