oxArticle Class Reference

Inheritance diagram for oxArticle:

Inheritance graph
[legend]
Collaboration diagram for oxArticle:

Collaboration graph
[legend]

List of all members.


Detailed Description

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

Definition at line 16 of file oxarticle.php.


Public Member Functions

 __construct ($aParams=null)
 __isset ($sName)
 __set ($sName, $sValue)
 __get ($sName)
 setId ($sId=null)
 getSqlActiveSnippet ($blForceCoreTable=false)
 setSkipAssign ($blSkipAssign)
 disablePriceLoad ($oArticle)
 getItemKey ()
 setItemKey ($sItemKey)
 setNoVariantLoading ($blLoadVariants)
 isBuyable ()
 getPersParams ()
 isOnComparisonList ()
 setOnComparisonList ($blOnList)
 setLoadParentData ($blLoadParentData)
 setSkipAbPrice ($blSkipAbPrice=null)
 getSearchableFields ()
 isMultilingualField ($sFieldName)
 isVisible ()
 assign ($aRecord)
 load ($oxID)
 addToRatingAverage ($iRating)
 getArticleRatingAverage ()
 getReviews ()
 getCrossSelling ()
 getAccessoires ()
 getSimilarProducts ()
 getCustomerAlsoBoughtThisProducts ()
 loadAmountPriceInfo ()
 getSelectLists ($sKeyPrefix=null)
 getVariants ($blRemoveNotOrderables=true)
 getSimpleVariants ()
 getAdminVariants ($sLanguage=null)
 getCategory ()
 getCategoryIds ($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 ()
 setArticleUser ($oUser)
 getArticleUser ()
 getBasketPrice ($dAmount, $aSelList, $oBasket)
 applyBasketDiscounts (oxPrice $oPrice, $aDiscounts, $dAmount=1)
 delete ($sOXID=null)
 updateSoldAmount ($iAmount=0)
 disableReminder ()
 save ()
 getPictureGallery ()
 onChange ($sAction=null, $sOXID=null, $sParentID=null)
 getCustomVAT ()
 checkForStock ($dAmount)
 getArticleLongDesc ($sOXID=null)
 setArticleLongDesc ()
 getAttributes ()
 appendLink ($sAddParams)
 getLink ($iLang=null)
 setLinkType ($iType)
 getStdLink ($iLang=null)
 getTags ()
 saveTags ($sTags)
 addTag ($sTag)
 getMediaUrls ()
 getDynImageDir ()
 getDispSelList ()
 getMoreDetailLink ()
 getToBasketLink ()
 getStockStatus ()
 getDeliveryDate ()
 getFTPrice ()
 getFPrice ()
 getPricePerUnit ()
 isParentNotBuyable ()
 isNotBuyable ()
 setBuyableState ($blBuyable=false)
 getVariantList ()
 setSelectlist ($aSelList)
 getPictureUrl ($iIndex)
 getIconUrl ($iIndex= '')
 getThumbnailUrl ()
 getZoomPictureUrl ($iIndex)
 getFileUrl ()
 getPriceFromPrefix ()
 getArticleVat ()
 applyVats (oxPrice $oPrice)
 applyDiscountsForVariant ($oPrice)

Protected Member Functions

 _setFieldData ($sFieldName, $sValue, $iDataType=oxField::T_TEXT)
 _calculatePrice ($oPrice)
 _saveArtLongDesc ($iLang, $sValue)
 _removeInactiveVariants ($oVariants, $blStrict=false)
 _skipSaveFields ()
 _mergeDiscounts ($aDiscounts, $aItemDiscounts)
 _getGroupPrice ()
 _getAmountPrice ($dAmount=1)
 _modifySelectListPrice (&$dPrice, $aChosenList=null)
 _fillAmountPriceList ($oAmPriceList)
 _getVariantsIds ()
 _applyVAT (oxPrice $oPrice, $dVat)
 _applyDiscounts ($oPrice, $aDiscounts)
 _applyCurrency (oxPrice $oPrice, $oCur=null)
 _getIcon ()
 _getAttribsString (&$sAttribs, &$iCnt)
 _getSimList ($sAttribs, $iCnt)
 _generateSimListSearchStr ($sArticleTable, $aList)
 _generateSearchStr ($sOXID, $blSearchPriceCat=false)
 _generateSearchStrForCustomerBought ()
 _generateSelectCatStr ($sOXID, $sCatId, $dPriceFromTo=false)
 _getAmountPriceList ()
 _isFieldEmpty ($sFieldName)
 _assignParentFieldValue ($sFieldName)
 _getParentAricle ()
 _assignParentFieldValues ()
 _assignNotBuyableParent ()
 _assignPictureValues ()
 _assignStock ()
 _assignPrices ()
 _assignPersistentParam ()
 _assignDynImageDir ()
 _assignComparisonListFlag ()
 _assignAttributes ()
 _insert ()
 _update ()
 _deleteRecords ($sOXID)
 _deleteVariantRecords ($sOXID)
 _resetCacheAndArticleCount ($sOxid)
 _deletePics ()
 _onChangeResetCounts ($sOxid, $sVendorId=null, $sManufacturerId=null)
 _onChangeUpdateStock ($sParentID)
 _onChangeUpdateVarCount ($sParentID)
 _onChangeUpdateMinVarPrice ($sParentID)
 _applyRangePrice ()

Protected Attributes

 $_sCoreTbl = 'oxarticles'
 $_sClassName = 'oxarticle'
 $_blUseLazyLoading = true
 $_sItemKey
 $_blCalcPrice = true
 $_oPrice = null
 $_dArticleVat = null
 $_aPersistParam = null
 $_blNotBuyable = false
 $_blLoadVariants = true
 $_aVariants = null
 $_aVariantsWithNotOrderables = null
 $_blNotBuyableParent = false
 $_blHasVariants = false
 $_iVarStock = 0
 $_oVariantList = array()
 $_blIsOnComparisonList = false
 $_oUser = null
 $_blLoadPrice = true
 $_blSkipAbPrice = false
 $_fPricePerUnit = null
 $_blLoadParentData = false
 $_blSkipAssign = false
 $_blSkipDiscounts = null
 $_oAttributeList = null
 $_blIsRangePrice = false
 $_aMediaUrls = null
 $_aDispSelList
 $_blIsSeoObject = true
 $_oAmountPriceList = null
 $_iLinkType = 0
 $_sStdLink = null
 $_sDynImageDir = null
 $_sMoreDetailLink = null
 $_sToBasketLink = null
 $_iStockStatus = null
 $_oTPrice = null
 $_oAmountPriceInfo = null
 $_dAmountPrice = null
 $_sDetailLink = null

Static Protected Attributes

static $_aLoadedParents
static $_aSelList
static $_aArticleManufacturers = array()
static $_aArticleVendors = array()
static $_aArticleCats = array()

Constructor & Destructor Documentation

oxArticle.__construct ( aParams = null  ) 

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

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

Definition at line 336 of file oxarticle.php.


Member Function Documentation

oxArticle.__isset ( sName  ) 

Magic isset, deals with article long description

Parameters:
string $sName Variable name
Returns:
string

Reimplemented from oxBase.

Definition at line 356 of file oxarticle.php.

oxArticle.__set ( sName,
sValue 
)

Magic setter. disallows oxlongdesc to go to aFieldNames

Parameters:
string $sName Long field name
mixed $sValue Field value
Returns:
null

Reimplemented from oxBase.

Definition at line 374 of file oxarticle.php.

oxArticle.__get ( sName  ) 

Magic getter, deals with deprecated values and long description which is loaded on demand. Additionally it sets default value for unknown picture fields

Parameters:
string $sName Variable name
Returns:
mixed

Reimplemented from oxBase.

Definition at line 391 of file oxarticle.php.

oxArticle.setId ( sId = null  ) 

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

Parameters:
string $sId New ID
Returns:
null

Reimplemented from oxBase.

Definition at line 513 of file oxarticle.php.

oxArticle.getSqlActiveSnippet ( blForceCoreTable = false  ) 

Returns SQL select string with checks if items are available

Parameters:
bool $blForceCoreTable forces core table usage (optional)
Returns:
string

Reimplemented from oxI18n.

Definition at line 530 of file oxarticle.php.

oxArticle.setSkipAssign ( blSkipAssign  ) 

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

Parameters:
bool $blSkipAssign Whether to skip assign process for the article
Returns:
null

Definition at line 564 of file oxarticle.php.

oxArticle.disablePriceLoad ( oArticle  ) 

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

Parameters:
objetc $oArticle article object
Returns:
null

Definition at line 576 of file oxarticle.php.

oxArticle.getItemKey (  ) 

Returns item key used with oxuserbasket

Returns:
string

Definition at line 586 of file oxarticle.php.

oxArticle.setItemKey ( sItemKey  ) 

Sets item key used with oxuserbasket

Parameters:
string $sItemKey Item key
Returns:
null

Definition at line 598 of file oxarticle.php.

oxArticle.setNoVariantLoading ( blLoadVariants  ) 

Disables/enables variant loading

Parameters:
bool $blLoadVariants skip variant loading or not
Returns:
null

Definition at line 610 of file oxarticle.php.

oxArticle.isBuyable (  ) 

Checks if article is buyable.

Returns:
bool

Definition at line 620 of file oxarticle.php.

oxArticle.getPersParams (  ) 

Get persistent parameters

Returns:
array

Definition at line 634 of file oxarticle.php.

oxArticle.isOnComparisonList (  ) 

Checks whether article is inluded in comparison list

Returns:
bool

Definition at line 644 of file oxarticle.php.

oxArticle.setOnComparisonList ( blOnList  ) 

Set if article is inluded in comparison list

Parameters:
bool $blOnList Whether is article on the list
Returns:
null

Definition at line 656 of file oxarticle.php.

oxArticle.setLoadParentData ( blLoadParentData  ) 

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

Parameters:
bool $blLoadParentData Whether to load parent data
Returns:
null

Definition at line 668 of file oxarticle.php.

oxArticle.setSkipAbPrice ( blSkipAbPrice = null  ) 

Set _blSkipAbPrice value. If is set to true, then "From price" is not calculated for this object.

Parameters:
bool $blSkipAbPrice Whether to skip "From" price loading
Returns:
null

Definition at line 680 of file oxarticle.php.

oxArticle.getSearchableFields (  ) 

Returns an array of article object DB fields, without multilanguage.

Returns:
array

Definition at line 690 of file oxarticle.php.

oxArticle.isMultilingualField ( sFieldName  ) 

Returns true if the field is multilanguage

Parameters:
string $sFieldName Field name
Returns:
bool

Reimplemented from oxI18n.

Definition at line 706 of file oxarticle.php.

oxArticle.isVisible (  ) 

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

Returns:
bool

Definition at line 720 of file oxarticle.php.

oxArticle.assign ( aRecord  ) 

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

Parameters:
string $aRecord Array representing current field values
Returns:
null

Reimplemented from oxI18n.

Definition at line 762 of file oxarticle.php.

oxArticle._setFieldData ( sFieldName,
sValue,
iDataType = oxField::T_TEXT 
) [protected]

Sets data field value

Parameters:
string $sFieldName index OR name (eg. 'oxarticles__oxtitle') of a data field to set
string $sValue value of data field
int $iDataType field type
Returns:
null

Reimplemented from oxBase.

Definition at line 804 of file oxarticle.php.

oxArticle.load ( oxID  ) 

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

Parameters:
string $oxID Article object ID
Returns:
bool

Reimplemented from oxBase.

Definition at line 819 of file oxarticle.php.

oxArticle.addToRatingAverage ( iRating  ) 

Calculates and saves product rating average

Parameters:
integer $iRating new rating value
Returns:
null

Definition at line 840 of file oxarticle.php.

oxArticle.getArticleRatingAverage (  ) 

Returns product rating average

Returns:
double

Definition at line 857 of file oxarticle.php.

oxArticle.getReviews (  ) 

Collects user written reviews about an article.

Returns:
oxList

Definition at line 867 of file oxarticle.php.

oxArticle.getCrossSelling (  ) 

Loads and returns array with crosselling information.

Returns:
array

Definition at line 901 of file oxarticle.php.

oxArticle.getAccessoires (  ) 

Loads and returns array with accessoires information.

Returns:
array

Definition at line 915 of file oxarticle.php.

oxArticle.getSimilarProducts (  ) 

Returns a list of similar products.

Returns:
array

Definition at line 938 of file oxarticle.php.

oxArticle.getCustomerAlsoBoughtThisProducts (  ) 

Loads and returns articles list, bought by same customer.

Returns:
array

Definition at line 981 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 1006 of file oxarticle.php.

oxArticle.getSelectLists ( sKeyPrefix = null  ) 

Returns all selectlists this article has.

Parameters:
string $sKeyPrefix Optionall key prefix
Returns:
array

Definition at line 1034 of file oxarticle.php.

oxArticle.getVariants ( blRemoveNotOrderables = true  ) 

Collects and returns article variants.

Parameters:
bool $blRemoveNotOrderables if true, removes from list not orderable articles, which are out of stock
Returns:
array

Definition at line 1090 of file oxarticle.php.

oxArticle.getSimpleVariants (  ) 

Simple way to get variants without quering oxarticle table first. This is basically used for lists.

Returns:
null

Definition at line 1162 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 $sLanguage shop language.
Returns:
object

Definition at line 1177 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 1209 of file oxarticle.php.

oxArticle.getCategoryIds ( blSkipCache = false  ) 

Returns ID's of categories. where this article is assigned

Parameters:
bool $blSkipCache Whether to skip cache
Returns:
array

Definition at line 1250 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 $blShopCheck Set false if shop check is not required (default is true)
Returns:
object

Definition at line 1294 of file oxarticle.php.

oxArticle.getVendorId ( blForceReload = false  ) 

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

Parameters:
bool $blForceReload reloads id even if it is cached
Returns:
string

Definition at line 1320 of file oxarticle.php.

oxArticle.getManufacturerId ( blForceReload = false  ) 

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

Parameters:
bool $blForceReload reloads id even if it is cached
Returns:
string

Definition at line 1340 of file oxarticle.php.

oxArticle.getManufacturer ( blShopCheck = true  ) 

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

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

Definition at line 1362 of file oxarticle.php.

oxArticle.inCategory ( sCatNid  ) 

Checks if artickle is assigned to category $sCatNID. on success.

Parameters:
string $sCatNid category ID
Returns:
bool

Definition at line 1394 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 $sCatId category ID
Returns:
bool

Definition at line 1407 of file oxarticle.php.

oxArticle.getTPrice (  ) 

Returns T price

Returns:
oxPrice

Definition at line 1443 of file oxarticle.php.

oxArticle.skipDiscounts (  ) 

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

Returns:
bool

Definition at line 1467 of file oxarticle.php.

oxArticle.setPrice ( oxPrice oPrice  ) 

Sets the current oxPrice object

Parameters:
oxPrice $oPrice the new price object
Returns:
null

Definition at line 1490 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 $dAmount article amount. Default is 1
Returns:
double

Definition at line 1503 of file oxarticle.php.

oxArticle.getPrice (  ) 

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

Returns:
oxPrice

Definition at line 1525 of file oxarticle.php.

oxArticle._calculatePrice ( oPrice  )  [protected]

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

Returns:
oxPrice

Definition at line 1557 of file oxarticle.php.

oxArticle.setArticleUser ( oUser  ) 

sets article user

Parameters:
oxUser $oUser user to set
Returns:
null

Definition at line 1581 of file oxarticle.php.

oxArticle.getArticleUser (  ) 

return article user

Returns:
oxUser

Definition at line 1591 of file oxarticle.php.

oxArticle.getBasketPrice ( dAmount,
aSelList,
oBasket 
)

Creates, calculates and returns oxprice object for basket product.

Parameters:
double $dAmount Amount
string $aSelList Selection list
object $oBasket User shopping basket object
Returns:
oxPrice

Definition at line 1608 of file oxarticle.php.

oxArticle.applyBasketDiscounts ( oxPrice oPrice,
aDiscounts,
dAmount = 1 
)

Applies discoutns which are supposed to be applied on amounts greater than zero. Returns applied discounts.

Parameters:
oxPrice $oPrice Old article price
array $aDiscounts Discount array
amount $dAmount Amount in basket
Returns:
array

Definition at line 1650 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 $sOXID Article id
Returns:
bool

Reimplemented from oxBase.

Definition at line 1681 of file oxarticle.php.

oxArticle.updateSoldAmount ( iAmount = 0  ) 

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

Parameters:
integer $iAmount Number of articles sold
Returns:
bool

Definition at line 1712 of file oxarticle.php.

oxArticle.disableReminder (  ) 

Disables reminder functionality for article

Returns:
bool

Definition at line 1740 of file oxarticle.php.

oxArticle.save (  ) 

Makes sure that image values (oxpic1 - oxpic12, oxthumb, oxicon) are only base name by striping any dir information and leave only original file name and finally save the object using parent.save() method.

Returns:
bool

Reimplemented from oxBase.

Definition at line 1752 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 1788 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 as static method when changes are executed over SQL. (or use module class instead of oxArticle if such exists)

Parameters:
string $sAction Action constant
string $sOXID Article ID
string $sParentID Parent ID
Returns:
null

Definition at line 1866 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 1915 of file oxarticle.php.

oxArticle.checkForStock ( dAmount  ) 

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

Parameters:
double $dAmount buyable amount
Returns:
mixed

Definition at line 1929 of file oxarticle.php.

oxArticle.getArticleLongDesc ( sOXID = null  ) 

Get article long description

Parameters:
string $sOXID Article ID
Returns:
object $oField field object

Definition at line 1979 of file oxarticle.php.

oxArticle.setArticleLongDesc (  ) 

Set article long description

Returns:
object $oField field object

Definition at line 2025 of file oxarticle.php.

oxArticle.getAttributes (  ) 

Loads and returns attribute list associated with this article

Returns:
object

Definition at line 2065 of file oxarticle.php.

oxArticle.appendLink ( sAddParams  ) 

Appends current article link with additional request parameters

Parameters:
string $sAddParams additional parameters which needs to be added to product url
Returns:
null

Definition at line 2088 of file oxarticle.php.

oxArticle.getLink ( iLang = null  ) 

Gets article link

Parameters:
int $iLang required language. optional
Returns:
string

Definition at line 2103 of file oxarticle.php.

oxArticle.setLinkType ( iType  ) 

Resets details link

Parameters:
int $iType type of link to load
Returns:
null

Definition at line 2136 of file oxarticle.php.

oxArticle.getStdLink ( iLang = null  ) 

Returns standard URL to product

Parameters:
int $iLang required language. optional
Returns:
string

Definition at line 2152 of file oxarticle.php.

oxArticle.getTags (  ) 

Returns article tags

Returns:
string;

Definition at line 2203 of file oxarticle.php.

oxArticle.saveTags ( sTags  ) 

Saves article tags

Parameters:
string $sTags article tag
Returns:
bool

Definition at line 2220 of file oxarticle.php.

oxArticle.addTag ( sTag  ) 

Adds tag

Parameters:
string $sTag new tag
Returns:
bool

Definition at line 2239 of file oxarticle.php.

oxArticle.getMediaUrls (  ) 

Return article media URL

Returns:
unknown

Definition at line 2259 of file oxarticle.php.

oxArticle.getDynImageDir (  ) 

Get image url

Returns:
array

Definition at line 2280 of file oxarticle.php.

oxArticle.getDispSelList (  ) 

Returns select lists to display

Returns:
array

Definition at line 2290 of file oxarticle.php.

oxArticle.getMoreDetailLink (  ) 

Get more details link

Returns:
string

Definition at line 2305 of file oxarticle.php.

oxArticle.getToBasketLink (  ) 

Get to basket link

Returns:
string

Definition at line 2328 of file oxarticle.php.

oxArticle.getStockStatus (  ) 

Get stock status

Returns:
integer

Definition at line 2369 of file oxarticle.php.

oxArticle.getDeliveryDate (  ) 

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

Returns:
string | bool

Definition at line 2379 of file oxarticle.php.

oxArticle.getFTPrice (  ) 

Returns rounded T price.

Returns:
double | bool

Definition at line 2393 of file oxarticle.php.

oxArticle.getFPrice (  ) 

Returns formated product's price.

Returns:
double

Definition at line 2409 of file oxarticle.php.

oxArticle.getPricePerUnit (  ) 

Returns formated price per unit (oxarticle._assignPrices())

Returns:
string

Definition at line 2423 of file oxarticle.php.

oxArticle.isParentNotBuyable (  ) 

Returns true if parent is not buyable

Returns:
bool

Definition at line 2433 of file oxarticle.php.

oxArticle.isNotBuyable (  ) 

Returns true if article is not buyable

Returns:
bool

Definition at line 2443 of file oxarticle.php.

oxArticle.setBuyableState ( blBuyable = false  ) 

Sets product state - buyable or not

Parameters:
bool $blBuyable state - buyable or not (default false)
Returns:
null

Definition at line 2455 of file oxarticle.php.

oxArticle.getVariantList (  ) 

Returns variant lists of current product

Returns:
object

Definition at line 2465 of file oxarticle.php.

oxArticle.setSelectlist ( aSelList  ) 

Sets selectlists of current product

Parameters:
array $aSelList selectlist
Returns:
object

Definition at line 2477 of file oxarticle.php.

oxArticle.getPictureUrl ( iIndex  ) 

Returns article picture

Parameters:
int $iIndex picture index
Returns:
string

Definition at line 2489 of file oxarticle.php.

oxArticle.getIconUrl ( iIndex = ''  ) 

Returns article icon picture url

Parameters:
int $iIndex picture index
Returns:
string

Definition at line 2501 of file oxarticle.php.

oxArticle.getThumbnailUrl (  ) 

Returns article thumbnail picture url

Returns:
string

Definition at line 2522 of file oxarticle.php.

oxArticle.getZoomPictureUrl ( iIndex  ) 

Returns article zoom picture url

Parameters:
int $iIndex picture index
Returns:
string

Definition at line 2535 of file oxarticle.php.

oxArticle.getFileUrl (  ) 

Returns article file url

Returns:
string

Definition at line 2545 of file oxarticle.php.

oxArticle.getPriceFromPrefix (  ) 

Returns string prefix (like "ab") if needed or empty string.

Returns:
string

Definition at line 2555 of file oxarticle.php.

oxArticle._saveArtLongDesc ( iLang,
sValue 
) [protected]

inserts article long description to artextends table

Parameters:
int $iLang language
string $sValue long description
Returns:
null

Definition at line 2573 of file oxarticle.php.

oxArticle._removeInactiveVariants ( oVariants,
blStrict = false 
) [protected]

This function basically is intended to call from GetVariants() for further variant processing. Function removes inactive or out of stock variants and sets class variables: $_iVarStock $_blHasVariants $_blNotBuyableParent $_blNotBuyable

Parameters:
oxArticleList $oVariants Object with article variants
bool $blStrict If true articles with oxstockflag = 3 will be removed (currently is used in getSimpleVariants to skip these articles in list)
Returns:
object oxarticlelist object with modified article variants

Definition at line 2601 of file oxarticle.php.

oxArticle._skipSaveFields (  )  [protected]

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

Definition at line 2648 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 $aDiscounts Discount array
array $aItemDiscounts Discount array
Returns:
array $aDiscounts

Definition at line 2673 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 2691 of file oxarticle.php.

oxArticle._getAmountPrice ( dAmount = 1  )  [protected]

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

Parameters:
double $dAmount Basket amount
Returns:
bool | null

Definition at line 2722 of file oxarticle.php.

oxArticle._modifySelectListPrice ( &$  dPrice,
aChosenList = null 
) [protected]

Modifies article price according to selected select list value

Parameters:
double &$dPrice Modifyable price
array $aChosenList Selection list array
Returns:
double

Definition at line 2750 of file oxarticle.php.

oxArticle._fillAmountPriceList ( oAmPriceList  )  [protected]

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

Parameters:
object $oAmPriceList Amount (staffel) price list
Returns:
object

Definition at line 2779 of file oxarticle.php.

oxArticle._getVariantsIds (  )  [protected]

Collects and returns article variants ids.

Returns:
array

Definition at line 2837 of file oxarticle.php.

oxArticle.getArticleVat (  ) 

retrieve article VAT (cached)

Returns:
double

Definition at line 2855 of file oxarticle.php.

oxArticle._applyVAT ( oxPrice oPrice,
dVat 
) [protected]

Applies VAT to article

Parameters:
oxPrice $oPrice Price object
double $dVat VAT percent
Returns:
null

Definition at line 2871 of file oxarticle.php.

oxArticle.applyVats ( oxPrice oPrice  ) 

apply article and article use

Parameters:
oxPrice $oPrice target price

Definition at line 2886 of file oxarticle.php.

oxArticle._applyDiscounts ( oPrice,
aDiscounts 
) [protected]

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

Parameters:
oxprice $oPrice Price object
array $aDiscounts Discount list
Returns:
null

Definition at line 2901 of file oxarticle.php.

oxArticle.applyDiscountsForVariant ( oPrice  ) 

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

Parameters:
oxprice $oPrice Price object
array $aDiscounts Discount list
Returns:
null

Definition at line 2917 of file oxarticle.php.

oxArticle._applyCurrency ( oxPrice oPrice,
oCur = null 
) [protected]

Applies currency factor

Parameters:
oxPrice $oPrice Price object
object $oCur Currency object
Returns:
null

Definition at line 2933 of file oxarticle.php.

oxArticle._getIcon (  )  [protected]

Returns path of icon file ("/0/".$this->oxarticles__oxicon->value) or if icon is not generated yet - tries to generate this file (if no GD lib available and oxarticles__oxthumb is not set as default icon sets "/0/nopic_ico.jpg")and updates DB article field "oxicon".

Returns:
string

Definition at line 2950 of file oxarticle.php.

oxArticle._getAttribsString ( &$  sAttribs,
&$  iCnt 
) [protected]

gets attribs string

Parameters:
string &$sAttribs Attribute selection snippet
int &$iCnt The number of selected attributes
Returns:
null;

Definition at line 3019 of file oxarticle.php.

oxArticle._getSimList ( sAttribs,
iCnt 
) [protected]

Gets similar list.

Parameters:
string $sAttribs Attribute selection snippet
int $iCnt Similar list article count
Returns:
array

Definition at line 3049 of file oxarticle.php.

oxArticle._generateSimListSearchStr ( sArticleTable,
aList 
) [protected]

Generates search string for similar list.

Parameters:
string $sArticleTable Article table name
array $aList A list of original articles
Returns:
string

Definition at line 3090 of file oxarticle.php.

oxArticle._generateSearchStr ( sOXID,
blSearchPriceCat = false 
) [protected]

Generates SearchString for getCategory()

Parameters:
string $sOXID Article ID
bool $blSearchPriceCat Whether to perform the search within price categories
Returns:
string

Definition at line 3127 of file oxarticle.php.

oxArticle._generateSearchStrForCustomerBought (  )  [protected]

Generates SQL select string for getCustomerAlsoBoughtThisProduct

Returns:
string

Definition at line 3150 of file oxarticle.php.

oxArticle._generateSelectCatStr ( sOXID,
sCatId,
dPriceFromTo = false 
) [protected]

Generates select string for isAssignedToCategory()

Parameters:
string $sOXID Article ID
string $sCatId Category ID
bool $dPriceFromTo Article price for price categories
Returns:
string

Definition at line 3209 of file oxarticle.php.

oxArticle._getAmountPriceList (  )  [protected]

Collecting assigned to article amount-price list

Returns:
oxList

Definition at line 3232 of file oxarticle.php.

oxArticle._isFieldEmpty ( sFieldName  )  [protected]

Detects if field is empty.

Parameters:
string $sFieldName Field name
Returns:
bool

Definition at line 3282 of file oxarticle.php.

oxArticle._assignParentFieldValue ( sFieldName  )  [protected]

Assigns parent field values to article

Parameters:
string $sFieldName field name
Returns:
null;

Definition at line 3325 of file oxarticle.php.

oxArticle._getParentAricle (  )  [protected]

get parent article

Returns:
oxArticle

Definition at line 3404 of file oxarticle.php.

oxArticle._assignParentFieldValues (  )  [protected]

Assigns parent field values to article

Returns:
null;

Definition at line 3428 of file oxarticle.php.

oxArticle._assignNotBuyableParent (  )  [protected]

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

Returns:
null

Definition at line 3465 of file oxarticle.php.

oxArticle._assignPictureValues (  )  [protected]

Assigns picture values to article

Returns:
null

Definition at line 3479 of file oxarticle.php.

oxArticle._assignStock (  )  [protected]

Assigns stock status to article

Returns:
null

Definition at line 3542 of file oxarticle.php.

oxArticle._assignPrices (  )  [protected]

Assigns prices to article

Returns:
null

Definition at line 3607 of file oxarticle.php.

oxArticle._assignPersistentParam (  )  [protected]

assigns persistent param to article

Returns:
null;

Definition at line 3636 of file oxarticle.php.

oxArticle._assignDynImageDir (  )  [protected]

assigns dynimagedir to article

Returns:
null;

Definition at line 3650 of file oxarticle.php.

oxArticle._assignComparisonListFlag (  )  [protected]

Adds a flag if article is on comparisonlist.

Returns:
null;

Definition at line 3667 of file oxarticle.php.

oxArticle._assignAttributes (  )  [protected]

Assigns atttibutes to article

Returns:
null;

Definition at line 3682 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 oxBase.

Definition at line 3699 of file oxarticle.php.

oxArticle._update (  )  [protected]

Executes oxarticle._skipSaveFields() and updates article information

Returns:
bool

Reimplemented from oxI18n.

Definition at line 3718 of file oxarticle.php.

oxArticle._deleteRecords ( sOXID  )  [protected]

Deletes records in database

Parameters:
string $sOXID Article ID
Returns:
int

Definition at line 3736 of file oxarticle.php.

oxArticle._deleteVariantRecords ( sOXID  )  [protected]

Deletes variant records

Parameters:
string $sOXID Article ID
Returns:
null

Definition at line 3787 of file oxarticle.php.

oxArticle._resetCacheAndArticleCount ( sOxid  )  [protected]

Resets cache and article count in vendor and category

Parameters:
string $sOxid reset article id
Deprecated:
since Jan 21, 2009
Returns:
null

Definition at line 3810 of file oxarticle.php.

oxArticle._deletePics (  )  [protected]

Delete pics

Returns:
null

Definition at line 3820 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 triger.

Parameters:
string $sOxid object to reset id ID
string $sVendorId Vendor ID
string $sManufacturerId Manufacturer ID
Returns:
null

Definition at line 3863 of file oxarticle.php.

oxArticle._onChangeUpdateStock ( sParentID  )  [protected]

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

Parameters:
string $sParentID product parent id
Returns:
null

Definition at line 3894 of file oxarticle.php.

oxArticle._onChangeUpdateVarCount ( sParentID  )  [protected]

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

Parameters:
string $sParentID Parent ID
Returns:
null

Definition at line 3931 of file oxarticle.php.

oxArticle._onChangeUpdateMinVarPrice ( sParentID  )  [protected]

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

Parameters:
string $sParentID Parent ID
Returns:
null

Definition at line 3948 of file oxarticle.php.

oxArticle._applyRangePrice (  )  [protected]

Returns minimum brut price from all (already loaded) variants and if aplicable parent article

Returns:
null;

Definition at line 3973 of file oxarticle.php.


Member Data Documentation

oxArticle.$_sCoreTbl = 'oxarticles' [protected]

Definition at line 23 of file oxarticle.php.

oxArticle.$_sClassName = 'oxarticle' [protected]

Reimplemented from oxI18n.

Definition at line 30 of file oxarticle.php.

oxArticle.$_blUseLazyLoading = true [protected]

Reimplemented from oxBase.

Definition at line 37 of file oxarticle.php.

oxArticle.$_sItemKey [protected]

Definition at line 44 of file oxarticle.php.

oxArticle.$_blCalcPrice = true [protected]

Definition at line 51 of file oxarticle.php.

oxArticle.$_oPrice = null [protected]

Definition at line 57 of file oxarticle.php.

oxArticle.$_dArticleVat = null [protected]

Definition at line 64 of file oxarticle.php.

oxArticle.$_aPersistParam = null [protected]

Definition at line 71 of file oxarticle.php.

oxArticle.$_blNotBuyable = false [protected]

Definition at line 78 of file oxarticle.php.

oxArticle.$_blLoadVariants = true [protected]

Definition at line 86 of file oxarticle.php.

oxArticle.$_aVariants = null [protected]

Definition at line 93 of file oxarticle.php.

oxArticle.$_aVariantsWithNotOrderables = null [protected]

Definition at line 100 of file oxarticle.php.

oxArticle.$_blNotBuyableParent = false [protected]

Definition at line 110 of file oxarticle.php.

oxArticle.$_blHasVariants = false [protected]

$_blHasVariants is set to true if article has any variants. As an opposite to $_oVariantList this works even if variants are not active

Definition at line 116 of file oxarticle.php.

oxArticle.$_iVarStock = 0 [protected]

Indicates how many variants this article has "on stock" (very large number for unlimited)

Definition at line 121 of file oxarticle.php.

oxArticle.$_oVariantList = array() [protected]

Definition at line 127 of file oxarticle.php.

oxArticle.$_blIsOnComparisonList = false [protected]

Definition at line 133 of file oxarticle.php.

oxArticle.$_oUser = null [protected]

Definition at line 139 of file oxarticle.php.

oxArticle.$_blLoadPrice = true [protected]

Definition at line 146 of file oxarticle.php.

oxArticle.$_blSkipAbPrice = false [protected]

If $_blSkipAbPrice is set to true, then "From price" is not calculated for this object.

Definition at line 151 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 159 of file oxarticle.php.

oxArticle.$_blLoadParentData = false [protected]

Variable used to force load parent data in export

Definition at line 164 of file oxarticle.php.

oxArticle.$_blSkipAssign = false [protected]

Variable used to force load parent data in export

Definition at line 169 of file oxarticle.php.

oxArticle.$_blSkipDiscounts = null [protected]

Definition at line 176 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 182 of file oxarticle.php.

oxArticle.$_blIsRangePrice = false [protected]

Definition at line 190 of file oxarticle.php.

oxArticle.$_aMediaUrls = null [protected]

Definition at line 197 of file oxarticle.php.

oxArticle.$_aLoadedParents [static, protected]

Definition at line 204 of file oxarticle.php.

oxArticle.$_aSelList [static, protected]

Definition at line 211 of file oxarticle.php.

oxArticle.$_aDispSelList [protected]

Definition at line 218 of file oxarticle.php.

oxArticle.$_blIsSeoObject = true [protected]

Reimplemented from oxBase.

Definition at line 225 of file oxarticle.php.

oxArticle.$_oAmountPriceList = null [protected]

Definition at line 232 of file oxarticle.php.

oxArticle.$_iLinkType = 0 [protected]

Definition at line 242 of file oxarticle.php.

oxArticle.$_sStdLink = null [protected]

Definition at line 249 of file oxarticle.php.

oxArticle.$_sDynImageDir = null [protected]

Definition at line 256 of file oxarticle.php.

oxArticle.$_sMoreDetailLink = null [protected]

Definition at line 263 of file oxarticle.php.

oxArticle.$_sToBasketLink = null [protected]

Definition at line 270 of file oxarticle.php.

oxArticle.$_iStockStatus = null [protected]

Definition at line 277 of file oxarticle.php.

oxArticle.$_oTPrice = null [protected]

Definition at line 284 of file oxarticle.php.

oxArticle.$_oAmountPriceInfo = null [protected]

Definition at line 291 of file oxarticle.php.

oxArticle.$_dAmountPrice = null [protected]

Definition at line 298 of file oxarticle.php.

oxArticle.$_sDetailLink = null [protected]

Definition at line 305 of file oxarticle.php.

oxArticle.$_aArticleManufacturers = array() [static, protected]

Definition at line 312 of file oxarticle.php.

oxArticle.$_aArticleVendors = array() [static, protected]

Definition at line 319 of file oxarticle.php.

oxArticle.$_aArticleCats = array() [static, protected]

Definition at line 326 of file oxarticle.php.


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

Generated on Wed Jun 17 12:11:51 2009 for OXID eShop CE by  doxygen 1.5.5