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

Public Member Functions

 __construct ()
 
 getSelectLists ()
 
 getArticleUser ()
 
 getPrice ()
 
 modifyGroupPrice ($price)
 
 setPrice ($oPrice)
 
 getFPrice ()
 
 setParent ($oParent)
 
 getParent ()
 
 getLinkType ()
 
 inCategory ($sCatNid)
 
 inPriceCategory ($sCatNid)
 
 getBaseStdLink ($iLang, $blAddId=true, $blFull=true)
 
 getStdLink ($iLang=null, $aParams=[])
 
 getBaseSeoLink ($iLang)
 
 getLink ($iLang=null)
 

Protected Member Functions

 _getGroupPrice ()
 
 _applyCurrency (\OxidEsales\Eshop\Core\Price $oPrice, $oCur=null)
 
 _applyParentDiscounts ($oPrice)
 
 _applyParentVat ($oPrice)
 

Protected Attributes

 $_blUseLazyLoading = true
 
 $_oPrice = null
 
 $_oParent = null
 
 $_aStdUrls = []
 
 $_aBaseStdUrls = []
 
 $_aSeoUrls = []
 
 $_oUser = null
 

Detailed Description

Lightweight variant handler. Implemnets only absolutely needed oxArticle methods.

Constructor & Destructor Documentation

◆ __construct()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::__construct ( )

Initializes instance

Member Function Documentation

◆ _applyCurrency()

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

Applies currency factor

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

◆ _applyParentDiscounts()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::_applyParentDiscounts (   $oPrice)
protected

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

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

◆ _applyParentVat()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::_applyParentVat (   $oPrice)
protected

apply parent article VAT to given price

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

◆ _getGroupPrice()

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

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

Returns
double

◆ getArticleUser()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::getArticleUser ( )

Returns article user

Returns
oxUser

◆ getBaseSeoLink()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::getBaseSeoLink (   $iLang)

Returns raw recommlist seo url

Parameters
int$iLanglanguage id
Returns
string

◆ getBaseStdLink()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::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
bool$blFullreturn full including domain name [optional]
Returns
string

◆ getFPrice()

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

Returns formated product price.

Returns
double

◆ getLink()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::getLink (   $iLang = null)

Gets article link

Parameters
int$iLangrequired language id [optional]
Returns
string

◆ getLinkType()

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

Get link type

Returns
int

◆ getParent()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::getParent ( )

Parent article getter.

Returns
\OxidEsales\Eshop\Application\Model\Article

◆ getPrice()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::getPrice ( )

Implementing (faking) performance friendly method from oxArticle

Returns
\OxidEsales\Eshop\Core\Price

◆ getSelectLists()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::getSelectLists ( )

Implementing (fakeing) performance friendly method from oxArticle oxbase

Returns
null

◆ getStdLink()

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

Gets article link

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

◆ inCategory()

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

Checks if article is assigned to category

Parameters
string$sCatNidcategory ID
Returns
bool

◆ inPriceCategory()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::inPriceCategory (   $sCatNid)

Checks if article is assigned to price category $sCatNID

Parameters
string$sCatNidPrice category ID
Returns
bool

◆ modifyGroupPrice()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::modifyGroupPrice (   $price)

Make changes to price on getting price.

Parameters
float$price
Returns
float

◆ setParent()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::setParent (   $oParent)

Sets parent article

Parameters
\OxidEsales\Eshop\Application\Model\Article$oParentParent article

◆ setPrice()

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::setPrice (   $oPrice)

Price setter

Parameters
object$oPriceprice object

Member Data Documentation

◆ $_aBaseStdUrls

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::$_aBaseStdUrls = []
protected

◆ $_aSeoUrls

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

◆ $_aStdUrls

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

◆ $_blUseLazyLoading

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

◆ $_oParent

OxidEsales\EshopCommunity\Application\Model\SimpleVariant::$_oParent = null
protected

◆ $_oPrice

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

◆ $_oUser

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

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