oxSimpleVariant Class Reference

Inheritance diagram for oxSimpleVariant:
Inheritance graph
[legend]
Collaboration diagram for oxSimpleVariant:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 __construct ()
 __get ($sName)
 assign ($aRecord)
 getSelectLists ()
 getArticleUser ()
 getPrice ()
 setPrice ($oPrice)
 getFPrice ()
 setParent ($oParent)
 getParent ()
 getLinkType ()
 inCategory ($sCatNid)
 inPriceCategory ($sCatNid)
 getBaseStdLink ($iLang, $blAddId=true, $blFull=true)
 getStdLink ($iLang=null, $aParams=array())
 getBaseSeoLink ($iLang)
 getLink ($iLang=null)

Protected Member Functions

 _getGroupPrice ()
 _applyCurrency (oxPrice $oPrice, $oCur=null)
 _applyParentDiscounts ($oPrice)
 _applyParentVat ($oPrice)
 _getParentPrice ()

Protected Attributes

 $_blUseLazyLoading = true
 $_oPrice = null
 $_oParent = null
 $_aStdUrls = array()
 $_aBaseStdUrls = array()
 $_aSeoUrls = array()
 $_oUser = null

Detailed Description

Lightweight variant handler. Implemnets only absolutely needed oxArticle methods.

Definition at line 7 of file oxsimplevariant.php.


Constructor & Destructor Documentation

oxSimpleVariant.__construct (  ) 

Initializes instance

Reimplemented from oxI18n.

Definition at line 61 of file oxsimplevariant.php.


Member Function Documentation

oxSimpleVariant.__get ( sName  ) 

Magic getter, deals with deprecated values

Parameters:
string $sName Variable name
Returns:
mixed

Reimplemented from oxBase.

Definition at line 75 of file oxsimplevariant.php.

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

Applies currency factor

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

Definition at line 188 of file oxsimplevariant.php.

oxSimpleVariant._applyParentDiscounts ( oPrice  )  [protected]

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

Parameters:
oxprice $oPrice Price object
Returns:
null

Definition at line 204 of file oxsimplevariant.php.

oxSimpleVariant._applyParentVat ( oPrice  )  [protected]

apply parent article VAT to given price

Parameters:
oxPrice $oPrice price object
Returns:
null

Definition at line 218 of file oxsimplevariant.php.

oxSimpleVariant._getGroupPrice (  )  [protected]

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

Returns:
double

Definition at line 135 of file oxsimplevariant.php.

oxSimpleVariant._getParentPrice (  )  [protected]

Returns parent price. Assuming variant parent has been assigned before function execution.

Deprecated:
should be used $this->_oParent->getPrice();
Returns:
double

Definition at line 280 of file oxsimplevariant.php.

oxSimpleVariant.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 98 of file oxsimplevariant.php.

oxSimpleVariant.getArticleUser (  ) 

Returns article user

Returns:
oxUser

Definition at line 122 of file oxsimplevariant.php.

oxSimpleVariant.getBaseSeoLink ( iLang  ) 

Returns raw recommlist seo url

Parameters:
int $iLang language id
Returns:
string

Definition at line 388 of file oxsimplevariant.php.

oxSimpleVariant.getBaseStdLink ( iLang,
blAddId = true,
blFull = true 
)

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

Parameters:
int $iLang language id
bool $blAddId add current object id to url or not
bool $blFull return full including domain name [optional]
Returns:
string

Implements oxIUrl.

Definition at line 344 of file oxsimplevariant.php.

oxSimpleVariant.getFPrice (  ) 

Returns formated product price.

Returns:
double

Definition at line 242 of file oxsimplevariant.php.

oxSimpleVariant.getLink ( iLang = null  ) 

Gets article link

Parameters:
int $iLang required language id [optional]
Returns:
string

Implements oxIUrl.

Definition at line 400 of file oxsimplevariant.php.

oxSimpleVariant.getLinkType (  ) 

Get link type

Returns:
int

Definition at line 294 of file oxsimplevariant.php.

oxSimpleVariant.getParent (  ) 

Parent article getter.

Returns:
oxArticle

Definition at line 268 of file oxsimplevariant.php.

oxSimpleVariant.getPrice (  ) 

Implementing (faking) performance friendly method from oxArticle

Returns:
oxPrice

Definition at line 161 of file oxsimplevariant.php.

oxSimpleVariant.getSelectLists (  ) 

Implementing (fakeing) performance friendly method from oxArticle oxbase

Returns:
null

Definition at line 112 of file oxsimplevariant.php.

oxSimpleVariant.getStdLink ( iLang = null,
aParams = array() 
)

Gets article link

Parameters:
int $iLang required language [optional]
array $aParams additional params to use [optional]
Returns:
string

Implements oxIUrl.

Definition at line 364 of file oxsimplevariant.php.

oxSimpleVariant.inCategory ( sCatNid  ) 

Checks if article is assigned to category

Parameters:
string $sCatNid category ID
Returns:
bool

Definition at line 310 of file oxsimplevariant.php.

oxSimpleVariant.inPriceCategory ( sCatNid  ) 

Checks if article is assigned to price category $sCatNID

Parameters:
string $sCatNid Price category ID
Returns:
bool

Definition at line 326 of file oxsimplevariant.php.

oxSimpleVariant.setParent ( oParent  ) 

Sets parent article

Parameters:
oxArticle $oParent Parent article
Returns:
null

Definition at line 258 of file oxsimplevariant.php.

oxSimpleVariant.setPrice ( oPrice  ) 

Price setter

Parameters:
object $oPrice price object
Returns:
null;

Definition at line 232 of file oxsimplevariant.php.


Member Data Documentation

oxSimpleVariant.$_aBaseStdUrls = array() [protected]

Definition at line 42 of file oxsimplevariant.php.

oxSimpleVariant.$_aSeoUrls = array() [protected]

Definition at line 49 of file oxsimplevariant.php.

oxSimpleVariant.$_aStdUrls = array() [protected]

Definition at line 35 of file oxsimplevariant.php.

oxSimpleVariant.$_blUseLazyLoading = true [protected]

Reimplemented from oxBase.

Definition at line 14 of file oxsimplevariant.php.

oxSimpleVariant.$_oParent = null [protected]

Definition at line 28 of file oxsimplevariant.php.

oxSimpleVariant.$_oPrice = null [protected]

Definition at line 21 of file oxsimplevariant.php.

oxSimpleVariant.$_oUser = null [protected]

Definition at line 55 of file oxsimplevariant.php.


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

Generated by  doxygen 1.6.2