Exemplo n.º 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');
 }
Exemplo n.º 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);
 }
Exemplo n.º 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');
 }
Exemplo n.º 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';
 }
Exemplo n.º 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'));
 }
Exemplo n.º 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';
 }
Exemplo n.º 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');
 }
Exemplo n.º 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');
 }
Exemplo n.º 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');
 }
Exemplo n.º 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);
 }
Exemplo n.º 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';
 }
Exemplo n.º 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');
 }
Exemplo n.º 13
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('hotel');
 }
Exemplo n.º 14
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('countries');
 }
Exemplo n.º 15
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('categoryfaq');
 }
Exemplo n.º 16
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('activity');
 }
Exemplo n.º 17
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('language');
 }
Exemplo n.º 18
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('departure');
 }
Exemplo n.º 19
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('group_size');
 }
Exemplo n.º 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'));
 }
Exemplo n.º 22
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('states');
 }
Exemplo n.º 23
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('general');
 }
Exemplo n.º 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'));
 }
Exemplo n.º 25
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('products');
 }
Exemplo n.º 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');
 }
Exemplo n.º 27
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('payment');
 }
Exemplo n.º 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'));
 }
Exemplo n.º 29
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('supplier');
 }
Exemplo n.º 30
0
 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('excursion_addon');
 }