Пример #1
0
 /**
  * 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');
 }
Пример #2
0
 /**
  * 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');
         if ($task == 'add') {
             $myarray = array('r.created_on', 'tsmart_rating_review_id', 'vote');
             $this->removevalidOrderingFieldName('created_on');
             $this->removevalidOrderingFieldName('product_name');
             $this->removevalidOrderingFieldName('tsmart_rating_id');
             $this->removevalidOrderingFieldName('rating');
             $this->_selectedOrdering = 'r.created_on';
         } else {
             $myarray = array('pr.created_on', 'tsmart_rating_review_id', 'vote');
             $this->removevalidOrderingFieldName('created_on');
             $this->removevalidOrderingFieldName('product_name');
             $this->removevalidOrderingFieldName('tsmart_rating_id');
             $this->removevalidOrderingFieldName('rating');
             $this->_selectedOrdering = 'pr.created_on';
         }
     } else {
         $myarray = array('created_on', 'product_name', 'tsmart_rating_id');
         $this->removevalidOrderingFieldName('pr.created_on');
         $this->removevalidOrderingFieldName('tsmart_rating_review_id');
         $this->removevalidOrderingFieldName('vote');
         $this->_selectedOrdering = 'created_on';
     }
     $this->addvalidOrderingFieldName($myarray);
 }
Пример #3
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('tsmart_custom_id');
     $this->setMainTable('customs');
     $this->setToggleName('admin_only');
     $this->setToggleName('is_hidden');
 }
Пример #4
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('tsmart_media_id');
     $this->setMainTable('medias');
     $this->addvalidOrderingFieldName(array('ordering'));
     $this->_selectedOrdering = 'created_on';
 }
Пример #5
0
 /**
  * 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->setToggleName('shared');
     $this->addvalidOrderingFieldName(array('tsmart_category_id', 'tsmart_country_id', 'tsmart_state_id', 'tsmart_shoppergroup_id', 'tsmart_manufacturer_id'));
 }
Пример #6
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('tsmart_manufacturer_id');
     $this->setMainTable('manufacturers');
     $this->addvalidOrderingFieldName(array('m.tsmart_manufacturer_id', 'mf_name', 'mf_desc', 'mf_category_name', 'mf_url'));
     $this->removevalidOrderingFieldName('tsmart_manufacturer_id');
     $this->_selectedOrdering = 'mf_name';
     $this->_selectedOrderingDir = 'ASC';
 }
Пример #7
0
 /**
  * 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 (tsmConfig::get('multix', 'none') == 'none') {
         $this->setId(1);
     }
     $this->setMainTable('vendors');
 }
Пример #8
0
 /**
  * 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('tsmart_user_id');
     $this->setToggleName('user_is_vendor');
     $this->addvalidOrderingFieldName(array('ju.username', 'ju.name', 'ju.email', 'sg.tsmart_shoppergroup_id', 'shopper_group_name', 'shopper_group_desc', 'vmu.tsmart_user_id'));
     $this->setMainTable('vmusers');
     $this->removevalidOrderingFieldName('tsmart_user_id');
     array_unshift($this->_validOrderingFieldName, 'ju.id');
 }
Пример #9
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('categories');
     $this->addvalidOrderingFieldName(self::$_validOrderingFields);
     $toCheck = tsmConfig::get('browse_cat_orderby_field', 'category_name');
     if (!in_array($toCheck, $this->_validOrderingFieldName)) {
         $toCheck = 'category_name';
     }
     $this->_selectedOrdering = $toCheck;
     $this->_selectedOrderingDir = tsmConfig::get('cat_brws_orderby_dir', 'ASC');
     $this->setToggleName('shared');
 }
Пример #10
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('tsmart_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';
     tsmConfig::loadJLang('com_tsmart_shoppers', TRUE);
 }
Пример #11
0
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('orders');
     $this->setDatePresets();
     $app = JFactory::getApplication();
     $this->period = $app->getUserStateFromRequest('com_tsmart.revenue.period', 'period', 'last30', 'string');
     //$post = vRequest::get ('post');
     //vmdebug ('$post ', $post);
     if (empty($this->period) or $this->period != 'none') {
         $this->setPeriodByPreset();
     } else {
         $this->setPeriod();
     }
     $this->removevalidOrderingFieldName('tsmart_order_id');
     $this->addvalidOrderingFieldName(array('product_quantity', 'o.tsmart_order_id'));
     $this->_selectedOrdering = 'created_on';
 }
Пример #12
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  *
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('tsmart_customfield_id');
     $this->setMainTable('product_customfields');
 }
Пример #13
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('hotel');
 }
Пример #14
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('countries');
 }
Пример #15
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('categoryfaq');
 }
Пример #16
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('activity');
 }
Пример #17
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('language');
 }
Пример #18
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('departure');
 }
Пример #19
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('group_size');
 }
Пример #20
0
 /**
  * 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('tsmart_manufacturercategories_id');
     $this->setMainTable('manufacturercategories');
     $this->addvalidOrderingFieldName(array('mf_category_name'));
 }
Пример #22
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('states');
 }
Пример #23
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('general');
 }
Пример #24
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  */
 function __construct()
 {
     parent::__construct('tsmart_product_id');
     $this->setMainTable('products');
     $this->addvalidOrderingFieldName(array('product_name', 'product_sku', 'product_in_stock', 'product_price', 'product_weight', 'published'));
 }
Пример #25
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('products');
 }
Пример #26
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('tsmart_shoppergroup_id');
     $this->setMainTable('shoppergroups');
 }
Пример #27
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('payment');
 }
Пример #28
0
 /**
  * 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', 'tsmart_order_id'));
 }
Пример #29
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('supplier');
 }
Пример #30
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('excursion_addon');
 }