I can fix the issue by replacing JRequest by jInput and JRequest::setVar by $jinput->set
<?php
/**
* @package HikaShop for Joomla!
* @version 3.1.1
* @author hikashop.com
* @copyright (C) 2010-2017 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
jimport('joomla.application.component.controller');
jimport('joomla.application.component.view');
$jinput = JFactory::getApplication()->input;
$jinput->set('hikashop_front_end_main',1);
if(!defined('DS'))
define('DS', DIRECTORY_SEPARATOR);
include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php');
if(defined('JDEBUG') && JDEBUG){
error_reporting(E_ALL);
@ini_set('display_errors', 1);
}
$config =& hikashop_config();
if($config->get('store_offline')) {
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('SHOP_IN_MAINTENANCE'));
return;
}
global $Itemid;
if(empty($Itemid)) {
$urlItemid = $jinput->getInt('Itemid');
if($urlItemid) {
$Itemid = $urlItemid;
}
}
$view = $jinput->getCmd('view');
if(!empty($view) && empty($jinput->getCmd('ctrl'))) {
$jinput->set('ctrl', $view);
$layout = $jinput->getCmd('layout');
if(!empty($layout)){
$jinput->set('task', $layout);
}
}
if(HIKASHOP_J30) {
$token = hikashop_getFormToken();
$isToken = $jinput->getVar($token, '');
if(!empty($isToken) && !$jinput->checkToken('request')) {
$app = JFactory::getApplication();
$app->input->request->set($token, 1);
}
}
$session = JFactory::getSession();
if(is_null($session->get('registry'))) {
jimport('joomla.registry.registry');
$session->set('registry', new JRegistry('session'));
}
$taskGroup = $jinput->getCmd('ctrl','category');
$className = ucfirst($taskGroup).'Controller';
if(!class_exists($className) && (!file_exists(HIKASHOP_CONTROLLER.$taskGroup.'.php') || !@include(HIKASHOP_CONTROLLER.$taskGroup.'.php'))) {
if(!hikashop_getPluginController($taskGroup))
return JError::raiseError(404, 'Page not found : '.$taskGroup);
}
if($taskGroup != 'checkout') {
$app = JFactory::getApplication();
$app->setUserState('com_hikashop.ssl_redirect',0);
}
$classGroup = new $className();
$jinput->set('view', $classGroup->getName() );
$classGroup->execute($jinput->getCmd('task'));
$classGroup->redirect();
if($jinput->getString('tmpl') !== 'component'){
echo hikashop_footer();
}
$jinput->set('hikashop_front_end_main',0);
But I meet another issue -
At the category lisitng page I cannot get to the list of producst. Both - with my hack and without it.
I go here
albertatacticalrifle.com/hikashop-menu-for-categories-listing
and click on a category - I see the same page. I don't go to subcategories as expected.
albertatacticalrifle.com/hikashop-menu-f...ategory/13-ar15-ar10