OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Core\Exception\OutOfStockException Class Reference
+ Inheritance diagram for OxidEsales\EshopCommunity\Core\Exception\OutOfStockException:
+ Collaboration diagram for OxidEsales\EshopCommunity\Core\Exception\OutOfStockException:

Public Member Functions

 setRemainingAmount ($iRemainingAmount)
 
 getRemainingAmount ()
 
 setBasketIndex ($sBasketIndex)
 
 getBasketIndex ()
 
 getString ()
 
 getValues ()
 
 setDestination ($sDestination)
 

Protected Attributes

 $type = 'oxOutOfStockException'
 

Private Attributes

 $_iRemainingAmount = 0
 
 $_sBasketIndex = null
 

Detailed Description

exception class for an article which is out of stock

Member Function Documentation

◆ getBasketIndex()

OxidEsales\EshopCommunity\Core\Exception\OutOfStockException::getBasketIndex ( )

The basketindex of the faulty article

Returns
string

◆ getRemainingAmount()

OxidEsales\EshopCommunity\Core\Exception\OutOfStockException::getRemainingAmount ( )

Amount of articles left

Returns
integer

◆ getString()

OxidEsales\EshopCommunity\Core\Exception\OutOfStockException::getString ( )

Get string dump Overrides oxException::getString()

Returns
string

◆ getValues()

OxidEsales\EshopCommunity\Core\Exception\OutOfStockException::getValues ( )

Creates an array of field name => field value of the object. To make a easy conversion of exceptions to error messages possible. Should be extended when additional fields are used! Overrides oxException::getValues()

Returns
array

◆ setBasketIndex()

OxidEsales\EshopCommunity\Core\Exception\OutOfStockException::setBasketIndex (   $sBasketIndex)

Sets the basket index for the article

Parameters
string$sBasketIndexBasket index for the faulty article

◆ setDestination()

OxidEsales\EshopCommunity\Core\Exception\OutOfStockException::setDestination (   $sDestination)

Defines a name of the view variable containing the messages. Currently it checks if destination value is set, and if not - overrides default error message with:

$this->getMessage(). $this->getRemainingAmount()

It is necessary to display correct stock error message on any view (except basket).

Parameters
string$sDestinationname of the view variable

◆ setRemainingAmount()

OxidEsales\EshopCommunity\Core\Exception\OutOfStockException::setRemainingAmount (   $iRemainingAmount)

Sets the amount of the article remaining in stock.

Parameters
integer$iRemainingAmountArticles remaining in stock

Member Data Documentation

◆ $_iRemainingAmount

OxidEsales\EshopCommunity\Core\Exception\OutOfStockException::$_iRemainingAmount = 0
private

◆ $_sBasketIndex

OxidEsales\EshopCommunity\Core\Exception\OutOfStockException::$_sBasketIndex = null
private

◆ $type

OxidEsales\EshopCommunity\Core\Exception\OutOfStockException::$type = 'oxOutOfStockException'
protected

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