public function onBeforeDispatch()
 {
     $app = JFactory::getApplication();
     if ($app->isAdmin()) {
         $layout = new JLayoutFile('joomla.sidebars.submenu');
         $layout->addIncludePaths(JPATH_ADMINISTRATOR . '/components/com_j2store/layouts');
     }
     require_once JPATH_ADMINISTRATOR . '/components/com_j2store/helpers/strapper.php';
     J2StoreStrapper::addJS();
     J2StoreStrapper::addCSS();
     require_once JPATH_ADMINISTRATOR . '/components/com_j2store/helpers/j2store.php';
     require_once JPATH_ADMINISTRATOR . '/components/com_j2store/library/popup.php';
     require_once JPATH_ADMINISTRATOR . '/components/com_j2store/helpers/select.php';
     require_once JPATH_ADMINISTRATOR . '/components/com_j2store/helpers/j2html.php';
     return parent::onBeforeDispatch();
 }