|
VirtueMart
3.2.14.9808
|


Public Member Functions | |
| __construct () | |
| initialiseRequests () | |
| updateRequests () | |
| getLastProductOrdering ($default=0) | |
| setLastProductOrdering ($ordering) | |
| setKeyWord ($keyword) | |
| sortSearchListQuery ($onlyPublished=TRUE, $virtuemart_category_id=FALSE, $group=FALSE, $nbrReturnProducts=FALSE, $langFields=array()) | |
| getProductStockhandle () | |
| setPaginationLimits () | |
| getProduct ($virtuemart_product_id=NULL, $front=TRUE, $withCalc=TRUE, $onlyPublished=TRUE, $quantity=1, $virtuemart_shoppergroup_ids=0) | |
| loadProductPrices ($productId, $virtuemart_shoppergroup_ids, $front) | |
| getRawProductPrices (&$product, $quantity, $virtuemart_shoppergroup_ids, $front, $withParent=0) | |
| getProductSingle ($virtuemart_product_id=NULL, $front=TRUE, $quantity=1, $withParent=false, $virtuemart_shoppergroup_ids=0, $prices=true) | |
| fillVoidPrice () | |
| getProductCategories ($virtuemart_product_id) | |
| getProductsInCategory ($categoryId) | |
| getProductListing ($group=FALSE, $nbrReturnProducts=FALSE, $withCalc=TRUE, $onlyPublished=TRUE, $single=FALSE, $filterCategory=TRUE, $category_id=0, $filterManufacturer=TRUE, $manufacturer_id=0) | |
| getProductsListing ($group=FALSE, $nbrReturnProducts=FALSE, $withCalc=TRUE, $onlyPublished=TRUE, $single=FALSE, $filterCategory=TRUE, $category_id=0, $filterManufacturer=TRUE, $manufacturer_id=0, $omit=0) | |
| setFilter () | |
| getProducts ($productIds, $front=TRUE, $withCalc=TRUE, $onlyPublished=TRUE, $single=FALSE) | |
| getNeighborProducts ($product, $onlyPublished=TRUE, $max=1) | |
| saveorder ($cid=array(), $order, $filter=NULL) | |
| move ($direction, $filter=NULL) | |
| store (&$product) | |
| updateXrefAndChildTables ($data, $tableName, $preload=FALSE) | |
| createChild ($id) | |
| createClone ($id) | |
| remove ($ids) | |
| getPrice ($product, $quantity, $ctype=-1) | |
| getOrderByList ($virtuemart_category_id=FALSE) | |
| getStockIndicator ($product) | |
| updateStockInDB ($product, $amount, $signInStock, $signOrderedStock) | |
| lowStockWarningEmail ($virtuemart_product_id) | |
| getUncategorizedChildren ($withParent) | |
| checkChildProducts ($product_ids) | |
| getProductChilds ($product_id) | |
| getProductChildIds ($product_id) | |
| getAllProductChildIds ($product_ids, &$childIds) | |
| sentProductEmailToShoppers () | |
| getProductShoppersByStatus ($product_id, $states, $filter_order= 'ou.email', $filter_order_Dir= 'ASC') | |
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 | getValidProductFilterArray () |
| static | checkIfCached ($virtuemart_product_id, $front=NULL, $withCalc=TRUE, $onlyPublished=TRUE, $quantity=1, $virtuemart_shoppergroup_ids=0, $withRating=0) |
| static | checkIfCachedSingle ($virtuemart_product_id, $front=NULL, $quantity=1, $withParent=false, $virtuemart_shoppergroup_ids=0, $prices=true) |
| static | getProductCategoryIds ($id) |
| static | getProductParentId ($product_id) |
| static | addProductToRecent ($productId) |
| static | getRecentProductIds ($nbr=3) |
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) |
Public Attributes | |
| $products = NULL | |
| $_onlyQuery = false | |
| $keyword = "0" | |
| $product_parent_id = FALSE | |
| $virtuemart_manufacturer_id = FALSE | |
| $virtuemart_category_id = 0 | |
| $search_type = '' | |
| $searchcustoms = FALSE | |
| $searchplugin = 0 | |
| $filter_order = 'p.virtuemart_product_id' | |
| $filter_order_Dir = 'DESC' | |
| $valid_BE_search_fields = array('product_name', 'product_sku','`l`.`slug`', 'product_s_desc', '`l`.`metadesc`') | |
| $withRating = false | |
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') | |
Static Public Attributes | |
| static | $decimals = array('product_length','product_width','product_height','product_weight','product_packaging') |
| static | $_products = array() |
| static | $_cacheOpt = array() |
| static | $_cacheOptSingle = array() |
| static | $_alreadyLoadedIds = array() |
| static | $omitLoaded = false |
| static | $_productsSingle = array() |
Protected Member Functions | |
| populateState () | |
Protected Member Functions inherited from VmModel | |
| populateState () | |
| _createTable ($name, $prefix= 'Table', $config=array()) | |
| _getList ($query, $limitstart=0, $limit=0) | |
| _getListCount ($query) | |
Private Member Functions | |
| fillVoidProduct ($front=TRUE) | |
| productPricesClone ($virtuemart_product_id) | |
| productCustomsfieldsClone ($virtuemart_product_id) | |
Private Attributes | |
| $_autoOrder = 0 | |
| $orderByString = 0 | |
| $listing = FALSE | |
Additional Inherited Members | |
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 | |
| VirtueMartModelProduct::__construct | ( | ) |
constructs a VmModel setMainTable defines the maintable of the model
|
static |
| VirtueMartModelProduct::checkChildProducts | ( | $product_ids | ) |
Check if the product has any children
| int | $virtuemart_product_id | Product ID |
|
static |
|
static |
| VirtueMartModelProduct::createChild | ( | $id | ) |
This function creates a child for a given product id
| int | id of parent id |
| VirtueMartModelProduct::createClone | ( | $id | ) |
Creates a clone of a given product id
| int | $virtuemart_product_id |
| VirtueMartModelProduct::fillVoidPrice | ( | ) |
|
private |
This fills the empty properties of a product todo add if(!empty statements
| unknown_type | $product | |
| unknown_type | $front |
| VirtueMartModelProduct::getAllProductChildIds | ( | $product_ids, | |
| & | $childIds | ||
| ) |
| VirtueMartModelProduct::getLastProductOrdering | ( | $default = 0 | ) |
| VirtueMartModelProduct::getNeighborProducts | ( | $product, | |
$onlyPublished = TRUE, |
|||
$max = 1 |
|||
| ) |
This function retrieves the "neighbor" products of a product specified by $virtuemart_product_id Neighbors are the previous and next product in the current list
| object | $product | The product to find the neighours of |
| VirtueMartModelProduct::getOrderByList | ( | $virtuemart_category_id = FALSE | ) |
Get the Order By Select List
notice by Max Milbers html tags should never be in a model. This function should be moved to a helper or simular,...
| $fieds | from config Back-end |
| VirtueMartModelProduct::getPrice | ( | $product, | |
| $quantity, | |||
$ctype = -1 |
|||
| ) |
Gets the price for a variant
| VirtueMartModelProduct::getProduct | ( | $virtuemart_product_id = NULL, |
|
$front = TRUE, |
|||
$withCalc = TRUE, |
|||
$onlyPublished = TRUE, |
|||
$quantity = 1, |
|||
$virtuemart_shoppergroup_ids = 0 |
|||
| ) |
This function creates a product with the attributes of the parent.
| int | $virtuemart_product_id | |
| boolean | $front | for frontend use |
| boolean | $withCalc | calculate prices? |
| boolean | published | |
| int | quantity | |
| boolean | load customfields |
| VirtueMartModelProduct::getProductCategories | ( | $virtuemart_product_id | ) |
Load the product category
|
static |
| VirtueMartModelProduct::getProductChildIds | ( | $product_id | ) |
| VirtueMartModelProduct::getProductChilds | ( | $product_id | ) |
| VirtueMartModelProduct::getProductListing | ( | $group = FALSE, |
|
$nbrReturnProducts = FALSE, |
|||
$withCalc = TRUE, |
|||
$onlyPublished = TRUE, |
|||
$single = FALSE, |
|||
$filterCategory = TRUE, |
|||
$category_id = 0, |
|||
$filterManufacturer = TRUE, |
|||
$manufacturer_id = 0 |
|||
| ) |
Loads different kind of product lists. you can load them with calculation or only published onces, very intersting is the loading of groups valid values are latest, topten, featured, recent.
The function checks itself by the config if the user is allowed to see the price or published products
|
static |
| VirtueMartModelProduct::getProducts | ( | $productIds, | |
$front = TRUE, |
|||
$withCalc = TRUE, |
|||
$onlyPublished = TRUE, |
|||
$single = FALSE |
|||
| ) |
Returns products for given array of ids
| int | $productIds | |
| boolean | $front | |
| boolean | $withCalc | |
| boolean | $onlyPublished |
| VirtueMartModelProduct::getProductShoppersByStatus | ( | $product_id, | |
| $states, | |||
$filter_order = 'ou.email', |
|||
$filter_order_Dir = 'ASC' |
|||
| ) |
| VirtueMartModelProduct::getProductsInCategory | ( | $categoryId | ) |
Get the products in a given category
public
| int | $virtuemart_category_id | the category ID where to get the products for |
| VirtueMartModelProduct::getProductSingle | ( | $virtuemart_product_id = NULL, |
|
$front = TRUE, |
|||
$quantity = 1, |
|||
$withParent = false, |
|||
$virtuemart_shoppergroup_ids = 0, |
|||
$prices = true |
|||
| ) |
| VirtueMartModelProduct::getProductsListing | ( | $group = FALSE, |
|
$nbrReturnProducts = FALSE, |
|||
$withCalc = TRUE, |
|||
$onlyPublished = TRUE, |
|||
$single = FALSE, |
|||
$filterCategory = TRUE, |
|||
$category_id = 0, |
|||
$filterManufacturer = TRUE, |
|||
$manufacturer_id = 0, |
|||
$omit = 0 |
|||
| ) |
| VirtueMartModelProduct::getProductStockhandle | ( | ) |
| VirtueMartModelProduct::getRawProductPrices | ( | & | $product, |
| $quantity, | |||
| $virtuemart_shoppergroup_ids, | |||
| $front, | |||
$withParent = 0 |
|||
| ) |
|
static |
Gives ids the recently by the shopper visited products
| VirtueMartModelProduct::getStockIndicator | ( | $product | ) |
Get the stock level for a given product
| object | $product | the product to get stocklevel for |
| VirtueMartModelProduct::getUncategorizedChildren | ( | $withParent | ) |
|
static |
| VirtueMartModelProduct::initialiseRequests | ( | ) |
This function resets the variables holding request depended data to the initial values
| VirtueMartModelProduct::loadProductPrices | ( | $productId, | |
| $virtuemart_shoppergroup_ids, | |||
| $front | |||
| ) |
| VirtueMartModelProduct::lowStockWarningEmail | ( | $virtuemart_product_id | ) |
| VirtueMartModelProduct::move | ( | $direction, | |
$filter = NULL |
|||
| ) |
Moves the order of a record
| integer | The increment to reorder by |
|
protected |
This functions updates the variables of the model which are used in the sortSearchListQuery with the variables from the Request
|
private |
|
private |
| VirtueMartModelProduct::remove | ( | $ids | ) |
removes a product and related table entries
| VirtueMartModelProduct::saveorder | ( | $cid = array(), |
|
| $order, | |||
$filter = NULL |
|||
| ) |
| VirtueMartModelProduct::sentProductEmailToShoppers | ( | ) |
| VirtueMartModelProduct::setFilter | ( | ) |
overriden getFilter to persist filters
| VirtueMartModelProduct::setKeyWord | ( | $keyword | ) |
Sets the keyword variable for the search
| string | $keyword |
| VirtueMartModelProduct::setLastProductOrdering | ( | $ordering | ) |
| VirtueMartModelProduct::setPaginationLimits | ( | ) |
Override
| VirtueMartModelProduct::sortSearchListQuery | ( | $onlyPublished = TRUE, |
|
$virtuemart_category_id = FALSE, |
|||
$group = FALSE, |
|||
$nbrReturnProducts = FALSE, |
|||
$langFields = array() |
|||
| ) |
New function for sorting, searching, filtering and pagination for product ids.
| VirtueMartModelProduct::store | ( | & | $product | ) |
Store a product
| $product | reference | |
| bool | $isChild | Means not that the product is child or not. It means if the product should be threated as child |
| VirtueMartModelProduct::updateRequests | ( | ) |
| VirtueMartModelProduct::updateStockInDB | ( | $product, | |
| $amount, | |||
| $signInStock, | |||
| $signOrderedStock | |||
| ) |
| VirtueMartModelProduct::updateXrefAndChildTables | ( | $data, | |
| $tableName, | |||
$preload = FALSE |
|||
| ) |
|
static |
|
private |
|
static |
|
static |
| VirtueMartModelProduct::$_onlyQuery = false |
|
static |
|
static |
|
static |
| VirtueMartModelProduct::$filter_order = 'p.virtuemart_product_id' |
| VirtueMartModelProduct::$filter_order_Dir = 'DESC' |
| VirtueMartModelProduct::$keyword = "0" |
|
private |
|
static |
|
private |
| VirtueMartModelProduct::$product_parent_id = FALSE |
| VirtueMartModelProduct::$products = NULL |
| VirtueMartModelProduct::$search_type = '' |
| VirtueMartModelProduct::$searchcustoms = FALSE |
| VirtueMartModelProduct::$searchplugin = 0 |
| VirtueMartModelProduct::$valid_BE_search_fields = array('product_name', 'product_sku','`l`.`slug`', 'product_s_desc', '`l`.`metadesc`') |
| VirtueMartModelProduct::$virtuemart_category_id = 0 |
| VirtueMartModelProduct::$virtuemart_manufacturer_id = FALSE |
| VirtueMartModelProduct::$withRating = false |
1.8.11