no SSL outside checkout plugin - Infinite loop

  • Posts: 132
  • Thank you received: 2
  • Hikaserial Standard Hikashop Business
10 years 2 months ago #195327

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.3.10

Hi!

After having installed SSL on a dev server I wanted to enable the checkout to be accessed through HTTPS only, but the rest of the shop through HTTP, so I enabled the plugin "HikaShop no SSL outside checkout plugin". But when I tried to reach my checkout I got stuck in an' Infinite loop, the checkout trying to put me through to HTTPS and the plugin trying to revert me back to HTTP.

I am using a forced checkout menu so my guess is that the error lies there.

Attachments:

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

  • Posts: 83831
  • Thank you received: 13572
  • MODERATOR
10 years 2 months ago #195405

Hi,

Could you replace the line:
$app->redirect(str_replace('https://','http://',hikashop_currentURL()));

to:
var_dump($_REQUEST);

in the file plugins/system/nossloutsidecheckout/nossloutsidecheckout.php and provide the debug data displayed on the checkout page after that change ?

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

  • Posts: 132
  • Thank you received: 2
  • Hikaserial Standard Hikashop Business
10 years 2 months ago #195509

The result of the var_dump:

array(7) {
     ["language"]  =>  string(5) "en-US"
     ["format"] => string(4) "html"
     ["Itemid" ] =>  string(3) "566"
     ["option"] =>  string(12) "com_hikashop"
     ["lang"] =>  string(5) "en-US"
     ["view"] =>  string(8) "checkout"
     ["layout"] =>  string(4) "step"
}

I don't know whether it has any use but; When I changed the code that you requested I had to disable Gzip in Joomla, otherwise I kept getting this error message:
"Error code: ERR_CONTENT_DECODING_FAILED"

Last edit: 10 years 2 months ago by earmaster.

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

  • Posts: 83831
  • Thank you received: 13572
  • MODERATOR
10 years 2 months ago #195618

Hi,

Great !
So add these lines:

if(empty($_REQUEST['ctrl'])) $_REQUEST['ctrl'] = @$_REQUEST['view'];
if(empty($_REQUEST['task'])) $_REQUEST['task'] = @$_REQUEST['layout'];
before the line:
if(@$_REQUEST['option']!='com_hikashop' || (@$_REQUEST['ctrl']!='checkout' && !(@$_REQUEST['ctrl']=='order' && @$_REQUEST['task']=='pay') )){
in that same file and revert the change I asked in my last message and it should then work properly.

The following user(s) said Thank You: earmaster

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

Time to create page: 0.186 seconds
Powered by Kunena Forum