OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Application\Model\Article Class Reference
+ Inheritance diagram for OxidEsales\EshopCommunity\Application\Model\Article:
+ Collaboration diagram for OxidEsales\EshopCommunity\Application\Model\Article:

Public Member Functions

 __construct ($aParams=null)
 
 __get ($sName)
 
 __set ($sName, $sValue)
 
 setAmountPriceList ($amountPriceList)
 
 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 ()
 
 isPriceAlarm ()
 
 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 ($rating)
 
 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 ()
 
 getManufacturerId ()
 
 getManufacturer ($blShopCheck=true)
 
 inCategory ($sCatNid)
 
 isAssignedToCategory ($sCatId)
 
 getTPrice ()
 
 skipDiscounts ()
 
 setPrice (\OxidEsales\Eshop\Core\Price $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 ($action=null, $articleId=null, $parentArticleId=null)
 
 getCustomVAT ()
 
 checkForStock ($dAmount, $dArtStockAmount=0, $selectForUpdate=false)
 
 getLongDescription ()
 
 getLongDesc ()
 
 setArticleLongDesc ($longDescription)
 
 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=[])
 
 getMediaUrls ()
 
 getDynImageDir ()
 
 getDispSelList ()
 
 getMoreDetailLink ()
 
 getToBasketLink ()
 
 getStockStatus ()
 
 getStock ()
 
 getDeliveryDate ()
 
 getFTPrice ()
 
 getFPrice ()
 
 resetRemindStatus ()
 
 getFNetPrice ()
 
 isParentNotBuyable ()
 
 isNotBuyable ()
 
 setBuyableState ($blBuyable=false)
 
 setSelectlist ($aSelList)
 
 getPictureUrl ($iIndex=1)
 
 getIconUrl ($iIndex=0)
 
 getThumbnailUrl ($bSsl=null)
 
 getZoomPictureUrl ($iIndex='')
 
 applyVats (\OxidEsales\Eshop\Core\Price $oPrice)
 
 applyDiscountsForVariant ($oPrice)
 
 getParentArticle ()
 
 updateVariantsRemind ()
 
 getProductId ()
 
 getParentId ()
 
 isOrderArticle ()
 
 isVariant ()
 
 isMdVariant ()
 
 getSqlForPriceCategories ($sFields='')
 
 inPriceCategory ($categoryPriceId)
 
 getMdVariants ()
 
 getMdSubvariants ()
 
 getPictureFieldValue ($sFieldName, $iIndex=null)
 
 getMasterZoomPictureUrl ($iIndex)
 
 getUnitName ()
 
 getArticleFiles ($blAddFromParent=false)
 
 isDownloadable ()
 
 hasAmountPrice ()
 
 getVariantIds ($blActiveVariants=true)
 
 getArticleVat ()
 
 checkForVpe ($amount)
 

Protected Member Functions

 getAmountPriceList ()
 
 _createSqlActiveSnippet ($forceCoreTable)
 
 _calculateVarMinPrice ()
 
 _prepareModifiedPrice ($dPrice)
 
 _setShopValues ($article)
 
 _loadData ($articleId)
 
 _createMultilanguageVendorObject ()
 
 _getModifiedAmountPrice ($amount)
 
 newAttributeList ()
 
 fetchFirstInPriceCategory ($categoryPriceId)
 
 createFetchFirstInPriceCategorySql ($categoryPriceId)
 
 getDatabase ()
 
 _loadVariantList ($loadSimpleVariants, $blRemoveNotOrderables=true, $forceCoreTableUsage=null)
 
 _selectCategoryIds ($query, $field)
 
 _getCategoryIdsSelect ($blActCats=false)
 
 _getActiveCategorySelectSnippet ()
 
 _calculatePrice ($oPrice, $dVat=null)
 
 _hasAnyVariant ($blForceCoreTable=null)
 
 _isStockStatusChanged ()
 
 _isVisibilityChanged ()
 
 _saveArtLongDesc ()
 
 _skipSaveFields ()
 
 _mergeDiscounts ($aDiscounts, $aItemDiscounts)
 
 _getGroupPrice ()
 
 _getAmountPrice ($amount=1)
 
 _modifySelectListPrice ($dPrice, $aChosenList=null)
 
 _fillAmountPriceList ($aAmPriceList)
 
 _applyVAT (\OxidEsales\Eshop\Core\Price $oPrice, $dVat)
 
 _applyCurrency (\OxidEsales\Eshop\Core\Price $oPrice, $oCur=null)
 
 _getAttribsString (&$sAttributeSql, &$iCnt)
 
 _getSimList ($sAttributeSql, $iCnt)
 
 _generateSimListSearchStr ($sArticleTable, $aList)
 
 _generateSearchStr ($sOXID, $blSearchPriceCat=false)
 
 _generateSearchStrForCustomerBought ()
 
 _generateSelectCatStr ($sOXID, $sCatId, $dPriceFromTo=false)
 
 _getAmountPriceList ()
 
 buildAmountPriceList ()
 
 _isFieldEmpty ($sFieldName)
 
 _assignParentFieldValue ($sFieldName)
 
 _isImageField ($sFieldName)
 
 _assignParentFieldValues ()
 
 _assignNotBuyableParent ()
 
 _assignStock ()
 
 _assignPersistentParam ()
 
 _assignDynImageDir ()
 
 _assignComparisonListFlag ()
 
 _insert ()
 
 _update ()
 
 _deleteRecords ($articleId)
 
 _deleteVariantRecords ($sOXID)
 
 _deletePics ()
 
 _onChangeResetCounts ($sOxid, $sVendorId=null, $sManufacturerId=null)
 
 _onChangeUpdateStock ($parentId)
 
 _onChangeStockResetCount ($sOxid)
 
 _onChangeUpdateVarCount ($parentId)
 
 _setVarMinMaxPrice ($sParentId)
 
 _hasMasterImage ($iIndex)
 
 _isPriceViewModeNetto ()
 
 _getPriceObject ($blCalculationModeNetto=null)
 
 _getPriceForView ($oPrice)
 
 _preparePrice ($dPrice, $dVat, $blCalculationModeNetto=null)
 
 _getUserPriceSufix ()
 
 _getPrice ()
 
 _getVarMinPrice ()
 
 _getVarMaxPrice ()
 
 _getShopVarMinPrice ()
 
 _getShopVarMaxPrice ()
 
 _loadFromDb ($articleId)
 
 _updateParentDependFields ()
 
 _getCopyParentFields ()
 
 _assignParentDependFields ()
 
 _saveSortingFieldValuesOnLoad ()
 
 getLoadVariantsQuery ($blRemoveNotOrderables, $forceCoreTableUsage, $baseObject, $sArticleTable)
 
 updateVariantsBaseObject ($baseObject, $forceCoreTableUsage=null)
 
 updateManufacturerBeforeLoading ($oManufacturer)
 

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
 
 $basketAttributeList = null
 
 $_blIsRangePrice = null
 
 $_aMediaUrls = null
 
 $_aDispSelList
 
 $_blIsSeoObject = true
 
 $_oAmountPriceList = null
 
 $_iLinkType = 0
 
 $_aStdUrls = []
 
 $_aSeoUrls = []
 
 $_aSeoAddParams = []
 
 $_aStdAddParams = []
 
 $_sDynImageDir = null
 
 $_sMoreDetailLink = null
 
 $_sToBasketLink = null
 
 $_iStockStatusOnLoad = null
 
 $_aSortingFieldsOnLoad = []
 
 $_iStockStatus = null
 
 $_oTPrice = null
 
 $_oAmountPriceInfo = null
 
 $_dAmountPrice = null
 
 $_aNonCopyParentFields
 
 $_aCopyParentField
 
 $_oMdVariants = null
 
 $_oLongDesc = null
 
 $_aVariantSelections = []
 
 $_aArticleFiles = null
 
 $_blCanUpdateAnyField = null
 

Static Protected Attributes

static $_aLoadedParents
 
static $_aSelList
 
static $_aArticleManufacturers = []
 
static $_aArticleVendors = []
 
static $_aArticleCats = []
 
static $_aSelections = []
 
static $_aCategoryCache = null
 
static $_blHasAmountPrice = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

OxidEsales\EshopCommunity\Application\Model\Article::__construct (   $aParams = null)

Constructor, sets shop ID for article (\OxidEsales\Eshop\Core\Config::getShopId()), initiates parent constructor (parent::oxI18n()).

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

Member Function Documentation

◆ __get()

OxidEsales\EshopCommunity\Application\Model\Article::__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

◆ __set()

OxidEsales\EshopCommunity\Application\Model\Article::__set (   $sName,
  $sValue 
)

Sets article parameter

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

◆ _applyCurrency()

OxidEsales\EshopCommunity\Application\Model\Article::_applyCurrency ( \OxidEsales\Eshop\Core\Price  $oPrice,
  $oCur = null 
)
protected

Applies currency factor

Parameters
\OxidEsales\Eshop\Core\Price$oPricePrice object
object$oCurCurrency object

◆ _applyVAT()

OxidEsales\EshopCommunity\Application\Model\Article::_applyVAT ( \OxidEsales\Eshop\Core\Price  $oPrice,
  $dVat 
)
protected

Applies VAT to article

Parameters
\OxidEsales\Eshop\Core\Price$oPricePrice object
double$dVatVAT percent

◆ _assignComparisonListFlag()

OxidEsales\EshopCommunity\Application\Model\Article::_assignComparisonListFlag ( )
protected

Adds a flag if article is on comparisonlist.

◆ _assignDynImageDir()

OxidEsales\EshopCommunity\Application\Model\Article::_assignDynImageDir ( )
protected

assigns dynimagedir to article

◆ _assignNotBuyableParent()

OxidEsales\EshopCommunity\Application\Model\Article::_assignNotBuyableParent ( )
protected

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

◆ _assignParentDependFields()

OxidEsales\EshopCommunity\Application\Model\Article::_assignParentDependFields ( )
protected

Set parent field value to child - variants

◆ _assignParentFieldValue()

OxidEsales\EshopCommunity\Application\Model\Article::_assignParentFieldValue (   $sFieldName)
protected

Assigns parent field values to article

Parameters
string$sFieldNamefield name
Returns
null;

◆ _assignParentFieldValues()

OxidEsales\EshopCommunity\Application\Model\Article::_assignParentFieldValues ( )
protected

Assigns parent field values to article

◆ _assignPersistentParam()

OxidEsales\EshopCommunity\Application\Model\Article::_assignPersistentParam ( )
protected

Assigns persistent param to article.

Deprecated:
on b-dev (2015-11-30); Not used anymore. Setting pers params to session was removed since 2.7.

◆ _assignStock()

OxidEsales\EshopCommunity\Application\Model\Article::_assignStock ( )
protected

Assigns stock status to article

◆ _calculatePrice()

OxidEsales\EshopCommunity\Application\Model\Article::_calculatePrice (   $oPrice,
  $dVat = null 
)
protected

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

Parameters
\OxidEsales\Eshop\Core\Price$oPriceprice object
double$dVatvat value, optional, if passed, bypasses "bl_perfCalcVatOnlyForBasketOrder" config value
Returns
\OxidEsales\Eshop\Core\Price

◆ _calculateVarMinPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_calculateVarMinPrice ( )
protected

Calculates lowest price of available article variants.

Returns
double

◆ _createMultilanguageVendorObject()

OxidEsales\EshopCommunity\Application\Model\Article::_createMultilanguageVendorObject ( )
protected
Returns
oxi18n

◆ _createSqlActiveSnippet()

OxidEsales\EshopCommunity\Application\Model\Article::_createSqlActiveSnippet (   $forceCoreTable)
protected

Returns SQL select string with checks if items are available

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

◆ _deletePics()

OxidEsales\EshopCommunity\Application\Model\Article::_deletePics ( )
protected

Delete pics

◆ _deleteRecords()

OxidEsales\EshopCommunity\Application\Model\Article::_deleteRecords (   $articleId)
protected

Deletes records in database

Parameters
string$articleIdArticle ID
Returns
int

◆ _deleteVariantRecords()

OxidEsales\EshopCommunity\Application\Model\Article::_deleteVariantRecords (   $sOXID)
protected

Deletes variant records

Parameters
string$sOXIDArticle ID

◆ _fillAmountPriceList()

OxidEsales\EshopCommunity\Application\Model\Article::_fillAmountPriceList (   $aAmPriceList)
protected

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

Parameters
array$aAmPriceListAmount price list
Returns
array

◆ _generateSearchStr()

OxidEsales\EshopCommunity\Application\Model\Article::_generateSearchStr (   $sOXID,
  $blSearchPriceCat = false 
)
protected

Generates SearchString for getCategory()

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

◆ _generateSearchStrForCustomerBought()

OxidEsales\EshopCommunity\Application\Model\Article::_generateSearchStrForCustomerBought ( )
protected

Generates SQL select string for getCustomerAlsoBoughtThisProduct

Returns
string

◆ _generateSelectCatStr()

OxidEsales\EshopCommunity\Application\Model\Article::_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

◆ _generateSimListSearchStr()

OxidEsales\EshopCommunity\Application\Model\Article::_generateSimListSearchStr (   $sArticleTable,
  $aList 
)
protected

Generates search string for similar list.

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

◆ _getActiveCategorySelectSnippet()

OxidEsales\EshopCommunity\Application\Model\Article::_getActiveCategorySelectSnippet ( )
protected

Returns active category select snippet

Returns
string

◆ _getAmountPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_getAmountPrice (   $amount = 1)
protected

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

Parameters
int$amountBasket amount
Returns
double

◆ _getAmountPriceList()

OxidEsales\EshopCommunity\Application\Model\Article::_getAmountPriceList ( )
protected

Collecting assigned to article amount-price list

Deprecated:
on b-dev (2015-04-02); use buildAmountPriceList().
Returns
\OxidEsales\Eshop\Application\Model\AmountPriceList

◆ _getAttribsString()

OxidEsales\EshopCommunity\Application\Model\Article::_getAttribsString ( $sAttributeSql,
$iCnt 
)
protected

gets attribs string

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

◆ _getCategoryIdsSelect()

OxidEsales\EshopCommunity\Application\Model\Article::_getCategoryIdsSelect (   $blActCats = false)
protected

Returns query for article categories select

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

◆ _getCopyParentFields()

OxidEsales\EshopCommunity\Application\Model\Article::_getCopyParentFields ( )
protected

Returns array of fields which should not changed in variants

Returns
array

◆ _getGroupPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_getGroupPrice ( )
protected

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

Returns
double

◆ _getModifiedAmountPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_getModifiedAmountPrice (   $amount)
protected

Modifies given amount price.

Parameters
int$amount
Returns
double

◆ _getPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_getPrice ( )
protected

Return prepared price

Returns
null

◆ _getPriceForView()

OxidEsales\EshopCommunity\Application\Model\Article::_getPriceForView (   $oPrice)
protected

Depending on view mode prepare price for viewing

Parameters
\OxidEsales\Eshop\Core\Price$oPriceprice object
Returns
double

◆ _getPriceObject()

OxidEsales\EshopCommunity\Application\Model\Article::_getPriceObject (   $blCalculationModeNetto = null)
protected

Depending on view mode prepare oxPrice object

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

◆ _getShopVarMaxPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_getShopVarMaxPrice ( )
protected

Place to hook to return variant max price if it might be different, for example for subshops.

Returns
double|null

◆ _getShopVarMinPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_getShopVarMinPrice ( )
protected

Place to hook to return variant min price if it might be different, for example for subshops.

Returns
double|null

◆ _getSimList()

OxidEsales\EshopCommunity\Application\Model\Article::_getSimList (   $sAttributeSql,
  $iCnt 
)
protected

Gets similar list.

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

◆ _getUserPriceSufix()

OxidEsales\EshopCommunity\Application\Model\Article::_getUserPriceSufix ( )
protected

Return price suffix

Returns
null

◆ _getVarMaxPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_getVarMaxPrice ( )
protected

Return variant max price

Returns
null

◆ _getVarMinPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_getVarMinPrice ( )
protected

Return variant min price

Returns
null

◆ _hasAnyVariant()

OxidEsales\EshopCommunity\Application\Model\Article::_hasAnyVariant (   $blForceCoreTable = null)
protected

Checks if parent has ANY variant assigned

Parameters
bool$blForceCoreTableforce core table usage
Returns
bool

◆ _hasMasterImage()

OxidEsales\EshopCommunity\Application\Model\Article::_hasMasterImage (   $iIndex)
protected

Checks if article has uploaded master image for selected picture

Parameters
int$iIndexmaster picture index
Returns
bool

◆ _insert()

OxidEsales\EshopCommunity\Application\Model\Article::_insert ( )
protected

Sets article creation date (\OxidEsales\Eshop\Application\Model\Article::oxarticles__oxinsert). Then executes parent method parent::_insert() and returns insertion status.

Returns
bool

◆ _isFieldEmpty()

OxidEsales\EshopCommunity\Application\Model\Article::_isFieldEmpty (   $sFieldName)
protected

Detects if field is empty.

Parameters
string$sFieldNameField name
Returns
bool

◆ _isImageField()

OxidEsales\EshopCommunity\Application\Model\Article::_isImageField (   $sFieldName)
protected

Detects if field is an image field by field name

Parameters
string$sFieldNameField name
Returns
bool.

◆ _isPriceViewModeNetto()

OxidEsales\EshopCommunity\Application\Model\Article::_isPriceViewModeNetto ( )
protected

Checks and return true if price view mode is netto

Returns
bool

◆ _isStockStatusChanged()

OxidEsales\EshopCommunity\Application\Model\Article::_isStockStatusChanged ( )
protected

Check if stock status has changed since loading the article

Returns
bool

◆ _isVisibilityChanged()

OxidEsales\EshopCommunity\Application\Model\Article::_isVisibilityChanged ( )
protected

Check if visibility has changed since loading the article

Returns
bool

◆ _loadData()

OxidEsales\EshopCommunity\Application\Model\Article::_loadData (   $articleId)
protected

Loads data from database and returns it.

Parameters
string$articleId
Returns
array

◆ _loadFromDb()

OxidEsales\EshopCommunity\Application\Model\Article::_loadFromDb (   $articleId)
protected

Get data from db

Parameters
string$articleIdid
Returns
array

◆ _loadVariantList()

OxidEsales\EshopCommunity\Application\Model\Article::_loadVariantList (   $loadSimpleVariants,
  $blRemoveNotOrderables = true,
  $forceCoreTableUsage = null 
)
protected

Loads and returns variants list.

Parameters
bool$loadSimpleVariantsif 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 | null$forceCoreTableUsageif true forces core table use, default is false [optional]
Returns
array | oxsimplevariantlist | oxarticlelist

◆ _mergeDiscounts()

OxidEsales\EshopCommunity\Application\Model\Article::_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

◆ _modifySelectListPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_modifySelectListPrice (   $dPrice,
  $aChosenList = null 
)
protected

Modifies article price according to selected select list value

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

◆ _onChangeResetCounts()

OxidEsales\EshopCommunity\Application\Model\Article::_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

◆ _onChangeStockResetCount()

OxidEsales\EshopCommunity\Application\Model\Article::_onChangeStockResetCount (   $sOxid)
protected

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

Parameters
string$sOxidproduct id

◆ _onChangeUpdateStock()

OxidEsales\EshopCommunity\Application\Model\Article::_onChangeUpdateStock (   $parentId)
protected

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

Parameters
string$parentIdproduct parent id

◆ _onChangeUpdateVarCount()

OxidEsales\EshopCommunity\Application\Model\Article::_onChangeUpdateVarCount (   $parentId)
protected

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

Parameters
string$parentIdParent ID

◆ _prepareModifiedPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_prepareModifiedPrice (   $dPrice)
protected
Parameters
double$dPrice
Returns
double

◆ _preparePrice()

OxidEsales\EshopCommunity\Application\Model\Article::_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

◆ _saveArtLongDesc()

OxidEsales\EshopCommunity\Application\Model\Article::_saveArtLongDesc ( )
protected

inserts article long description to artextends table

Returns
null

◆ _saveSortingFieldValuesOnLoad()

OxidEsales\EshopCommunity\Application\Model\Article::_saveSortingFieldValuesOnLoad ( )
protected

Saves values of sorting fields on article load.

◆ _selectCategoryIds()

OxidEsales\EshopCommunity\Application\Model\Article::_selectCategoryIds (   $query,
  $field 
)
protected

Selects category IDs from given SQL statement and ID field name

Parameters
string$querysql statement
string$fieldcategory ID field name
Returns
array

◆ _setShopValues()

OxidEsales\EshopCommunity\Application\Model\Article::_setShopValues (   $article)
protected
Parameters
\OxidEsales\Eshop\Application\Model\Article$article

◆ _setVarMinMaxPrice()

OxidEsales\EshopCommunity\Application\Model\Article::_setVarMinMaxPrice (   $sParentId)
protected

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

Parameters
string$sParentIdParent ID

◆ _skipSaveFields()

OxidEsales\EshopCommunity\Application\Model\Article::_skipSaveFields ( )
protected

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

◆ _update()

OxidEsales\EshopCommunity\Application\Model\Article::_update ( )
protected

Executes \OxidEsales\Eshop\Application\Model\Article::_skipSaveFields() and updates article information

Returns
bool

◆ _updateParentDependFields()

OxidEsales\EshopCommunity\Application\Model\Article::_updateParentDependFields ( )
protected

Set parent field value to child - variants in DB

Returns
bool

◆ addToRatingAverage()

OxidEsales\EshopCommunity\Application\Model\Article::addToRatingAverage (   $rating)

Calculates and saves product rating average

Parameters
integer$ratingnew rating value

◆ appendLink()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ appendStdLink()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ applyDiscountsForVariant()

OxidEsales\EshopCommunity\Application\Model\Article::applyDiscountsForVariant (   $oPrice)

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

Parameters
\OxidEsales\Eshop\Core\Price$oPricePrice object

◆ applyVats()

OxidEsales\EshopCommunity\Application\Model\Article::applyVats ( \OxidEsales\Eshop\Core\Price  $oPrice)

apply article and article use

Parameters
\OxidEsales\Eshop\Core\Price$oPricetarget price

◆ assign()

OxidEsales\EshopCommunity\Application\Model\Article::assign (   $aRecord)

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

Parameters
array$aRecordArray representing current field values
Returns
null

◆ buildAmountPriceList()

OxidEsales\EshopCommunity\Application\Model\Article::buildAmountPriceList ( )
protected

Collecting assigned to article amount-price list.

Returns
\OxidEsales\Eshop\Application\Model\AmountPriceList

◆ checkForStock()

OxidEsales\EshopCommunity\Application\Model\Article::checkForStock (   $dAmount,
  $dArtStockAmount = 0,
  $selectForUpdate = false 
)

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

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

◆ checkForVpe()

OxidEsales\EshopCommunity\Application\Model\Article::checkForVpe (   $amount)

Place to hook and change amount if it should be calculated by different logic, for example VPE.

Parameters
double$amountAmount

◆ createFetchFirstInPriceCategorySql()

OxidEsales\EshopCommunity\Application\Model\Article::createFetchFirstInPriceCategorySql (   $categoryPriceId)
protected

Create the sql for the fetchFirstInPriceCategory method.

Parameters
string$categoryPriceIdThe price category id.
Returns
string The wished sql.

◆ delete()

OxidEsales\EshopCommunity\Application\Model\Article::delete (   $sOXID = null)

Deletes record and other information related to this article such as images from DB, also removes variants. Returns true if entry was deleted.

Parameters
string$sOXIDArticle id
Exceptions

◆ disablePriceLoad()

OxidEsales\EshopCommunity\Application\Model\Article::disablePriceLoad ( )

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

◆ disableReminder()

OxidEsales\EshopCommunity\Application\Model\Article::disableReminder ( )

Disables reminder functionality for article

Returns
bool

◆ enablePriceLoad()

OxidEsales\EshopCommunity\Application\Model\Article::enablePriceLoad ( )

Enable article price loading, if disabled.

◆ fetchFirstInPriceCategory()

OxidEsales\EshopCommunity\Application\Model\Article::fetchFirstInPriceCategory (   $categoryPriceId)
protected

Fetch the article corresponding to this object in the price category with the given id.

Parameters
string$categoryPriceIdThe id of the category we want to check, if this article is in.
Returns
string One, if the given article is in the given price category, else empty string.

◆ getAccessoires()

OxidEsales\EshopCommunity\Application\Model\Article::getAccessoires ( )

Loads and returns array with accessories information.

Returns
array

◆ getActiveCheckQuery()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getAdminVariants()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getAmountPriceList()

OxidEsales\EshopCommunity\Application\Model\Article::getAmountPriceList ( )
protected
Returns
\OxidEsales\Eshop\Application\Model\AmountPriceList

◆ getArticleFiles()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getArticleRatingAverage()

OxidEsales\EshopCommunity\Application\Model\Article::getArticleRatingAverage (   $blIncludeVariants = false)

Returns product rating average

Parameters
bool$blIncludeVariants- include variant ratings
Returns
double

◆ getArticleRatingCount()

OxidEsales\EshopCommunity\Application\Model\Article::getArticleRatingCount (   $blIncludeVariants = false)

Returns product rating count

Parameters
bool$blIncludeVariants- include variant ratings
Returns
double

◆ getArticleUser()

OxidEsales\EshopCommunity\Application\Model\Article::getArticleUser ( )
Returns
\OxidEsales\Eshop\Application\Model\User article user.

◆ getArticleVat()

OxidEsales\EshopCommunity\Application\Model\Article::getArticleVat ( )

retrieve article VAT (cached)

Returns
double

◆ getAttributes()

OxidEsales\EshopCommunity\Application\Model\Article::getAttributes ( )

Loads and returns attribute list associated with this article

Returns
\OxidEsales\Eshop\Application\Model\AttributeList

◆ getAttributesDisplayableInBasket()

OxidEsales\EshopCommunity\Application\Model\Article::getAttributesDisplayableInBasket ( )

Loads and returns attribute list for display in basket

Returns
\OxidEsales\Eshop\Application\Model\AttributeList

◆ getBasePrice()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getBaseSeoLink()

OxidEsales\EshopCommunity\Application\Model\Article::getBaseSeoLink (   $iLang,
  $blMain = false 
)

Returns raw article seo url

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

◆ getBaseStdLink()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getBasketPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getBasketPrice (   $dAmount,
  $aSelList,
  $oBasket 
)

Creates, calculates and returns oxPrice object for basket product.

Parameters
float$dAmountAmount
array$aSelListSelection list
object$oBasketUser shopping basket object
Returns
\OxidEsales\Eshop\Core\Price

◆ getCategory()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getCategoryIds()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getCrossSelling()

OxidEsales\EshopCommunity\Application\Model\Article::getCrossSelling ( )

Loads and returns array with cross selling information.

Returns
array

◆ getCustomerAlsoBoughtThisProducts()

OxidEsales\EshopCommunity\Application\Model\Article::getCustomerAlsoBoughtThisProducts ( )

Loads and returns articles list, bought by same customer.

Returns
oxArticleList|null

◆ getCustomVAT()

OxidEsales\EshopCommunity\Application\Model\Article::getCustomVAT ( )

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

Returns
double

◆ getDatabase()

OxidEsales\EshopCommunity\Application\Model\Article::getDatabase ( )
protected

Get the database object.

Returns
\OxidEsales\Eshop\Core\Database\Adapter\DatabaseInterface

◆ getDeliveryDate()

OxidEsales\EshopCommunity\Application\Model\Article::getDeliveryDate ( )

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

Returns
string | bool

◆ getDispSelList()

OxidEsales\EshopCommunity\Application\Model\Article::getDispSelList ( )

Returns select lists to display

Returns
array

◆ getDynImageDir()

OxidEsales\EshopCommunity\Application\Model\Article::getDynImageDir ( )

Get image url

Returns
array

◆ getFMinPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getFMinPrice ( )

Returns formatted article min price

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

◆ getFNetPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getFNetPrice ( )

Returns formatted product's NETTO price.

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

◆ getFPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getFPrice ( )

Returns formatted product's price.

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

◆ getFTPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getFTPrice ( )

Returns rounded T price.

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

◆ getFullVariants()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getFUnitPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getFUnitPrice ( )

Returns formatted price per unit

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

◆ getFVarMinPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getFVarMinPrice ( )

Returns formatted min article variant price

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

◆ getIconUrl()

OxidEsales\EshopCommunity\Application\Model\Article::getIconUrl (   $iIndex = 0)

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

Parameters
int$iIndexpicture index
Returns
string

◆ getItemKey()

OxidEsales\EshopCommunity\Application\Model\Article::getItemKey ( )

Returns item key used with oxuserbasket

Returns
string

◆ getLink()

OxidEsales\EshopCommunity\Application\Model\Article::getLink (   $iLang = null,
  $blMain = false 
)

Gets article link

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

◆ getLinkType()

OxidEsales\EshopCommunity\Application\Model\Article::getLinkType ( )

Get link type

Returns
int

◆ getLoadParentData()

OxidEsales\EshopCommunity\Application\Model\Article::getLoadParentData ( )

Getter for do we load parent data

Returns
bool

◆ getLoadVariantsQuery()

OxidEsales\EshopCommunity\Application\Model\Article::getLoadVariantsQuery (   $blRemoveNotOrderables,
  $forceCoreTableUsage,
  $baseObject,
  $sArticleTable 
)
protected

Forms query to load variants.

Parameters
bool$blRemoveNotOrderables
bool$forceCoreTableUsage
oxSimpleVariant | oxarticle$baseObject
string$sArticleTable
Returns
string

◆ getLongDesc()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getLongDescription()

OxidEsales\EshopCommunity\Application\Model\Article::getLongDescription ( )

Get article long description

Returns
object $oField field object

◆ getMainLink()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getManufacturer()

OxidEsales\EshopCommunity\Application\Model\Article::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
\OxidEsales\Eshop\Application\Model\Manufacturer|null

◆ getManufacturerId()

OxidEsales\EshopCommunity\Application\Model\Article::getManufacturerId ( )

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

Returns
string

◆ getMasterZoomPictureUrl()

OxidEsales\EshopCommunity\Application\Model\Article::getMasterZoomPictureUrl (   $iIndex)

Get master zoom picture url

Parameters
int$iIndexpicture index
Returns
string

◆ getMdSubvariants()

OxidEsales\EshopCommunity\Application\Model\Article::getMdSubvariants ( )

Returns first level variants from multidimensional variants list

Returns
oxMdVariant

◆ getMdVariants()

OxidEsales\EshopCommunity\Application\Model\Article::getMdVariants ( )

Returns multidimensional variant structure

Returns
oxMdVariant

◆ getMediaUrls()

OxidEsales\EshopCommunity\Application\Model\Article::getMediaUrls ( )

Return article media URL

Returns
array

◆ getMinPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getMinPrice ( )

Returns article min price in calculation included variants

Returns
\OxidEsales\Eshop\Core\Price

◆ getMoreDetailLink()

OxidEsales\EshopCommunity\Application\Model\Article::getMoreDetailLink ( )

Get more details link

Returns
string

◆ getParentArticle()

OxidEsales\EshopCommunity\Application\Model\Article::getParentArticle ( )

Get parent article

Returns
oxArticle

◆ getParentId()

OxidEsales\EshopCommunity\Application\Model\Article::getParentId ( )

Returns product parent id (oxparentid)

Returns
string

◆ getPersParams()

OxidEsales\EshopCommunity\Application\Model\Article::getPersParams ( )

Get persistent parameters

Deprecated:
on b-dev (2015-11-30); Not used anymore. Setting pers params to session was removed since 2.7.
Returns
array

◆ getPictureFieldValue()

OxidEsales\EshopCommunity\Application\Model\Article::getPictureFieldValue (   $sFieldName,
  $iIndex = null 
)

Return article picture file name

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

◆ getPictureGallery()

OxidEsales\EshopCommunity\Application\Model\Article::getPictureGallery ( )

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

Returns
array

◆ getPictureUrl()

OxidEsales\EshopCommunity\Application\Model\Article::getPictureUrl (   $iIndex = 1)

Returns article picture

Parameters
int$iIndexpicture index
Returns
string

◆ getPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getPrice (   $dAmount = 1)

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

Parameters
float | int$dAmountarticle amount.
Returns
\OxidEsales\Eshop\Core\Price

◆ getProductId()

OxidEsales\EshopCommunity\Application\Model\Article::getProductId ( )

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

Returns
string

◆ getReviews()

OxidEsales\EshopCommunity\Application\Model\Article::getReviews ( )

Collects user written reviews about an article.

Returns
oxList

◆ getSelections()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getSelectLists()

OxidEsales\EshopCommunity\Application\Model\Article::getSelectLists (   $sKeyPrefix = null)

Returns all selectlists this article has (used in oxbasket)

Parameters
string$sKeyPrefixOptional key prefix
Returns
array

◆ getSimilarProducts()

OxidEsales\EshopCommunity\Application\Model\Article::getSimilarProducts ( )

Returns a list of similar products.

Returns
array

◆ getSimpleVariants()

OxidEsales\EshopCommunity\Application\Model\Article::getSimpleVariants ( )

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

Returns
null

◆ getSize()

OxidEsales\EshopCommunity\Application\Model\Article::getSize ( )

Return Size of product: length*width*height

Returns
double

◆ getSqlActiveSnippet()

OxidEsales\EshopCommunity\Application\Model\Article::getSqlActiveSnippet (   $blForceCoreTable = null)

Returns SQL select string with checks if items are available

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

◆ getSqlForPriceCategories()

OxidEsales\EshopCommunity\Application\Model\Article::getSqlForPriceCategories (   $sFields = '')

get Sql for loading price categories which include this article

Parameters
string$sFieldsfields to load from oxCategories
Returns
string

◆ getStdLink()

OxidEsales\EshopCommunity\Application\Model\Article::getStdLink (   $iLang = null,
  $aParams = [] 
)

Returns standard URL to product

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

◆ getStock()

OxidEsales\EshopCommunity\Application\Model\Article::getStock ( )

Get stock

Returns
float

◆ getStockCheckQuery()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getStockStatus()

OxidEsales\EshopCommunity\Application\Model\Article::getStockStatus ( )

Get stock status

Returns
integer

◆ getThumbnailUrl()

OxidEsales\EshopCommunity\Application\Model\Article::getThumbnailUrl (   $bSsl = null)

Returns article thumbnail picture url

Parameters
bool$bSslto force SSL
Returns
string

◆ getToBasketLink()

OxidEsales\EshopCommunity\Application\Model\Article::getToBasketLink ( )

Get to basket link

Returns
string

◆ getTPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getTPrice ( )

Returns T price

Returns
\OxidEsales\Eshop\Core\Price

◆ getUnitName()

OxidEsales\EshopCommunity\Application\Model\Article::getUnitName ( )

Returns oxarticles__oxunitname value processed by \OxidEsales\Eshop\Core\Language::translateString()

Returns
string

◆ getUnitPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getUnitPrice ( )

Returns price per unit

Returns
string

◆ getUnitQuantity()

OxidEsales\EshopCommunity\Application\Model\Article::getUnitQuantity ( )

Return unit quantity

Returns
string

◆ getVariantIds()

OxidEsales\EshopCommunity\Application\Model\Article::getVariantIds (   $blActiveVariants = true)

Collects and returns active/all variant ids of article.

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

◆ getVariants()

OxidEsales\EshopCommunity\Application\Model\Article::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 \OxidEsales\Eshop\Application\Model\Article::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

◆ getVariantsCount()

OxidEsales\EshopCommunity\Application\Model\Article::getVariantsCount ( )

Returns amount of variants article has

Returns
mixed

◆ getVariantSelections()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getVariantsQuery()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getVarMinPrice()

OxidEsales\EshopCommunity\Application\Model\Article::getVarMinPrice ( )

Returns article min price of variants

Returns
\OxidEsales\Eshop\Core\Price

◆ getVendor()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ getVendorId()

OxidEsales\EshopCommunity\Application\Model\Article::getVendorId ( )

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

Returns
string

◆ getWeight()

OxidEsales\EshopCommunity\Application\Model\Article::getWeight ( )

Return product weight

Returns
double

◆ getZoomPictureUrl()

OxidEsales\EshopCommunity\Application\Model\Article::getZoomPictureUrl (   $iIndex = '')

Returns article zoom picture url

Parameters
int$iIndexpicture index
Returns
string

◆ hasAmountPrice()

OxidEsales\EshopCommunity\Application\Model\Article::hasAmountPrice ( )

Checks if articles has amount price

Returns
bool

◆ hasDownloadableAgreement()

OxidEsales\EshopCommunity\Application\Model\Article::hasDownloadableAgreement ( )

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

Returns
bool

◆ hasIntangibleAgreement()

OxidEsales\EshopCommunity\Application\Model\Article::hasIntangibleAgreement ( )

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

Returns
bool

◆ hasMdVariants()

OxidEsales\EshopCommunity\Application\Model\Article::hasMdVariants ( )

Checks if article has multidimensional variants

Returns
bool

◆ hasSortingFieldsChanged()

OxidEsales\EshopCommunity\Application\Model\Article::hasSortingFieldsChanged ( )

Checks whether sorting fields changed from last article loading.

Returns
bool

◆ inCategory()

OxidEsales\EshopCommunity\Application\Model\Article::inCategory (   $sCatNid)

Checks if article is assigned to category $sCatNID.

Parameters
string$sCatNidcategory ID
Returns
bool

◆ inPriceCategory()

OxidEsales\EshopCommunity\Application\Model\Article::inPriceCategory (   $categoryPriceId)

Checks if article is assigned to price category $sCatNID.

Parameters
string$categoryPriceIdPrice category ID
Returns
bool

◆ isAssignedToCategory()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ isBuyable()

OxidEsales\EshopCommunity\Application\Model\Article::isBuyable ( )

Checks if article is buyable.

Returns
bool

◆ isDownloadable()

OxidEsales\EshopCommunity\Application\Model\Article::isDownloadable ( )

Returns oxarticles__oxisdownloadable value

Returns
bool

◆ isInList()

OxidEsales\EshopCommunity\Application\Model\Article::isInList ( )

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

Returns
bool

◆ isMdVariant()

OxidEsales\EshopCommunity\Application\Model\Article::isMdVariant ( )

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

Returns
bool

◆ isMultilingualField()

OxidEsales\EshopCommunity\Application\Model\Article::isMultilingualField (   $sFieldName)

Returns true if the field is multilanguage

Parameters
string$sFieldNameField name
Returns
bool

◆ isNotBuyable()

OxidEsales\EshopCommunity\Application\Model\Article::isNotBuyable ( )

Returns true if article is not buyable

Returns
bool

◆ isOnComparisonList()

OxidEsales\EshopCommunity\Application\Model\Article::isOnComparisonList ( )

Checks whether article is inluded in comparison list

Returns
bool

◆ isOrderArticle()

OxidEsales\EshopCommunity\Application\Model\Article::isOrderArticle ( )

Returns false if object is not derived from oxorderarticle class

Returns
bool

◆ isParentNotBuyable()

OxidEsales\EshopCommunity\Application\Model\Article::isParentNotBuyable ( )

Returns true if parent is not buyable

Returns
bool

◆ isPriceAlarm()

OxidEsales\EshopCommunity\Application\Model\Article::isPriceAlarm ( )

Checks if price alarm is enabled.

Returns
bool

◆ isRangePrice()

OxidEsales\EshopCommunity\Application\Model\Article::isRangePrice ( )

Returns true if article has variant with different price

Returns
bool

◆ isVariant()

OxidEsales\EshopCommunity\Application\Model\Article::isVariant ( )

Returns TRUE if product is variant, and false if not

Returns
bool

◆ isVisible()

OxidEsales\EshopCommunity\Application\Model\Article::isVisible ( )

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

Returns
bool

◆ load()

OxidEsales\EshopCommunity\Application\Model\Article::load (   $sOXID)

Loads object data from DB (object data ID must be passed to method). Converts dates (\OxidEsales\Eshop\Application\Model\Article::oxarticles__oxinsert) to international format (oxUtils.php \OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate(...)). Returns true if article was loaded successfully.

Parameters
string$sOXIDArticle object ID
Returns
bool

◆ loadAmountPriceInfo()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ newAttributeList()

OxidEsales\EshopCommunity\Application\Model\Article::newAttributeList ( )
protected

the uninitilized list of attributes use getAttributes

Returns
\OxidEsales\Eshop\Application\Model\AttributeList

◆ onChange()

OxidEsales\EshopCommunity\Application\Model\Article::onChange (   $action = null,
  $articleId = null,
  $parentArticleId = 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 \OxidEsales\Eshop\Application\Model\Article::onChange($sAction, $sOXID) with ID parameter when changes are executed over SQL. (or use module class instead of oxArticle if such exists)

Parameters
string$actionAction constant
string$articleIdArticle ID
string$parentArticleIdParent ID
Returns
null

◆ reduceStock()

OxidEsales\EshopCommunity\Application\Model\Article::reduceStock (   $dAmount,
  $blAllowNegativeStock = false 
)

Reduce article stock. return the affected amount

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

◆ resetParent()

OxidEsales\EshopCommunity\Application\Model\Article::resetParent ( )

Changes article variant to parent article

◆ resetRemindStatus()

OxidEsales\EshopCommunity\Application\Model\Article::resetRemindStatus ( )

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

◆ save()

OxidEsales\EshopCommunity\Application\Model\Article::save ( )

(\OxidEsales\Eshop\Application\Model\Article::_saveArtLongDesc()) save the object using parent::save() method.

Returns
bool

◆ setAmountPriceList()

OxidEsales\EshopCommunity\Application\Model\Article::setAmountPriceList (   $amountPriceList)
Parameters
\OxidEsales\Eshop\Application\Model\AmountPriceList$amountPriceList

◆ setArticleLongDesc()

OxidEsales\EshopCommunity\Application\Model\Article::setArticleLongDesc (   $longDescription)

Save article long description to oxartext table

Parameters
string$longDescriptiondescription to set

◆ setArticleUser()

OxidEsales\EshopCommunity\Application\Model\Article::setArticleUser (   $oUser)

sets article user

Parameters
\OxidEsales\Eshop\Application\Model\User$oUseruser to set

◆ setBuyableState()

OxidEsales\EshopCommunity\Application\Model\Article::setBuyableState (   $blBuyable = false)

Sets product state - buyable or not

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

◆ setId()

OxidEsales\EshopCommunity\Application\Model\Article::setId (   $sId = null)

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

Parameters
string$sIdNew ID
Returns
string|null

◆ setItemKey()

OxidEsales\EshopCommunity\Application\Model\Article::setItemKey (   $sItemKey)

Sets item key used with oxuserbasket

Parameters
string$sItemKeyItem key

◆ setLinkType()

OxidEsales\EshopCommunity\Application\Model\Article::setLinkType (   $iType)

Resets details link

Parameters
int$iTypetype of link to load

◆ setLoadParentData()

OxidEsales\EshopCommunity\Application\Model\Article::setLoadParentData (   $blLoadParentData)

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

Parameters
bool$blLoadParentDataWhether to load parent data

◆ setNoVariantLoading()

OxidEsales\EshopCommunity\Application\Model\Article::setNoVariantLoading (   $blLoadVariants)

Disables/enables variant loading

Parameters
bool$blLoadVariantsskip variant loading or not

◆ setOnComparisonList()

OxidEsales\EshopCommunity\Application\Model\Article::setOnComparisonList (   $blOnList)

Set if article is inluded in comparison list

Parameters
bool$blOnListWhether is article on the list

◆ setPrice()

OxidEsales\EshopCommunity\Application\Model\Article::setPrice ( \OxidEsales\Eshop\Core\Price  $oPrice)

Sets the current oxPrice object

Parameters
\OxidEsales\Eshop\Core\Price$oPricethe new price object

◆ setRangePrice()

OxidEsales\EshopCommunity\Application\Model\Article::setRangePrice (   $blIsRangePrice = true)

Setter to set if article has range price

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

◆ setRatingAverage()

OxidEsales\EshopCommunity\Application\Model\Article::setRatingAverage (   $iRating)

Set product rating average

Parameters
integer$iRatingnew rating value

◆ setRatingCount()

OxidEsales\EshopCommunity\Application\Model\Article::setRatingCount (   $iRatingCnt)

Set product rating count

Parameters
integer$iRatingCntnew rating count

◆ setSelectlist()

OxidEsales\EshopCommunity\Application\Model\Article::setSelectlist (   $aSelList)

Sets selectlists of current product

Parameters
array$aSelListselectlist

◆ setSkipAssign()

OxidEsales\EshopCommunity\Application\Model\Article::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

◆ skipDiscounts()

OxidEsales\EshopCommunity\Application\Model\Article::skipDiscounts ( )

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

Returns
bool

◆ updateManufacturerBeforeLoading()

OxidEsales\EshopCommunity\Application\Model\Article::updateManufacturerBeforeLoading (   $oManufacturer)
protected
Parameters
\OxidEsales\Eshop\Application\Model\Manufacturer$oManufacturer

◆ updateSoldAmount()

OxidEsales\EshopCommunity\Application\Model\Article::updateSoldAmount (   $dAmount = 0)

Recursive function. Updates quantity of sold articles. Return true if amount was changed in database.

Parameters
float$dAmountNumber of articles sold
Returns
mixed

◆ updateVariantsBaseObject()

OxidEsales\EshopCommunity\Application\Model\Article::updateVariantsBaseObject (   $baseObject,
  $forceCoreTableUsage = null 
)
protected

Set needed parameters to article list object like language.

Parameters
\OxidEsales\Eshop\Core\Model\BaseModel$baseObjectarticle list template object.
bool | null$forceCoreTableUsageif true forces core table use, default is false [optional]

◆ updateVariantsRemind()

OxidEsales\EshopCommunity\Application\Model\Article::updateVariantsRemind ( )

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

Member Data Documentation

◆ $_aArticleCats

OxidEsales\EshopCommunity\Application\Model\Article::$_aArticleCats = []
staticprotected

◆ $_aArticleFiles

OxidEsales\EshopCommunity\Application\Model\Article::$_aArticleFiles = null
protected

◆ $_aArticleManufacturers

OxidEsales\EshopCommunity\Application\Model\Article::$_aArticleManufacturers = []
staticprotected

◆ $_aArticleVendors

OxidEsales\EshopCommunity\Application\Model\Article::$_aArticleVendors = []
staticprotected

◆ $_aCategoryCache

OxidEsales\EshopCommunity\Application\Model\Article::$_aCategoryCache = null
staticprotected

◆ $_aCopyParentField

OxidEsales\EshopCommunity\Application\Model\Article::$_aCopyParentField
protected
Initial value:
= [
'oxarticles__oxnonmaterial',
'oxarticles__oxfreeshipping',
'oxarticles__oxisdownloadable',
'oxarticles__oxshowcustomagreement'
]

◆ $_aDispSelList

OxidEsales\EshopCommunity\Application\Model\Article::$_aDispSelList
protected

◆ $_aLoadedParents

OxidEsales\EshopCommunity\Application\Model\Article::$_aLoadedParents
staticprotected

◆ $_aMediaUrls

OxidEsales\EshopCommunity\Application\Model\Article::$_aMediaUrls = null
protected

◆ $_aNonCopyParentFields

OxidEsales\EshopCommunity\Application\Model\Article::$_aNonCopyParentFields
protected
Initial value:
= [
'oxarticles__oxinsert',
'oxarticles__oxtimestamp',
'oxarticles__oxnid',
'oxarticles__oxid',
'oxarticles__oxparentid'
]

◆ $_aPersistParam

OxidEsales\EshopCommunity\Application\Model\Article::$_aPersistParam = null
protected

◆ $_aSelections

OxidEsales\EshopCommunity\Application\Model\Article::$_aSelections = []
staticprotected

◆ $_aSelList

OxidEsales\EshopCommunity\Application\Model\Article::$_aSelList
staticprotected

◆ $_aSeoAddParams

OxidEsales\EshopCommunity\Application\Model\Article::$_aSeoAddParams = []
protected

◆ $_aSeoUrls

OxidEsales\EshopCommunity\Application\Model\Article::$_aSeoUrls = []
protected

◆ $_aSortingFieldsOnLoad

OxidEsales\EshopCommunity\Application\Model\Article::$_aSortingFieldsOnLoad = []
protected

◆ $_aStdAddParams

OxidEsales\EshopCommunity\Application\Model\Article::$_aStdAddParams = []
protected

◆ $_aStdUrls

OxidEsales\EshopCommunity\Application\Model\Article::$_aStdUrls = []
protected

◆ $_aVariants

OxidEsales\EshopCommunity\Application\Model\Article::$_aVariants = null
protected

◆ $_aVariantSelections

OxidEsales\EshopCommunity\Application\Model\Article::$_aVariantSelections = []
protected

◆ $_aVariantsWithNotOrderables

OxidEsales\EshopCommunity\Application\Model\Article::$_aVariantsWithNotOrderables = null
protected

◆ $_blAllowEmptyParentId

OxidEsales\EshopCommunity\Application\Model\Article::$_blAllowEmptyParentId = false
protected

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

◆ $_blCalcPrice

OxidEsales\EshopCommunity\Application\Model\Article::$_blCalcPrice = true
protected

◆ $_blCanUpdateAnyField

OxidEsales\EshopCommunity\Application\Model\Article::$_blCanUpdateAnyField = null
protected

◆ $_blHasAmountPrice

OxidEsales\EshopCommunity\Application\Model\Article::$_blHasAmountPrice = null
staticprotected

◆ $_blHasMdVariants

OxidEsales\EshopCommunity\Application\Model\Article::$_blHasMdVariants = false
protected

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

◆ $_blHasVariants

OxidEsales\EshopCommunity\Application\Model\Article::$_blHasVariants = false
protected

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

◆ $_blIsOnComparisonList

OxidEsales\EshopCommunity\Application\Model\Article::$_blIsOnComparisonList = false
protected

◆ $_blIsRangePrice

OxidEsales\EshopCommunity\Application\Model\Article::$_blIsRangePrice = null
protected

◆ $_blIsSeoObject

OxidEsales\EshopCommunity\Application\Model\Article::$_blIsSeoObject = true
protected

◆ $_blLoadParentData

OxidEsales\EshopCommunity\Application\Model\Article::$_blLoadParentData = false
protected

Variable used to force load parent data in export

◆ $_blLoadPrice

OxidEsales\EshopCommunity\Application\Model\Article::$_blLoadPrice = true
protected

◆ $_blLoadVariants

OxidEsales\EshopCommunity\Application\Model\Article::$_blLoadVariants = true
protected

◆ $_blNotBuyable

OxidEsales\EshopCommunity\Application\Model\Article::$_blNotBuyable = false
protected

◆ $_blNotBuyableParent

OxidEsales\EshopCommunity\Application\Model\Article::$_blNotBuyableParent = false
protected

◆ $_blSkipAssign

OxidEsales\EshopCommunity\Application\Model\Article::$_blSkipAssign = false
protected

Variable used to force load parent data in export

◆ $_blSkipDiscounts

OxidEsales\EshopCommunity\Application\Model\Article::$_blSkipDiscounts = null
protected

◆ $_blUseLazyLoading

OxidEsales\EshopCommunity\Application\Model\Article::$_blUseLazyLoading = true
protected

◆ $_dAmountPrice

OxidEsales\EshopCommunity\Application\Model\Article::$_dAmountPrice = null
protected

◆ $_dArticleVat

OxidEsales\EshopCommunity\Application\Model\Article::$_dArticleVat = null
protected

◆ $_dVarMaxPrice

OxidEsales\EshopCommunity\Application\Model\Article::$_dVarMaxPrice = null
protected

◆ $_dVarMinPrice

OxidEsales\EshopCommunity\Application\Model\Article::$_dVarMinPrice = null
protected

◆ $_fPricePerUnit

OxidEsales\EshopCommunity\Application\Model\Article::$_fPricePerUnit = null
protected

$_fPricePerUnit holds price per unit value in active shop currency. $_fPricePerUnit is calculated from \OxidEsales\Eshop\Application\Model\Article::oxarticles__oxunitquantity->value and from \OxidEsales\Eshop\Application\Model\Article::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

◆ $_iLinkType

OxidEsales\EshopCommunity\Application\Model\Article::$_iLinkType = 0
protected

◆ $_iStockStatus

OxidEsales\EshopCommunity\Application\Model\Article::$_iStockStatus = null
protected

◆ $_iStockStatusOnLoad

OxidEsales\EshopCommunity\Application\Model\Article::$_iStockStatusOnLoad = null
protected

◆ $_oAmountPriceInfo

OxidEsales\EshopCommunity\Application\Model\Article::$_oAmountPriceInfo = null
protected

◆ $_oAmountPriceList

OxidEsales\EshopCommunity\Application\Model\Article::$_oAmountPriceList = null
protected

◆ $_oAttributeList

OxidEsales\EshopCommunity\Application\Model\Article::$_oAttributeList = null
protected

◆ $_oLongDesc

OxidEsales\EshopCommunity\Application\Model\Article::$_oLongDesc = null
protected

◆ $_oMdVariants

OxidEsales\EshopCommunity\Application\Model\Article::$_oMdVariants = null
protected

◆ $_oPrice

OxidEsales\EshopCommunity\Application\Model\Article::$_oPrice = null
protected

◆ $_oTPrice

OxidEsales\EshopCommunity\Application\Model\Article::$_oTPrice = null
protected

◆ $_oUser

OxidEsales\EshopCommunity\Application\Model\Article::$_oUser = null
protected

◆ $_sClassName

OxidEsales\EshopCommunity\Application\Model\Article::$_sClassName = 'oxarticle'
protected

◆ $_sDynImageDir

OxidEsales\EshopCommunity\Application\Model\Article::$_sDynImageDir = null
protected

◆ $_sItemKey

OxidEsales\EshopCommunity\Application\Model\Article::$_sItemKey
protected

◆ $_sMoreDetailLink

OxidEsales\EshopCommunity\Application\Model\Article::$_sMoreDetailLink = null
protected

◆ $_sToBasketLink

OxidEsales\EshopCommunity\Application\Model\Article::$_sToBasketLink = null
protected

◆ $basketAttributeList

OxidEsales\EshopCommunity\Application\Model\Article::$basketAttributeList = null
protected

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