function __construct () { parent::__construct (); $this->setMainTable ('orders'); // set default values always used $config = JFactory::getConfig (); $this->tzoffset = $config->getValue ('config.offset'); $this->setDatePresets (); $app = JFactory::getApplication (); $this->period = $app->getUserStateFromRequest ('com_virtuemart.revenue.period', 'period', 'last30', 'string'); $post = JRequest::get ('post'); vmdebug ('$post ', $post); if (empty($this->period) or $this->period != 'none') { $this->setPeriodByPreset (); } else { $this->setPeriod (); } $this->removevalidOrderingFieldName ('virtuemart_order_id'); $this->addvalidOrderingFieldName (array('product_quantity', 'o.virtuemart_order_id')); $this->_selectedOrdering = 'created_on'; }
/** * constructs a VmModel * setMainTable defines the maintable of the model * * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_product_id'); $this->setMainTable('products'); $this->starttime = microtime(TRUE); $this->maxScriptTime = VmConfig::getExecutionTime() * 0.95 - 1; $this->memory_limit = VmConfig::getMemoryLimit() - 4; // $this->addvalidOrderingFieldName(array('m.mf_name','pp.product_price')); $app = JFactory::getApplication(); if ($app->isSite()) { $this->_validOrderingFieldName = array(); $browseOrderByFields = VmConfig::get('browse_orderby_fields', array('product_sku', 'category_name', 'mf_name', 'product_name')); } else { if (!class_exists('shopFunctions')) { require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'shopfunctions.php'; } $browseOrderByFields = ShopFunctions::getValidProductFilterArray(); $this->addvalidOrderingFieldName(array('product_price', 'product_sales')); //$this->addvalidOrderingFieldName (array('product_price')); // vmdebug('$browseOrderByFields',$browseOrderByFields); } $this->addvalidOrderingFieldName((array) $browseOrderByFields); $this->removevalidOrderingFieldName('virtuemart_product_id'); //$this->removevalidOrderingFieldName ('product_sales'); //unset($this->_validOrderingFieldName[0]);//virtuemart_product_id array_unshift($this->_validOrderingFieldName, 'p.virtuemart_product_id'); $this->_selectedOrdering = VmConfig::get('browse_orderby_field', '`p`.virtuemart_product_id'); $this->setToggleName('product_special'); $this->initialiseRequests(); //This is just done now for the moment for developing, the idea is of course todo this only when needed. $this->updateRequests(); }
function __construct() { parent::__construct(); $this->zas_model = VmModel::getModel('zasilkovna'); $this->setMainTable('orders'); $this->addvalidOrderingFieldName(array('order_name', 'payment_method', 'virtuemart_order_id')); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct(); $this->setMainTable('states'); $this->_selectedOrdering = 'state_name'; $this->_selectedOrderingDir = 'DESC'; }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct(); $this->setMainTable('shipmentmethods'); $this->_selectedOrdering = 'ordering'; $this->setToggleName('shared'); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_manufacturercategories_id'); $this->setMainTable('manufacturercategories'); $this->addvalidOrderingFieldName(array('mf_category_name')); $config = JFactory::getConfig(); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_media_id'); $this->setMainTable('medias'); $this->addvalidOrderingFieldName(array('ordering')); $this->_selectedOrdering = 'created_on'; }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_custom_id'); $this->setMainTable('customs'); $this->setToggleName('admin_only'); $this->setToggleName('is_hidden'); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_product_id'); $this->setMainTable('products'); $this->starttime = microtime(TRUE); $this->maxScriptTime = ini_get('max_execution_time') * 0.95 - 1; // $this->addvalidOrderingFieldName(array('m.mf_name','pp.product_price')); $view = JRequest::getVar('view'); $isSite = JFactory::getApplication()->isSite() && $view !== 'product' && $view !== 'inventory'; if ($isSite) { $browseOrderByFields = VmConfig::get('browse_orderby_fields', array('product_sku', 'category_name', 'mf_name', 'product_name')); } else { JLoader::register('shopFunctions', JPATH_VM_ADMINISTRATOR . 'helpers/shopfunctions.php'); $browseOrderByFields = ShopFunctions::getValidProductFilterArray(); $this->addvalidOrderingFieldName(array('product_price', 'p.`product_sales`')); //$this->addvalidOrderingFieldName (array('product_price')); // vmdebug('$browseOrderByFields',$browseOrderByFields); } $this->addvalidOrderingFieldName((array) $browseOrderByFields); $this->removevalidOrderingFieldName('virtuemart_product_id'); $this->removevalidOrderingFieldName('product_sales'); //unset($this->_validOrderingFieldName[0]);//virtuemart_product_id array_unshift($this->_validOrderingFieldName, 'p.virtuemart_product_id'); $this->_selectedOrdering = VmConfig::get('browse_orderby_field', '`p`.virtuemart_product_id'); $this->setToggleName('product_special'); $this->initialiseRequests(); //This is just done now for the moment for developing, the idea is of course todo this only when needed. $this->updateRequests(); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct(); $this->setMainTable('orders'); $this->addvalidOrderingFieldName(array('order_name', 'order_email', 'payment_method', 'virtuemart_order_id')); $this->populateState(); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct(); $this->setMainTable('ratings'); $layout = vRequest::getString('layout','default'); $task = vRequest::getCmd('task','default'); if($layout == 'list_reviews' or $task == 'listreviews'){ vmdebug('in review list'); $myarray = array('pr.created_on','virtuemart_rating_review_id','vote'); $this->removevalidOrderingFieldName('created_on'); $this->removevalidOrderingFieldName('product_name'); $this->removevalidOrderingFieldName('virtuemart_rating_id'); $this->removevalidOrderingFieldName('rating'); $this->_selectedOrdering = 'pr.created_on'; } else { $myarray = array('created_on','product_name','virtuemart_rating_id'); $this->removevalidOrderingFieldName('pr.created_on'); $this->removevalidOrderingFieldName('virtuemart_rating_review_id'); $this->removevalidOrderingFieldName('vote'); $this->_selectedOrdering = 'created_on'; } $this->addvalidOrderingFieldName($myarray); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct(); $this->setMainTable('coupons'); $this->_selectedOrdering = 'coupon_code'; $this->_selectedOrderingDir = 'DESC'; $this->addvalidOrderingFieldName(array('coupon_code', 'percent_or_total', 'coupon_type', 'coupon_value', 'coupon_start_date', 'coupon_expiry_date', 'coupon_value_valid', 'published')); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_waitinguser_id'); $this->setMainTable('waitingusers'); array_unshift($this->_validOrderingFieldName, 'country_name'); $this->_selectedOrdering = 'country_name'; $this->_selectedOrderingDir = 'ASC'; }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_manufacturer_id'); $this->setMainTable('manufacturers'); $this->addvalidOrderingFieldName(array('m.virtuemart_manufacturer_id','mf_name','mf_desc','mf_category_name','mf_url')); $this->removevalidOrderingFieldName('virtuemart_manufacturer_id'); $this->_selectedOrdering = 'mf_name'; $this->_selectedOrderingDir = 'ASC'; }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct(); $this->setMainTable('medias'); $this->addvalidOrderingFieldName(array('ordering')); $this->_selectedOrdering = 'created_on'; $this->setToggleName('shared'); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct(); $this->setMainTable('countries'); array_unshift($this->_validOrderingFieldName, 'country_name'); $this->_selectedOrdering = 'country_name'; $this->_selectedOrderingDir = 'ASC'; }
/** * Constructor for the calc model. * * The calc id is read and detmimined if it is an array of ids or just one single id. * * @author RickG */ public function __construct() { parent::__construct(); $this->setMainTable('calcs'); $this->setToggleName('calc_shopper_published'); $this->setToggleName('calc_vendor_published'); $this->addvalidOrderingFieldName(array('virtuemart_category_id', 'virtuemart_country_id', 'virtuemart_state_id', 'virtuemart_shoppergroup_id')); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct(); $this->setMainTable('customs'); $this->setToggleName('admin_only'); $this->setToggleName('is_hidden'); $this->setToggleName('shared'); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * * @author Max Milbers */ function __construct() { parent::__construct(); //Todo multivendor nasty hack, to get vendor with id 1 if (Vmconfig::get('multix', 'none') == 'none') { $this->setId(1); } $this->setMainTable('vendors'); }
/** * Constructor for the user model. * * The user ID is read and determined if it is an array of ids or just one single id. */ function __construct() { parent::__construct('virtuemart_user_id'); $this->setToggleName('user_is_vendor'); $this->addvalidOrderingFieldName(array('ju.username', 'ju.name', 'ju.email', 'sg.virtuemart_shoppergroup_id', 'shopper_group_name', 'shopper_group_desc', 'vmu.virtuemart_user_id')); $this->setMainTable('vmusers'); $this->removevalidOrderingFieldName('virtuemart_user_id'); array_unshift($this->_validOrderingFieldName, 'ju.id'); }
/** * Constructor for the user model. * * The user ID is read and determined if it is an array of ids or just one single id. */ function __construct() { parent::__construct('virtuemart_user_id'); $this->setMainTable('vmusers'); $this->setToggleName('user_is_vendor'); $this->addvalidOrderingFieldName(array('ju.username', 'ju.name', 'sg.virtuemart_shoppergroup_id', 'shopper_group_name', 'shopper_group_desc')); array_unshift($this->_validOrderingFieldName, 'ju.id'); // $user = JFactory::getUser(); // $this->_id = $user->id; }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct(); $this->setMainTable('categories'); $this->addvalidOrderingFieldName(array('category_name', 'category_description', 'c.ordering', 'cx.category_shared', 'c.published')); $toCheck = VmConfig::get('browse_cat_orderby_field', 'category_name'); if (!in_array($toCheck, $this->_validOrderingFieldName)) { $toCheck = 'category_name'; } $this->_selectedOrdering = $toCheck; $this->_selectedOrderingDir = 'ASC'; }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_userfield_id'); $this->setMainTable('userfields'); $this->setToggleName('required'); $this->setToggleName('registration'); $this->setToggleName('shipment'); $this->setToggleName('account'); // Instantiate the Helper class $this->_params = new ParamHelper(); // Form fields that must be translated to parameters $this->reqParam = array('age_verification' => 'minimum_age', 'euvatid' => 'virtuemart_shoppergroup_id', 'webaddress' => 'webaddresstype'); }
/** * constructs a VmModel * setMainTable defines the maintable of the model */ function __construct() { parent::__construct(); $this->setMainTable('categories'); $this->addvalidOrderingFieldName(self::$_validOrderingFields); $toCheck = VmConfig::get('browse_cat_orderby_field', 'category_name'); if (!in_array($toCheck, $this->_validOrderingFieldName)) { $toCheck = 'category_name'; } $this->_selectedOrdering = $toCheck; $this->_selectedOrderingDir = VmConfig::get('cat_brws_orderby_dir', 'ASC'); $this->setToggleName('shared'); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_userfield_id'); $this->setMainTable('userfields'); $this->setToggleName('required'); $this->setToggleName('cart'); $this->setToggleName('shipment'); $this->setToggleName('account'); // Instantiate the Helper class self::$_cache_ordered = null; self::$_cache_named = array(); $this->_selectedOrdering = 'ordering'; $this->_selectedOrderingDir = 'ASC'; VmConfig::loadJLang('com_virtuemart_shoppers', TRUE); }
public function __construct() { $language = JFactory::getLanguage(); $language->load('plg_vmshipment_zasilkovna', JPATH_ADMINISTRATOR, null, true); $language->load('plg_vmshipment_zasilkovna', JPATH_SITE, null, true); $q = "SELECT custom_data FROM #__extensions WHERE element='zasilkovna'"; $db = JFactory::getDBO(); $db->setQuery($q); $obj = $db->loadObject(); $config = unserialize($obj->custom_data); $this->api_pass = $config['zasilkovna_api_pass']; $this->api_key = substr($config['zasilkovna_api_pass'], 0, 16); $this->_media_url = JURI::root(true) . "/media/com_zasilkovna/media/"; $this->_media_path = JPATH_SITE . DS . "media" . DS . "com_zasilkovna" . DS . "media" . DS; parent::__construct(); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_userfield_id'); $this->setMainTable('userfields'); $this->setToggleName('required'); $this->setToggleName('registration'); $this->setToggleName('shipment'); $this->setToggleName('account'); // Instantiate the Helper class $this->_params = new ParamHelper(); self::$_cache_ordered = null; self::$_cache_named = array(); // Form fields that must be translated to parameters $this->reqParam = array('age_verification' => 'minimum_age', 'euvatid' => 'virtuemart_shoppergroup_id', 'webaddress' => 'webaddresstype'); $this->addvalidOrderingFieldName(array('name', 'type', 'ordering', 'virtuemart_userfield_id')); $this->_selectedOrdering = 'ordering'; $this->_selectedOrderingDir = 'ASC'; }
function __construct() { parent::__construct('virtuemart_customfield_id'); $this->setMainTable('product_customfields'); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct(); $this->setMainTable('worldzones'); }
/** * constructs a VmModel * setMainTable defines the maintable of the model * @author Max Milbers */ function __construct() { parent::__construct('virtuemart_shoppergroup_id'); $this->setMainTable('shoppergroups'); }