OXID eShop CE  4.10.8
 All Classes Namespaces Files Functions Variables Pages
oxArticle Class Reference
+ Inheritance diagram for oxArticle:
+ Collaboration diagram for oxArticle:

Public Member Functions

 __construct ($aParams=null)
 __get ($sName)
 __set ($sName, $sValue)
 isInList ()
 setId ($sId=null)
 getActiveCheckQuery ($blForceCoreTable=null)
 getStockCheckQuery ($blForceCoreTable=null)
 getVariantsQuery ($blRemoveNotOrderables, $blForceCoreTable=null)
 getUnitQuantity ()
 getSize ()
 getWeight ()
 getSqlActiveSnippet ($blForceCoreTable=null)
 setSkipAssign ($blSkipAssign)
 disablePriceLoad ()
 enablePriceLoad ()
 getItemKey ()
 setItemKey ($sItemKey)
 setNoVariantLoading ($blLoadVariants)
 isBuyable ()
 getPersParams ()
 isOnComparisonList ()
 setOnComparisonList ($blOnList)
 setLoadParentData ($blLoadParentData)
 getLoadParentData ()
 isMultilingualField ($sFieldName)
 getFUnitPrice ()
 getUnitPrice ()
 getFMinPrice ()
 getFVarMinPrice ()
 getVarMinPrice ()
 getMinPrice ()
 isRangePrice ()
 setRangePrice ($blIsRangePrice=true)
 isVisible ()
 assign ($aRecord)
 load ($sOXID)
 hasSortingFieldsChanged ()
 addToRatingAverage ($iRating)
 setRatingAverage ($iRating)
 setRatingCount ($iRatingCnt)
 getArticleRatingAverage ($blIncludeVariants=false)
 getArticleRatingCount ($blIncludeVariants=false)
 getReviews ()
 getCrossSelling ()
 getAccessoires ()
 getSimilarProducts ()
 getCustomerAlsoBoughtThisProducts ()
 loadAmountPriceInfo ()
 getSelectLists ($sKeyPrefix=null)
 getVariantsCount ()
 hasMdVariants ()
 hasIntangibleAgreement ()
 hasDownloadableAgreement ()
 getVariantSelections ($aFilterIds=null, $sActVariantId=null, $iLimit=0)
 getSelections ($iLimit=null, $aFilter=null)
 getFullVariants ($blRemoveNotOrderables=true, $blForceCoreTable=null)
 getVariants ($blRemoveNotOrderables=true, $blForceCoreTable=null)
 getSimpleVariants ()
 getAdminVariants ($sLanguage=null)
 getCategory ()
 getCategoryIds ($blActCats=false, $blSkipCache=false)
 getVendor ($blShopCheck=true)
 getVendorId ($blForceReload=false)
 getManufacturerId ($blForceReload=false)
 getManufacturer ($blShopCheck=true)
 inCategory ($sCatNid)
 isAssignedToCategory ($sCatId)
 getTPrice ()
 skipDiscounts ()
 setPrice (oxPrice $oPrice)
 getBasePrice ($dAmount=1)
 getPrice ($dAmount=1)
 setArticleUser ($oUser)
 getArticleUser ()
 getBasketPrice ($dAmount, $aSelList, $oBasket)
 delete ($sOXID=null)
 reduceStock ($dAmount, $blAllowNegativeStock=false)
 updateSoldAmount ($dAmount=0)
 disableReminder ()
 save ()
 resetParent ()
 getPictureGallery ()
 onChange ($sAction=null, $sOXID=null, $sParentID=null)
 getCustomVAT ()
 checkForStock ($dAmount, $dArtStockAmount=0, $selectForUpdate=false)
 getLongDescription ()
 getLongDesc ()
 setArticleLongDesc ($sDesc)
 getAttributes ()
 getAttributesDisplayableInBasket ()
 appendLink ($sAddParams, $iLang=null)
 getBaseSeoLink ($iLang, $blMain=false)
 getLink ($iLang=null, $blMain=false)
 getMainLink ($iLang=null)
 setLinkType ($iType)
 getLinkType ()
 appendStdLink ($sAddParams, $iLang=null)
 getBaseStdLink ($iLang, $blAddId=true, $blFull=true)
 getStdLink ($iLang=null, $aParams=array())
 getMediaUrls ()
 getDynImageDir ()
 getDispSelList ()
 getMoreDetailLink ()
 getToBasketLink ()
 getStockStatus ()
 getDeliveryDate ()
 getFTPrice ()
 getFPrice ()
 resetRemindStatus ()
 getFNetPrice ()
 isParentNotBuyable ()
 isNotBuyable ()
 setBuyableState ($blBuyable=false)
 setSelectlist ($aSelList)
 getPictureUrl ($iIndex=1)
 getIconUrl ($iIndex=0)
 getThumbnailUrl ($bSsl=null)
 getZoomPictureUrl ($iIndex= '')
 applyVats (oxPrice $oPrice)
 applyDiscountsForVariant ($oPrice)
 getParentArticle ()
 updateVariantsRemind ()
 getProductId ()
 getParentId ()
 isOrderArticle ()
 isVariant ()
 isMdVariant ()
 getSqlForPriceCategories ($sFields= '')
 inPriceCategory ($sCatNid)
 getMdVariants ()
 getMdSubvariants ()
 getPictureFieldValue ($sFieldName, $iIndex=null)
 getMasterZoomPictureUrl ($iIndex)
 getUnitName ()
 getArticleFiles ($blAddFromParent=false)
 isDownloadable ()
 hasAmountPrice ()
 getVariantIds ($blActiveVariants=true)
 getArticleVat ()
- Public Member Functions inherited from oxI18n
 __construct ()
 setLanguage ($iLang=null)
 getLanguage ()
 setEnableMultilang ($blEmployMultilanguage)
 isMultilang ()
 loadInLang ($iLanguage, $sOxid)
 modifyCacheKey ($sCacheKey, $blOverride=false)
 getAvailableInLangs ()
 getUpdateSqlFieldName ($sField)
- Public Member Functions inherited from oxBase
 getUseSkipSaveFields ()
 setUseSkipSaveFields ($blUseSkipSaveFields)
 __isset ($mVar)
 __clone ()
 oxClone ($oObject)
 getUpdateSeo ()
 setUpdateSeo ($blUpdateSeo)
 init ($sTableName=null, $blForceAllFields=false)
 getClassName ()
 getCoreTableName ()
 getId ()
 setShopId ($iShopId)
 getShopId ()
 getViewName ($blForceCoreTableUsage=null)
 disableLazyLoading ()
 isDerived ()
 setIsDerived ($blVal)
 isLoaded ()
 buildSelectString ($aWhere=null)
 assignRecord ($sSelect)
 getFieldData ($sFieldName)
 getSelectFields ($blForceCoreTableUsage=null)
 allowDerivedUpdate ()
 allowDerivedDelete ()
 exists ($sOXID=null)
 beforeUpdate ($sOXID=null)
 onChange ($iAction=null, $sOXID=null)
 setInList ()
 isOx ()
 isReadOnly ()
 setReadOnly ($blReadOnly)
 getFieldNames ()
 addFieldName ($sName)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)
- Public Member Functions inherited from oxIArticle
 checkForStock ($dAmount, $dArtStockAmount=0)
 getPrice ()
- Public Member Functions inherited from oxIUrl
 getLink ($iLang=null)

Protected Member Functions

 _loadVariantList ($blSimple, $blRemoveNotOrderables=true, $blForceCoreTable=null)
 _selectCategoryIds ($sSql, $sField)
 _getCategoryIdsSelect ($blActCats=false)
 _getActiveCategorySelectSnippet ()
 _getSelectCatIds ($sOXID, $blActCats=false)
 _calculatePrice ($oPrice, $dVat=null)
 _hasAnyVariant ($blForceCoreTable=null)
 _isStockStatusChanged ()
 _isVisibilityChanged ()
 _saveArtLongDesc ()
 _skipSaveFields ()
 _mergeDiscounts ($aDiscounts, $aItemDiscounts)
 _getGroupPrice ()
 _getAmountPrice ($dAmount=1)
 _modifySelectListPrice ($dPrice, $aChosenList=null)
 _fillAmountPriceList ($aAmPriceList)
 _getVariantsIds ($blActiveVariants=true)
 _applyVAT (oxPrice $oPrice, $dVat)
 _applyCurrency (oxPrice $oPrice, $oCur=null)
 _getAttribsString (&$sAttributeSql, &$iCnt)
 _getSimList ($sAttributeSql, $iCnt)
 _generateSimListSearchStr ($sArticleTable, $aList)
 _generateSearchStr ($sOXID, $blSearchPriceCat=false)
 _generateSearchStrForCustomerBought ()
 _generateSelectCatStr ($sOXID, $sCatId, $dPriceFromTo=false)
 _getAmountPriceList ()
 _isFieldEmpty ($sFieldName)
 _assignParentFieldValue ($sFieldName)
 _isImageField ($sFieldName)
 _assignParentFieldValues ()
 _assignNotBuyableParent ()
 _assignStock ()
 _assignPersistentParam ()
 _assignDynImageDir ()
 _assignComparisonListFlag ()
 _insert ()
 _update ()
 _deleteRecords ($sOXID)
 _deleteVariantRecords ($sOXID)
 _deletePics ()
 _onChangeResetCounts ($sOxid, $sVendorId=null, $sManufacturerId=null)
 _onChangeUpdateStock ($sParentID)
 _onChangeStockResetCount ($sOxid)
 _onChangeUpdateVarCount ($sParentID)
 _setVarMinMaxPrice ($sParentId)
 _hasMasterImage ($iIndex)
 _isPriceViewModeNetto ()
 _getPriceObject ($blCalculationModeNetto=null)
 _getPriceForView ($oPrice)
 _preparePrice ($dPrice, $dVat, $blCalculationModeNetto=null)
 _getUserPriceSufix ()
 _getPrice ()
 _getVarMinPrice ()
 _getSubShopVarMinPrice ()
 _getVarMaxPrice ()
 _getSubShopVarMaxPrice ()
 _loadFromDb ($sOXID)
 _updateParentDependFields ()
 _getCopyParentFields ()
 _assignParentDependFields ()
 _saveSortingFieldValuesOnLoad ()
- Protected Member Functions inherited from oxI18n
 _getFieldStatus ($sFieldName)
 _getNonCachedFieldNames ($blForceFullStructure=false)
 _getFieldLang ($sFieldName)
 _setUpdateSeoOnFieldChange ($sField)
 _getUpdateFieldsForTable ($sTable, $blUseSkipSaveFields=true)
 _getUpdateFields ($blUseSkipSaveFields=true)
 _getLanguageSetTables ($sCoreTableName=null)
 _getObjectViewName ($sTable, $sShopID=null)
 _getAllFields ($blReturnSimple=false)
 _addField ($sName, $sStatus, $sType=null, $sLength=null)
 _canFieldBeNull ($sFieldName)
- Protected Member Functions inherited from oxBase
 _removeElement2ShopRelations ($sOxId)
 _isInList ()
 _getTableFields ($sTable, $blReturnSimple=false)
 _initDataStructure ($blForceFullStructure=false)
 _getFieldLongName ($sFieldName)
 _setFieldData ($sFieldName, $sValue, $iDataType=oxField::T_TEXT)
 _getFieldDefaultValue ($sFieldName)
 _getUpdateFieldValue ($sFieldName, $oField)
 _isDisabledFieldCache ()
 _addSkippedSaveFieldsForMapping ()
 _disableLazyLoadingForCaching ()

Protected Attributes

 $_sClassName = 'oxarticle'
 $_blUseLazyLoading = true
 $_sItemKey
 $_blCalcPrice = true
 $_oPrice = null
 $_dVarMinPrice = null
 $_dVarMaxPrice = null
 $_dArticleVat = null
 $_aPersistParam = null
 $_blNotBuyable = false
 $_blLoadVariants = true
 $_aVariants = null
 $_aVariantsWithNotOrderables = null
 $_blNotBuyableParent = false
 $_blHasVariants = false
 $_blHasMdVariants = false
 $_blIsOnComparisonList = false
 $_oUser = null
 $_blLoadPrice = true
 $_fPricePerUnit = null
 $_blLoadParentData = false
 $_blAllowEmptyParentId = false
 $_blSkipAssign = false
 $_blSkipDiscounts = null
 $_oAttributeList = null
 $_blIsRangePrice = null
 $_aMediaUrls = null
 $_aDispSelList
 $_blIsSeoObject = true
 $_oAmountPriceList = null
 $_iLinkType = 0
 $_aStdUrls = array()
 $_aSeoUrls = array()
 $_aSeoAddParams = array()
 $_aStdAddParams = array()
 $_sDynImageDir = null
 $_sMoreDetailLink = null
 $_sToBasketLink = null
 $_iStockStatusOnLoad = null
 $_aSortingFieldsOnLoad = array()
 $_iStockStatus = null
 $_oTPrice = null
 $_oAmountPriceInfo = null
 $_dAmountPrice = null
 $_aNonCopyParentFields
 $_aCopyParentField
 $_oMdVariants = null
 $_oLongDesc = null
 $_aVariantSelections = array()
 $_aArticleFiles = null
 $_blCanUpdateAnyField = null
- Protected Attributes inherited from oxI18n
 $_sClassName = 'oxI18n'
 $_iLanguage = null
 $_blEmployMultilanguage = true
- Protected Attributes inherited from oxBase
 $_sOXID = null
 $_iShopId = null
 $_blIsSimplyClonable = true
 $_sClassName = 'oxbase'
 $_sCoreTable = null
 $_sViewTable = null
 $_aFieldNames = array('oxid' => 0)
 $_sCacheKey = null
 $_blUseLazyLoading = false
 $_aSkipSaveFields = array('oxtimestamp')
 $_blUseSkipSaveFields = true
 $_sExistKey = 'oxid'
 $_blIsDerived = null
 $_blIsSeoObject = false
 $_blUpdateSeo = true
 $_blReadOnly = false
 $_blIsInList = false
 $_isLoaded = false
 $_aInnerLazyCache = null
 $_blEmployMultilanguage = false

Static Protected Attributes

static $_aLoadedParents
static $_aSelList
static $_aArticleManufacturers = array()
static $_aArticleVendors = array()
static $_aArticleCats = array()
static $_aSelections = array()
static $_aCategoryCache = null
static $_blHasAmountPrice = null

Detailed Description

Article manager. Creates fully detailed article object, with such information as VAT, discounts, etc.

Definition at line 19 of file oxarticle.php.

Constructor & Destructor Documentation

oxArticle::__construct (   $aParams = null)

Constructor, sets shop ID for article (oxconfig::getShopId()), initiates parent constructor (parent::oxI18n()).

Parameters
array$aParamsThe array of names and values of oxArticle instance properties to be set on object instantiation
Returns
null

Definition at line 455 of file oxarticle.php.

Member Function Documentation

oxArticle::__get (   $sName)

Magic getter, deals with values which are loaded on demand. Additionally it sets default value for unknown picture fields

Parameters
string$sNameVariable name
Returns
mixed

Reimplemented from oxBase.

Definition at line 474 of file oxarticle.php.

oxArticle::__set (   $sName,
  $sValue 
)

Sets article parameter

Parameters
string$sNamename of parameter to set
mixed$sValueparameter value

Reimplemented from oxBase.

Definition at line 491 of file oxarticle.php.

oxArticle::_applyCurrency ( oxPrice  $oPrice,
  $oCur = null 
)
protected

Applies currency factor

Parameters
oxPrice$oPricePrice object
object$oCurCurrency object

Definition at line 3842 of file oxarticle.php.

oxArticle::_applyVAT ( oxPrice  $oPrice,
  $dVat 
)
protected

Applies VAT to article

Parameters
oxPrice$oPricePrice object
double$dVatVAT percent

Definition at line 3824 of file oxarticle.php.

oxArticle::_assignComparisonListFlag ( )
protected

Adds a flag if article is on comparisonlist.

Definition at line 4308 of file oxarticle.php.

oxArticle::_assignDynImageDir ( )
protected

assigns dynimagedir to article

Definition at line 4293 of file oxarticle.php.

oxArticle::_assignNotBuyableParent ( )
protected

if we have variants then depending on config option the parent may be non buyable

Definition at line 4197 of file oxarticle.php.

oxArticle::_assignParentDependFields ( )
protected

Set parent field value to child - variants

Definition at line 4955 of file oxarticle.php.

oxArticle::_assignParentFieldValue (   $sFieldName)
protected

Assigns parent field values to article

Parameters
string$sFieldNamefield name
Returns
null;

Definition at line 4130 of file oxarticle.php.

oxArticle::_assignParentFieldValues ( )
protected

Assigns parent field values to article

Definition at line 4180 of file oxarticle.php.

oxArticle::_assignPersistentParam ( )
protected

assigns persistent param to article

Definition at line 4281 of file oxarticle.php.

oxArticle::_assignStock ( )
protected

Assigns stock status to article

Definition at line 4210 of file oxarticle.php.

oxArticle::_calculatePrice (   $oPrice,
  $dVat = null 
)
protected

Calculates price of article (adds taxes, currency and discounts).

Parameters
oxPrice$oPriceprice object
double$dVatvat value, optional, if passed, bypasses "bl_perfCalcVatOnlyForBasketOrder" config value
Returns
oxPrice

Definition at line 3479 of file oxarticle.php.

oxArticle::_deletePics ( )
protected

Delete pics

Definition at line 4448 of file oxarticle.php.

oxArticle::_deleteRecords (   $sOXID)
protected

Deletes records in database

Parameters
string$sOXIDArticle ID
Returns
int

Definition at line 4369 of file oxarticle.php.

oxArticle::_deleteVariantRecords (   $sOXID)
protected

Deletes variant records

Parameters
string$sOXIDArticle ID

Definition at line 4427 of file oxarticle.php.

oxArticle::_fillAmountPriceList (   $aAmPriceList)
protected

Fills amount price list object and sets amount price for article object

Parameters
array$aAmPriceListAmount price list
Returns
array

Definition at line 3729 of file oxarticle.php.

oxArticle::_generateSearchStr (   $sOXID,
  $blSearchPriceCat = false 
)
protected

Generates SearchString for getCategory()

Parameters
string$sOXIDArticle ID
bool$blSearchPriceCatWhether to perform the search within price categories
Returns
string

Definition at line 3940 of file oxarticle.php.

oxArticle::_generateSearchStrForCustomerBought ( )
protected

Generates SQL select string for getCustomerAlsoBoughtThisProduct

Returns
string

Definition at line 3965 of file oxarticle.php.

oxArticle::_generateSelectCatStr (   $sOXID,
  $sCatId,
  $dPriceFromTo = false 
)
protected

Generates select string for isAssignedToCategory()

Parameters
string$sOXIDArticle ID
string$sCatIdCategory ID
bool$dPriceFromToArticle price for price categories
Returns
string

Definition at line 4025 of file oxarticle.php.

oxArticle::_generateSimListSearchStr (   $sArticleTable,
  $aList 
)
protected

Generates search string for similar list.

Parameters
string$sArticleTableArticle table name
array$aListA list of original articles
Returns
string

Definition at line 3917 of file oxarticle.php.

oxArticle::_getActiveCategorySelectSnippet ( )
protected

Returns active category select snippet

Returns
string

Definition at line 3439 of file oxarticle.php.

oxArticle::_getAmountPrice (   $dAmount = 1)
protected

Modifies article price depending on given amount. Takes data from oxprice2article table.

Parameters
double$dAmountBasket amount
Returns
bool | null

Definition at line 3671 of file oxarticle.php.

oxArticle::_getAmountPriceList ( )
protected

Collecting assigned to article amount-price list

Returns
oxList

Definition at line 4054 of file oxarticle.php.

oxArticle::_getAttribsString ( $sAttributeSql,
$iCnt 
)
protected

gets attribs string

Parameters
string&$sAttributeSqlAttribute selection snippet
int&$iCntThe number of selected attributes

Definition at line 3858 of file oxarticle.php.

oxArticle::_getCategoryIdsSelect (   $blActCats = false)
protected

Returns query for article categories select

Parameters
bool$blActCatsselect categories if all parents are active
Returns
string

Definition at line 3413 of file oxarticle.php.

oxArticle::_getCopyParentFields ( )
protected

Returns array of fields which should not changed in variants

Returns
array

Definition at line 4947 of file oxarticle.php.

oxArticle::_getGroupPrice ( )
protected

get user Group A, B or C price, returns db price if user is not in groups

Returns
double

Definition at line 3649 of file oxarticle.php.

oxArticle::_getPrice ( )
protected

Return prepared price

Returns
null

Definition at line 4755 of file oxarticle.php.

oxArticle::_getPriceForView (   $oPrice)
protected

Depending on view mode prepare price for viewing

Parameters
oxPrice$oPriceprice object
Returns
double

Definition at line 4687 of file oxarticle.php.

oxArticle::_getPriceObject (   $blCalculationModeNetto = null)
protected

Depending on view mode prepare oxPrice object

Parameters
bool$blCalculationModeNetto- if calculation mode netto - true
Returns
oxPice

Definition at line 4662 of file oxarticle.php.

oxArticle::_getSelectCatIds (   $sOXID,
  $blActCats = false 
)
protected

Returns query for article categories select

Parameters
string$sOXIDarticle id
bool$blActCatsselect categories if all parents are active
Deprecated:
since v5.2 (2013-11-18); use oxArticle::_getCategoryIdsSelect instead
Returns
string

Definition at line 3457 of file oxarticle.php.

oxArticle::_getSimList (   $sAttributeSql,
  $iCnt 
)
protected

Gets similar list.

Parameters
string$sAttributeSqlAttribute selection snippet
int$iCntSimilar list article count
Returns
array

Definition at line 3883 of file oxarticle.php.

oxArticle::_getSubShopVarMaxPrice ( )
protected

Return sub shop variant max price

Returns
null

Definition at line 4879 of file oxarticle.php.

oxArticle::_getSubShopVarMinPrice ( )
protected

Return sub shop variant min price

Returns
null

Definition at line 4814 of file oxarticle.php.

oxArticle::_getUserPriceSufix ( )
protected

Return price suffix

Returns
null

Definition at line 4731 of file oxarticle.php.

oxArticle::_getVariantsIds (   $blActiveVariants = true)
protected

Collects and returns active/all variant ids of article.

Parameters
bool$blActiveVariantsParameter to load only active variants.
Deprecated:
since v5.2.0 (2014-04-30); Naming was changed and the method was made to public. Now use function getVariantIds().
Returns
array

Definition at line 3799 of file oxarticle.php.

oxArticle::_getVarMaxPrice ( )
protected

Return variant max price

Returns
null

Definition at line 4842 of file oxarticle.php.

oxArticle::_getVarMinPrice ( )
protected

Return variant min price

Returns
null

Definition at line 4777 of file oxarticle.php.

oxArticle::_hasAnyVariant (   $blForceCoreTable = null)
protected

Checks if parent has ANY variant assigned

Parameters
bool$blForceCoreTableforce core table usage
Returns
bool

Definition at line 3510 of file oxarticle.php.

oxArticle::_hasMasterImage (   $iIndex)
protected

Checks if article has uploaded master image for selected picture

Parameters
int$iIndexmaster picture index
Returns
bool

Definition at line 4615 of file oxarticle.php.

oxArticle::_insert ( )
protected

Sets article creation date (oxarticle::oxarticles__oxinsert). Then executes parent method parent::_insert() and returns insertion status.

Returns
bool

Reimplemented from oxI18n.

Definition at line 4325 of file oxarticle.php.

oxArticle::_isFieldEmpty (   $sFieldName)
protected

Detects if field is empty.

Parameters
string$sFieldNameField name
Returns
bool

Definition at line 4086 of file oxarticle.php.

oxArticle::_isImageField (   $sFieldName)
protected

Detects if field is an image field by field name

Parameters
string$sFieldNameField name
Returns
bool.

Definition at line 4170 of file oxarticle.php.

oxArticle::_isPriceViewModeNetto ( )
protected

Checks and return true if price view mode is netto

Returns
bool

Definition at line 4643 of file oxarticle.php.

oxArticle::_isStockStatusChanged ( )
protected

Check if stock status has changed since loading the article

Returns
bool

Definition at line 3530 of file oxarticle.php.

oxArticle::_isVisibilityChanged ( )
protected

Check if visibility has changed since loading the article

Returns
bool

Definition at line 3540 of file oxarticle.php.

oxArticle::_loadFromDb (   $sOXID)
protected

Get data from db

Parameters
string$sOXIDid
Returns
array

Definition at line 4909 of file oxarticle.php.

oxArticle::_loadVariantList (   $blSimple,
  $blRemoveNotOrderables = true,
  $blForceCoreTable = null 
)
protected

Loads and returns variants list.

Parameters
bool$blSimpleIf parameter $blSimple - list will be filled with oxSimpleVariant objects, else - oxArticle
bool$blRemoveNotOrderablesif true, removes from list not orderable articles, which are out of stock [optional]
bool$blForceCoreTableif true forces core table use, default is false [optional]
Returns
array | oxsimplevariantlist | oxarticlelist

Definition at line 3301 of file oxarticle.php.

oxArticle::_mergeDiscounts (   $aDiscounts,
  $aItemDiscounts 
)
protected

Merges two discount arrays. If there are two the same discounts, discount values will be added.

Parameters
array$aDiscountsDiscount array
array$aItemDiscountsDiscount array
Returns
array $aDiscounts

Definition at line 3630 of file oxarticle.php.

oxArticle::_modifySelectListPrice (   $dPrice,
  $aChosenList = null 
)
protected

Modifies article price according to selected select list value

Parameters
double$dPriceModifiable price
array$aChosenListSelection list array
Returns
double

Definition at line 3699 of file oxarticle.php.

oxArticle::_onChangeResetCounts (   $sOxid,
  $sVendorId = null,
  $sManufacturerId = null 
)
protected

Resets category and vendor counts. This method is supposed to be called on article change trigger.

Parameters
string$sOxidobject to reset id ID
string$sVendorIdVendor ID
string$sManufacturerIdManufacturer ID

Definition at line 4476 of file oxarticle.php.

oxArticle::_onChangeStockResetCount (   $sOxid)
protected

Resets article count cache when stock value is zero and article goes offline.

Parameters
string$sOxidproduct id

Definition at line 4538 of file oxarticle.php.

oxArticle::_onChangeUpdateStock (   $sParentID)
protected

Updates article stock. This method is supposed to be called on article change trigger.

Parameters
string$sParentIDproduct parent id

Definition at line 4500 of file oxarticle.php.

oxArticle::_onChangeUpdateVarCount (   $sParentID)
protected

Updates variant count. This method is supposed to be called on article change trigger.

Parameters
string$sParentIDParent ID

Definition at line 4555 of file oxarticle.php.

oxArticle::_preparePrice (   $dPrice,
  $dVat,
  $blCalculationModeNetto = null 
)
protected

Depending on view mode prepare price before calculation

Parameters
double$dPrice- price
double$dVat- VAT
bool$blCalculationModeNetto- if calculation mode netto - true
Returns
double

Definition at line 4708 of file oxarticle.php.

oxArticle::_saveArtLongDesc ( )
protected

inserts article long description to artextends table

Returns
null

Definition at line 3550 of file oxarticle.php.

oxArticle::_saveSortingFieldValuesOnLoad ( )
protected

Saves values of sorting fields on article load.

Definition at line 4970 of file oxarticle.php.

oxArticle::_selectCategoryIds (   $sSql,
  $sField 
)
protected

Selects category IDs from given SQL statement and ID field name

Parameters
string$sSqlsql statement
string$sFieldcategory ID field name
Returns
array

Definition at line 3389 of file oxarticle.php.

oxArticle::_setVarMinMaxPrice (   $sParentId)
protected

Updates variant min price. This method is supposed to be called on article change trigger.

Parameters
string$sParentIdParent ID

Definition at line 4573 of file oxarticle.php.

oxArticle::_skipSaveFields ( )
protected

Removes object data fields (oxarticles__oxtimestamp, oxarticles__oxparentid, oxarticles__oxinsert).

Definition at line 3604 of file oxarticle.php.

oxArticle::_update ( )
protected

Executes oxarticle::_skipSaveFields() and updates article information

Returns
bool

Reimplemented from oxI18n.

Definition at line 4345 of file oxarticle.php.

oxArticle::_updateParentDependFields ( )
protected

Set parent field value to child - variants in DB

Returns
bool

Definition at line 4925 of file oxarticle.php.

oxArticle::addToRatingAverage (   $iRating)

Calculates and saves product rating average

Parameters
integer$iRatingnew rating value

Definition at line 1109 of file oxarticle.php.

oxArticle::appendLink (   $sAddParams,
  $iLang = null 
)

Appends article seo url with additional request parameters

Parameters
string$sAddParamsadditional parameters which needs to be added to product url
int$iLanglanguage id

Definition at line 2492 of file oxarticle.php.

oxArticle::appendStdLink (   $sAddParams,
  $iLang = null 
)

Appends article dynamic url with additional request parameters

Parameters
string$sAddParamsadditional parameters which needs to be added to product url
int$iLanglanguage id

Definition at line 2597 of file oxarticle.php.

oxArticle::applyDiscountsForVariant (   $oPrice)

Applies discounts which should be applied in general case (for 0 amount)

Parameters
oxprice$oPricePrice object

Definition at line 2990 of file oxarticle.php.

oxArticle::applyVats ( oxPrice  $oPrice)

apply article and article use

Parameters
oxPrice$oPricetarget price

Definition at line 2980 of file oxarticle.php.

oxArticle::assign (   $aRecord)

Assigns to oxarticle object some base parameters/values (such as detaillink, moredetaillink, etc).

Parameters
array$aRecordArray representing current field values
Returns
null

Reimplemented from oxBase.

Definition at line 1021 of file oxarticle.php.

oxArticle::checkForStock (   $dAmount,
  $dArtStockAmount = 0,
  $selectForUpdate = false 
)

Checks if stock configuration allows to buy user chosen amount $dAmount

Parameters
double$dAmountbuyable amount
double$dArtStockAmountstock amount
bool$selectForUpdateSet true to select for update
Returns
mixed

Definition at line 2340 of file oxarticle.php.

oxArticle::delete (   $sOXID = null)

Deletes record and other information related to this article such as images from DB, also removes variants. Returns true on success.

Parameters
string$sOXIDArticle id
Returns
bool

Reimplemented from oxI18n.

Definition at line 2033 of file oxarticle.php.

oxArticle::disablePriceLoad ( )

Disables article price loading. Should be called before assign(), or load()

Definition at line 680 of file oxarticle.php.

oxArticle::disableReminder ( )

Disables reminder functionality for article

Returns
bool

Definition at line 2129 of file oxarticle.php.

oxArticle::enablePriceLoad ( )

Enable article price loading, if disabled.

Definition at line 688 of file oxarticle.php.

oxArticle::getAccessoires ( )

Loads and returns array with accessories information.

Returns
array

Definition at line 1231 of file oxarticle.php.

oxArticle::getActiveCheckQuery (   $blForceCoreTable = null)

Returns part of sql query used in active snippet. Query checks if product "oxactive = 1". If config option "blUseTimeCheck" is TRUE additionally checks if "oxactivefrom < current data < oxactiveto"

Parameters
bool$blForceCoreTableforce core table usage
Returns
string

Definition at line 533 of file oxarticle.php.

oxArticle::getAdminVariants (   $sLanguage = null)

Loads article variants and returns variants list object. Article language may be set by passing with parameter, or GET/POST/Session variable.

Parameters
string$sLanguageshop language.
Returns
object

Definition at line 1565 of file oxarticle.php.

oxArticle::getArticleFiles (   $blAddFromParent = false)

Return article downloadable file list (oxlist of oxfile)

Parameters
bool$blAddFromParent- return with parent files if not buyable
Returns
null|oxList of oxFile

Definition at line 3238 of file oxarticle.php.

oxArticle::getArticleRatingAverage (   $blIncludeVariants = false)

Returns product rating average

Parameters
bool$blIncludeVariants- include variant ratings
Returns
double

Definition at line 1150 of file oxarticle.php.

oxArticle::getArticleRatingCount (   $blIncludeVariants = false)

Returns product rating count

Parameters
bool$blIncludeVariants- include variant ratings
Returns
double

Definition at line 1168 of file oxarticle.php.

oxArticle::getArticleUser ( )

return article user

Returns
oxUser

Definition at line 1982 of file oxarticle.php.

oxArticle::getArticleVat ( )

retrieve article VAT (cached)

Returns
double

Definition at line 3809 of file oxarticle.php.

oxArticle::getAttributes ( )

Loads and returns attribute list associated with this article

Returns
object

Definition at line 2460 of file oxarticle.php.

oxArticle::getAttributesDisplayableInBasket ( )

Loads and returns displayable in basket/order attributes list associated with this article

Returns
object

Definition at line 2475 of file oxarticle.php.

oxArticle::getBasePrice (   $dAmount = 1)

Returns base article price from database. Price may differ according to users group Override this function if you want e.g. different prices for diff. usergroups.

Parameters
double$dAmountarticle amount. Default is 1
Returns
double

Implements oxIArticle.

Definition at line 1907 of file oxarticle.php.

oxArticle::getBaseSeoLink (   $iLang,
  $blMain = false 
)

Returns raw article seo url

Parameters
int$iLanglanguage id
bool$blMainforce to return main url [optional]
Returns
string

Definition at line 2512 of file oxarticle.php.

oxArticle::getBaseStdLink (   $iLang,
  $blAddId = true,
  $blFull = true 
)

Returns base dynamic url: shopurl/index.php?cl=details

Parameters
int$iLanglanguage id
bool$blAddIdadd current object id to url or not [optional]
bool$blFullreturn full including domain name [optional]
Returns
string

Implements oxIUrl.

Definition at line 2618 of file oxarticle.php.

oxArticle::getBasketPrice (   $dAmount,
  $aSelList,
  $oBasket 
)

Creates, calculates and returns oxPrice object for basket product.

Parameters
float$dAmountAmount
string$aSelListSelection list
object$oBasketUser shopping basket object
Returns
oxPrice

Implements oxIArticle.

Definition at line 2000 of file oxarticle.php.

oxArticle::getCategory ( )

Loads and returns article category object. First tries to load assigned category and is such category does not exist, tries to load category by price

Returns
oxcategory

Definition at line 1598 of file oxarticle.php.

oxArticle::getCategoryIds (   $blActCats = false,
  $blSkipCache = false 
)

Returns ID's of categories where this article is assigned

Parameters
bool$blActCatsselect categories if all parents are active
bool$blSkipCacheWhether to skip cache
Returns
array

Implements oxIArticle.

Definition at line 1649 of file oxarticle.php.

oxArticle::getCrossSelling ( )

Loads and returns array with cross selling information.

Returns
array

Definition at line 1217 of file oxarticle.php.

oxArticle::getCustomerAlsoBoughtThisProducts ( )

Loads and returns articles list, bought by same customer.

Returns
array

Definition at line 1297 of file oxarticle.php.

oxArticle::getCustomVAT ( )

Returns custom article VAT value if possible By default value is taken from oxarticle__oxvat field

Returns
double

Definition at line 2324 of file oxarticle.php.

oxArticle::getDeliveryDate ( )

Returns formatted delivery date. If the date is not set ('0000-00-00') returns false.

Returns
string | bool

Definition at line 2775 of file oxarticle.php.

oxArticle::getDispSelList ( )

Returns select lists to display

Returns
array

Definition at line 2687 of file oxarticle.php.

oxArticle::getDynImageDir ( )

Get image url

Returns
array

Definition at line 2677 of file oxarticle.php.

oxArticle::getFMinPrice ( )

Returns formatted article min price

Deprecated:
since v5.1 (2013-10-04); use oxPrice smarty plugin for formatting in templates
Returns
string

Definition at line 855 of file oxarticle.php.

oxArticle::getFNetPrice ( )

Returns formatted product's NETTO price.

Deprecated:
since v5.1 (2013-10-03); use getPrice() and oxPrice modifier;
Returns
double

Definition at line 2837 of file oxarticle.php.

oxArticle::getFPrice ( )

Returns formatted product's price.

Deprecated:
since v5.1 (2013-10-04); use oxPrice smarty plugin for formatting in templates
Returns
double

Definition at line 2808 of file oxarticle.php.

oxArticle::getFTPrice ( )

Returns rounded T price.

Deprecated:
since v5.1 (2013-10-03); use getTPrice() and oxPrice modifier;
Returns
double | bool

Definition at line 2791 of file oxarticle.php.

oxArticle::getFullVariants (   $blRemoveNotOrderables = true,
  $blForceCoreTable = null 
)

Returns variant list (list contains oxArticle objects)

Parameters
bool$blRemoveNotOrderablesif true, removes from list not orderable articles, which are out of stock [optional]
bool$blForceCoreTableif true forces core table use, default is false [optional]
Returns
oxarticlelist

Definition at line 1526 of file oxarticle.php.

oxArticle::getFUnitPrice ( )

Returns formatted price per unit

Deprecated:
since v5.1 (2013-09-25); use oxPrice smarty plugin for formatting in templates
Returns
string

Definition at line 814 of file oxarticle.php.

oxArticle::getFVarMinPrice ( )

Returns formatted min article variant price

Deprecated:
since v5.1 (2013-10-04); use oxPrice smarty plugin for formatting in templates
Returns
string

Definition at line 873 of file oxarticle.php.

oxArticle::getIconUrl (   $iIndex = 0)

Returns article icon picture url. If no index specified, will return main icon url.

Parameters
int$iIndexpicture index
Returns
string

Definition at line 2913 of file oxarticle.php.

oxArticle::getItemKey ( )

Returns item key used with oxuserbasket

Returns
string

Definition at line 698 of file oxarticle.php.

oxArticle::getLink (   $iLang = null,
  $blMain = false 
)

Gets article link

Parameters
int$iLanglanguage id [optional]
bool$blMainforce to return main url [optional]
Returns
string

Definition at line 2531 of file oxarticle.php.

oxArticle::getLinkType ( )

Get link type

Returns
int

Definition at line 2586 of file oxarticle.php.

oxArticle::getLoadParentData ( )

Getter for do we load parent data

Returns
bool

Definition at line 782 of file oxarticle.php.

oxArticle::getLongDesc ( )

get long description, parsed through smarty. should only be used by exports or so. In templates use [{oxeval var=$oProduct->getLongDescription()->getRawValue()}]

Returns
string

Definition at line 2435 of file oxarticle.php.

oxArticle::getLongDescription ( )

Get article long description

Returns
object $oField field object

Definition at line 2400 of file oxarticle.php.

oxArticle::getMainLink (   $iLang = null)

Returns main object URL. If SEO is ON returned link will be in SEO form, else URL will have dynamic form

Parameters
int$iLanglanguage id [optional]
Returns
string

Definition at line 2562 of file oxarticle.php.

oxArticle::getManufacturer (   $blShopCheck = true)

Returns current article Manufacturer object. If $blShopCheck = false, then Manufacturer blReadOnly parameter will be set to true. If Manufacturer is not assigned to current shop

Parameters
bool$blShopCheckSet false if shop check is not required (default is true)
Returns
object

Definition at line 1740 of file oxarticle.php.

oxArticle::getManufacturerId (   $blForceReload = false)

Returns article object Manufacturer ID. Result is cached into self::$_aArticleManufacturers

Parameters
bool$blForceReloadreloads id even if it is cached
Returns
string

Definition at line 1719 of file oxarticle.php.

oxArticle::getMasterZoomPictureUrl (   $iIndex)

Get master zoom picture url

Parameters
int$iIndexpicture index
Returns
string

Definition at line 3204 of file oxarticle.php.

oxArticle::getMdSubvariants ( )

Returns first level variants from multidimensional variants list

Returns
OxMdVariants

Definition at line 3175 of file oxarticle.php.

oxArticle::getMdVariants ( )

Returns multidimensional variant structure

Returns
OxMdVariants

Definition at line 3151 of file oxarticle.php.

oxArticle::getMediaUrls ( )

Return article media URL

Returns
array

Definition at line 2657 of file oxarticle.php.

oxArticle::getMinPrice ( )

Returns article min price in calculation included variants

Returns
oxPrice

Definition at line 914 of file oxarticle.php.

oxArticle::getMoreDetailLink ( )

Get more details link

Returns
string

Definition at line 2703 of file oxarticle.php.

oxArticle::getParentArticle ( )

Get parent article

Returns
oxArticle

Definition at line 3010 of file oxarticle.php.

oxArticle::getParentId ( )

Returns product parent id (oxparentid)

Returns
string

Definition at line 3066 of file oxarticle.php.

oxArticle::getPersParams ( )

Get persistent parameters

Returns
array

Definition at line 742 of file oxarticle.php.

oxArticle::getPictureFieldValue (   $sFieldName,
  $iIndex = null 
)

Return article picture file name

Parameters
string$sFieldNamearticle picture field name
int$iIndexarticle picture index
Returns
string

Definition at line 3188 of file oxarticle.php.

oxArticle::getPictureGallery ( )

collect article pics, icons, zoompic and puts it all in an array structure of array (ActPicID, ActPic, MorePics, Pics, Icons, ZoomPic)

Returns
array

Definition at line 2176 of file oxarticle.php.

oxArticle::getPictureUrl (   $iIndex = 1)

Returns article picture

Parameters
int$iIndexpicture index
Returns
string

Definition at line 2891 of file oxarticle.php.

oxArticle::getPrice (   $dAmount = 1)

Calculates and returns price of article (adds taxes and discounts).

Parameters
float$dAmountarticle amount
Returns
oxPrice

Definition at line 1932 of file oxarticle.php.

oxArticle::getProductId ( )

Returns product id (oxid) (required for interface oxIArticle)

Returns
string

Implements oxIArticle.

Definition at line 3056 of file oxarticle.php.

oxArticle::getReviews ( )

Collects user written reviews about an article.

Returns
oxList

Definition at line 1185 of file oxarticle.php.

oxArticle::getSelections (   $iLimit = null,
  $aFilter = null 
)

Returns product selections lists array (used in azure theme)

Parameters
int$iLimitif given - will load limited count of selections [optional]
array$aFilterselection filter [optional]
Returns
array

Definition at line 1466 of file oxarticle.php.

oxArticle::getSelectLists (   $sKeyPrefix = null)

Returns all selectlists this article has (used in oxbasket)

Parameters
string$sKeyPrefixOptional key prefix
Returns
array

Implements oxIArticle.

Definition at line 1346 of file oxarticle.php.

oxArticle::getSimilarProducts ( )

Returns a list of similar products.

Returns
array

Definition at line 1254 of file oxarticle.php.

oxArticle::getSimpleVariants ( )

Simple way to get variants without querying oxArticle table first. This is basically used for lists.

Returns
null

Definition at line 1550 of file oxarticle.php.

oxArticle::getSize ( )

Return Size of product: length*width*height

Returns
double

Definition at line 629 of file oxarticle.php.

oxArticle::getSqlActiveSnippet (   $blForceCoreTable = null)

Returns SQL select string with checks if items are available

Parameters
bool$blForceCoreTableforces core table usage (optional)
Returns
string

Reimplemented from oxBase.

Definition at line 655 of file oxarticle.php.

oxArticle::getSqlForPriceCategories (   $sFields = '')

get Sql for loading price categories which include this article

Parameters
string$sFieldsfields to load from oxCategories
Returns
string

Definition at line 3110 of file oxarticle.php.

oxArticle::getStdLink (   $iLang = null,
  $aParams = array() 
)

Returns standard URL to product

Parameters
int$iLangrequired language. optional
array$aParamsadditional params to use [optional]
Returns
string

Implements oxIUrl.

Definition at line 2639 of file oxarticle.php.

oxArticle::getStockCheckQuery (   $blForceCoreTable = null)

Returns part of sql query used in active snippet. If config option "blUseStock" is TRUE checks if "oxstockflag != 2 or ( oxstock + oxvarstock ) > 0". If config option "blVariantParentBuyable" is TRUE checks if product has variants, and if has - checks is there at least one variant which is buyable. If config option option "blUseTimeCheck" is TRUE additionally checks if variants "oxactivefrom < current data < oxactiveto"

Parameters
bool$blForceCoreTableforce core table usage
Returns
string

Definition at line 562 of file oxarticle.php.

oxArticle::getStockStatus ( )

Get stock status

Returns
integer

Definition at line 2765 of file oxarticle.php.

oxArticle::getThumbnailUrl (   $bSsl = null)

Returns article thumbnail picture url

Parameters
bool$bSslto force SSL
Returns
string

Definition at line 2941 of file oxarticle.php.

oxArticle::getToBasketLink ( )

Get to basket link

Returns
string

Definition at line 2726 of file oxarticle.php.

oxArticle::getTPrice ( )

Returns T price

Returns
oxPrice

Definition at line 1819 of file oxarticle.php.

oxArticle::getUnitName ( )

Returns oxarticles__oxunitname value processed by oxLang::translateString()

Returns
string

Definition at line 3224 of file oxarticle.php.

oxArticle::getUnitPrice ( )

Returns price per unit

Returns
string

Definition at line 832 of file oxarticle.php.

oxArticle::getUnitQuantity ( )

Return unit quantity

Returns
sting

Definition at line 619 of file oxarticle.php.

oxArticle::getVariantIds (   $blActiveVariants = true)

Collects and returns active/all variant ids of article.

Parameters
bool$blActiveVariantsParameter to load only active variants.
Returns
array

Definition at line 3766 of file oxarticle.php.

oxArticle::getVariants (   $blRemoveNotOrderables = true,
  $blForceCoreTable = null 
)

Collects and returns article variants. Note: Only active variants are returned by this method. If you need full variant list use oxArticle::getAdminVariants()

Parameters
bool$blRemoveNotOrderablesif true, removes from list not orderable articles, which are out of stock
bool$blForceCoreTableif true forces core table use, default is false [optional]
Returns
array

Definition at line 1540 of file oxarticle.php.

oxArticle::getVariantsCount ( )

Returns amount of variants article has

Returns
mixed

Definition at line 1395 of file oxarticle.php.

oxArticle::getVariantSelections (   $aFilterIds = null,
  $sActVariantId = null,
  $iLimit = 0 
)

Returns variants selections lists array

Parameters
array$aFilterIdsids of active selections [optional]
string$sActVariantIdactive variant id [optional]
int$iLimitlimit variant lists count (if non zero, return limited number of multidimensional variant selections)
Returns
array

Definition at line 1439 of file oxarticle.php.

oxArticle::getVariantsQuery (   $blRemoveNotOrderables,
  $blForceCoreTable = null 
)

Returns part of query which checks if product is variant of current object. Additionally if config option "blUseStock" is TRUE checks stock state "( oxstock > 0 or ( oxstock <= 0 and ( oxstockflag = 1 or oxstockflag = 4 ) )"

Parameters
bool$blRemoveNotOrderablesremove or leave non orderable products
bool$blForceCoreTableforce core table usage
Returns
string

Definition at line 597 of file oxarticle.php.

oxArticle::getVarMinPrice ( )

Returns article min price of variants

Returns
oxPrice

Definition at line 889 of file oxarticle.php.

oxArticle::getVendor (   $blShopCheck = true)

Returns current article vendor object. If $blShopCheck = false, then vendor loading will fallback to oxI18n object and blReadOnly parameter will be set to true if vendor is not assigned to current shop

Parameters
bool$blShopCheckSet false if shop check is not required (default is true)
Returns
object

Definition at line 1676 of file oxarticle.php.

oxArticle::getVendorId (   $blForceReload = false)

Returns article object vendor ID. Result is cached into self::$_aArticleVendors

Parameters
bool$blForceReloadreloads id even if it is cached
Returns
string

Definition at line 1701 of file oxarticle.php.

oxArticle::getWeight ( )

Return product weight

Returns
double

Definition at line 643 of file oxarticle.php.

oxArticle::getZoomPictureUrl (   $iIndex = '')

Returns article zoom picture url

Parameters
int$iIndexpicture index
Returns
string

Definition at line 2964 of file oxarticle.php.

oxArticle::hasAmountPrice ( )

Checks if articles has amount price

Returns
bool

Definition at line 3275 of file oxarticle.php.

oxArticle::hasDownloadableAgreement ( )

Returns if article has downloadable agreement with which customer will have to agree.

Returns
bool

Definition at line 1425 of file oxarticle.php.

oxArticle::hasIntangibleAgreement ( )

Returns if article has intangible agreement with which customer will have to agree.

Returns
bool

Definition at line 1415 of file oxarticle.php.

oxArticle::hasMdVariants ( )

Checks if article has multidimensional variants

Returns
bool

Definition at line 1405 of file oxarticle.php.

oxArticle::hasSortingFieldsChanged ( )

Checks whether sorting fields changed from last article loading.

Returns
bool

Definition at line 1087 of file oxarticle.php.

oxArticle::inCategory (   $sCatNid)

Checks if article is assigned to category $sCatNID.

Parameters
string$sCatNidcategory ID
Returns
bool

Definition at line 1769 of file oxarticle.php.

oxArticle::inPriceCategory (   $sCatNid)

Checks if article is assigned to price category $sCatNID.

Parameters
string$sCatNidPrice category ID
Returns
bool

Definition at line 3130 of file oxarticle.php.

oxArticle::isAssignedToCategory (   $sCatId)

Checks if article is assigned to passed category (even checks if this category is "price category"). Returns true on success.

Parameters
string$sCatIdcategory ID
Returns
bool

Definition at line 1782 of file oxarticle.php.

oxArticle::isBuyable ( )

Checks if article is buyable.

Returns
bool

Definition at line 728 of file oxarticle.php.

oxArticle::isDownloadable ( )

Returns oxarticles__oxisdownloadable value

Returns
bool

Definition at line 3265 of file oxarticle.php.

oxArticle::isInList ( )

Checks whether object is in list or not It's needed for oxArticle so that it can pass this to widgets

Returns
bool

Definition at line 502 of file oxarticle.php.

oxArticle::isMdVariant ( )

Returns TRUE if product is multidimensional variant, and false if not

Returns
bool

Definition at line 3096 of file oxarticle.php.

oxArticle::isMultilingualField (   $sFieldName)

Returns true if the field is multilanguage

Parameters
string$sFieldNameField name
Returns
bool

Reimplemented from oxI18n.

Definition at line 795 of file oxarticle.php.

oxArticle::isNotBuyable ( )

Returns true if article is not buyable

Returns
bool

Definition at line 2859 of file oxarticle.php.

oxArticle::isOnComparisonList ( )

Checks whether article is inluded in comparison list

Returns
bool

Definition at line 752 of file oxarticle.php.

oxArticle::isOrderArticle ( )

Returns false if object is not derived from oxorderarticle class

Returns
bool

Implements oxIArticle.

Definition at line 3076 of file oxarticle.php.

oxArticle::isParentNotBuyable ( )

Returns true if parent is not buyable

Returns
bool

Definition at line 2849 of file oxarticle.php.

oxArticle::isRangePrice ( )

Returns true if article has variant with different price

Returns
bool

Definition at line 941 of file oxarticle.php.

oxArticle::isVariant ( )

Returns TRUE if product is variant, and false if not

Returns
bool

Definition at line 3086 of file oxarticle.php.

oxArticle::isVisible ( )

Checks if article has visible status. Returns TRUE if its visible

Returns
bool

Definition at line 981 of file oxarticle.php.

oxArticle::load (   $sOXID)

Loads object data from DB (object data ID must be passed to method). Converts dates (oxarticle::oxarticles__oxinsert) to international format (oxutils.php oxRegistry::get("oxUtilsDate")->formatDBDate(...)). Returns true if article was loaded successfully.

Parameters
string$sOXIDArticle object ID
Returns
bool

Reimplemented from oxBase.

Definition at line 1059 of file oxarticle.php.

oxArticle::loadAmountPriceInfo ( )

Returns list object with info about article price that depends on amount in basket. Takes data from oxprice2article table. Returns false if such info is not set.

Returns
mixed

Definition at line 1322 of file oxarticle.php.

oxArticle::onChange (   $sAction = null,
  $sOXID = null,
  $sParentID = null 
)

This function is triggered whenever article is saved or deleted or after the stock is changed. Originally we need to update the oxstock for possible article parent in case parent is not buyable Plus you may want to extend this function to update some extended information. Call oxArticle::onChange($sAction, $sOXID) with ID parameter when changes are executed over SQL. (or use module class instead of oxArticle if such exists)

Parameters
string$sActionAction constant
string$sOXIDArticle ID
string$sParentIDParent ID
Returns
null

Definition at line 2265 of file oxarticle.php.

oxArticle::reduceStock (   $dAmount,
  $blAllowNegativeStock = false 
)

Reduce article stock. return the affected amount

Parameters
float$dAmountamount to reduce
bool$blAllowNegativeStockare negative stocks allowed?
Returns
float

Definition at line 2070 of file oxarticle.php.

oxArticle::resetParent ( )

Changes article variant to parent article

Definition at line 2156 of file oxarticle.php.

oxArticle::resetRemindStatus ( )

Resets oxremindactive status. If remindActive status is 2, reminder is already sent.

Definition at line 2821 of file oxarticle.php.

oxArticle::save ( )

(oxArticle::_saveArtLongDesc()) save the object using parent::save() method.

Returns
bool

Reimplemented from oxBase.

Definition at line 2141 of file oxarticle.php.

oxArticle::setArticleLongDesc (   $sDesc)

Save article long description to oxartext table

Parameters
string$sDescdescription to set
Returns
null

Definition at line 2447 of file oxarticle.php.

oxArticle::setArticleUser (   $oUser)

sets article user

Parameters
oxUser$oUseruser to set

Definition at line 1972 of file oxarticle.php.

oxArticle::setBuyableState (   $blBuyable = false)

Sets product state - buyable or not

Parameters
bool$blBuyablestate - buyable or not (default false)

Definition at line 2869 of file oxarticle.php.

oxArticle::setId (   $sId = null)

Sets object ID, additionally sets $this->oxarticles__oxnid field value

Parameters
string$sIdNew ID
Returns
null

Reimplemented from oxBase.

Definition at line 514 of file oxarticle.php.

oxArticle::setItemKey (   $sItemKey)

Sets item key used with oxuserbasket

Parameters
string$sItemKeyItem key

Definition at line 708 of file oxarticle.php.

oxArticle::setLinkType (   $iType)

Resets details link

Parameters
int$iTypetype of link to load

Definition at line 2572 of file oxarticle.php.

oxArticle::setLoadParentData (   $blLoadParentData)

A setter for $_blLoadParentData (whether article parent info should be laoded fully) class variable

Parameters
bool$blLoadParentDataWhether to load parent data

Definition at line 772 of file oxarticle.php.

oxArticle::setNoVariantLoading (   $blLoadVariants)

Disables/enables variant loading

Parameters
bool$blLoadVariantsskip variant loading or not

Definition at line 718 of file oxarticle.php.

oxArticle::setOnComparisonList (   $blOnList)

Set if article is inluded in comparison list

Parameters
bool$blOnListWhether is article on the list

Definition at line 762 of file oxarticle.php.

oxArticle::setPrice ( oxPrice  $oPrice)

Sets the current oxPrice object

Parameters
oxPrice$oPricethe new price object

Definition at line 1894 of file oxarticle.php.

oxArticle::setRangePrice (   $blIsRangePrice = true)

Setter to set if article has range price

Parameters
bool$blIsRangePrice- true if range, else false
Returns
null

Definition at line 971 of file oxarticle.php.

oxArticle::setRatingAverage (   $iRating)

Set product rating average

Parameters
integer$iRatingnew rating value

Definition at line 1128 of file oxarticle.php.

oxArticle::setRatingCount (   $iRatingCnt)

Set product rating count

Parameters
integer$iRatingCntnew rating count

Definition at line 1138 of file oxarticle.php.

oxArticle::setSelectlist (   $aSelList)

Sets selectlists of current product

Parameters
array$aSelListselectlist

Definition at line 2879 of file oxarticle.php.

oxArticle::setSkipAssign (   $blSkipAssign)

Assign condition setter. In case article assignment is skipped ($_blSkipAssign = true), it does not perform additional

Parameters
bool$blSkipAssignWhether to skip assign process for the article

Definition at line 672 of file oxarticle.php.

oxArticle::skipDiscounts ( )

Checks if discount should be skipped for this article in basket. Returns true if yes.

Returns
bool

Implements oxIArticle.

Definition at line 1863 of file oxarticle.php.

oxArticle::updateSoldAmount (   $dAmount = 0)

Recursive function. Updates quantity of sold articles. Return true on success

Parameters
float$dAmountNumber of articles sold
Returns
mixed

Definition at line 2101 of file oxarticle.php.

oxArticle::updateVariantsRemind ( )

Updates article variants oxremindactive field, as variants inherit this setting from parent

Definition at line 3032 of file oxarticle.php.

Member Data Documentation

oxArticle::$_aArticleCats = array()
staticprotected

Definition at line 366 of file oxarticle.php.

oxArticle::$_aArticleFiles = null
protected

Definition at line 438 of file oxarticle.php.

oxArticle::$_aArticleManufacturers = array()
staticprotected

Definition at line 352 of file oxarticle.php.

oxArticle::$_aArticleVendors = array()
staticprotected

Definition at line 359 of file oxarticle.php.

oxArticle::$_aCategoryCache = null
staticprotected

Definition at line 424 of file oxarticle.php.

oxArticle::$_aCopyParentField
protected
Initial value:
array('oxarticles__oxnonmaterial',
'oxarticles__oxfreeshipping',
'oxarticles__oxisdownloadable',
'oxarticles__oxshowcustomagreement')

Definition at line 384 of file oxarticle.php.

oxArticle::$_aDispSelList
protected

Definition at line 230 of file oxarticle.php.

oxArticle::$_aLoadedParents
staticprotected

Definition at line 216 of file oxarticle.php.

oxArticle::$_aMediaUrls = null
protected

Definition at line 209 of file oxarticle.php.

oxArticle::$_aNonCopyParentFields
protected
Initial value:
array('oxarticles__oxinsert',
'oxarticles__oxtimestamp',
'oxarticles__oxnid',
'oxarticles__oxid',
'oxarticles__oxparentid')

Definition at line 373 of file oxarticle.php.

oxArticle::$_aPersistParam = null
protected

Definition at line 86 of file oxarticle.php.

oxArticle::$_aSelections = array()
staticprotected

Definition at line 417 of file oxarticle.php.

oxArticle::$_aSelList
staticprotected

Definition at line 223 of file oxarticle.php.

oxArticle::$_aSeoAddParams = array()
protected

Definition at line 275 of file oxarticle.php.

oxArticle::$_aSeoUrls = array()
protected

Definition at line 268 of file oxarticle.php.

oxArticle::$_aSortingFieldsOnLoad = array()
protected

Definition at line 317 of file oxarticle.php.

oxArticle::$_aStdAddParams = array()
protected

Definition at line 282 of file oxarticle.php.

oxArticle::$_aStdUrls = array()
protected

Definition at line 261 of file oxarticle.php.

oxArticle::$_aVariants = null
protected

Definition at line 108 of file oxarticle.php.

oxArticle::$_aVariantSelections = array()
protected

Definition at line 410 of file oxarticle.php.

oxArticle::$_aVariantsWithNotOrderables = null
protected

Definition at line 115 of file oxarticle.php.

oxArticle::$_blAllowEmptyParentId = false
protected

Variable used to determine if setting parentId to empty value is allowed

Definition at line 176 of file oxarticle.php.

oxArticle::$_blCalcPrice = true
protected

Definition at line 50 of file oxarticle.php.

oxArticle::$_blCanUpdateAnyField = null
protected

Definition at line 445 of file oxarticle.php.

oxArticle::$_blHasAmountPrice = null
staticprotected

Definition at line 431 of file oxarticle.php.

oxArticle::$_blHasMdVariants = false
protected

$_blHasVariants is set to true if article has multidimensional variants.

Definition at line 136 of file oxarticle.php.

oxArticle::$_blHasVariants = false
protected

$_blHasVariants is set to true if article has any variants.

Definition at line 131 of file oxarticle.php.

oxArticle::$_blIsOnComparisonList = false
protected

Definition at line 143 of file oxarticle.php.

oxArticle::$_blIsRangePrice = null
protected

Definition at line 202 of file oxarticle.php.

oxArticle::$_blIsSeoObject = true
protected

Definition at line 237 of file oxarticle.php.

oxArticle::$_blLoadParentData = false
protected

Variable used to force load parent data in export

Definition at line 171 of file oxarticle.php.

oxArticle::$_blLoadPrice = true
protected

Definition at line 158 of file oxarticle.php.

oxArticle::$_blLoadVariants = true
protected

Definition at line 101 of file oxarticle.php.

oxArticle::$_blNotBuyable = false
protected

Definition at line 93 of file oxarticle.php.

oxArticle::$_blNotBuyableParent = false
protected

Definition at line 125 of file oxarticle.php.

oxArticle::$_blSkipAssign = false
protected

Variable used to force load parent data in export

Definition at line 181 of file oxarticle.php.

oxArticle::$_blSkipDiscounts = null
protected

Definition at line 188 of file oxarticle.php.

oxArticle::$_blUseLazyLoading = true
protected

Definition at line 35 of file oxarticle.php.

oxArticle::$_dAmountPrice = null
protected

Definition at line 345 of file oxarticle.php.

oxArticle::$_dArticleVat = null
protected

Definition at line 79 of file oxarticle.php.

oxArticle::$_dVarMaxPrice = null
protected

Definition at line 72 of file oxarticle.php.

oxArticle::$_dVarMinPrice = null
protected

Definition at line 65 of file oxarticle.php.

oxArticle::$_fPricePerUnit = null
protected

$_fPricePerUnit holds price per unit value in active shop currency. $_fPricePerUnit is calculated from oxArticle::oxarticles__oxunitquantity->value and from oxArticle::oxarticles__oxuniname->value. If either one of these values is empty then $_fPricePerUnit is not calculated. Example: In case when product price is 10 EUR and product quantity is 0.5 (liters) then $_fPricePerUnit would be 20,00

Definition at line 166 of file oxarticle.php.

oxArticle::$_iLinkType = 0
protected

Definition at line 254 of file oxarticle.php.

oxArticle::$_iStockStatus = null
protected

Definition at line 324 of file oxarticle.php.

oxArticle::$_iStockStatusOnLoad = null
protected

Definition at line 310 of file oxarticle.php.

oxArticle::$_oAmountPriceInfo = null
protected

Definition at line 338 of file oxarticle.php.

oxArticle::$_oAmountPriceList = null
protected

Definition at line 244 of file oxarticle.php.

oxArticle::$_oAttributeList = null
protected

Object holding the list of attributes and attribute values associated with this article Attributes are loaded only when bl_perfLoadAttributes config option is set to true

Definition at line 194 of file oxarticle.php.

oxArticle::$_oLongDesc = null
protected

Definition at line 401 of file oxarticle.php.

oxArticle::$_oMdVariants = null
protected

Definition at line 394 of file oxarticle.php.

oxArticle::$_oPrice = null
protected

Definition at line 57 of file oxarticle.php.

oxArticle::$_oTPrice = null
protected

Definition at line 331 of file oxarticle.php.

oxArticle::$_oUser = null
protected

Definition at line 150 of file oxarticle.php.

oxArticle::$_sClassName = 'oxarticle'
protected

Definition at line 28 of file oxarticle.php.

oxArticle::$_sDynImageDir = null
protected

Definition at line 289 of file oxarticle.php.

oxArticle::$_sItemKey
protected

Definition at line 42 of file oxarticle.php.

oxArticle::$_sMoreDetailLink = null
protected

Definition at line 296 of file oxarticle.php.

oxArticle::$_sToBasketLink = null
protected

Definition at line 303 of file oxarticle.php.


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