Esempio n. 1
0
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('*');
     $query->from('#__j2store_storeprofiles');
     $db->setQuery($query);
     $rows = $db->loadObjectList();
     if (count($rows) < 1) {
         $redirect_url = 'index.php?option=com_j2store&view=postconfig';
         $app->redirect($redirect_url);
     }
     $model = $this->getModel('cpanel');
     $model->checkCurrency();
     //fix indexes
     $model->fixIndexes();
     $params = JComponentHelper::getParams('com_j2store');
     $this->assignRef('params', $params);
     require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/orders.php';
     require_once JPATH_COMPONENT_ADMINISTRATOR . '/library/prices.php';
     $order_model = new J2StoreModelOrders();
     $order_model->setState('filter_limit', 5);
     $latest_items = $order_model->getOrders();
     $this->orders = $latest_items;
     $this->order_model = $order_model;
     $this->params = $params;
     $this->addToolBar();
     $toolbar = new J2StoreToolBar();
     $toolbar->renderLinkbar();
     parent::display($tpl);
 }
Esempio n. 2
0
<?php

/*------------------------------------------------------------------------
# mod_j2store_cart - J2 Store Cart
# ------------------------------------------------------------------------
# author    Sasi varna kumar - Weblogicx India http://www.weblogicxindia.com
# copyright Copyright (C) 2014 - 19 Weblogicxindia.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://j2store.org
# Technical Support:  Forum - http://j2store.org/forum/index.html
-------------------------------------------------------------------------*/
// no direct access
defined('_JEXEC') or die('Restricted access');
require_once dirname(__FILE__) . '/helper.php';
JFactory::getLanguage()->load('com_j2store', JPATH_SITE);
$moduleclass_sfx = $params->get('moduleclass_sfx', '');
$link_type = $params->get('link_type', 'link');
$params = JComponentHelper::getParams('com_j2store');
require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/orders.php';
$order_model = new J2StoreModelOrders();
$order_model->setState('filter_limit', 5);
$orders = $order_model->getOrders();
require JModuleHelper::getLayoutPath('mod_j2store_orders');