VirtueMart  3.2.14.9808
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
VirtueMartModelVendor Class Reference
Inheritance diagram for VirtueMartModelVendor:
Inheritance graph
[legend]
Collaboration diagram for VirtueMartModelVendor:
Collaboration graph
[legend]

Public Member Functions

 __construct ()
 
 getVendor ($vendor_id=0)
 
 getVendors ()
 
 store (&$data)
 
 getVendorAndAcceptedCurrencies ($vendorId)
 
 getUserIdByOrderId ($virtuemart_order_id)
 
 getVendorName ($virtuemart_vendor_id=1)
 
 getVendorEmail ($virtuemart_vendor_id)
 
 getVendorAdressBT ($virtuemart_vendor_id)
 
 getVendorAddressFields ($vendorId=0)
 
- Public Member Functions inherited from VmModel
 __construct ($cidName='cid', $config=array())
 
 setDebugSql ($b)
 
 getName ()
 
 setState ($property, $value=null)
 
 getState ($property=null, $default=null)
 
 getTable ($name= '', $prefix= 'Table', $options=array())
 
 setIdName ($idName)
 
 getIdName ()
 
 getId ()
 
 setId ($id)
 
 setMainTable ($maintablename, $maintable=0)
 
 getDefaultOrdering ()
 
 addvalidOrderingFieldName ($add)
 
 removevalidOrderingFieldName ($name)
 
 setDefaultValidOrderingFields ($defaultTable=null)
 
 _getOrdering ($preTable='')
 
 checkFilterOrder ($toCheck, $view=0, $task= '')
 
 checkValidOrderingFieldName ($toCheck)
 
 checkFilterDir ($toCheck, $view=0, $task= '')
 
 getPagination ($perRow=5)
 
 setPaginationLimits ()
 
 getTotal ()
 
 setGetCount ($withCount)
 
 exeSortSearchListQuery ($object, $select, $joinedTables, $whereString= '', $groupBy= '', $orderBy= '', $filter_order_Dir= '', $nbrReturnProducts=false)
 
 emptyCache ()
 
 getData ($id=0)
 
 store (&$data)
 
 remove ($ids)
 
 setToggleName ($togglesName)
 
 toggle ($field, $val=NULL, $cidname=0, $tablename=0, $view=false)
 
 move ($direction, $filter=null)
 
 saveorder ($cid=array(), $order, $filter=null)
 
 addImages ($obj, $limit=0)
 
 resetErrors ()
 
- Public Member Functions inherited from vObject
 __toString ()
 
 get ($prop, $def=null)
 
 set ($prop, $value=null)
 
 setProperties ($props)
 

Static Public Member Functions

static getLoggedVendor ($ownerOnly=TRUE)
 
static getUserIdByVendorId ($vendorId)
 
static getVendorCurrency ($_vendorId)
 
static getVendorId ($type, $value, $ownerOnly=TRUE)
 
- Static Public Member Functions inherited from VmModel
static addTablePath ($path)
 
static addIncludePath ($path= '', $prefix= '')
 
static getInstance ($type, $prefix= '', $config=array())
 
static getModel ($name=false)
 
static joinLangTables ($tablename, $prefix, $on, $method=0)
 
static joinLangSelectFields ($langFields, $as=true)
 
static joinLangLikeFields ($langFields, $keyword)
 
static joinLangLikeField ($searchField, $keyword)
 

Static Public Attributes

static $_vendorCurrencies = array()
 
static $_vendorAcceptedCurrencies = array()
 

Private Attributes

 $_vendorFields = FALSE
 

Additional Inherited Members

- Public Attributes inherited from VmModel
 $_id = 0
 
 $_data = null
 
 $_query = null
 
 $_total = null
 
 $_pagination = 0
 
 $_limit = 0
 
 $_limitStart = 0
 
 $_maintable = ''
 
 $_maintablename = ''
 
 $_idName = ''
 
 $_cidName = 'cid'
 
 $_togglesName = null
 
 $_selectedOrderingDir = 'DESC'
 
 $_noLimit = false
 
 $_tablePreFix = ''
 
 $_validOrderingFieldName = array()
 
 $_validFilterDir = array('ASC','DESC')
 
- Protected Member Functions inherited from VmModel
 populateState ()
 
 _createTable ($name, $prefix= 'Table', $config=array())
 
 _getList ($query, $limitstart=0, $limit=0)
 
 _getListCount ($query)
 
- Static Protected Member Functions inherited from VmModel
static _createFileName ($type, $parts=array())
 
- Protected Attributes inherited from VmModel
 $__state_set = null
 
 $name
 
 $option = null
 
 $state
 
 $event_clean_cache = null
 
 $_maxItems = 1000
 

Constructor & Destructor Documentation

VirtueMartModelVendor::__construct ( )

constructs a VmModel setMainTable defines the maintable of the model

Author
Max Milbers

Member Function Documentation

static VirtueMartModelVendor::getLoggedVendor (   $ownerOnly = TRUE)
static

name: getLoggedVendor Checks which $vendorId has the just logged in user.

Author
Max Milbers
Parameters
VirtueMartModelVendor::getUserIdByOrderId (   $virtuemart_order_id)
Deprecated:
Parameters
$virtuemart_order_id
Returns
int|mixed
static VirtueMartModelVendor::getUserIdByVendorId (   $vendorId)
static

Find the user id given a vendor id

Author
Max Milbers
Parameters
int$virtuemart_vendor_id
Returns
int $virtuemart_user_id
VirtueMartModelVendor::getVendor (   $vendor_id = 0)

Retrieve the vendor details from the database.

Author
Max Milbers
Returns
object Vendor details
VirtueMartModelVendor::getVendorAddressFields (   $vendorId = 0)
VirtueMartModelVendor::getVendorAdressBT (   $virtuemart_vendor_id)
VirtueMartModelVendor::getVendorAndAcceptedCurrencies (   $vendorId)
static VirtueMartModelVendor::getVendorCurrency (   $_vendorId)
static
VirtueMartModelVendor::getVendorEmail (   $virtuemart_vendor_id)

This function gives back the email for the given vendor.

Author
Max Milbers
static VirtueMartModelVendor::getVendorId (   $type,
  $value,
  $ownerOnly = TRUE 
)
static

Gets the vendorId by user Id mapped by table auth_user_vendor or by the order item Assigned users cannot change storeinformations ownerOnly = false should be used for users who are assigned to a vendor for administrative jobs like execution of orders or managing products Changing of vendorinformation should ONLY be possible by the Mainvendor who is in charge

Author
by Max Milbers
RolandD
Parameters
string$typeWhere the vendor ID should be taken from
mixed$valueWhatever value the vendor ID should be filtered on
Returns
int Vendor ID
VirtueMartModelVendor::getVendorName (   $virtuemart_vendor_id = 1)

This function gives back the storename for the given vendor.

Author
Max Milbers
VirtueMartModelVendor::getVendors ( )

Retrieve a list of vendors todo only names are needed here, maybe it should be enhanced (loading object list is slow) todo add possibility to load without limit

Author
RickG
Max Milbers
Returns
object List of vendors
VirtueMartModelVendor::store ( $data)

Bind the post data to the vendor table and save it This function DOES NOT safe information which is in the vmusers or vm_user_info table It only stores the stuff into the vendor table

Author
RickG
Max Milbers
Returns
boolean True is the save was successful, false otherwise.

Member Data Documentation

VirtueMartModelVendor::$_vendorAcceptedCurrencies = array()
static
VirtueMartModelVendor::$_vendorCurrencies = array()
static

Get the vendor specific currency

Author
Oscar van Eijk
Parameters
$_vendorIdVendor ID
Returns
string Currency code
VirtueMartModelVendor::$_vendorFields = FALSE
private

The documentation for this class was generated from the following file: