* but WITHOUT ANY WARRANTY; without even the implied warranty of, * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ // no direct access defined('_JEXEC') or die('Restricted access'); if (!file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'load.php')) { JError::raiseError(500, JText::_('')); } require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'load.php'; $context = JeproshopContext::getContext(); /** initialize the shop **/ $context->shop = JeproshopShopModelShop::initialize(); /** load configuration */ JeproshopSettingModelSetting::loadSettings(); /** load languages */ JeproshopLanguageModelLanguage::loadLanguages(); /** set context cookie */ $life_time = time() + max(JeproshopSettingModelSetting::getValue('bo_life_time'), 1) * 3600; $context->cookie = new JeproshopCookie('jeproshop_site', '', $life_time); /** @var employee */ $context->employee = new JeproshopEmployeeModelEmployee(JFactory::getUser()->id); $context->cookie->employee_id = $context->employee->employee_id; /** Loading default country */ $context->country = new JeproshopCountryModelCountry(JeproshopSettingModelSetting::getValue('default_country'), JeproshopSettingModelSetting::getValue('default_lang')); /** if the cookie stored language is not an available language, use default language */ if (isset($context->cookie->lang_id) && $context->cookie->lang_id) { $language = new JeproshopLanguageModelLanguage($context->cookie->lang_id);