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

Public Member Functions

 __construct ()
 
 getCustomfield ($id=0)
 
 getCustomEmbeddedProductCustomFields ($productIds, $virtuemart_custom_id=0, $cartattribute=-1, $forcefront=FALSE)
 
 displayProductCustomfieldBE ($field, $product, $row)
 
 calculateModificators (&$product)
 
 storeProductCustomfields ($table, $datas, $id)
 
 addHidden ($name, $value= '')
 
- 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 getProductCustomSelectFieldList ()
 
static getCustomEmbeddedProductCustomField ($virtuemart_customfield_id)
 
static bindCustomEmbeddedFieldParams (&$obj, $fieldtype)
 
static displayProductCustomfieldFE (&$product, &$customfields)
 
static displayProductCustomfieldSelected ($product, $html, $trigger)
 
static CustomsFieldCartModDisplay ($product)
 
static CustomsFieldCartDisplay ($product)
 
static CustomsFieldOrderDisplay ($item, $view= 'FE', $absUrl=FALSE)
 
static displayCustomMedia ($media_id, $table= 'product', $width=false, $height=false, $absUrl=false)
 
static _getCustomPrice ($customPrice, $currency, $calculator)
 
static renderCustomfieldPrice ($productCustom, $product, $calculator)
 
static getCustomFieldPriceModificator ($productCustom, $product)
 
static setEditCustomHidden ($customfield, $i)
 
- 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 $dimensions = array('product_length','product_width','product_height','product_weight')
 
static $useAbsUrls = false
 
static $customfieldRenderer = true
 

Private Member Functions

 sortChildIds ($product_id, $childIds, $options, $sorted=array())
 
 renderProductChildLine ($i, $line, $field, $productModel, $row, $showSku)
 

Private Attributes

 $_hidden = array()
 

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

VirtueMartModelCustomfields::__construct ( )

constructs a VmModel setMainTable defines the maintable of the model

Author
Max Milbers

Member Function Documentation

static VirtueMartModelCustomfields::_getCustomPrice (   $customPrice,
  $currency,
  $calculator 
)
static
Deprecated:
Parameters
$customPrice
$currency
$calculator
Returns
string
VirtueMartModelCustomfields::addHidden (   $name,
  $value = '' 
)
static VirtueMartModelCustomfields::bindCustomEmbeddedFieldParams ( $obj,
  $fieldtype 
)
static
VirtueMartModelCustomfields::calculateModificators ( $product)
Parameters
$product
$variantsids of the selected variants
Returns
float
static VirtueMartModelCustomfields::CustomsFieldCartDisplay (   $product)
static

render custom fields display cart FE

static VirtueMartModelCustomfields::CustomsFieldCartModDisplay (   $product)
static

TODO This is html and view stuff and MUST NOT be in the model, notice by Max render custom fields display cart module FE

static VirtueMartModelCustomfields::CustomsFieldOrderDisplay (   $item,
  $view = 'FE',
  $absUrl = FALSE 
)
static

render custom fields display order BE/FE

static VirtueMartModelCustomfields::displayCustomMedia (   $media_id,
  $table = 'product',
  $width = false,
  $height = false,
  $absUrl = false 
)
static
VirtueMartModelCustomfields::displayProductCustomfieldBE (   $field,
  $product,
  $row 
)
Author
Max Milbers
Parameters
$field
$product_id
$row
static VirtueMartModelCustomfields::displayProductCustomfieldFE ( $product,
$customfields 
)
static
Author
Max Milbers
Parameters
$product
$customfield
static VirtueMartModelCustomfields::displayProductCustomfieldSelected (   $product,
  $html,
  $trigger 
)
static

There are too many functions doing almost the same for my taste the results are sometimes slighty different and makes it hard to work with it, therefore here the function for future proxy use

static VirtueMartModelCustomfields::getCustomEmbeddedProductCustomField (   $virtuemart_customfield_id)
static
VirtueMartModelCustomfields::getCustomEmbeddedProductCustomFields (   $productIds,
  $virtuemart_custom_id = 0,
  $cartattribute = -1,
  $forcefront = FALSE 
)
VirtueMartModelCustomfields::getCustomfield (   $id = 0)

Gets a single custom by virtuemart_customfield_id

Parameters
string$type
string$mimemime type of custom, use for exampel image
Returns
customobject
static VirtueMartModelCustomfields::getCustomFieldPriceModificator (   $productCustom,
  $product 
)
static
static VirtueMartModelCustomfields::getProductCustomSelectFieldList ( )
static
static VirtueMartModelCustomfields::renderCustomfieldPrice (   $productCustom,
  $product,
  $calculator 
)
static
VirtueMartModelCustomfields::renderProductChildLine (   $i,
  $line,
  $field,
  $productModel,
  $row,
  $showSku 
)
private
static VirtueMartModelCustomfields::setEditCustomHidden (   $customfield,
  $i 
)
static
VirtueMartModelCustomfields::sortChildIds (   $product_id,
  $childIds,
  $options,
  $sorted = array() 
)
private
VirtueMartModelCustomfields::storeProductCustomfields (   $table,
  $datas,
  $id 
)

Save and delete from database all product custom_fields and xref @ var $table : the xref table(eg. product,category ...) $data : array of customfields $id : The concerned id (eg. product_id)

Member Data Documentation

VirtueMartModelCustomfields::$_hidden = array()
private
VirtueMartModelCustomfields::$customfieldRenderer = true
static
VirtueMartModelCustomfields::$dimensions = array('product_length','product_width','product_height','product_weight')
static
VirtueMartModelCustomfields::$useAbsUrls = false
static

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