repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/CategoryMain.php | CategoryMain._parseRequestParametersForSave | protected function _parseRequestParametersForSave($aReqParams)
{
// checkbox handling
if (!isset($aReqParams['oxcategories__oxactive'])) {
$aReqParams['oxcategories__oxactive'] = 0;
}
if (!isset($aReqParams['oxcategories__oxhidden'])) {
$aReqParams['oxcategories__oxhidden'] = 0;
}
if (!isset($aReqParams['oxcategories__oxdefsortmode'])) {
$aReqParams['oxcategories__oxdefsortmode'] = 0;
}
// null values
if ($aReqParams['oxcategories__oxvat'] === '') {
$aReqParams['oxcategories__oxvat'] = null;
}
if ($this->getEditObjectId() == self::NEW_CATEGORY_ID) {
//#550A - if new category is made then is must be default activ
//#4051: Impossible to create inactive category
//$aReqParams['oxcategories__oxactive'] = 1;
$aReqParams['oxcategories__oxid'] = null;
}
if (isset($aReqParams["oxcategories__oxlongdesc"])) {
$aReqParams["oxcategories__oxlongdesc"] = $this->_processLongDesc($aReqParams["oxcategories__oxlongdesc"]);
}
if (empty($aReqParams['oxcategories__oxpricefrom'])) {
$aReqParams['oxcategories__oxpricefrom'] = 0;
}
if (empty($aReqParams['oxcategories__oxpriceto'])) {
$aReqParams['oxcategories__oxpriceto'] = 0;
}
return $aReqParams;
} | php | protected function _parseRequestParametersForSave($aReqParams)
{
// checkbox handling
if (!isset($aReqParams['oxcategories__oxactive'])) {
$aReqParams['oxcategories__oxactive'] = 0;
}
if (!isset($aReqParams['oxcategories__oxhidden'])) {
$aReqParams['oxcategories__oxhidden'] = 0;
}
if (!isset($aReqParams['oxcategories__oxdefsortmode'])) {
$aReqParams['oxcategories__oxdefsortmode'] = 0;
}
// null values
if ($aReqParams['oxcategories__oxvat'] === '') {
$aReqParams['oxcategories__oxvat'] = null;
}
if ($this->getEditObjectId() == self::NEW_CATEGORY_ID) {
//#550A - if new category is made then is must be default activ
//#4051: Impossible to create inactive category
//$aReqParams['oxcategories__oxactive'] = 1;
$aReqParams['oxcategories__oxid'] = null;
}
if (isset($aReqParams["oxcategories__oxlongdesc"])) {
$aReqParams["oxcategories__oxlongdesc"] = $this->_processLongDesc($aReqParams["oxcategories__oxlongdesc"]);
}
if (empty($aReqParams['oxcategories__oxpricefrom'])) {
$aReqParams['oxcategories__oxpricefrom'] = 0;
}
if (empty($aReqParams['oxcategories__oxpriceto'])) {
$aReqParams['oxcategories__oxpriceto'] = 0;
}
return $aReqParams;
} | [
"protected",
"function",
"_parseRequestParametersForSave",
"(",
"$",
"aReqParams",
")",
"{",
"// checkbox handling",
"if",
"(",
"!",
"isset",
"(",
"$",
"aReqParams",
"[",
"'oxcategories__oxactive'",
"]",
")",
")",
"{",
"$",
"aReqParams",
"[",
"'oxcategories__oxactiv... | Parse parameters prior to saving category.
@param array $aReqParams Request parameters.
@return array | [
"Parse",
"parameters",
"prior",
"to",
"saving",
"category",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/CategoryMain.php#L280-L317 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Wrapping.php | Wrapping.getWrappingPrice | public function getWrappingPrice($dAmount = 1)
{
if ($this->_oPrice === null) {
$this->_oPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);
if (!$this->_blWrappingVatOnTop) {
$this->_oPrice->setBruttoPriceMode();
} else {
$this->_oPrice->setNettoPriceMode();
}
$oCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
$this->_oPrice->setPrice($this->oxwrapping__oxprice->value * $oCur->rate, $this->_dVat);
$this->_oPrice->multiply($dAmount);
}
return $this->_oPrice;
} | php | public function getWrappingPrice($dAmount = 1)
{
if ($this->_oPrice === null) {
$this->_oPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);
if (!$this->_blWrappingVatOnTop) {
$this->_oPrice->setBruttoPriceMode();
} else {
$this->_oPrice->setNettoPriceMode();
}
$oCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
$this->_oPrice->setPrice($this->oxwrapping__oxprice->value * $oCur->rate, $this->_dVat);
$this->_oPrice->multiply($dAmount);
}
return $this->_oPrice;
} | [
"public",
"function",
"getWrappingPrice",
"(",
"$",
"dAmount",
"=",
"1",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oPrice",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oPrice",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\... | Returns oxprice object for wrapping
@param int $dAmount article amount
@return object | [
"Returns",
"oxprice",
"object",
"for",
"wrapping"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Wrapping.php#L87-L104 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Wrapping.php | Wrapping.getWrappingList | public function getWrappingList($sWrapType)
{
// load wrapping
$oEntries = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
$oEntries->init('oxwrapping');
$sWrappingViewName = getViewName('oxwrapping');
$sSelect = "select * from $sWrappingViewName where $sWrappingViewName.oxactive = '1' and $sWrappingViewName.oxtype = " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sWrapType);
$oEntries->selectString($sSelect);
return $oEntries;
} | php | public function getWrappingList($sWrapType)
{
// load wrapping
$oEntries = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
$oEntries->init('oxwrapping');
$sWrappingViewName = getViewName('oxwrapping');
$sSelect = "select * from $sWrappingViewName where $sWrappingViewName.oxactive = '1' and $sWrappingViewName.oxtype = " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sWrapType);
$oEntries->selectString($sSelect);
return $oEntries;
} | [
"public",
"function",
"getWrappingList",
"(",
"$",
"sWrapType",
")",
"{",
"// load wrapping",
"$",
"oEntries",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Model",
"\\",
"ListModel",
"::",
"class",
")",
";",
"$",
"oEntries",
"... | Loads wrapping list for specific wrap type
@param string $sWrapType wrap type
@return array $oEntries wrapping list | [
"Loads",
"wrapping",
"list",
"for",
"specific",
"wrap",
"type"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Wrapping.php#L113-L123 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Wrapping.php | Wrapping.getFPrice | public function getFPrice()
{
$dPrice = $this->getPrice();
return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($dPrice, \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject());
} | php | public function getFPrice()
{
$dPrice = $this->getPrice();
return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($dPrice, \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject());
} | [
"public",
"function",
"getFPrice",
"(",
")",
"{",
"$",
"dPrice",
"=",
"$",
"this",
"->",
"getPrice",
"(",
")",
";",
"return",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getLang",
"(",
")",
"->",
"formatCurrency",
"(",
"$"... | Returns formatted wrapping price
@deprecated since v5.1 (2013-10-13); use oxPrice smarty plugin for formatting in templates
@return string | [
"Returns",
"formatted",
"wrapping",
"price"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Wrapping.php#L164-L169 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Wrapping.php | Wrapping.getPrice | public function getPrice()
{
if ($this->_isPriceViewModeNetto()) {
$dPrice = $this->getWrappingPrice()->getNettoPrice();
} else {
$dPrice = $this->getWrappingPrice()->getBruttoPrice();
}
return $dPrice;
} | php | public function getPrice()
{
if ($this->_isPriceViewModeNetto()) {
$dPrice = $this->getWrappingPrice()->getNettoPrice();
} else {
$dPrice = $this->getWrappingPrice()->getBruttoPrice();
}
return $dPrice;
} | [
"public",
"function",
"getPrice",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_isPriceViewModeNetto",
"(",
")",
")",
"{",
"$",
"dPrice",
"=",
"$",
"this",
"->",
"getWrappingPrice",
"(",
")",
"->",
"getNettoPrice",
"(",
")",
";",
"}",
"else",
"{",
"... | Gets price.
@return double | [
"Gets",
"price",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Wrapping.php#L176-L185 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Wrapping.php | Wrapping.getPictureUrl | public function getPictureUrl()
{
if ($this->oxwrapping__oxpic->value) {
return \OxidEsales\Eshop\Core\Registry::getConfig()->getPictureUrl("master/wrapping/" . $this->oxwrapping__oxpic->value, false, \OxidEsales\Eshop\Core\Registry::getConfig()->isSsl(), null, $this->oxwrapping__oxshopid->value);
}
} | php | public function getPictureUrl()
{
if ($this->oxwrapping__oxpic->value) {
return \OxidEsales\Eshop\Core\Registry::getConfig()->getPictureUrl("master/wrapping/" . $this->oxwrapping__oxpic->value, false, \OxidEsales\Eshop\Core\Registry::getConfig()->isSsl(), null, $this->oxwrapping__oxshopid->value);
}
} | [
"public",
"function",
"getPictureUrl",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"oxwrapping__oxpic",
"->",
"value",
")",
"{",
"return",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getPictureUrl... | Returns returns dyn image dir
@return string | [
"Returns",
"returns",
"dyn",
"image",
"dir"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Wrapping.php#L202-L207 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/NewsMainAjax.php | NewsMainAjax.addGroupToNews | public function addGroupToNews()
{
$aAddGroups = $this->_getActionIds('oxgroups.oxid');
$soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
$sGroupTable = $this->_getViewName('oxgroups');
$aAddGroups = $this->_getAll($this->_addFilter("select $sGroupTable.oxid " . $this->_getQuery()));
}
if ($soxId && $soxId != "-1" && is_array($aAddGroups)) {
foreach ($aAddGroups as $sAddgroup) {
$oNewGroup = oxNew(\OxidEsales\Eshop\Application\Model\Object2Group::class);
$oNewGroup->oxobject2group__oxobjectid = new \OxidEsales\Eshop\Core\Field($soxId);
$oNewGroup->oxobject2group__oxgroupsid = new \OxidEsales\Eshop\Core\Field($sAddgroup);
$oNewGroup->save();
}
}
} | php | public function addGroupToNews()
{
$aAddGroups = $this->_getActionIds('oxgroups.oxid');
$soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
$sGroupTable = $this->_getViewName('oxgroups');
$aAddGroups = $this->_getAll($this->_addFilter("select $sGroupTable.oxid " . $this->_getQuery()));
}
if ($soxId && $soxId != "-1" && is_array($aAddGroups)) {
foreach ($aAddGroups as $sAddgroup) {
$oNewGroup = oxNew(\OxidEsales\Eshop\Application\Model\Object2Group::class);
$oNewGroup->oxobject2group__oxobjectid = new \OxidEsales\Eshop\Core\Field($soxId);
$oNewGroup->oxobject2group__oxgroupsid = new \OxidEsales\Eshop\Core\Field($sAddgroup);
$oNewGroup->save();
}
}
} | [
"public",
"function",
"addGroupToNews",
"(",
")",
"{",
"$",
"aAddGroups",
"=",
"$",
"this",
"->",
"_getActionIds",
"(",
"'oxgroups.oxid'",
")",
";",
"$",
"soxId",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(... | Adds user group for viewing some news. | [
"Adds",
"user",
"group",
"for",
"viewing",
"some",
"news",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/NewsMainAjax.php#L86-L104 | train |
OXID-eSales/oxideshop_ce | source/Core/UniversallyUniqueIdGenerator.php | UniversallyUniqueIdGenerator.generateV5 | public function generateV5($sSeed, $sSalt)
{
$sSeed = str_replace(['-', '{', '}'], '', $sSeed);
$sBinarySeed = '';
for ($i = 0; $i < strlen($sSeed); $i += 2) {
$sBinarySeed .= chr(hexdec($sSeed[$i] . $sSeed[$i + 1]));
}
$sHash = sha1($sBinarySeed . $sSalt);
$sUUID = sprintf(
'%08s-%04s-%04x-%04x-%12s',
substr($sHash, 0, 8),
substr($sHash, 8, 4),
(hexdec(substr($sHash, 12, 4)) & 0x0fff) | 0x3000,
(hexdec(substr($sHash, 16, 4)) & 0x3fff) | 0x8000,
substr($sHash, 20, 12)
);
return $sUUID;
} | php | public function generateV5($sSeed, $sSalt)
{
$sSeed = str_replace(['-', '{', '}'], '', $sSeed);
$sBinarySeed = '';
for ($i = 0; $i < strlen($sSeed); $i += 2) {
$sBinarySeed .= chr(hexdec($sSeed[$i] . $sSeed[$i + 1]));
}
$sHash = sha1($sBinarySeed . $sSalt);
$sUUID = sprintf(
'%08s-%04s-%04x-%04x-%12s',
substr($sHash, 0, 8),
substr($sHash, 8, 4),
(hexdec(substr($sHash, 12, 4)) & 0x0fff) | 0x3000,
(hexdec(substr($sHash, 16, 4)) & 0x3fff) | 0x8000,
substr($sHash, 20, 12)
);
return $sUUID;
} | [
"public",
"function",
"generateV5",
"(",
"$",
"sSeed",
",",
"$",
"sSalt",
")",
"{",
"$",
"sSeed",
"=",
"str_replace",
"(",
"[",
"'-'",
",",
"'{'",
",",
"'}'",
"]",
",",
"''",
",",
"$",
"sSeed",
")",
";",
"$",
"sBinarySeed",
"=",
"''",
";",
"for",... | Generates version 5 UUID.
@param string $sSeed
@param string $sSalt
@return string | [
"Generates",
"version",
"5",
"UUID",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/UniversallyUniqueIdGenerator.php#L66-L84 | train |
OXID-eSales/oxideshop_ce | source/Core/UniversallyUniqueIdGenerator.php | UniversallyUniqueIdGenerator._generateBasedOnOpenSSL | protected function _generateBasedOnOpenSSL()
{
$sRandomData = openssl_random_pseudo_bytes(16);
$sRandomData[6] = chr(ord($sRandomData[6]) & 0x0f | 0x40); // set version to 0100
$sRandomData[8] = chr(ord($sRandomData[8]) & 0x3f | 0x80); // set bits 6-7 to 10
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($sRandomData), 4));
} | php | protected function _generateBasedOnOpenSSL()
{
$sRandomData = openssl_random_pseudo_bytes(16);
$sRandomData[6] = chr(ord($sRandomData[6]) & 0x0f | 0x40); // set version to 0100
$sRandomData[8] = chr(ord($sRandomData[8]) & 0x3f | 0x80); // set bits 6-7 to 10
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($sRandomData), 4));
} | [
"protected",
"function",
"_generateBasedOnOpenSSL",
"(",
")",
"{",
"$",
"sRandomData",
"=",
"openssl_random_pseudo_bytes",
"(",
"16",
")",
";",
"$",
"sRandomData",
"[",
"6",
"]",
"=",
"chr",
"(",
"ord",
"(",
"$",
"sRandomData",
"[",
"6",
"]",
")",
"&",
"... | Generates UUID based on OpenSSL's openssl_random_pseudo_bytes.
@return string | [
"Generates",
"UUID",
"based",
"on",
"OpenSSL",
"s",
"openssl_random_pseudo_bytes",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/UniversallyUniqueIdGenerator.php#L101-L108 | train |
OXID-eSales/oxideshop_ce | source/Core/UniversallyUniqueIdGenerator.php | UniversallyUniqueIdGenerator._generateBasedOnMtRand | protected function _generateBasedOnMtRand()
{
return sprintf(
'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
mt_rand(0, 0xffff),
mt_rand(0, 0xffff),
mt_rand(0, 0xffff),
mt_rand(0, 0x0fff) | 0x4000,
mt_rand(0, 0x3fff) | 0x8000,
mt_rand(0, 0xffff),
mt_rand(0, 0xffff),
mt_rand(0, 0xffff)
);
} | php | protected function _generateBasedOnMtRand()
{
return sprintf(
'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
mt_rand(0, 0xffff),
mt_rand(0, 0xffff),
mt_rand(0, 0xffff),
mt_rand(0, 0x0fff) | 0x4000,
mt_rand(0, 0x3fff) | 0x8000,
mt_rand(0, 0xffff),
mt_rand(0, 0xffff),
mt_rand(0, 0xffff)
);
} | [
"protected",
"function",
"_generateBasedOnMtRand",
"(",
")",
"{",
"return",
"sprintf",
"(",
"'%04x%04x-%04x-%04x-%04x-%04x%04x%04x'",
",",
"mt_rand",
"(",
"0",
",",
"0xffff",
")",
",",
"mt_rand",
"(",
"0",
",",
"0xffff",
")",
",",
"mt_rand",
"(",
"0",
",",
"... | Generates UUID based on mt_rand.
@return string | [
"Generates",
"UUID",
"based",
"on",
"mt_rand",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/UniversallyUniqueIdGenerator.php#L115-L128 | train |
OXID-eSales/oxideshop_ce | source/Core/Request.php | Request.getRequestUrl | public function getRequestUrl($sParams = '', $blReturnUrl = false)
{
$requestUrl = '';
if ($_SERVER["REQUEST_METHOD"] != "POST") {
if (isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI']) {
$rawRequestUrl = $_SERVER['REQUEST_URI'];
} else {
$rawRequestUrl = $_SERVER['SCRIPT_URI'];
}
// trying to resolve controller file name
if ($rawRequestUrl && ($iPos = stripos($rawRequestUrl, '?')) !== false) {
$string = getStr();
// formatting request url
$requestUrl = 'index.php' . $string->substr($rawRequestUrl, $iPos);
// removing possible session id
$requestUrl = $string->preg_replace('/(&|\?)(force_)?(admin_)?sid=[^&]*&?/', '$1', $requestUrl);
$requestUrl = $string->preg_replace('/(&|\?)stoken=[^&]*&?/', '$1', $requestUrl);
$requestUrl = $string->preg_replace('/&$/', '', $requestUrl);
$requestUrl = str_replace('&', '&', $requestUrl);
}
}
return $requestUrl;
} | php | public function getRequestUrl($sParams = '', $blReturnUrl = false)
{
$requestUrl = '';
if ($_SERVER["REQUEST_METHOD"] != "POST") {
if (isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI']) {
$rawRequestUrl = $_SERVER['REQUEST_URI'];
} else {
$rawRequestUrl = $_SERVER['SCRIPT_URI'];
}
// trying to resolve controller file name
if ($rawRequestUrl && ($iPos = stripos($rawRequestUrl, '?')) !== false) {
$string = getStr();
// formatting request url
$requestUrl = 'index.php' . $string->substr($rawRequestUrl, $iPos);
// removing possible session id
$requestUrl = $string->preg_replace('/(&|\?)(force_)?(admin_)?sid=[^&]*&?/', '$1', $requestUrl);
$requestUrl = $string->preg_replace('/(&|\?)stoken=[^&]*&?/', '$1', $requestUrl);
$requestUrl = $string->preg_replace('/&$/', '', $requestUrl);
$requestUrl = str_replace('&', '&', $requestUrl);
}
}
return $requestUrl;
} | [
"public",
"function",
"getRequestUrl",
"(",
"$",
"sParams",
"=",
"''",
",",
"$",
"blReturnUrl",
"=",
"false",
")",
"{",
"$",
"requestUrl",
"=",
"''",
";",
"if",
"(",
"$",
"_SERVER",
"[",
"\"REQUEST_METHOD\"",
"]",
"!=",
"\"POST\"",
")",
"{",
"if",
"(",... | Returns request url, which was executed to render current page view
@param string $sParams Parameters to object
@param bool $blReturnUrl If return url
@return string | [
"Returns",
"request",
"url",
"which",
"was",
"executed",
"to",
"render",
"current",
"page",
"view"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Request.php#L63-L88 | train |
OXID-eSales/oxideshop_ce | source/Internal/Review/Service/UserReviewAndRatingService.php | UserReviewAndRatingService.getMergedReviewAndRatingList | private function getMergedReviewAndRatingList($userId)
{
$reviews = $this->userReviewService->getReviews($userId);
$ratings = $this->userRatingService->getRatings($userId);
return $this
->reviewAndRatingMergingService
->mergeReviewAndRating($reviews, $ratings);
} | php | private function getMergedReviewAndRatingList($userId)
{
$reviews = $this->userReviewService->getReviews($userId);
$ratings = $this->userRatingService->getRatings($userId);
return $this
->reviewAndRatingMergingService
->mergeReviewAndRating($reviews, $ratings);
} | [
"private",
"function",
"getMergedReviewAndRatingList",
"(",
"$",
"userId",
")",
"{",
"$",
"reviews",
"=",
"$",
"this",
"->",
"userReviewService",
"->",
"getReviews",
"(",
"$",
"userId",
")",
";",
"$",
"ratings",
"=",
"$",
"this",
"->",
"userRatingService",
"... | Returns merged Rating and Review.
@param string $userId
@return ArrayCollection | [
"Returns",
"merged",
"Rating",
"and",
"Review",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Service/UserReviewAndRatingService.php#L85-L93 | train |
OXID-eSales/oxideshop_ce | source/Internal/Review/Service/UserReviewAndRatingService.php | UserReviewAndRatingService.sortReviewAndRatingList | private function sortReviewAndRatingList(ArrayCollection $reviewAndRatingList)
{
$reviewAndRatingListArray = $reviewAndRatingList->toArray();
usort($reviewAndRatingListArray, function (ReviewAndRating $first, ReviewAndRating $second) {
return $first->getCreatedAt() < $second->getCreatedAt() ? 1 : -1;
});
return new ArrayCollection($reviewAndRatingListArray);
} | php | private function sortReviewAndRatingList(ArrayCollection $reviewAndRatingList)
{
$reviewAndRatingListArray = $reviewAndRatingList->toArray();
usort($reviewAndRatingListArray, function (ReviewAndRating $first, ReviewAndRating $second) {
return $first->getCreatedAt() < $second->getCreatedAt() ? 1 : -1;
});
return new ArrayCollection($reviewAndRatingListArray);
} | [
"private",
"function",
"sortReviewAndRatingList",
"(",
"ArrayCollection",
"$",
"reviewAndRatingList",
")",
"{",
"$",
"reviewAndRatingListArray",
"=",
"$",
"reviewAndRatingList",
"->",
"toArray",
"(",
")",
";",
"usort",
"(",
"$",
"reviewAndRatingListArray",
",",
"funct... | Sorts ReviewAndRating list.
@param ArrayCollection $reviewAndRatingList
@return ArrayCollection | [
"Sorts",
"ReviewAndRating",
"list",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Service/UserReviewAndRatingService.php#L102-L111 | train |
OXID-eSales/oxideshop_ce | source/Core/Database/Adapter/Doctrine/ResultSet.php | ResultSet.fetchRow | public function fetchRow()
{
$this->fields = $this->getStatement()->fetch();
if (false === $this->fields) {
$this->EOF = true;
}
return $this->fields;
} | php | public function fetchRow()
{
$this->fields = $this->getStatement()->fetch();
if (false === $this->fields) {
$this->EOF = true;
}
return $this->fields;
} | [
"public",
"function",
"fetchRow",
"(",
")",
"{",
"$",
"this",
"->",
"fields",
"=",
"$",
"this",
"->",
"getStatement",
"(",
")",
"->",
"fetch",
"(",
")",
";",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"fields",
")",
"{",
"$",
"this",
"->",
"EO... | Fetches the next row from a result set and fills the fields array.
@return mixed The return value of this function on success depends on the fetch type.
In all cases, FALSE is returned on failure. | [
"Fetches",
"the",
"next",
"row",
"from",
"a",
"result",
"set",
"and",
"fills",
"the",
"fields",
"array",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Database/Adapter/Doctrine/ResultSet.php#L73-L82 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.getSidFromRequest | protected function getSidFromRequest()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$sid = null;
$sForceSidParam = $myConfig->getRequestParameter($this->getForcedName());
$sSidParam = $myConfig->getRequestParameter($this->getName());
//forcing sid for SSL<->nonSSL transitions
if ($sForceSidParam) {
$sid = $sForceSidParam;
} elseif ($this->_getSessionUseCookies() && $this->_getCookieSid()) {
$sid = $this->_getCookieSid();
} elseif ($sSidParam) {
$sid = $sSidParam;
}
return $sid;
} | php | protected function getSidFromRequest()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$sid = null;
$sForceSidParam = $myConfig->getRequestParameter($this->getForcedName());
$sSidParam = $myConfig->getRequestParameter($this->getName());
//forcing sid for SSL<->nonSSL transitions
if ($sForceSidParam) {
$sid = $sForceSidParam;
} elseif ($this->_getSessionUseCookies() && $this->_getCookieSid()) {
$sid = $this->_getCookieSid();
} elseif ($sSidParam) {
$sid = $sSidParam;
}
return $sid;
} | [
"protected",
"function",
"getSidFromRequest",
"(",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"$",
"sid",
"=",
"null",
";",
"$",
"sForceSidParam",
"=",
"$",
"myConf... | retrieves the session id from the request if any
@return string|null | [
"retrieves",
"the",
"session",
"id",
"from",
"the",
"request",
"if",
"any"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L190-L208 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.start | public function start()
{
if ($this->isSessionStarted()) {
return;
}
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
if ($this->isAdmin()) {
$this->setName("admin_sid");
} else {
$this->setName("sid");
}
$sid = $this->getSidFromRequest();
//starting session if only we can
if ($this->_allowSessionStart()) {
//creating new sid
if (!$sid) {
self::$_blIsNewSession = true;
$this->initNewSession();
} else {
self::$_blIsNewSession = false;
$this->_setSessionId($sid);
$this->_sessionStart();
}
//special handling for new ZP cluster session, as in that case session_start() regenerates id
if ($this->_sId != session_id()) {
$this->_setSessionId(session_id());
}
//checking for swapped client
$blSwapped = $this->_isSwappedClient();
if (!self::$_blIsNewSession && $blSwapped) {
$this->initNewSession();
// passing notification about session problems
if ($this->_sErrorMsg && $myConfig->getConfigParam('iDebug')) {
\OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay(oxNew(\OxidEsales\Eshop\Core\Exception\StandardException::class, $this->_sErrorMsg));
}
} elseif (!$blSwapped) {
// transferring cookies between hosts
\OxidEsales\Eshop\Core\Registry::getUtilsServer()->loadSessionCookies();
}
}
} | php | public function start()
{
if ($this->isSessionStarted()) {
return;
}
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
if ($this->isAdmin()) {
$this->setName("admin_sid");
} else {
$this->setName("sid");
}
$sid = $this->getSidFromRequest();
//starting session if only we can
if ($this->_allowSessionStart()) {
//creating new sid
if (!$sid) {
self::$_blIsNewSession = true;
$this->initNewSession();
} else {
self::$_blIsNewSession = false;
$this->_setSessionId($sid);
$this->_sessionStart();
}
//special handling for new ZP cluster session, as in that case session_start() regenerates id
if ($this->_sId != session_id()) {
$this->_setSessionId(session_id());
}
//checking for swapped client
$blSwapped = $this->_isSwappedClient();
if (!self::$_blIsNewSession && $blSwapped) {
$this->initNewSession();
// passing notification about session problems
if ($this->_sErrorMsg && $myConfig->getConfigParam('iDebug')) {
\OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay(oxNew(\OxidEsales\Eshop\Core\Exception\StandardException::class, $this->_sErrorMsg));
}
} elseif (!$blSwapped) {
// transferring cookies between hosts
\OxidEsales\Eshop\Core\Registry::getUtilsServer()->loadSessionCookies();
}
}
} | [
"public",
"function",
"start",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isSessionStarted",
"(",
")",
")",
"{",
"return",
";",
"}",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
"... | Starts shop session, generates unique session ID, extracts user IP.
@return void | [
"Starts",
"shop",
"session",
"generates",
"unique",
"session",
"ID",
"extracts",
"user",
"IP",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L215-L262 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session._initNewSessionChallenge | protected function _initNewSessionChallenge()
{
$this->setVariable('sess_stoken', sprintf('%X', crc32(\OxidEsales\Eshop\Core\Registry::getUtilsObject()->generateUID())));
} | php | protected function _initNewSessionChallenge()
{
$this->setVariable('sess_stoken', sprintf('%X', crc32(\OxidEsales\Eshop\Core\Registry::getUtilsObject()->generateUID())));
} | [
"protected",
"function",
"_initNewSessionChallenge",
"(",
")",
"{",
"$",
"this",
"->",
"setVariable",
"(",
"'sess_stoken'",
",",
"sprintf",
"(",
"'%X'",
",",
"crc32",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getUtilsObject... | initialize new session challenge token | [
"initialize",
"new",
"session",
"challenge",
"token"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L306-L309 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.initNewSession | public function initNewSession()
{
// starting session only if it was not started yet
if (self::$_blIsNewSession) {
$this->_sessionStart();
}
//saving persistent params if old session exists
$aPersistent = [];
foreach ($this->_aPersistentParams as $sParam) {
if (($sValue = $this->getVariable($sParam))) {
$aPersistent[$sParam] = $sValue;
}
}
$this->_setSessionId($this->_getNewSessionId());
//restoring persistent params to session
foreach ($aPersistent as $sKey => $sParam) {
$this->setVariable($sKey, $aPersistent[$sKey]);
}
$this->_initNewSessionChallenge();
// (re)setting actual user agent when initiating new session
$this->setVariable("sessionagent", \OxidEsales\Eshop\Core\Registry::getUtilsServer()->getServerVar('HTTP_USER_AGENT'));
} | php | public function initNewSession()
{
// starting session only if it was not started yet
if (self::$_blIsNewSession) {
$this->_sessionStart();
}
//saving persistent params if old session exists
$aPersistent = [];
foreach ($this->_aPersistentParams as $sParam) {
if (($sValue = $this->getVariable($sParam))) {
$aPersistent[$sParam] = $sValue;
}
}
$this->_setSessionId($this->_getNewSessionId());
//restoring persistent params to session
foreach ($aPersistent as $sKey => $sParam) {
$this->setVariable($sKey, $aPersistent[$sKey]);
}
$this->_initNewSessionChallenge();
// (re)setting actual user agent when initiating new session
$this->setVariable("sessionagent", \OxidEsales\Eshop\Core\Registry::getUtilsServer()->getServerVar('HTTP_USER_AGENT'));
} | [
"public",
"function",
"initNewSession",
"(",
")",
"{",
"// starting session only if it was not started yet",
"if",
"(",
"self",
"::",
"$",
"_blIsNewSession",
")",
"{",
"$",
"this",
"->",
"_sessionStart",
"(",
")",
";",
"}",
"//saving persistent params if old session exi... | Assigns new session ID, clean existing data except persistent. | [
"Assigns",
"new",
"session",
"ID",
"clean",
"existing",
"data",
"except",
"persistent",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L347-L373 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.regenerateSessionId | public function regenerateSessionId()
{
// starting session only if it was not started yet
if (self::$_blIsNewSession) {
$this->_sessionStart();
// (re)setting actual user agent when initiating new session
$this->setVariable("sessionagent", \OxidEsales\Eshop\Core\Registry::getUtilsServer()->getServerVar('HTTP_USER_AGENT'));
}
$this->_setSessionId($this->_getNewSessionId(false));
$this->_initNewSessionChallenge();
} | php | public function regenerateSessionId()
{
// starting session only if it was not started yet
if (self::$_blIsNewSession) {
$this->_sessionStart();
// (re)setting actual user agent when initiating new session
$this->setVariable("sessionagent", \OxidEsales\Eshop\Core\Registry::getUtilsServer()->getServerVar('HTTP_USER_AGENT'));
}
$this->_setSessionId($this->_getNewSessionId(false));
$this->_initNewSessionChallenge();
} | [
"public",
"function",
"regenerateSessionId",
"(",
")",
"{",
"// starting session only if it was not started yet",
"if",
"(",
"self",
"::",
"$",
"_blIsNewSession",
")",
"{",
"$",
"this",
"->",
"_sessionStart",
"(",
")",
";",
"// (re)setting actual user agent when initiatin... | Regenerates session id | [
"Regenerates",
"session",
"id"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L378-L390 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.getBasket | public function getBasket()
{
if ($this->_oBasket === null) {
$serializedBasket = $this->getVariable($this->_getBasketName());
//init oxbasketitem class first
//#1746
oxNew(BasketItem::class);
// init oxbasket through oxNew and not oxAutoload, Mantis-Bug #0004262
$emptyBasket = oxNew(Basket::class);
$basket =
$this->isSerializedBasketValid($serializedBasket) &&
($unserializedBasket = unserialize($serializedBasket)) &&
$this->isUnserializedBasketValid($unserializedBasket, $emptyBasket) ?
$unserializedBasket : $emptyBasket;
$this->_validateBasket($basket);
$this->setBasket($basket);
}
return $this->_oBasket;
} | php | public function getBasket()
{
if ($this->_oBasket === null) {
$serializedBasket = $this->getVariable($this->_getBasketName());
//init oxbasketitem class first
//#1746
oxNew(BasketItem::class);
// init oxbasket through oxNew and not oxAutoload, Mantis-Bug #0004262
$emptyBasket = oxNew(Basket::class);
$basket =
$this->isSerializedBasketValid($serializedBasket) &&
($unserializedBasket = unserialize($serializedBasket)) &&
$this->isUnserializedBasketValid($unserializedBasket, $emptyBasket) ?
$unserializedBasket : $emptyBasket;
$this->_validateBasket($basket);
$this->setBasket($basket);
}
return $this->_oBasket;
} | [
"public",
"function",
"getBasket",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oBasket",
"===",
"null",
")",
"{",
"$",
"serializedBasket",
"=",
"$",
"this",
"->",
"getVariable",
"(",
"$",
"this",
"->",
"_getBasketName",
"(",
")",
")",
";",
"//init o... | Returns basket session object.
@return \OxidEsales\Eshop\Application\Model\Basket | [
"Returns",
"basket",
"session",
"object",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L535-L558 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.isSerializedBasketValid | protected function isSerializedBasketValid($serializedBasket)
{
$basketClass = get_class(oxNew(Basket::class));
$basketItemClass = get_class(oxNew(BasketItem::class));
$priceClass = get_class(oxNew(\OxidEsales\Eshop\Core\Price::class));
$priceListClass = get_class(oxNew(\OxidEsales\Eshop\Core\PriceList::class));
$userClass = get_class(oxNew(User::class));
return $serializedBasket &&
$this->isClassInSerializedObject($serializedBasket, $basketClass) &&
$this->isClassInSerializedObject($serializedBasket, $basketItemClass) &&
$this->isClassOrNullInSerializedObjectAfterField($serializedBasket, "oPrice", $priceClass) &&
$this->isClassOrNullInSerializedObjectAfterField($serializedBasket, "oProductsPriceList", $priceListClass) &&
$this->isClassOrNullInSerializedObjectAfterField($serializedBasket, "oUser", $userClass);
} | php | protected function isSerializedBasketValid($serializedBasket)
{
$basketClass = get_class(oxNew(Basket::class));
$basketItemClass = get_class(oxNew(BasketItem::class));
$priceClass = get_class(oxNew(\OxidEsales\Eshop\Core\Price::class));
$priceListClass = get_class(oxNew(\OxidEsales\Eshop\Core\PriceList::class));
$userClass = get_class(oxNew(User::class));
return $serializedBasket &&
$this->isClassInSerializedObject($serializedBasket, $basketClass) &&
$this->isClassInSerializedObject($serializedBasket, $basketItemClass) &&
$this->isClassOrNullInSerializedObjectAfterField($serializedBasket, "oPrice", $priceClass) &&
$this->isClassOrNullInSerializedObjectAfterField($serializedBasket, "oProductsPriceList", $priceListClass) &&
$this->isClassOrNullInSerializedObjectAfterField($serializedBasket, "oUser", $userClass);
} | [
"protected",
"function",
"isSerializedBasketValid",
"(",
"$",
"serializedBasket",
")",
"{",
"$",
"basketClass",
"=",
"get_class",
"(",
"oxNew",
"(",
"Basket",
"::",
"class",
")",
")",
";",
"$",
"basketItemClass",
"=",
"get_class",
"(",
"oxNew",
"(",
"BasketIte... | True if given serialized object is constructed with compatible classes.
@param string $serializedBasket
@return bool | [
"True",
"if",
"given",
"serialized",
"object",
"is",
"constructed",
"with",
"compatible",
"classes",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L566-L580 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.isClassInSerializedObject | protected function isClassInSerializedObject($serializedObject, $className)
{
$quotedClassName = sprintf('"%s"', $className);
return strpos($serializedObject, $quotedClassName) !== false;
} | php | protected function isClassInSerializedObject($serializedObject, $className)
{
$quotedClassName = sprintf('"%s"', $className);
return strpos($serializedObject, $quotedClassName) !== false;
} | [
"protected",
"function",
"isClassInSerializedObject",
"(",
"$",
"serializedObject",
",",
"$",
"className",
")",
"{",
"$",
"quotedClassName",
"=",
"sprintf",
"(",
"'\"%s\"'",
",",
"$",
"className",
")",
";",
"return",
"strpos",
"(",
"$",
"serializedObject",
",",
... | True if given class is found within serialized object.
@param string $serializedObject
@param string $className
@return bool | [
"True",
"if",
"given",
"class",
"is",
"found",
"within",
"serialized",
"object",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L590-L595 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.isClassOrNullInSerializedObjectAfterField | protected function isClassOrNullInSerializedObjectAfterField($serializedObject, $fieldName, $className)
{
$fieldAndClassPattern = '/'. preg_quote($fieldName, '/') . '";((?P<null>N);|O:\d+:"(?P<class>[\w\\\\]+)":)/';
$matchFound = preg_match($fieldAndClassPattern, $serializedObject, $matches) === 1;
return $matchFound &&
(
(isset($matches['class']) && $matches['class'] === $className) ||
(isset($matches['null']) && $matches['null'] === 'N')
);
} | php | protected function isClassOrNullInSerializedObjectAfterField($serializedObject, $fieldName, $className)
{
$fieldAndClassPattern = '/'. preg_quote($fieldName, '/') . '";((?P<null>N);|O:\d+:"(?P<class>[\w\\\\]+)":)/';
$matchFound = preg_match($fieldAndClassPattern, $serializedObject, $matches) === 1;
return $matchFound &&
(
(isset($matches['class']) && $matches['class'] === $className) ||
(isset($matches['null']) && $matches['null'] === 'N')
);
} | [
"protected",
"function",
"isClassOrNullInSerializedObjectAfterField",
"(",
"$",
"serializedObject",
",",
"$",
"fieldName",
",",
"$",
"className",
")",
"{",
"$",
"fieldAndClassPattern",
"=",
"'/'",
".",
"preg_quote",
"(",
"$",
"fieldName",
",",
"'/'",
")",
".",
"... | True if given class or null value is found after given field in serialized object.
@param string $serializedObject
@param string $fieldName
@param string $className
@return bool | [
"True",
"if",
"given",
"class",
"or",
"null",
"value",
"is",
"found",
"after",
"given",
"field",
"in",
"serialized",
"object",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L606-L616 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session._validateBasket | protected function _validateBasket(\OxidEsales\Eshop\Application\Model\Basket $oBasket)
{
$aCurrContent = $oBasket->getContents();
if (empty($aCurrContent)) {
return;
}
$iCurrLang = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
foreach ($aCurrContent as $oContent) {
if ($oContent->getLanguageId() != $iCurrLang) {
$oContent->setLanguageId($iCurrLang);
}
}
} | php | protected function _validateBasket(\OxidEsales\Eshop\Application\Model\Basket $oBasket)
{
$aCurrContent = $oBasket->getContents();
if (empty($aCurrContent)) {
return;
}
$iCurrLang = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
foreach ($aCurrContent as $oContent) {
if ($oContent->getLanguageId() != $iCurrLang) {
$oContent->setLanguageId($iCurrLang);
}
}
} | [
"protected",
"function",
"_validateBasket",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Application",
"\\",
"Model",
"\\",
"Basket",
"$",
"oBasket",
")",
"{",
"$",
"aCurrContent",
"=",
"$",
"oBasket",
"->",
"getContents",
"(",
")",
";",
"if",
"(",
"empt... | Validate loaded from session basket content. Check for language change.
@param \OxidEsales\Eshop\Application\Model\Basket $oBasket Basket object loaded from session.
@return null | [
"Validate",
"loaded",
"from",
"session",
"basket",
"content",
".",
"Check",
"for",
"language",
"change",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L640-L653 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.isSidNeeded | public function isSidNeeded($sUrl = null)
{
if ($this->isAdmin()) {
return true;
}
$oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
if (!$this->_getSessionUseCookies() || ($sUrl && $this->_getCookieSid() && !$oConfig->isCurrentProtocol($sUrl))) {
// switching from ssl to non ssl or vice versa?
return true;
}
if ($sUrl && !$oConfig->isCurrentUrl($sUrl)) {
return true;
} elseif ($this->_blSidNeeded === null) {
// setting initial state
$this->_blSidNeeded = false;
// no SIDs for search engines
if (!\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine()) {
// cookie found - SID is not needed
if (\OxidEsales\Eshop\Core\Registry::getUtilsServer()->getOxCookie($this->getName())) {
$this->_blSidNeeded = false;
} elseif ($this->_forceSessionStart()) {
$this->_blSidNeeded = true;
} else {
// no cookie, so must check session
if ($blSidNeeded = $this->getVariable('blSidNeeded')) {
$this->_blSidNeeded = true;
} elseif ($this->_isSessionRequiredAction() && !count($_COOKIE)) {
$this->_blSidNeeded = true;
// storing to session, performance..
$this->setVariable('blSidNeeded', $this->_blSidNeeded);
}
}
}
}
return $this->_blSidNeeded;
} | php | public function isSidNeeded($sUrl = null)
{
if ($this->isAdmin()) {
return true;
}
$oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
if (!$this->_getSessionUseCookies() || ($sUrl && $this->_getCookieSid() && !$oConfig->isCurrentProtocol($sUrl))) {
// switching from ssl to non ssl or vice versa?
return true;
}
if ($sUrl && !$oConfig->isCurrentUrl($sUrl)) {
return true;
} elseif ($this->_blSidNeeded === null) {
// setting initial state
$this->_blSidNeeded = false;
// no SIDs for search engines
if (!\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine()) {
// cookie found - SID is not needed
if (\OxidEsales\Eshop\Core\Registry::getUtilsServer()->getOxCookie($this->getName())) {
$this->_blSidNeeded = false;
} elseif ($this->_forceSessionStart()) {
$this->_blSidNeeded = true;
} else {
// no cookie, so must check session
if ($blSidNeeded = $this->getVariable('blSidNeeded')) {
$this->_blSidNeeded = true;
} elseif ($this->_isSessionRequiredAction() && !count($_COOKIE)) {
$this->_blSidNeeded = true;
// storing to session, performance..
$this->setVariable('blSidNeeded', $this->_blSidNeeded);
}
}
}
}
return $this->_blSidNeeded;
} | [
"public",
"function",
"isSidNeeded",
"(",
"$",
"sUrl",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAdmin",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"$",
"oConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Regi... | Checks if cookies are not available. Returns TRUE of sid needed
@param string $sUrl if passed domain does not match current - returns true (optional)
@return bool | [
"Checks",
"if",
"cookies",
"are",
"not",
"available",
".",
"Returns",
"TRUE",
"of",
"sid",
"needed"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L701-L742 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.isActualSidInCookie | public function isActualSidInCookie()
{
return isset($_COOKIE[$this->getName()]) && ($_COOKIE[$this->getName()] == $this->getId());
} | php | public function isActualSidInCookie()
{
return isset($_COOKIE[$this->getName()]) && ($_COOKIE[$this->getName()] == $this->getId());
} | [
"public",
"function",
"isActualSidInCookie",
"(",
")",
"{",
"return",
"isset",
"(",
"$",
"_COOKIE",
"[",
"$",
"this",
"->",
"getName",
"(",
")",
"]",
")",
"&&",
"(",
"$",
"_COOKIE",
"[",
"$",
"this",
"->",
"getName",
"(",
")",
"]",
"==",
"$",
"this... | Checks if current session id is the same as in originally received cookie.
This method is intended to indicate if new session cookie
is to be sent as header from this script execution.
@return bool | [
"Checks",
"if",
"current",
"session",
"id",
"is",
"the",
"same",
"as",
"in",
"originally",
"received",
"cookie",
".",
"This",
"method",
"is",
"intended",
"to",
"indicate",
"if",
"new",
"session",
"cookie",
"is",
"to",
"be",
"sent",
"as",
"header",
"from",
... | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L751-L754 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session._allowSessionStart | protected function _allowSessionStart()
{
$blAllowSessionStart = true;
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
// special handling only in non-admin mode
if (!$this->isAdmin()) {
if (\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine() || $myConfig->getRequestParameter('skipSession')) {
$blAllowSessionStart = false;
} elseif (\OxidEsales\Eshop\Core\Registry::getUtilsServer()->getOxCookie('oxid_' . $myConfig->getShopId() . '_autologin') === '1') {
$blAllowSessionStart = true;
} elseif (!$this->_forceSessionStart() && !\OxidEsales\Eshop\Core\Registry::getUtilsServer()->getOxCookie('sid_key')) {
// session is not needed to start when it is not necessary:
// - no sid in request and also user executes no session connected action
// - no cookie set and user executes no session connected action
if (!\OxidEsales\Eshop\Core\Registry::getUtilsServer()->getOxCookie($this->getName()) &&
!($myConfig->getRequestParameter($this->getName()) || $myConfig->getRequestParameter($this->getForcedName())) &&
!$this->_isSessionRequiredAction()
) {
$blAllowSessionStart = false;
}
}
}
return $blAllowSessionStart;
} | php | protected function _allowSessionStart()
{
$blAllowSessionStart = true;
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
// special handling only in non-admin mode
if (!$this->isAdmin()) {
if (\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine() || $myConfig->getRequestParameter('skipSession')) {
$blAllowSessionStart = false;
} elseif (\OxidEsales\Eshop\Core\Registry::getUtilsServer()->getOxCookie('oxid_' . $myConfig->getShopId() . '_autologin') === '1') {
$blAllowSessionStart = true;
} elseif (!$this->_forceSessionStart() && !\OxidEsales\Eshop\Core\Registry::getUtilsServer()->getOxCookie('sid_key')) {
// session is not needed to start when it is not necessary:
// - no sid in request and also user executes no session connected action
// - no cookie set and user executes no session connected action
if (!\OxidEsales\Eshop\Core\Registry::getUtilsServer()->getOxCookie($this->getName()) &&
!($myConfig->getRequestParameter($this->getName()) || $myConfig->getRequestParameter($this->getForcedName())) &&
!$this->_isSessionRequiredAction()
) {
$blAllowSessionStart = false;
}
}
}
return $blAllowSessionStart;
} | [
"protected",
"function",
"_allowSessionStart",
"(",
")",
"{",
"$",
"blAllowSessionStart",
"=",
"true",
";",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"// special handling only in no... | Checks if we can start new session. Returns bool success status
@return bool | [
"Checks",
"if",
"we",
"can",
"start",
"new",
"session",
".",
"Returns",
"bool",
"success",
"status"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L826-L851 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session._isSwappedClient | protected function _isSwappedClient()
{
$blSwapped = false;
$myUtilsServer = \OxidEsales\Eshop\Core\Registry::getUtilsServer();
// check only for non search engines
if (!\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine() && !$myUtilsServer->isTrustedClientIp() && !$this->_isValidRemoteAccessToken()) {
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
// checking if session user agent matches actual
$blSwapped = $this->_checkUserAgent($myUtilsServer->getServerVar('HTTP_USER_AGENT'), $this->getVariable('sessionagent'));
if (!$blSwapped) {
$blDisableCookieCheck = $myConfig->getConfigParam('blDisableCookieCheck');
$blUseCookies = $this->_getSessionUseCookies();
if (!$blDisableCookieCheck && $blUseCookies) {
$blSwapped = $this->_checkCookies($myUtilsServer->getOxCookie('sid_key'), $this->getVariable("sessioncookieisset"));
}
}
}
return $blSwapped;
} | php | protected function _isSwappedClient()
{
$blSwapped = false;
$myUtilsServer = \OxidEsales\Eshop\Core\Registry::getUtilsServer();
// check only for non search engines
if (!\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine() && !$myUtilsServer->isTrustedClientIp() && !$this->_isValidRemoteAccessToken()) {
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
// checking if session user agent matches actual
$blSwapped = $this->_checkUserAgent($myUtilsServer->getServerVar('HTTP_USER_AGENT'), $this->getVariable('sessionagent'));
if (!$blSwapped) {
$blDisableCookieCheck = $myConfig->getConfigParam('blDisableCookieCheck');
$blUseCookies = $this->_getSessionUseCookies();
if (!$blDisableCookieCheck && $blUseCookies) {
$blSwapped = $this->_checkCookies($myUtilsServer->getOxCookie('sid_key'), $this->getVariable("sessioncookieisset"));
}
}
}
return $blSwapped;
} | [
"protected",
"function",
"_isSwappedClient",
"(",
")",
"{",
"$",
"blSwapped",
"=",
"false",
";",
"$",
"myUtilsServer",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getUtilsServer",
"(",
")",
";",
"// check only for non search en... | Saves various visitor parameters and compares with current data.
Returns true if any change is detected.
Using this method we can detect different visitor with same session id.
@return bool | [
"Saves",
"various",
"visitor",
"parameters",
"and",
"compares",
"with",
"current",
"data",
".",
"Returns",
"true",
"if",
"any",
"change",
"is",
"detected",
".",
"Using",
"this",
"method",
"we",
"can",
"detect",
"different",
"visitor",
"with",
"same",
"session"... | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L860-L881 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session._checkUserAgent | protected function _checkUserAgent($sAgent, $sExistingAgent)
{
$blCheck = false;
// processing
$oUtils = \OxidEsales\Eshop\Core\Registry::getUtilsServer();
$sAgent = $oUtils->processUserAgentInfo($sAgent);
$sExistingAgent = $oUtils->processUserAgentInfo($sExistingAgent);
if ($sAgent && $sAgent !== $sExistingAgent) {
if ($sExistingAgent) {
$this->_sErrorMsg = "Different browser ({$sExistingAgent}, {$sAgent}), creating new SID...<br>";
}
$blCheck = true;
}
return $blCheck;
} | php | protected function _checkUserAgent($sAgent, $sExistingAgent)
{
$blCheck = false;
// processing
$oUtils = \OxidEsales\Eshop\Core\Registry::getUtilsServer();
$sAgent = $oUtils->processUserAgentInfo($sAgent);
$sExistingAgent = $oUtils->processUserAgentInfo($sExistingAgent);
if ($sAgent && $sAgent !== $sExistingAgent) {
if ($sExistingAgent) {
$this->_sErrorMsg = "Different browser ({$sExistingAgent}, {$sAgent}), creating new SID...<br>";
}
$blCheck = true;
}
return $blCheck;
} | [
"protected",
"function",
"_checkUserAgent",
"(",
"$",
"sAgent",
",",
"$",
"sExistingAgent",
")",
"{",
"$",
"blCheck",
"=",
"false",
";",
"// processing",
"$",
"oUtils",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getUtilsSe... | Checking user agent
@param string $sAgent current user agent
@param string $sExistingAgent existing user agent
@return bool | [
"Checking",
"user",
"agent"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L891-L907 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session._checkCookies | protected function _checkCookies($sCookieSid, $aSessCookieSetOnce)
{
$blSwapped = false;
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$sCurrUrl = $myConfig->isSsl() ? $myConfig->getSslShopUrl() : $myConfig->getShopUrl();
$blSessCookieSetOnce = false;
if (is_array($aSessCookieSetOnce) && isset($aSessCookieSetOnce[$sCurrUrl])) {
$blSessCookieSetOnce = $aSessCookieSetOnce[$sCurrUrl];
}
//if cookie was there once but now is gone it means we have to reset
if ($blSessCookieSetOnce && !$sCookieSid) {
if ($myConfig->getConfigParam('iDebug')) {
$this->_sErrorMsg = "Cookie not found, creating new SID...<br>";
$this->_sErrorMsg .= "Cookie: $sCookieSid<br>";
$this->_sErrorMsg .= "Session: $blSessCookieSetOnce<br>";
$this->_sErrorMsg .= "URL: " . $sCurrUrl . "<br>";
}
$blSwapped = true;
}
//if we detect the cookie then set session var for possible later use
if ($sCookieSid == "oxid" && !$blSessCookieSetOnce) {
if (!is_array($aSessCookieSetOnce)) {
$aSessCookieSetOnce = [];
}
$aSessCookieSetOnce[$sCurrUrl] = "ox_true";
$this->setVariable("sessioncookieisset", $aSessCookieSetOnce);
}
//if we have no cookie then try to set it
if (!$sCookieSid) {
\OxidEsales\Eshop\Core\Registry::getUtilsServer()->setOxCookie('sid_key', 'oxid');
}
return $blSwapped;
} | php | protected function _checkCookies($sCookieSid, $aSessCookieSetOnce)
{
$blSwapped = false;
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$sCurrUrl = $myConfig->isSsl() ? $myConfig->getSslShopUrl() : $myConfig->getShopUrl();
$blSessCookieSetOnce = false;
if (is_array($aSessCookieSetOnce) && isset($aSessCookieSetOnce[$sCurrUrl])) {
$blSessCookieSetOnce = $aSessCookieSetOnce[$sCurrUrl];
}
//if cookie was there once but now is gone it means we have to reset
if ($blSessCookieSetOnce && !$sCookieSid) {
if ($myConfig->getConfigParam('iDebug')) {
$this->_sErrorMsg = "Cookie not found, creating new SID...<br>";
$this->_sErrorMsg .= "Cookie: $sCookieSid<br>";
$this->_sErrorMsg .= "Session: $blSessCookieSetOnce<br>";
$this->_sErrorMsg .= "URL: " . $sCurrUrl . "<br>";
}
$blSwapped = true;
}
//if we detect the cookie then set session var for possible later use
if ($sCookieSid == "oxid" && !$blSessCookieSetOnce) {
if (!is_array($aSessCookieSetOnce)) {
$aSessCookieSetOnce = [];
}
$aSessCookieSetOnce[$sCurrUrl] = "ox_true";
$this->setVariable("sessioncookieisset", $aSessCookieSetOnce);
}
//if we have no cookie then try to set it
if (!$sCookieSid) {
\OxidEsales\Eshop\Core\Registry::getUtilsServer()->setOxCookie('sid_key', 'oxid');
}
return $blSwapped;
} | [
"protected",
"function",
"_checkCookies",
"(",
"$",
"sCookieSid",
",",
"$",
"aSessCookieSetOnce",
")",
"{",
"$",
"blSwapped",
"=",
"false",
";",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
... | Check for existing cookie.
Cookie info is dropped from time to time.
@param string $sCookieSid coockie sid
@param array $aSessCookieSetOnce if session cookie is set
@return bool | [
"Check",
"for",
"existing",
"cookie",
".",
"Cookie",
"info",
"is",
"dropped",
"from",
"time",
"to",
"time",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L918-L956 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session._getBasketName | protected function _getBasketName()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
if ($myConfig->getConfigParam('blMallSharedBasket') == 0) {
return $myConfig->getShopId() . "_basket";
}
return "basket";
} | php | protected function _getBasketName()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
if ($myConfig->getConfigParam('blMallSharedBasket') == 0) {
return $myConfig->getShopId() . "_basket";
}
return "basket";
} | [
"protected",
"function",
"_getBasketName",
"(",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"if",
"(",
"$",
"myConfig",
"->",
"getConfigParam",
"(",
"'blMallSharedBasket... | Returns name of shopping basket.
@return string | [
"Returns",
"name",
"of",
"shopping",
"basket",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L997-L1005 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session._getRequireSessionWithParams | protected function _getRequireSessionWithParams()
{
$aCfgArray = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aRequireSessionWithParams');
if (is_array($aCfgArray)) {
$aDefault = $this->_aRequireSessionWithParams;
foreach ($aCfgArray as $key => $val) {
if (!is_array($val) && $val) {
unset($aDefault[$key]);
}
}
return array_merge_recursive($aCfgArray, $aDefault);
}
return $this->_aRequireSessionWithParams;
} | php | protected function _getRequireSessionWithParams()
{
$aCfgArray = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aRequireSessionWithParams');
if (is_array($aCfgArray)) {
$aDefault = $this->_aRequireSessionWithParams;
foreach ($aCfgArray as $key => $val) {
if (!is_array($val) && $val) {
unset($aDefault[$key]);
}
}
return array_merge_recursive($aCfgArray, $aDefault);
}
return $this->_aRequireSessionWithParams;
} | [
"protected",
"function",
"_getRequireSessionWithParams",
"(",
")",
"{",
"$",
"aCfgArray",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getConfigParam",
"(",
"'aRequireSessionWithParams'",
")",
";",
"... | returns configuration array with info which parameters require session
start
@return array | [
"returns",
"configuration",
"array",
"with",
"info",
"which",
"parameters",
"require",
"session",
"start"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L1023-L1038 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session._isSessionRequiredAction | protected function _isSessionRequiredAction()
{
foreach ($this->_getRequireSessionWithParams() as $sParam => $aValues) {
$sValue = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter($sParam);
if (isset($sValue)) {
if (is_array($aValues)) {
if (isset($aValues[$sValue]) && $aValues[$sValue]) {
return true;
}
} elseif ($aValues) {
return true;
}
}
}
return (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST');
} | php | protected function _isSessionRequiredAction()
{
foreach ($this->_getRequireSessionWithParams() as $sParam => $aValues) {
$sValue = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter($sParam);
if (isset($sValue)) {
if (is_array($aValues)) {
if (isset($aValues[$sValue]) && $aValues[$sValue]) {
return true;
}
} elseif ($aValues) {
return true;
}
}
}
return (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST');
} | [
"protected",
"function",
"_isSessionRequiredAction",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_getRequireSessionWithParams",
"(",
")",
"as",
"$",
"sParam",
"=>",
"$",
"aValues",
")",
"{",
"$",
"sValue",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",... | Tests if current action requires session
@return bool | [
"Tests",
"if",
"current",
"action",
"requires",
"session"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L1045-L1061 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session._isValidRemoteAccessToken | protected function _isValidRemoteAccessToken()
{
$inputToken = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('rtoken');
$token = $this->getRemoteAccessToken(false);
return !empty($inputToken) ? ($token === $inputToken) : false;
} | php | protected function _isValidRemoteAccessToken()
{
$inputToken = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('rtoken');
$token = $this->getRemoteAccessToken(false);
return !empty($inputToken) ? ($token === $inputToken) : false;
} | [
"protected",
"function",
"_isValidRemoteAccessToken",
"(",
")",
"{",
"$",
"inputToken",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getRequestParameter",
"(",
"'rtoken'",
")",
";",
"$",
"token",
... | Checks if token supplied over 'rtoken' parameter matches remote access session token.
@return bool | [
"Checks",
"if",
"token",
"supplied",
"over",
"rtoken",
"parameter",
"matches",
"remote",
"access",
"session",
"token",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L1078-L1084 | train |
OXID-eSales/oxideshop_ce | source/Core/Session.php | Session.getBasketReservations | public function getBasketReservations()
{
if (!$this->_oBasketReservations) {
$this->_oBasketReservations = oxNew(\OxidEsales\Eshop\Application\Model\BasketReservation::class);
}
return $this->_oBasketReservations;
} | php | public function getBasketReservations()
{
if (!$this->_oBasketReservations) {
$this->_oBasketReservations = oxNew(\OxidEsales\Eshop\Application\Model\BasketReservation::class);
}
return $this->_oBasketReservations;
} | [
"public",
"function",
"getBasketReservations",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_oBasketReservations",
")",
"{",
"$",
"this",
"->",
"_oBasketReservations",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Application",
"\\",
"Mo... | return basket reservations handler object
@return oxBasketReservation | [
"return",
"basket",
"reservations",
"handler",
"object"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Session.php#L1091-L1098 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ArticleStock.php | ArticleStock.render | public function render()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
parent::render();
$this->_aViewData["edit"] = $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
$soxId = $this->getEditObjectId();
if (isset($soxId) && $soxId != "-1") {
// load object
$oArticle->loadInLang($this->_iEditLang, $soxId);
// load object in other languages
$oOtherLang = $oArticle->getAvailableInLangs();
if (!isset($oOtherLang[$this->_iEditLang])) {
// echo "language entry doesn't exist! using: ".key($oOtherLang);
$oArticle->loadInLang(key($oOtherLang), $soxId);
}
foreach ($oOtherLang as $id => $language) {
$oLang = new stdClass();
$oLang->sLangDesc = $language;
$oLang->selected = ($id == $this->_iEditLang);
$this->_aViewData["otherlang"][$id] = clone $oLang;
}
if ($oArticle->isDerived()) {
$this->_aViewData['readonly'] = true;
}
// variant handling
if ($oArticle->oxarticles__oxparentid->value) {
$oParentArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
$oParentArticle->load($oArticle->oxarticles__oxparentid->value);
$this->_aViewData["parentarticle"] = $oParentArticle;
$this->_aViewData["oxparentid"] = $oArticle->oxarticles__oxparentid->value;
}
if ($myConfig->getConfigParam('blMallInterchangeArticles')) {
$sShopSelect = '1';
} else {
$sShopID = $myConfig->getShopID();
$sShopSelect = " oxshopid = '$sShopID' ";
}
$oPriceList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
$oPriceList->init('oxbase', "oxprice2article");
$sQ = "select * from oxprice2article where oxartid = '{$soxId}' " .
"and {$sShopSelect} and (oxamount > 0 or oxamountto > 0) order by oxamount ";
$oPriceList->selectstring($sQ);
$this->_aViewData["amountprices"] = $oPriceList;
}
return "article_stock.tpl";
} | php | public function render()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
parent::render();
$this->_aViewData["edit"] = $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
$soxId = $this->getEditObjectId();
if (isset($soxId) && $soxId != "-1") {
// load object
$oArticle->loadInLang($this->_iEditLang, $soxId);
// load object in other languages
$oOtherLang = $oArticle->getAvailableInLangs();
if (!isset($oOtherLang[$this->_iEditLang])) {
// echo "language entry doesn't exist! using: ".key($oOtherLang);
$oArticle->loadInLang(key($oOtherLang), $soxId);
}
foreach ($oOtherLang as $id => $language) {
$oLang = new stdClass();
$oLang->sLangDesc = $language;
$oLang->selected = ($id == $this->_iEditLang);
$this->_aViewData["otherlang"][$id] = clone $oLang;
}
if ($oArticle->isDerived()) {
$this->_aViewData['readonly'] = true;
}
// variant handling
if ($oArticle->oxarticles__oxparentid->value) {
$oParentArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
$oParentArticle->load($oArticle->oxarticles__oxparentid->value);
$this->_aViewData["parentarticle"] = $oParentArticle;
$this->_aViewData["oxparentid"] = $oArticle->oxarticles__oxparentid->value;
}
if ($myConfig->getConfigParam('blMallInterchangeArticles')) {
$sShopSelect = '1';
} else {
$sShopID = $myConfig->getShopID();
$sShopSelect = " oxshopid = '$sShopID' ";
}
$oPriceList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
$oPriceList->init('oxbase', "oxprice2article");
$sQ = "select * from oxprice2article where oxartid = '{$soxId}' " .
"and {$sShopSelect} and (oxamount > 0 or oxamountto > 0) order by oxamount ";
$oPriceList->selectstring($sQ);
$this->_aViewData["amountprices"] = $oPriceList;
}
return "article_stock.tpl";
} | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"parent",
"::",
"render",
"(",
")",
";",
"$",
"this",
"->",
"_aViewData",
"[",
"... | Loads article Inventory information, passes it to Smarty engine and
returns name of template file "article_stock.tpl".
@return string | [
"Loads",
"article",
"Inventory",
"information",
"passes",
"it",
"to",
"Smarty",
"engine",
"and",
"returns",
"name",
"of",
"template",
"file",
"article_stock",
".",
"tpl",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ArticleStock.php#L28-L84 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ArticleStock.php | ArticleStock.save | public function save()
{
parent::save();
$soxId = $this->getEditObjectId();
$aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");
$oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
$oArticle->loadInLang($this->_iEditLang, $soxId);
$oArticle->setLanguage(0);
// checkbox handling
if (!$oArticle->oxarticles__oxparentid->value && !isset($aParams['oxarticles__oxremindactive'])) {
$aParams['oxarticles__oxremindactive'] = 0;
}
$oArticle->assign($aParams);
//tells to article to save in different language
$oArticle->setLanguage($this->_iEditLang);
$oArticle = \OxidEsales\Eshop\Core\Registry::getUtilsFile()->processFiles($oArticle);
$oArticle->resetRemindStatus();
$oArticle->updateVariantsRemind();
$oArticle->save();
} | php | public function save()
{
parent::save();
$soxId = $this->getEditObjectId();
$aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");
$oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
$oArticle->loadInLang($this->_iEditLang, $soxId);
$oArticle->setLanguage(0);
// checkbox handling
if (!$oArticle->oxarticles__oxparentid->value && !isset($aParams['oxarticles__oxremindactive'])) {
$aParams['oxarticles__oxremindactive'] = 0;
}
$oArticle->assign($aParams);
//tells to article to save in different language
$oArticle->setLanguage($this->_iEditLang);
$oArticle = \OxidEsales\Eshop\Core\Registry::getUtilsFile()->processFiles($oArticle);
$oArticle->resetRemindStatus();
$oArticle->updateVariantsRemind();
$oArticle->save();
} | [
"public",
"function",
"save",
"(",
")",
"{",
"parent",
"::",
"save",
"(",
")",
";",
"$",
"soxId",
"=",
"$",
"this",
"->",
"getEditObjectId",
"(",
")",
";",
"$",
"aParams",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
... | Saves article Inventori information changes. | [
"Saves",
"article",
"Inventori",
"information",
"changes",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ArticleStock.php#L89-L117 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ArticleStock.php | ArticleStock.updateprices | public function updateprices()
{
$aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("updateval");
if (is_array($aParams)) {
foreach ($aParams as $soxId => $aStockParams) {
$this->addprice($soxId, $aStockParams);
}
}
$sOxArtId = $this->getEditObjectId();
$this->onArticleAmountPriceChange($sOxArtId);
} | php | public function updateprices()
{
$aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("updateval");
if (is_array($aParams)) {
foreach ($aParams as $soxId => $aStockParams) {
$this->addprice($soxId, $aStockParams);
}
}
$sOxArtId = $this->getEditObjectId();
$this->onArticleAmountPriceChange($sOxArtId);
} | [
"public",
"function",
"updateprices",
"(",
")",
"{",
"$",
"aParams",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getRequestParameter",
"(",
"\"updateval\"",
")",
";",
"if",
"(",
"is_array",
"(... | Updates all amount prices for article at once | [
"Updates",
"all",
"amount",
"prices",
"for",
"article",
"at",
"once"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ArticleStock.php#L204-L215 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ArticleStock.php | ArticleStock.deleteprice | public function deleteprice()
{
$this->resetContentCache();
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$sPriceId = $oDb->quote(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("priceid"));
$articleId = $this->getEditObjectId();
$sId = $oDb->quote($articleId);
$oDb->execute("delete from oxprice2article where oxid = {$sPriceId} and oxartid = {$sId}");
$this->onArticleAmountPriceChange($articleId);
} | php | public function deleteprice()
{
$this->resetContentCache();
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$sPriceId = $oDb->quote(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("priceid"));
$articleId = $this->getEditObjectId();
$sId = $oDb->quote($articleId);
$oDb->execute("delete from oxprice2article where oxid = {$sPriceId} and oxartid = {$sId}");
$this->onArticleAmountPriceChange($articleId);
} | [
"public",
"function",
"deleteprice",
"(",
")",
"{",
"$",
"this",
"->",
"resetContentCache",
"(",
")",
";",
"$",
"oDb",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"DatabaseProvider",
"::",
"getDb",
"(",
")",
";",
"$",
"sPriceId",
"=",
"... | Adds amount price to article | [
"Adds",
"amount",
"price",
"to",
"article"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ArticleStock.php#L221-L232 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.load | public function load($sModuleId)
{
$sModulePath = $this->getModuleFullPath($sModuleId);
$sMetadataPath = $sModulePath . "/metadata.php";
if ($sModulePath && is_readable($sMetadataPath)) {
$this->includeModuleMetaData($sMetadataPath);
$this->_blRegistered = true;
$this->_blMetadata = true;
$this->_aModule['active'] = $this->isActive();
return true;
}
return false;
} | php | public function load($sModuleId)
{
$sModulePath = $this->getModuleFullPath($sModuleId);
$sMetadataPath = $sModulePath . "/metadata.php";
if ($sModulePath && is_readable($sMetadataPath)) {
$this->includeModuleMetaData($sMetadataPath);
$this->_blRegistered = true;
$this->_blMetadata = true;
$this->_aModule['active'] = $this->isActive();
return true;
}
return false;
} | [
"public",
"function",
"load",
"(",
"$",
"sModuleId",
")",
"{",
"$",
"sModulePath",
"=",
"$",
"this",
"->",
"getModuleFullPath",
"(",
"$",
"sModuleId",
")",
";",
"$",
"sMetadataPath",
"=",
"$",
"sModulePath",
".",
"\"/metadata.php\"",
";",
"if",
"(",
"$",
... | Load module info
@param string $sModuleId Module ID
@return bool | [
"Load",
"module",
"info"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L86-L101 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.loadByDir | public function loadByDir($sModuleDir)
{
$sModuleId = null;
$aModulePaths = $this->getModulePaths();
if (is_array($aModulePaths)) {
$sModuleId = array_search($sModuleDir, $aModulePaths);
}
// if no module id defined, using module dir as id
if (!$sModuleId) {
$sModuleId = $sModuleDir;
}
return $this->load($sModuleId);
} | php | public function loadByDir($sModuleDir)
{
$sModuleId = null;
$aModulePaths = $this->getModulePaths();
if (is_array($aModulePaths)) {
$sModuleId = array_search($sModuleDir, $aModulePaths);
}
// if no module id defined, using module dir as id
if (!$sModuleId) {
$sModuleId = $sModuleDir;
}
return $this->load($sModuleId);
} | [
"public",
"function",
"loadByDir",
"(",
"$",
"sModuleDir",
")",
"{",
"$",
"sModuleId",
"=",
"null",
";",
"$",
"aModulePaths",
"=",
"$",
"this",
"->",
"getModulePaths",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"aModulePaths",
")",
")",
"{",
"$",
... | Load module by dir name
@param string $sModuleDir Module dir name
@return bool | [
"Load",
"module",
"by",
"dir",
"name"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L110-L125 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.getTitle | public function getTitle()
{
$iLang = \OxidEsales\Eshop\Core\Registry::getLang()->getTplLanguage();
return $this->getInfo("title", $iLang);
} | php | public function getTitle()
{
$iLang = \OxidEsales\Eshop\Core\Registry::getLang()->getTplLanguage();
return $this->getInfo("title", $iLang);
} | [
"public",
"function",
"getTitle",
"(",
")",
"{",
"$",
"iLang",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getLang",
"(",
")",
"->",
"getTplLanguage",
"(",
")",
";",
"return",
"$",
"this",
"->",
"getInfo",
"(",
"\"tit... | Get module title
@return string | [
"Get",
"module",
"title"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L144-L149 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.getExtensions | public function getExtensions()
{
$rawExtensions = isset($this->_aModule['extend']) ? $this->_aModule['extend'] : [];
return $this->getUnifiedShopClassExtensionsForBc($rawExtensions);
} | php | public function getExtensions()
{
$rawExtensions = isset($this->_aModule['extend']) ? $this->_aModule['extend'] : [];
return $this->getUnifiedShopClassExtensionsForBc($rawExtensions);
} | [
"public",
"function",
"getExtensions",
"(",
")",
"{",
"$",
"rawExtensions",
"=",
"isset",
"(",
"$",
"this",
"->",
"_aModule",
"[",
"'extend'",
"]",
")",
"?",
"$",
"this",
"->",
"_aModule",
"[",
"'extend'",
"]",
":",
"[",
"]",
";",
"return",
"$",
"thi... | Returns array of module extensions.
@return array | [
"Returns",
"array",
"of",
"module",
"extensions",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L166-L171 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.getControllers | public function getControllers()
{
if (isset($this->_aModule['controllers']) && ! is_array($this->_aModule['controllers'])) {
throw new \InvalidArgumentException('Value for metadata key "controllers" must be an array');
}
return isset($this->_aModule['controllers']) ? array_change_key_case($this->_aModule['controllers']) : [];
} | php | public function getControllers()
{
if (isset($this->_aModule['controllers']) && ! is_array($this->_aModule['controllers'])) {
throw new \InvalidArgumentException('Value for metadata key "controllers" must be an array');
}
return isset($this->_aModule['controllers']) ? array_change_key_case($this->_aModule['controllers']) : [];
} | [
"public",
"function",
"getControllers",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_aModule",
"[",
"'controllers'",
"]",
")",
"&&",
"!",
"is_array",
"(",
"$",
"this",
"->",
"_aModule",
"[",
"'controllers'",
"]",
")",
")",
"{",
"throw",... | Returns associative array of module controller ids and corresponding classes.
@return array | [
"Returns",
"associative",
"array",
"of",
"module",
"controller",
"ids",
"and",
"corresponding",
"classes",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L178-L185 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.getIdByPath | public function getIdByPath($module)
{
$moduleId = null;
$moduleFile = $module;
$moduleId = $this->getIdFromExtension($module);
if (!$moduleId) {
$modulePaths = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModulePaths');
if (is_array($modulePaths)) {
foreach ($modulePaths as $id => $path) {
if (strpos($moduleFile, $path . "/") === 0) {
$moduleId = $id;
}
}
}
}
if (!$moduleId) {
$moduleId = substr($moduleFile, 0, strpos($moduleFile, "/"));
}
if (!$moduleId) {
$moduleId = $moduleFile;
}
return $moduleId;
} | php | public function getIdByPath($module)
{
$moduleId = null;
$moduleFile = $module;
$moduleId = $this->getIdFromExtension($module);
if (!$moduleId) {
$modulePaths = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModulePaths');
if (is_array($modulePaths)) {
foreach ($modulePaths as $id => $path) {
if (strpos($moduleFile, $path . "/") === 0) {
$moduleId = $id;
}
}
}
}
if (!$moduleId) {
$moduleId = substr($moduleFile, 0, strpos($moduleFile, "/"));
}
if (!$moduleId) {
$moduleId = $moduleFile;
}
return $moduleId;
} | [
"public",
"function",
"getIdByPath",
"(",
"$",
"module",
")",
"{",
"$",
"moduleId",
"=",
"null",
";",
"$",
"moduleFile",
"=",
"$",
"module",
";",
"$",
"moduleId",
"=",
"$",
"this",
"->",
"getIdFromExtension",
"(",
"$",
"module",
")",
";",
"if",
"(",
... | Get module ID
@param string $module extension full path
@return string | [
"Get",
"module",
"ID"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L216-L240 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.getModuleIdByClassName | public function getModuleIdByClassName($className)
{
if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($className)) {
return $this->backwardsCompatibleGetModuleIdByClassName($className);
}
$moduleId = '';
$extensions = (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModuleExtensions');
foreach ($extensions as $id => $moduleClasses) {
if (in_array($className, $moduleClasses)) {
$moduleId = $id;
break;
}
}
return $moduleId;
} | php | public function getModuleIdByClassName($className)
{
if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($className)) {
return $this->backwardsCompatibleGetModuleIdByClassName($className);
}
$moduleId = '';
$extensions = (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModuleExtensions');
foreach ($extensions as $id => $moduleClasses) {
if (in_array($className, $moduleClasses)) {
$moduleId = $id;
break;
}
}
return $moduleId;
} | [
"public",
"function",
"getModuleIdByClassName",
"(",
"$",
"className",
")",
"{",
"if",
"(",
"!",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"NamespaceInformationProvider",
"::",
"isNamespacedClass",
"(",
"$",
"className",
")",
")",
"{",
"return",
"... | Get the module id for a given class name. If there are duplicates, the first module id will be returned.
@param string $className
@return string | [
"Get",
"the",
"module",
"id",
"for",
"a",
"given",
"class",
"name",
".",
"If",
"there",
"are",
"duplicates",
"the",
"first",
"module",
"id",
"will",
"be",
"returned",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L263-L279 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.getInfo | public function getInfo($sName, $iLang = null)
{
if (isset($this->_aModule[$sName])) {
if ($iLang !== null && is_array($this->_aModule[$sName])) {
$sValue = null;
$sLang = \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageAbbr($iLang);
if (!empty($this->_aModule[$sName])) {
if (!empty($this->_aModule[$sName][$sLang])) {
$sValue = $this->_aModule[$sName][$sLang];
} elseif (!empty($this->_aModule['lang'])) {
// trying to get value according default language
$sValue = $this->_aModule[$sName][$this->_aModule['lang']];
} else {
// returning first array value
$sValue = reset($this->_aModule[$sName]);
}
return $sValue;
}
} else {
return $this->_aModule[$sName];
}
}
} | php | public function getInfo($sName, $iLang = null)
{
if (isset($this->_aModule[$sName])) {
if ($iLang !== null && is_array($this->_aModule[$sName])) {
$sValue = null;
$sLang = \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageAbbr($iLang);
if (!empty($this->_aModule[$sName])) {
if (!empty($this->_aModule[$sName][$sLang])) {
$sValue = $this->_aModule[$sName][$sLang];
} elseif (!empty($this->_aModule['lang'])) {
// trying to get value according default language
$sValue = $this->_aModule[$sName][$this->_aModule['lang']];
} else {
// returning first array value
$sValue = reset($this->_aModule[$sName]);
}
return $sValue;
}
} else {
return $this->_aModule[$sName];
}
}
} | [
"public",
"function",
"getInfo",
"(",
"$",
"sName",
",",
"$",
"iLang",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_aModule",
"[",
"$",
"sName",
"]",
")",
")",
"{",
"if",
"(",
"$",
"iLang",
"!==",
"null",
"&&",
"is_array",... | Get module info item. If second param is passed, will try
to get value according selected language.
@param string $sName name of info item to retrieve
@param string $iLang language ID
@return mixed | [
"Get",
"module",
"info",
"item",
".",
"If",
"second",
"param",
"is",
"passed",
"will",
"try",
"to",
"get",
"value",
"according",
"selected",
"language",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L290-L315 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.isActive | public function isActive()
{
$blActive = false;
$sId = $this->getId();
if (!is_null($sId)) {
$blActive = !$this->_isInDisabledList($sId);
if ($blActive && $this->hasExtendClass()) {
$blActive = $this->_isExtensionsActive();
}
}
return $blActive;
} | php | public function isActive()
{
$blActive = false;
$sId = $this->getId();
if (!is_null($sId)) {
$blActive = !$this->_isInDisabledList($sId);
if ($blActive && $this->hasExtendClass()) {
$blActive = $this->_isExtensionsActive();
}
}
return $blActive;
} | [
"public",
"function",
"isActive",
"(",
")",
"{",
"$",
"blActive",
"=",
"false",
";",
"$",
"sId",
"=",
"$",
"this",
"->",
"getId",
"(",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"sId",
")",
")",
"{",
"$",
"blActive",
"=",
"!",
"$",
"this",
... | Check if extension is active
@return bool | [
"Check",
"if",
"extension",
"is",
"active"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L322-L334 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.hasExtendClass | public function hasExtendClass()
{
$aExtensions = $this->getExtensions();
return isset($aExtensions)
&& is_array($aExtensions)
&& !empty($aExtensions);
} | php | public function hasExtendClass()
{
$aExtensions = $this->getExtensions();
return isset($aExtensions)
&& is_array($aExtensions)
&& !empty($aExtensions);
} | [
"public",
"function",
"hasExtendClass",
"(",
")",
"{",
"$",
"aExtensions",
"=",
"$",
"this",
"->",
"getExtensions",
"(",
")",
";",
"return",
"isset",
"(",
"$",
"aExtensions",
")",
"&&",
"is_array",
"(",
"$",
"aExtensions",
")",
"&&",
"!",
"empty",
"(",
... | Checks if has extend class.
@return bool | [
"Checks",
"if",
"has",
"extend",
"class",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L341-L348 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.getMetadataPath | public function getMetadataPath()
{
$sModulePath = $this->getModuleFullPath();
if (substr($sModulePath, -1) != DIRECTORY_SEPARATOR) {
$sModulePath .= DIRECTORY_SEPARATOR;
}
return $sModulePath . 'metadata.php';
} | php | public function getMetadataPath()
{
$sModulePath = $this->getModuleFullPath();
if (substr($sModulePath, -1) != DIRECTORY_SEPARATOR) {
$sModulePath .= DIRECTORY_SEPARATOR;
}
return $sModulePath . 'metadata.php';
} | [
"public",
"function",
"getMetadataPath",
"(",
")",
"{",
"$",
"sModulePath",
"=",
"$",
"this",
"->",
"getModuleFullPath",
"(",
")",
";",
"if",
"(",
"substr",
"(",
"$",
"sModulePath",
",",
"-",
"1",
")",
"!=",
"DIRECTORY_SEPARATOR",
")",
"{",
"$",
"sModule... | Get full path to module metadata file.
@return string | [
"Get",
"full",
"path",
"to",
"module",
"metadata",
"file",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L375-L383 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.getModuleFullPath | public function getModuleFullPath($sModuleId = null)
{
if (!$sModuleId) {
$sModuleId = $this->getId();
}
if ($sModuleDir = $this->getModulePath($sModuleId)) {
return \OxidEsales\Eshop\Core\Registry::getConfig()->getModulesDir() . $sModuleDir;
}
return false;
} | php | public function getModuleFullPath($sModuleId = null)
{
if (!$sModuleId) {
$sModuleId = $this->getId();
}
if ($sModuleDir = $this->getModulePath($sModuleId)) {
return \OxidEsales\Eshop\Core\Registry::getConfig()->getModulesDir() . $sModuleDir;
}
return false;
} | [
"public",
"function",
"getModuleFullPath",
"(",
"$",
"sModuleId",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"sModuleId",
")",
"{",
"$",
"sModuleId",
"=",
"$",
"this",
"->",
"getId",
"(",
")",
";",
"}",
"if",
"(",
"$",
"sModuleDir",
"=",
"$",
"thi... | Returns full module path
@param string $sModuleId
@return string | [
"Returns",
"full",
"module",
"path"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L416-L427 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.getTemplates | public function getTemplates($sModuleId = null)
{
if (is_null($sModuleId)) {
$sModuleId = $this->getId();
}
if (!$sModuleId) {
return [];
}
$sShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
return \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getCol("SELECT oxtemplate FROM oxtplblocks WHERE oxmodule = '$sModuleId' AND oxshopid = '$sShopId'");
} | php | public function getTemplates($sModuleId = null)
{
if (is_null($sModuleId)) {
$sModuleId = $this->getId();
}
if (!$sModuleId) {
return [];
}
$sShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
return \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getCol("SELECT oxtemplate FROM oxtplblocks WHERE oxmodule = '$sModuleId' AND oxshopid = '$sShopId'");
} | [
"public",
"function",
"getTemplates",
"(",
"$",
"sModuleId",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"sModuleId",
")",
")",
"{",
"$",
"sModuleId",
"=",
"$",
"this",
"->",
"getId",
"(",
")",
";",
"}",
"if",
"(",
"!",
"$",
"sModuleId",... | Return templates affected by template blocks for given module id.
@todo extract oxtplblocks query to ModuleTemplateBlockRepository
@param string $sModuleId Module id
@return array | [
"Return",
"templates",
"affected",
"by",
"template",
"blocks",
"for",
"given",
"module",
"id",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L448-L461 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module._countActivatedExtensions | protected function _countActivatedExtensions($aModuleExtensions, $aInstalledExtensions)
{
$iActive = 0;
foreach ($aModuleExtensions as $sClass => $mExtension) {
if (is_array($mExtension)) {
foreach ($mExtension as $sExtension) {
if ((isset($aInstalledExtensions[$sClass]) && in_array($sExtension, $aInstalledExtensions[$sClass]))) {
$iActive++;
}
}
} elseif ((isset($aInstalledExtensions[$sClass]) && in_array($mExtension, $aInstalledExtensions[$sClass]))) {
$iActive++;
}
}
return $iActive;
} | php | protected function _countActivatedExtensions($aModuleExtensions, $aInstalledExtensions)
{
$iActive = 0;
foreach ($aModuleExtensions as $sClass => $mExtension) {
if (is_array($mExtension)) {
foreach ($mExtension as $sExtension) {
if ((isset($aInstalledExtensions[$sClass]) && in_array($sExtension, $aInstalledExtensions[$sClass]))) {
$iActive++;
}
}
} elseif ((isset($aInstalledExtensions[$sClass]) && in_array($mExtension, $aInstalledExtensions[$sClass]))) {
$iActive++;
}
}
return $iActive;
} | [
"protected",
"function",
"_countActivatedExtensions",
"(",
"$",
"aModuleExtensions",
",",
"$",
"aInstalledExtensions",
")",
"{",
"$",
"iActive",
"=",
"0",
";",
"foreach",
"(",
"$",
"aModuleExtensions",
"as",
"$",
"sClass",
"=>",
"$",
"mExtension",
")",
"{",
"i... | Counts activated module extensions.
@param array $aModuleExtensions Module extensions
@param array $aInstalledExtensions Installed extensions
@return int | [
"Counts",
"activated",
"module",
"extensions",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L471-L487 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module._countExtensions | protected function _countExtensions($aModuleExtensions)
{
$iCount = 0;
foreach ($aModuleExtensions as $mExtensions) {
if (is_array($mExtensions)) {
$iCount += count($mExtensions);
} else {
$iCount++;
}
}
return $iCount;
} | php | protected function _countExtensions($aModuleExtensions)
{
$iCount = 0;
foreach ($aModuleExtensions as $mExtensions) {
if (is_array($mExtensions)) {
$iCount += count($mExtensions);
} else {
$iCount++;
}
}
return $iCount;
} | [
"protected",
"function",
"_countExtensions",
"(",
"$",
"aModuleExtensions",
")",
"{",
"$",
"iCount",
"=",
"0",
";",
"foreach",
"(",
"$",
"aModuleExtensions",
"as",
"$",
"mExtensions",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"mExtensions",
")",
")",
"{",... | Counts module extensions.
@param array $aModuleExtensions Module extensions
@return int | [
"Counts",
"module",
"extensions",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L496-L508 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module._isExtensionsActive | protected function _isExtensionsActive()
{
$aModuleExtensions = $this->getExtensions();
$aInstalledExtensions = \OxidEsales\Eshop\Core\Registry::getConfig()->getModulesWithExtendedClass();
$iModuleExtensionsCount = $this->_countExtensions($aModuleExtensions);
$iActivatedModuleExtensionsCount = $this->_countActivatedExtensions($aModuleExtensions, $aInstalledExtensions);
return $iModuleExtensionsCount > 0 && $iActivatedModuleExtensionsCount == $iModuleExtensionsCount;
} | php | protected function _isExtensionsActive()
{
$aModuleExtensions = $this->getExtensions();
$aInstalledExtensions = \OxidEsales\Eshop\Core\Registry::getConfig()->getModulesWithExtendedClass();
$iModuleExtensionsCount = $this->_countExtensions($aModuleExtensions);
$iActivatedModuleExtensionsCount = $this->_countActivatedExtensions($aModuleExtensions, $aInstalledExtensions);
return $iModuleExtensionsCount > 0 && $iActivatedModuleExtensionsCount == $iModuleExtensionsCount;
} | [
"protected",
"function",
"_isExtensionsActive",
"(",
")",
"{",
"$",
"aModuleExtensions",
"=",
"$",
"this",
"->",
"getExtensions",
"(",
")",
";",
"$",
"aInstalledExtensions",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConf... | Checks if module extensions count is the same as in activated extensions list.
@return bool | [
"Checks",
"if",
"module",
"extensions",
"count",
"is",
"the",
"same",
"as",
"in",
"activated",
"extensions",
"list",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L515-L524 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module._isInDisabledList | protected function _isInDisabledList($sId)
{
return in_array($sId, (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aDisabledModules'));
} | php | protected function _isInDisabledList($sId)
{
return in_array($sId, (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aDisabledModules'));
} | [
"protected",
"function",
"_isInDisabledList",
"(",
"$",
"sId",
")",
"{",
"return",
"in_array",
"(",
"$",
"sId",
",",
"(",
"array",
")",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getConfigParam",
... | Checks if module is in disabled list.
@param string $sId Module id
@return bool | [
"Checks",
"if",
"module",
"is",
"in",
"disabled",
"list",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L533-L536 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.includeModuleMetaData | protected function includeModuleMetaData($metadataPath)
{
include $metadataPath;
/**
* metadata.php should include a variable called $aModule, if this variable is not set,
* an empty array is assigned to self::aModule
*/
if (!isset($aModule)) {
$aModule = [];
}
$this->setModuleData($aModule);
/**
* metadata.php should include a variable called $sMetadataVersion
*/
if (isset($sMetadataVersion)) {
$this->setMetaDataVersion($sMetadataVersion);
}
} | php | protected function includeModuleMetaData($metadataPath)
{
include $metadataPath;
/**
* metadata.php should include a variable called $aModule, if this variable is not set,
* an empty array is assigned to self::aModule
*/
if (!isset($aModule)) {
$aModule = [];
}
$this->setModuleData($aModule);
/**
* metadata.php should include a variable called $sMetadataVersion
*/
if (isset($sMetadataVersion)) {
$this->setMetaDataVersion($sMetadataVersion);
}
} | [
"protected",
"function",
"includeModuleMetaData",
"(",
"$",
"metadataPath",
")",
"{",
"include",
"$",
"metadataPath",
";",
"/**\n * metadata.php should include a variable called $aModule, if this variable is not set,\n * an empty array is assigned to self::aModule\n *... | Include data from metadata.php
@param string $metadataPath Path to metadata.php | [
"Include",
"data",
"from",
"metadata",
".",
"php"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L543-L561 | train |
OXID-eSales/oxideshop_ce | source/Core/Module/Module.php | Module.getUnifiedShopClassExtensionsForBc | protected function getUnifiedShopClassExtensionsForBc($rawExtensions)
{
$extensions = [];
foreach ($rawExtensions as $classToBePatched => $moduleClass) {
if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($classToBePatched)) {
$bcMap = \OxidEsales\Eshop\Core\Registry::getBackwardsCompatibilityClassMap();
$classToBePatched = array_key_exists(strtolower($classToBePatched), $bcMap) ? $bcMap[strtolower($classToBePatched)]: $classToBePatched;
}
$extensions[$classToBePatched] = $moduleClass;
}
return $extensions;
} | php | protected function getUnifiedShopClassExtensionsForBc($rawExtensions)
{
$extensions = [];
foreach ($rawExtensions as $classToBePatched => $moduleClass) {
if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($classToBePatched)) {
$bcMap = \OxidEsales\Eshop\Core\Registry::getBackwardsCompatibilityClassMap();
$classToBePatched = array_key_exists(strtolower($classToBePatched), $bcMap) ? $bcMap[strtolower($classToBePatched)]: $classToBePatched;
}
$extensions[$classToBePatched] = $moduleClass;
}
return $extensions;
} | [
"protected",
"function",
"getUnifiedShopClassExtensionsForBc",
"(",
"$",
"rawExtensions",
")",
"{",
"$",
"extensions",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"rawExtensions",
"as",
"$",
"classToBePatched",
"=>",
"$",
"moduleClass",
")",
"{",
"if",
"(",
"!",
... | Translate module metadata information about the patched shop classes
into Unified Namespace. There might still be BC class names used in module metadata.php.
@param array $rawExtensions Extension information from module metadata.php.
@return array | [
"Translate",
"module",
"metadata",
"information",
"about",
"the",
"patched",
"shop",
"classes",
"into",
"Unified",
"Namespace",
".",
"There",
"might",
"still",
"be",
"BC",
"class",
"names",
"used",
"in",
"module",
"metadata",
".",
"php",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Module/Module.php#L571-L583 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/BasketController.php | BasketController.getBasketArticles | public function getBasketArticles()
{
if ($this->_oBasketArticles === null) {
$this->_oBasketArticles = false;
// passing basket articles
if ($oBasket = $this->getSession()->getBasket()) {
$this->_oBasketArticles = $oBasket->getBasketArticles();
}
}
return $this->_oBasketArticles;
} | php | public function getBasketArticles()
{
if ($this->_oBasketArticles === null) {
$this->_oBasketArticles = false;
// passing basket articles
if ($oBasket = $this->getSession()->getBasket()) {
$this->_oBasketArticles = $oBasket->getBasketArticles();
}
}
return $this->_oBasketArticles;
} | [
"public",
"function",
"getBasketArticles",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oBasketArticles",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oBasketArticles",
"=",
"false",
";",
"// passing basket articles",
"if",
"(",
"$",
"oBasket",
"=",
"$",
... | Return the current articles from the basket
@return object | bool | [
"Return",
"the",
"current",
"articles",
"from",
"the",
"basket"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/BasketController.php#L121-L133 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/BasketController.php | BasketController.getFirstBasketProduct | public function getFirstBasketProduct()
{
if ($this->_oFirstBasketProduct === null) {
$this->_oFirstBasketProduct = false;
$aBasketArticles = $this->getBasketArticles();
if (is_array($aBasketArticles) && $oProduct = reset($aBasketArticles)) {
$this->_oFirstBasketProduct = $oProduct;
}
}
return $this->_oFirstBasketProduct;
} | php | public function getFirstBasketProduct()
{
if ($this->_oFirstBasketProduct === null) {
$this->_oFirstBasketProduct = false;
$aBasketArticles = $this->getBasketArticles();
if (is_array($aBasketArticles) && $oProduct = reset($aBasketArticles)) {
$this->_oFirstBasketProduct = $oProduct;
}
}
return $this->_oFirstBasketProduct;
} | [
"public",
"function",
"getFirstBasketProduct",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oFirstBasketProduct",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oFirstBasketProduct",
"=",
"false",
";",
"$",
"aBasketArticles",
"=",
"$",
"this",
"->",
"getBas... | return the basket articles
@return object | bool | [
"return",
"the",
"basket",
"articles"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/BasketController.php#L140-L152 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/BasketController.php | BasketController.getBasketSimilarList | public function getBasketSimilarList()
{
if ($this->_oSimilarList === null) {
$this->_oSimilarList = false;
// similar product info
if ($oProduct = $this->getFirstBasketProduct()) {
$this->_oSimilarList = $oProduct->getSimilarProducts();
}
}
return $this->_oSimilarList;
} | php | public function getBasketSimilarList()
{
if ($this->_oSimilarList === null) {
$this->_oSimilarList = false;
// similar product info
if ($oProduct = $this->getFirstBasketProduct()) {
$this->_oSimilarList = $oProduct->getSimilarProducts();
}
}
return $this->_oSimilarList;
} | [
"public",
"function",
"getBasketSimilarList",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oSimilarList",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oSimilarList",
"=",
"false",
";",
"// similar product info",
"if",
"(",
"$",
"oProduct",
"=",
"$",
"th... | return the similar articles
@return object | bool | [
"return",
"the",
"similar",
"articles"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/BasketController.php#L159-L171 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/BasketController.php | BasketController.showBackToShop | public function showBackToShop()
{
$iNewBasketItemMessage = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNewBasketItemMessage');
$sBackToShop = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('_backtoshop');
return ($iNewBasketItemMessage == 3 && $sBackToShop);
} | php | public function showBackToShop()
{
$iNewBasketItemMessage = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNewBasketItemMessage');
$sBackToShop = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('_backtoshop');
return ($iNewBasketItemMessage == 3 && $sBackToShop);
} | [
"public",
"function",
"showBackToShop",
"(",
")",
"{",
"$",
"iNewBasketItemMessage",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getConfigParam",
"(",
"'iNewBasketItemMessage'",
")",
";",
"$",
"sB... | return the Link back to shop
@return bool | [
"return",
"the",
"Link",
"back",
"to",
"shop"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/BasketController.php#L198-L204 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/BasketController.php | BasketController._setWrappingInfo | protected function _setWrappingInfo($oBasket, $aWrapping)
{
if (is_array($aWrapping) && count($aWrapping)) {
foreach ($oBasket->getContents() as $sKey => $oBasketItem) {
if (isset($aWrapping[$sKey])) {
$oBasketItem->setWrapping($aWrapping[$sKey]);
}
}
}
} | php | protected function _setWrappingInfo($oBasket, $aWrapping)
{
if (is_array($aWrapping) && count($aWrapping)) {
foreach ($oBasket->getContents() as $sKey => $oBasketItem) {
if (isset($aWrapping[$sKey])) {
$oBasketItem->setWrapping($aWrapping[$sKey]);
}
}
}
} | [
"protected",
"function",
"_setWrappingInfo",
"(",
"$",
"oBasket",
",",
"$",
"aWrapping",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"aWrapping",
")",
"&&",
"count",
"(",
"$",
"aWrapping",
")",
")",
"{",
"foreach",
"(",
"$",
"oBasket",
"->",
"getContents"... | Sets basket wrapping
@param \OxidEsales\Eshop\Application\Model\Basket $oBasket
@param array $aWrapping | [
"Sets",
"basket",
"wrapping"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/BasketController.php#L383-L392 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/RequiredFieldValidator.php | RequiredFieldValidator.validateFieldValue | public function validateFieldValue($sFieldValue)
{
$blValid = true;
if (is_array($sFieldValue)) {
$blValid = $this->_validateFieldValueArray($sFieldValue);
} else {
if (!trim($sFieldValue)) {
$blValid = false;
}
}
return $blValid;
} | php | public function validateFieldValue($sFieldValue)
{
$blValid = true;
if (is_array($sFieldValue)) {
$blValid = $this->_validateFieldValueArray($sFieldValue);
} else {
if (!trim($sFieldValue)) {
$blValid = false;
}
}
return $blValid;
} | [
"public",
"function",
"validateFieldValue",
"(",
"$",
"sFieldValue",
")",
"{",
"$",
"blValid",
"=",
"true",
";",
"if",
"(",
"is_array",
"(",
"$",
"sFieldValue",
")",
")",
"{",
"$",
"blValid",
"=",
"$",
"this",
"->",
"_validateFieldValueArray",
"(",
"$",
... | Validates field value.
@param string $sFieldValue Field value
@return bool | [
"Validates",
"field",
"value",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/RequiredFieldValidator.php#L22-L34 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/RequiredFieldValidator.php | RequiredFieldValidator._validateFieldValueArray | private function _validateFieldValueArray($aFieldValues)
{
$blValid = true;
foreach ($aFieldValues as $sValue) {
if (!trim($sValue)) {
$blValid = false;
break;
}
}
return $blValid;
} | php | private function _validateFieldValueArray($aFieldValues)
{
$blValid = true;
foreach ($aFieldValues as $sValue) {
if (!trim($sValue)) {
$blValid = false;
break;
}
}
return $blValid;
} | [
"private",
"function",
"_validateFieldValueArray",
"(",
"$",
"aFieldValues",
")",
"{",
"$",
"blValid",
"=",
"true",
";",
"foreach",
"(",
"$",
"aFieldValues",
"as",
"$",
"sValue",
")",
"{",
"if",
"(",
"!",
"trim",
"(",
"$",
"sValue",
")",
")",
"{",
"$",... | Checks if all values are filled up
@param array $aFieldValues field values
@return bool | [
"Checks",
"if",
"all",
"values",
"are",
"filled",
"up"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/RequiredFieldValidator.php#L43-L54 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Payment.php | Payment.getGroups | public function getGroups()
{
if ($this->_oGroups == null && ($sOxid = $this->getId())) {
// user groups
$this->_oGroups = oxNew('oxlist', 'oxgroups');
$sViewName = getViewName("oxgroups", $this->getLanguage());
// performance
$sSelect = "select {$sViewName}.* from {$sViewName}, oxobject2group
where oxobject2group.oxobjectid = '{$sOxid}'
and oxobject2group.oxgroupsid={$sViewName}.oxid ";
$this->_oGroups->selectString($sSelect);
}
return $this->_oGroups;
} | php | public function getGroups()
{
if ($this->_oGroups == null && ($sOxid = $this->getId())) {
// user groups
$this->_oGroups = oxNew('oxlist', 'oxgroups');
$sViewName = getViewName("oxgroups", $this->getLanguage());
// performance
$sSelect = "select {$sViewName}.* from {$sViewName}, oxobject2group
where oxobject2group.oxobjectid = '{$sOxid}'
and oxobject2group.oxgroupsid={$sViewName}.oxid ";
$this->_oGroups->selectString($sSelect);
}
return $this->_oGroups;
} | [
"public",
"function",
"getGroups",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oGroups",
"==",
"null",
"&&",
"(",
"$",
"sOxid",
"=",
"$",
"this",
"->",
"getId",
"(",
")",
")",
")",
"{",
"// user groups",
"$",
"this",
"->",
"_oGroups",
"=",
"oxNe... | Payment groups getter. Returns groups list
@return oxList | [
"Payment",
"groups",
"getter",
".",
"Returns",
"groups",
"list"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Payment.php#L129-L144 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Payment.php | Payment.getPaymentValue | public function getPaymentValue($dBasePrice)
{
if ($this->oxpayments__oxaddsumtype->value == "%") {
$dRet = $dBasePrice * $this->oxpayments__oxaddsum->value / 100;
} else {
$oCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
$dRet = $this->oxpayments__oxaddsum->value * $oCur->rate;
}
if (($dRet * -1) > $dBasePrice) {
$dRet = $dBasePrice;
}
return $dRet;
} | php | public function getPaymentValue($dBasePrice)
{
if ($this->oxpayments__oxaddsumtype->value == "%") {
$dRet = $dBasePrice * $this->oxpayments__oxaddsum->value / 100;
} else {
$oCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
$dRet = $this->oxpayments__oxaddsum->value * $oCur->rate;
}
if (($dRet * -1) > $dBasePrice) {
$dRet = $dBasePrice;
}
return $dRet;
} | [
"public",
"function",
"getPaymentValue",
"(",
"$",
"dBasePrice",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"oxpayments__oxaddsumtype",
"->",
"value",
"==",
"\"%\"",
")",
"{",
"$",
"dRet",
"=",
"$",
"dBasePrice",
"*",
"$",
"this",
"->",
"oxpayments__oxaddsum",
... | Returns additional taxes to base article price.
@param double $dBasePrice Base article price
@return double | [
"Returns",
"additional",
"taxes",
"to",
"base",
"article",
"price",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Payment.php#L193-L207 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Payment.php | Payment.calculate | public function calculate($oBasket)
{
//getting basket price with applied discounts and vouchers
$dPrice = $this->getPaymentValue($this->getBaseBasketPriceForPaymentCostCalc($oBasket));
if (!$dPrice) {
$dPrice = 0;
}
// calculating total price
$oPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);
$oPrice->setNettoMode($this->_blPaymentVatOnTop);
$oPrice->setPrice($dPrice);
if ($dPrice > 0) {
$oPrice->setVat($oBasket->getAdditionalServicesVatPercent());
}
$this->_oPrice = $oPrice;
} | php | public function calculate($oBasket)
{
//getting basket price with applied discounts and vouchers
$dPrice = $this->getPaymentValue($this->getBaseBasketPriceForPaymentCostCalc($oBasket));
if (!$dPrice) {
$dPrice = 0;
}
// calculating total price
$oPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);
$oPrice->setNettoMode($this->_blPaymentVatOnTop);
$oPrice->setPrice($dPrice);
if ($dPrice > 0) {
$oPrice->setVat($oBasket->getAdditionalServicesVatPercent());
}
$this->_oPrice = $oPrice;
} | [
"public",
"function",
"calculate",
"(",
"$",
"oBasket",
")",
"{",
"//getting basket price with applied discounts and vouchers",
"$",
"dPrice",
"=",
"$",
"this",
"->",
"getPaymentValue",
"(",
"$",
"this",
"->",
"getBaseBasketPriceForPaymentCostCalc",
"(",
"$",
"oBasket",... | Returns price object for current payment applied on basket
@param \OxidEsales\Eshop\Application\Model\UserBasket $oBasket session basket | [
"Returns",
"price",
"object",
"for",
"current",
"payment",
"applied",
"on",
"basket"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Payment.php#L280-L298 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Payment.php | Payment.getFNettoPrice | public function getFNettoPrice()
{
if ($this->getPrice()) {
return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->getPrice()->getNettoPrice());
}
} | php | public function getFNettoPrice()
{
if ($this->getPrice()) {
return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->getPrice()->getNettoPrice());
}
} | [
"public",
"function",
"getFNettoPrice",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getPrice",
"(",
")",
")",
"{",
"return",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getLang",
"(",
")",
"->",
"formatCurrency",
"(",
"$... | Returns formatted netto price.
@deprecated in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
@return string | [
"Returns",
"formatted",
"netto",
"price",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Payment.php#L317-L322 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Payment.php | Payment.getFBruttoPrice | public function getFBruttoPrice()
{
if ($this->getPrice()) {
return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->getPrice()->getBruttoPrice());
}
} | php | public function getFBruttoPrice()
{
if ($this->getPrice()) {
return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->getPrice()->getBruttoPrice());
}
} | [
"public",
"function",
"getFBruttoPrice",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getPrice",
"(",
")",
")",
"{",
"return",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getLang",
"(",
")",
"->",
"formatCurrency",
"(",
"... | Returns formatted brutto price.
@deprecated in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
@return string | [
"Returns",
"formatted",
"brutto",
"price",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Payment.php#L331-L336 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Payment.php | Payment.getFPriceVat | public function getFPriceVat()
{
if ($this->getPrice()) {
return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->getPrice()->getVatValue());
}
} | php | public function getFPriceVat()
{
if ($this->getPrice()) {
return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->getPrice()->getVatValue());
}
} | [
"public",
"function",
"getFPriceVat",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getPrice",
"(",
")",
")",
"{",
"return",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getLang",
"(",
")",
"->",
"formatCurrency",
"(",
"$",... | Returns formatted vat value.
@deprecated in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
@return string | [
"Returns",
"formatted",
"vat",
"value",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Payment.php#L345-L350 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Payment.php | Payment.getCountries | public function getCountries()
{
if ($this->_aCountries === null) {
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$this->_aCountries = [];
$sSelect = 'select oxobjectid from oxobject2payment where oxpaymentid=' . $oDb->quote($this->getId()) . ' and oxtype = "oxcountry" ';
$rs = $oDb->getCol($sSelect);
$this->_aCountries = $rs;
}
return $this->_aCountries;
} | php | public function getCountries()
{
if ($this->_aCountries === null) {
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$this->_aCountries = [];
$sSelect = 'select oxobjectid from oxobject2payment where oxpaymentid=' . $oDb->quote($this->getId()) . ' and oxtype = "oxcountry" ';
$rs = $oDb->getCol($sSelect);
$this->_aCountries = $rs;
}
return $this->_aCountries;
} | [
"public",
"function",
"getCountries",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_aCountries",
"===",
"null",
")",
"{",
"$",
"oDb",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"DatabaseProvider",
"::",
"getDb",
"(",
")",
";",
"$",
... | Returns array of country Ids which are assigned to current payment
@return array | [
"Returns",
"array",
"of",
"country",
"Ids",
"which",
"are",
"assigned",
"to",
"current",
"payment"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Payment.php#L357-L368 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Payment.php | Payment.isValidPayment | public function isValidPayment($aDynValue, $sShopId, $oUser, $dBasketPrice, $sShipSetId)
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
if ($this->oxpayments__oxid->value == 'oxempty') {
// inactive or blOtherCountryOrder is off
if (!$this->oxpayments__oxactive->value || !$myConfig->getConfigParam("blOtherCountryOrder")) {
$this->_iPaymentError = -2;
return false;
}
if (count(
\OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\DeliverySetList::class)
->getDeliverySetList(
$oUser,
$oUser->getActiveCountry()
)
)
) {
$this->_iPaymentError = -3;
return false;
}
return true;
}
$mxValidationResult = \OxidEsales\Eshop\Core\Registry::getInputValidator()->validatePaymentInputData($this->oxpayments__oxid->value, $aDynValue);
if (is_integer($mxValidationResult)) {
$this->_iPaymentError = $mxValidationResult;
return false;
} elseif ($mxValidationResult === false) {
$this->_iPaymentError = 1;
return false;
}
$oCur = $myConfig->getActShopCurrencyObject();
$dBasketPrice = $dBasketPrice / $oCur->rate;
if ($sShipSetId) {
$aPaymentList = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\PaymentList::class)->getPaymentList($sShipSetId, $dBasketPrice, $oUser);
if (!array_key_exists($this->getId(), $aPaymentList)) {
$this->_iPaymentError = -3;
return false;
}
} else {
$this->_iPaymentError = -2;
return false;
}
return true;
} | php | public function isValidPayment($aDynValue, $sShopId, $oUser, $dBasketPrice, $sShipSetId)
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
if ($this->oxpayments__oxid->value == 'oxempty') {
// inactive or blOtherCountryOrder is off
if (!$this->oxpayments__oxactive->value || !$myConfig->getConfigParam("blOtherCountryOrder")) {
$this->_iPaymentError = -2;
return false;
}
if (count(
\OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\DeliverySetList::class)
->getDeliverySetList(
$oUser,
$oUser->getActiveCountry()
)
)
) {
$this->_iPaymentError = -3;
return false;
}
return true;
}
$mxValidationResult = \OxidEsales\Eshop\Core\Registry::getInputValidator()->validatePaymentInputData($this->oxpayments__oxid->value, $aDynValue);
if (is_integer($mxValidationResult)) {
$this->_iPaymentError = $mxValidationResult;
return false;
} elseif ($mxValidationResult === false) {
$this->_iPaymentError = 1;
return false;
}
$oCur = $myConfig->getActShopCurrencyObject();
$dBasketPrice = $dBasketPrice / $oCur->rate;
if ($sShipSetId) {
$aPaymentList = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\PaymentList::class)->getPaymentList($sShipSetId, $dBasketPrice, $oUser);
if (!array_key_exists($this->getId(), $aPaymentList)) {
$this->_iPaymentError = -3;
return false;
}
} else {
$this->_iPaymentError = -2;
return false;
}
return true;
} | [
"public",
"function",
"isValidPayment",
"(",
"$",
"aDynValue",
",",
"$",
"sShopId",
",",
"$",
"oUser",
",",
"$",
"dBasketPrice",
",",
"$",
"sShipSetId",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
":... | Function checks if loaded payment is valid to current basket
@param array $aDynValue dynamical value (in this case oxidcreditcard and oxiddebitnote are checked only)
@param string $sShopId id of current shop
@param \OxidEsales\Eshop\Application\Model\User $oUser the current user
@param double $dBasketPrice the current basket price (oBasket->dPrice)
@param string $sShipSetId the current ship set
@return bool true if payment is valid | [
"Function",
"checks",
"if",
"loaded",
"payment",
"is",
"valid",
"to",
"current",
"basket"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Payment.php#L403-L459 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.assign | public function assign($dbRecord)
{
parent::assign($dbRecord);
$oUtilsDate = \OxidEsales\Eshop\Core\Registry::getUtilsDate();
// convert date's to international format
$this->oxorder__oxorderdate = new \OxidEsales\Eshop\Core\Field($oUtilsDate->formatDBDate($this->oxorder__oxorderdate->value));
$this->oxorder__oxsenddate = new \OxidEsales\Eshop\Core\Field($oUtilsDate->formatDBDate($this->oxorder__oxsenddate->value));
} | php | public function assign($dbRecord)
{
parent::assign($dbRecord);
$oUtilsDate = \OxidEsales\Eshop\Core\Registry::getUtilsDate();
// convert date's to international format
$this->oxorder__oxorderdate = new \OxidEsales\Eshop\Core\Field($oUtilsDate->formatDBDate($this->oxorder__oxorderdate->value));
$this->oxorder__oxsenddate = new \OxidEsales\Eshop\Core\Field($oUtilsDate->formatDBDate($this->oxorder__oxsenddate->value));
} | [
"public",
"function",
"assign",
"(",
"$",
"dbRecord",
")",
"{",
"parent",
"::",
"assign",
"(",
"$",
"dbRecord",
")",
";",
"$",
"oUtilsDate",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getUtilsDate",
"(",
")",
";",
"/... | Assigns data, stored in DB to oxorder object
@param mixed $dbRecord DB record | [
"Assigns",
"data",
"stored",
"in",
"DB",
"to",
"oxorder",
"object"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L274-L283 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._getCountryTitle | protected function _getCountryTitle($sCountryId)
{
$sTitle = null;
if ($sCountryId && $sCountryId != '-1') {
$oCountry = oxNew(\OxidEsales\Eshop\Application\Model\Country::class);
$oCountry->loadInLang($this->getOrderLanguage(), $sCountryId);
$sTitle = $oCountry->oxcountry__oxtitle->value;
}
return $sTitle;
} | php | protected function _getCountryTitle($sCountryId)
{
$sTitle = null;
if ($sCountryId && $sCountryId != '-1') {
$oCountry = oxNew(\OxidEsales\Eshop\Application\Model\Country::class);
$oCountry->loadInLang($this->getOrderLanguage(), $sCountryId);
$sTitle = $oCountry->oxcountry__oxtitle->value;
}
return $sTitle;
} | [
"protected",
"function",
"_getCountryTitle",
"(",
"$",
"sCountryId",
")",
"{",
"$",
"sTitle",
"=",
"null",
";",
"if",
"(",
"$",
"sCountryId",
"&&",
"$",
"sCountryId",
"!=",
"'-1'",
")",
"{",
"$",
"oCountry",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
... | Gets country title by country id.
@param string $sCountryId country ID
@return string | [
"Gets",
"country",
"title",
"by",
"country",
"id",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L292-L302 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._getArticles | protected function _getArticles($blExcludeCanceled = false)
{
$sSelect = "SELECT `oxorderarticles`.* FROM `oxorderarticles`
WHERE `oxorderarticles`.`oxorderid` = '" . $this->getId() . "'" .
($blExcludeCanceled ? " AND `oxorderarticles`.`oxstorno` != 1 " : " ") . "
ORDER BY `oxorderarticles`.`oxartid`, `oxorderarticles`.`oxselvariant`, `oxorderarticles`.`oxpersparam` ";
// order articles
$oArticles = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
$oArticles->init('oxorderarticle');
$oArticles->selectString($sSelect);
return $oArticles;
} | php | protected function _getArticles($blExcludeCanceled = false)
{
$sSelect = "SELECT `oxorderarticles`.* FROM `oxorderarticles`
WHERE `oxorderarticles`.`oxorderid` = '" . $this->getId() . "'" .
($blExcludeCanceled ? " AND `oxorderarticles`.`oxstorno` != 1 " : " ") . "
ORDER BY `oxorderarticles`.`oxartid`, `oxorderarticles`.`oxselvariant`, `oxorderarticles`.`oxpersparam` ";
// order articles
$oArticles = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
$oArticles->init('oxorderarticle');
$oArticles->selectString($sSelect);
return $oArticles;
} | [
"protected",
"function",
"_getArticles",
"(",
"$",
"blExcludeCanceled",
"=",
"false",
")",
"{",
"$",
"sSelect",
"=",
"\"SELECT `oxorderarticles`.* FROM `oxorderarticles`\n WHERE `oxorderarticles`.`oxorderid` = '\"",
".",
"$",
"this",
"->",
"getId",
"(",
... | returned assigned orderarticles from order
@param bool $blExcludeCanceled excludes canceled items from list
@return \oxlist | [
"returned",
"assigned",
"orderarticles",
"from",
"order"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L311-L324 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.getOrderArticles | public function getOrderArticles($blExcludeCanceled = false)
{
// checking set value
if ($blExcludeCanceled) {
return $this->_getArticles(true);
} elseif ($this->_oArticles === null) {
$this->_oArticles = $this->_getArticles();
}
return $this->_oArticles;
} | php | public function getOrderArticles($blExcludeCanceled = false)
{
// checking set value
if ($blExcludeCanceled) {
return $this->_getArticles(true);
} elseif ($this->_oArticles === null) {
$this->_oArticles = $this->_getArticles();
}
return $this->_oArticles;
} | [
"public",
"function",
"getOrderArticles",
"(",
"$",
"blExcludeCanceled",
"=",
"false",
")",
"{",
"// checking set value",
"if",
"(",
"$",
"blExcludeCanceled",
")",
"{",
"return",
"$",
"this",
"->",
"_getArticles",
"(",
"true",
")",
";",
"}",
"elseif",
"(",
"... | Assigns data, stored in oxorderarticles to oxorder object .
@param bool $blExcludeCanceled excludes canceled items from list
@return \oxlist | [
"Assigns",
"data",
"stored",
"in",
"oxorderarticles",
"to",
"oxorder",
"object",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L333-L343 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.getOrderDeliveryPrice | public function getOrderDeliveryPrice()
{
if ($this->_oDelPrice != null) {
return $this->_oDelPrice;
}
$this->_oDelPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);
$this->_oDelPrice->setBruttoPriceMode();
$this->_oDelPrice->setPrice($this->oxorder__oxdelcost->value, $this->oxorder__oxdelvat->value);
return $this->_oDelPrice;
} | php | public function getOrderDeliveryPrice()
{
if ($this->_oDelPrice != null) {
return $this->_oDelPrice;
}
$this->_oDelPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);
$this->_oDelPrice->setBruttoPriceMode();
$this->_oDelPrice->setPrice($this->oxorder__oxdelcost->value, $this->oxorder__oxdelvat->value);
return $this->_oDelPrice;
} | [
"public",
"function",
"getOrderDeliveryPrice",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oDelPrice",
"!=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"_oDelPrice",
";",
"}",
"$",
"this",
"->",
"_oDelPrice",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",... | Returns order delivery expenses price object
@return ShopPrice | [
"Returns",
"order",
"delivery",
"expenses",
"price",
"object"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L360-L371 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.getOrderPaymentPrice | public function getOrderPaymentPrice()
{
if ($this->_oPaymentPrice != null) {
return $this->_oPaymentPrice;
}
$this->_oPaymentPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);
$this->_oPaymentPrice->setBruttoPriceMode();
$this->_oPaymentPrice->setPrice($this->oxorder__oxpaycost->value, $this->oxorder__oxpayvat->value);
return $this->_oPaymentPrice;
} | php | public function getOrderPaymentPrice()
{
if ($this->_oPaymentPrice != null) {
return $this->_oPaymentPrice;
}
$this->_oPaymentPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);
$this->_oPaymentPrice->setBruttoPriceMode();
$this->_oPaymentPrice->setPrice($this->oxorder__oxpaycost->value, $this->oxorder__oxpayvat->value);
return $this->_oPaymentPrice;
} | [
"public",
"function",
"getOrderPaymentPrice",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oPaymentPrice",
"!=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"_oPaymentPrice",
";",
"}",
"$",
"this",
"->",
"_oPaymentPrice",
"=",
"oxNew",
"(",
"\\",
"O... | Returns order payment expenses price object
@return ShopPrice | [
"Returns",
"order",
"payment",
"expenses",
"price",
"object"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L415-L426 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._setOrderStatus | protected function _setOrderStatus($sStatus)
{
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$sQ = 'update oxorder set oxtransstatus=' . $oDb->quote($sStatus) . ' where oxid=' . $oDb->quote($this->getId());
$oDb->execute($sQ);
//updating order object
$this->oxorder__oxtransstatus = new \OxidEsales\Eshop\Core\Field($sStatus, \OxidEsales\Eshop\Core\Field::T_RAW);
} | php | protected function _setOrderStatus($sStatus)
{
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$sQ = 'update oxorder set oxtransstatus=' . $oDb->quote($sStatus) . ' where oxid=' . $oDb->quote($this->getId());
$oDb->execute($sQ);
//updating order object
$this->oxorder__oxtransstatus = new \OxidEsales\Eshop\Core\Field($sStatus, \OxidEsales\Eshop\Core\Field::T_RAW);
} | [
"protected",
"function",
"_setOrderStatus",
"(",
"$",
"sStatus",
")",
"{",
"$",
"oDb",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"DatabaseProvider",
"::",
"getDb",
"(",
")",
";",
"$",
"sQ",
"=",
"'update oxorder set oxtransstatus='",
".",
"... | Updates order transaction status. Faster than saving whole object
@param string $sStatus order transaction status | [
"Updates",
"order",
"transaction",
"status",
".",
"Faster",
"than",
"saving",
"whole",
"object"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L575-L583 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._resetVats | protected function _resetVats()
{
$this->oxorder__oxartvat1 = new \OxidEsales\Eshop\Core\Field(null);
$this->oxorder__oxartvatprice1 = new \OxidEsales\Eshop\Core\Field(null);
$this->oxorder__oxartvat2 = new \OxidEsales\Eshop\Core\Field(null);
$this->oxorder__oxartvatprice2 = new \OxidEsales\Eshop\Core\Field(null);
} | php | protected function _resetVats()
{
$this->oxorder__oxartvat1 = new \OxidEsales\Eshop\Core\Field(null);
$this->oxorder__oxartvatprice1 = new \OxidEsales\Eshop\Core\Field(null);
$this->oxorder__oxartvat2 = new \OxidEsales\Eshop\Core\Field(null);
$this->oxorder__oxartvatprice2 = new \OxidEsales\Eshop\Core\Field(null);
} | [
"protected",
"function",
"_resetVats",
"(",
")",
"{",
"$",
"this",
"->",
"oxorder__oxartvat1",
"=",
"new",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Field",
"(",
"null",
")",
";",
"$",
"this",
"->",
"oxorder__oxartvatprice1",
"=",
"new",
"\\"... | Reset Vat info | [
"Reset",
"Vat",
"info"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L606-L612 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.getOrderLanguage | public function getOrderLanguage()
{
if ($this->_iOrderLang === null) {
if (isset($this->oxorder__oxlang->value)) {
$this->_iOrderLang = \OxidEsales\Eshop\Core\Registry::getLang()->validateLanguage($this->oxorder__oxlang->value);
} else {
$this->_iOrderLang = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
}
}
return $this->_iOrderLang;
} | php | public function getOrderLanguage()
{
if ($this->_iOrderLang === null) {
if (isset($this->oxorder__oxlang->value)) {
$this->_iOrderLang = \OxidEsales\Eshop\Core\Registry::getLang()->validateLanguage($this->oxorder__oxlang->value);
} else {
$this->_iOrderLang = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
}
}
return $this->_iOrderLang;
} | [
"public",
"function",
"getOrderLanguage",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_iOrderLang",
"===",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"oxorder__oxlang",
"->",
"value",
")",
")",
"{",
"$",
"this",
"->",
"_iOrderLang"... | Returns language id of current order object. If order already has
language defined - checks if this language is defined in shops config
@return int | [
"Returns",
"language",
"id",
"of",
"current",
"order",
"object",
".",
"If",
"order",
"already",
"has",
"language",
"defined",
"-",
"checks",
"if",
"this",
"language",
"is",
"defined",
"in",
"shops",
"config"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L709-L720 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._setUser | protected function _setUser($oUser)
{
$this->oxorder__oxuserid = new \OxidEsales\Eshop\Core\Field($oUser->getId());
// bill address
$this->oxorder__oxbillcompany = clone $oUser->oxuser__oxcompany;
$this->oxorder__oxbillemail = clone $oUser->oxuser__oxusername;
$this->oxorder__oxbillfname = clone $oUser->oxuser__oxfname;
$this->oxorder__oxbilllname = clone $oUser->oxuser__oxlname;
$this->oxorder__oxbillstreet = clone $oUser->oxuser__oxstreet;
$this->oxorder__oxbillstreetnr = clone $oUser->oxuser__oxstreetnr;
$this->oxorder__oxbilladdinfo = clone $oUser->oxuser__oxaddinfo;
$this->oxorder__oxbillustid = clone $oUser->oxuser__oxustid;
$this->oxorder__oxbillcity = clone $oUser->oxuser__oxcity;
$this->oxorder__oxbillcountryid = clone $oUser->oxuser__oxcountryid;
$this->oxorder__oxbillstateid = clone $oUser->oxuser__oxstateid;
$this->oxorder__oxbillzip = clone $oUser->oxuser__oxzip;
$this->oxorder__oxbillfon = clone $oUser->oxuser__oxfon;
$this->oxorder__oxbillfax = clone $oUser->oxuser__oxfax;
$this->oxorder__oxbillsal = clone $oUser->oxuser__oxsal;
// delivery address
if (($oDelAdress = $this->getDelAddressInfo())) {
// set delivery address
$this->oxorder__oxdelcompany = clone $oDelAdress->oxaddress__oxcompany;
$this->oxorder__oxdelfname = clone $oDelAdress->oxaddress__oxfname;
$this->oxorder__oxdellname = clone $oDelAdress->oxaddress__oxlname;
$this->oxorder__oxdelstreet = clone $oDelAdress->oxaddress__oxstreet;
$this->oxorder__oxdelstreetnr = clone $oDelAdress->oxaddress__oxstreetnr;
$this->oxorder__oxdeladdinfo = clone $oDelAdress->oxaddress__oxaddinfo;
$this->oxorder__oxdelcity = clone $oDelAdress->oxaddress__oxcity;
$this->oxorder__oxdelcountryid = clone $oDelAdress->oxaddress__oxcountryid;
$this->oxorder__oxdelstateid = clone $oDelAdress->oxaddress__oxstateid;
$this->oxorder__oxdelzip = clone $oDelAdress->oxaddress__oxzip;
$this->oxorder__oxdelfon = clone $oDelAdress->oxaddress__oxfon;
$this->oxorder__oxdelfax = clone $oDelAdress->oxaddress__oxfax;
$this->oxorder__oxdelsal = clone $oDelAdress->oxaddress__oxsal;
}
} | php | protected function _setUser($oUser)
{
$this->oxorder__oxuserid = new \OxidEsales\Eshop\Core\Field($oUser->getId());
// bill address
$this->oxorder__oxbillcompany = clone $oUser->oxuser__oxcompany;
$this->oxorder__oxbillemail = clone $oUser->oxuser__oxusername;
$this->oxorder__oxbillfname = clone $oUser->oxuser__oxfname;
$this->oxorder__oxbilllname = clone $oUser->oxuser__oxlname;
$this->oxorder__oxbillstreet = clone $oUser->oxuser__oxstreet;
$this->oxorder__oxbillstreetnr = clone $oUser->oxuser__oxstreetnr;
$this->oxorder__oxbilladdinfo = clone $oUser->oxuser__oxaddinfo;
$this->oxorder__oxbillustid = clone $oUser->oxuser__oxustid;
$this->oxorder__oxbillcity = clone $oUser->oxuser__oxcity;
$this->oxorder__oxbillcountryid = clone $oUser->oxuser__oxcountryid;
$this->oxorder__oxbillstateid = clone $oUser->oxuser__oxstateid;
$this->oxorder__oxbillzip = clone $oUser->oxuser__oxzip;
$this->oxorder__oxbillfon = clone $oUser->oxuser__oxfon;
$this->oxorder__oxbillfax = clone $oUser->oxuser__oxfax;
$this->oxorder__oxbillsal = clone $oUser->oxuser__oxsal;
// delivery address
if (($oDelAdress = $this->getDelAddressInfo())) {
// set delivery address
$this->oxorder__oxdelcompany = clone $oDelAdress->oxaddress__oxcompany;
$this->oxorder__oxdelfname = clone $oDelAdress->oxaddress__oxfname;
$this->oxorder__oxdellname = clone $oDelAdress->oxaddress__oxlname;
$this->oxorder__oxdelstreet = clone $oDelAdress->oxaddress__oxstreet;
$this->oxorder__oxdelstreetnr = clone $oDelAdress->oxaddress__oxstreetnr;
$this->oxorder__oxdeladdinfo = clone $oDelAdress->oxaddress__oxaddinfo;
$this->oxorder__oxdelcity = clone $oDelAdress->oxaddress__oxcity;
$this->oxorder__oxdelcountryid = clone $oDelAdress->oxaddress__oxcountryid;
$this->oxorder__oxdelstateid = clone $oDelAdress->oxaddress__oxstateid;
$this->oxorder__oxdelzip = clone $oDelAdress->oxaddress__oxzip;
$this->oxorder__oxdelfon = clone $oDelAdress->oxaddress__oxfon;
$this->oxorder__oxdelfax = clone $oDelAdress->oxaddress__oxfax;
$this->oxorder__oxdelsal = clone $oDelAdress->oxaddress__oxsal;
}
} | [
"protected",
"function",
"_setUser",
"(",
"$",
"oUser",
")",
"{",
"$",
"this",
"->",
"oxorder__oxuserid",
"=",
"new",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Field",
"(",
"$",
"oUser",
"->",
"getId",
"(",
")",
")",
";",
"// bill address",... | Assigns to new oxorder object customer delivery and shipping info
@param object $oUser user object | [
"Assigns",
"to",
"new",
"oxorder",
"object",
"customer",
"delivery",
"and",
"shipping",
"info"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L727-L767 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._setWrapping | protected function _setWrapping(\OxidEsales\Eshop\Application\Model\Basket $oBasket)
{
// wrapping price
if (($oWrappingCost = $oBasket->getCosts('oxwrapping'))) {
$this->oxorder__oxwrapcost = new \OxidEsales\Eshop\Core\Field($oWrappingCost->getBruttoPrice(), \OxidEsales\Eshop\Core\Field::T_RAW);
// wrapping VAT will be always calculated (#3757)
$this->oxorder__oxwrapvat = new \OxidEsales\Eshop\Core\Field($oWrappingCost->getVAT(), \OxidEsales\Eshop\Core\Field::T_RAW);
}
if (($oGiftCardCost = $oBasket->getCosts('oxgiftcard'))) {
$this->oxorder__oxgiftcardcost = new \OxidEsales\Eshop\Core\Field($oGiftCardCost->getBruttoPrice(), \OxidEsales\Eshop\Core\Field::T_RAW);
$this->oxorder__oxgiftcardvat = new \OxidEsales\Eshop\Core\Field($oGiftCardCost->getVAT(), \OxidEsales\Eshop\Core\Field::T_RAW);
}
// greetings card
$this->oxorder__oxcardid = new \OxidEsales\Eshop\Core\Field($oBasket->getCardId(), \OxidEsales\Eshop\Core\Field::T_RAW);
// card text will be stored in database
$this->oxorder__oxcardtext = new \OxidEsales\Eshop\Core\Field($oBasket->getCardMessage(), \OxidEsales\Eshop\Core\Field::T_RAW);
} | php | protected function _setWrapping(\OxidEsales\Eshop\Application\Model\Basket $oBasket)
{
// wrapping price
if (($oWrappingCost = $oBasket->getCosts('oxwrapping'))) {
$this->oxorder__oxwrapcost = new \OxidEsales\Eshop\Core\Field($oWrappingCost->getBruttoPrice(), \OxidEsales\Eshop\Core\Field::T_RAW);
// wrapping VAT will be always calculated (#3757)
$this->oxorder__oxwrapvat = new \OxidEsales\Eshop\Core\Field($oWrappingCost->getVAT(), \OxidEsales\Eshop\Core\Field::T_RAW);
}
if (($oGiftCardCost = $oBasket->getCosts('oxgiftcard'))) {
$this->oxorder__oxgiftcardcost = new \OxidEsales\Eshop\Core\Field($oGiftCardCost->getBruttoPrice(), \OxidEsales\Eshop\Core\Field::T_RAW);
$this->oxorder__oxgiftcardvat = new \OxidEsales\Eshop\Core\Field($oGiftCardCost->getVAT(), \OxidEsales\Eshop\Core\Field::T_RAW);
}
// greetings card
$this->oxorder__oxcardid = new \OxidEsales\Eshop\Core\Field($oBasket->getCardId(), \OxidEsales\Eshop\Core\Field::T_RAW);
// card text will be stored in database
$this->oxorder__oxcardtext = new \OxidEsales\Eshop\Core\Field($oBasket->getCardMessage(), \OxidEsales\Eshop\Core\Field::T_RAW);
} | [
"protected",
"function",
"_setWrapping",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Application",
"\\",
"Model",
"\\",
"Basket",
"$",
"oBasket",
")",
"{",
"// wrapping price",
"if",
"(",
"(",
"$",
"oWrappingCost",
"=",
"$",
"oBasket",
"->",
"getCosts",
"... | Assigns wrapping VAT and card price + card message info
@param \OxidEsales\Eshop\Application\Model\Basket $oBasket basket object | [
"Assigns",
"wrapping",
"VAT",
"and",
"card",
"price",
"+",
"card",
"message",
"info"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L774-L793 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._setPayment | protected function _setPayment($sPaymentid)
{
$oPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
if (!$oPayment->load($sPaymentid)) {
return null;
}
$aDynvalue = $this->getDynamicValues();
$oPayment->setDynValues(\OxidEsales\Eshop\Core\Registry::getUtils()->assignValuesFromText($oPayment->oxpayments__oxvaldesc->value));
// collecting dynamic values
$aDynVal = [];
if (is_array($aPaymentDynValues = $oPayment->getDynValues())) {
foreach ($aPaymentDynValues as $key => $oVal) {
if (isset($aDynvalue[$oVal->name])) {
$oVal->value = $aDynvalue[$oVal->name];
}
//$oPayment->setDynValue($key, $oVal);
$aPaymentDynValues[$key] = $oVal;
$aDynVal[$oVal->name] = $oVal->value;
}
}
// Store this payment information, we might allow users later to
// reactivate already give payment information
$oUserpayment = oxNew(\OxidEsales\Eshop\Application\Model\UserPayment::class);
$oUserpayment->oxuserpayments__oxuserid = clone $this->oxorder__oxuserid;
$oUserpayment->oxuserpayments__oxpaymentsid = new \OxidEsales\Eshop\Core\Field($sPaymentid, \OxidEsales\Eshop\Core\Field::T_RAW);
$oUserpayment->oxuserpayments__oxvalue = new \OxidEsales\Eshop\Core\Field(\OxidEsales\Eshop\Core\Registry::getUtils()->assignValuesToText($aDynVal), \OxidEsales\Eshop\Core\Field::T_RAW);
$oUserpayment->oxpayments__oxdesc = clone $oPayment->oxpayments__oxdesc;
$oUserpayment->oxpayments__oxlongdesc = clone $oPayment->oxpayments__oxlongdesc;
$oUserpayment->setDynValues($aPaymentDynValues);
$oUserpayment->save();
// storing payment information to order
$this->oxorder__oxpaymentid = new \OxidEsales\Eshop\Core\Field($oUserpayment->getId(), \OxidEsales\Eshop\Core\Field::T_RAW);
$this->oxorder__oxpaymenttype = clone $oUserpayment->oxuserpayments__oxpaymentsid;
// returning user payment object which will be used later in code ...
return $oUserpayment;
} | php | protected function _setPayment($sPaymentid)
{
$oPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
if (!$oPayment->load($sPaymentid)) {
return null;
}
$aDynvalue = $this->getDynamicValues();
$oPayment->setDynValues(\OxidEsales\Eshop\Core\Registry::getUtils()->assignValuesFromText($oPayment->oxpayments__oxvaldesc->value));
// collecting dynamic values
$aDynVal = [];
if (is_array($aPaymentDynValues = $oPayment->getDynValues())) {
foreach ($aPaymentDynValues as $key => $oVal) {
if (isset($aDynvalue[$oVal->name])) {
$oVal->value = $aDynvalue[$oVal->name];
}
//$oPayment->setDynValue($key, $oVal);
$aPaymentDynValues[$key] = $oVal;
$aDynVal[$oVal->name] = $oVal->value;
}
}
// Store this payment information, we might allow users later to
// reactivate already give payment information
$oUserpayment = oxNew(\OxidEsales\Eshop\Application\Model\UserPayment::class);
$oUserpayment->oxuserpayments__oxuserid = clone $this->oxorder__oxuserid;
$oUserpayment->oxuserpayments__oxpaymentsid = new \OxidEsales\Eshop\Core\Field($sPaymentid, \OxidEsales\Eshop\Core\Field::T_RAW);
$oUserpayment->oxuserpayments__oxvalue = new \OxidEsales\Eshop\Core\Field(\OxidEsales\Eshop\Core\Registry::getUtils()->assignValuesToText($aDynVal), \OxidEsales\Eshop\Core\Field::T_RAW);
$oUserpayment->oxpayments__oxdesc = clone $oPayment->oxpayments__oxdesc;
$oUserpayment->oxpayments__oxlongdesc = clone $oPayment->oxpayments__oxlongdesc;
$oUserpayment->setDynValues($aPaymentDynValues);
$oUserpayment->save();
// storing payment information to order
$this->oxorder__oxpaymentid = new \OxidEsales\Eshop\Core\Field($oUserpayment->getId(), \OxidEsales\Eshop\Core\Field::T_RAW);
$this->oxorder__oxpaymenttype = clone $oUserpayment->oxuserpayments__oxpaymentsid;
// returning user payment object which will be used later in code ...
return $oUserpayment;
} | [
"protected",
"function",
"_setPayment",
"(",
"$",
"sPaymentid",
")",
"{",
"$",
"oPayment",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Application",
"\\",
"Model",
"\\",
"Payment",
"::",
"class",
")",
";",
"if",
"(",
"!",
"$",
"oPayment"... | Creates and returns user payment.
@param string $sPaymentid used payment id
@return \OxidEsales\Eshop\Application\Model\UserPayment | [
"Creates",
"and",
"returns",
"user",
"payment",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L950-L995 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._setFolder | protected function _setFolder()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$this->oxorder__oxfolder = new \OxidEsales\Eshop\Core\Field(key($myConfig->getShopConfVar('aOrderfolder', $myConfig->getShopId())), \OxidEsales\Eshop\Core\Field::T_RAW);
} | php | protected function _setFolder()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$this->oxorder__oxfolder = new \OxidEsales\Eshop\Core\Field(key($myConfig->getShopConfVar('aOrderfolder', $myConfig->getShopId())), \OxidEsales\Eshop\Core\Field::T_RAW);
} | [
"protected",
"function",
"_setFolder",
"(",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"$",
"this",
"->",
"oxorder__oxfolder",
"=",
"new",
"\\",
"OxidEsales",
"\\",
... | Assigns oxfolder as new | [
"Assigns",
"oxfolder",
"as",
"new"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1000-L1004 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._updateNoticeList | protected function _updateNoticeList($aArticleList, $oUser)
{
/*
* #6141
* If there is no noticelist, don't create an empty one.
* Because loading the list via $user->getBasket('noticelist') will create it if there isn't one, but it will
* only exists in the session for now. So it is possible to check if it has an oxid. If yes then we had a list.
* If no then it was just created and will cause a new row in oxuserbaskets without content in oxuserbasketitems.
* Also it will prevent creating a row for guests.
*/
if ($oUser->getBasket('noticelist')->oxuserbaskets__oxid->value === null) {
return;
}
// loading users notice list ..
if ($oUserBasket = $oUser->getBasket('noticelist')) {
// only if wishlist is enabled
foreach ($aArticleList as $oContent) {
$sProdId = $oContent->getProductId();
// updating users notice list
$oUserBasketItem = $oUserBasket->getItem($sProdId, $oContent->getSelList(), $oContent->getPersParams());
$dNewAmount = $oUserBasketItem->oxuserbasketitems__oxamount->value - $oContent->getAmount();
if ($dNewAmount < 0) {
$dNewAmount = 0;
}
$oUserBasket->addItemToBasket($sProdId, $dNewAmount, $oContent->getSelList(), true, $oContent->getPersParams());
}
}
} | php | protected function _updateNoticeList($aArticleList, $oUser)
{
/*
* #6141
* If there is no noticelist, don't create an empty one.
* Because loading the list via $user->getBasket('noticelist') will create it if there isn't one, but it will
* only exists in the session for now. So it is possible to check if it has an oxid. If yes then we had a list.
* If no then it was just created and will cause a new row in oxuserbaskets without content in oxuserbasketitems.
* Also it will prevent creating a row for guests.
*/
if ($oUser->getBasket('noticelist')->oxuserbaskets__oxid->value === null) {
return;
}
// loading users notice list ..
if ($oUserBasket = $oUser->getBasket('noticelist')) {
// only if wishlist is enabled
foreach ($aArticleList as $oContent) {
$sProdId = $oContent->getProductId();
// updating users notice list
$oUserBasketItem = $oUserBasket->getItem($sProdId, $oContent->getSelList(), $oContent->getPersParams());
$dNewAmount = $oUserBasketItem->oxuserbasketitems__oxamount->value - $oContent->getAmount();
if ($dNewAmount < 0) {
$dNewAmount = 0;
}
$oUserBasket->addItemToBasket($sProdId, $dNewAmount, $oContent->getSelList(), true, $oContent->getPersParams());
}
}
} | [
"protected",
"function",
"_updateNoticeList",
"(",
"$",
"aArticleList",
",",
"$",
"oUser",
")",
"{",
"/*\n * #6141\n * If there is no noticelist, don't create an empty one.\n * Because loading the list via $user->getBasket('noticelist') will create it if there isn't one... | After order is finished this method cleans up users notice list, by
removing bought items from users notice list
@param array $aArticleList array of basket products
@param \OxidEsales\Eshop\Application\Model\User $oUser basket user object
@return null | [
"After",
"order",
"is",
"finished",
"this",
"method",
"cleans",
"up",
"users",
"notice",
"list",
"by",
"removing",
"bought",
"items",
"from",
"users",
"notice",
"list"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1052-L1081 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._updateOrderDate | protected function _updateOrderDate()
{
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$sDate = date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime());
$sQ = 'update oxorder set oxorderdate=' . $oDb->quote($sDate) . ' where oxid=' . $oDb->quote($this->getId());
$this->oxorder__oxorderdate = new \OxidEsales\Eshop\Core\Field($sDate, \OxidEsales\Eshop\Core\Field::T_RAW);
$oDb->execute($sQ);
} | php | protected function _updateOrderDate()
{
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$sDate = date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime());
$sQ = 'update oxorder set oxorderdate=' . $oDb->quote($sDate) . ' where oxid=' . $oDb->quote($this->getId());
$this->oxorder__oxorderdate = new \OxidEsales\Eshop\Core\Field($sDate, \OxidEsales\Eshop\Core\Field::T_RAW);
$oDb->execute($sQ);
} | [
"protected",
"function",
"_updateOrderDate",
"(",
")",
"{",
"$",
"oDb",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"DatabaseProvider",
"::",
"getDb",
"(",
")",
";",
"$",
"sDate",
"=",
"date",
"(",
"'Y-m-d H:i:s'",
",",
"\\",
"OxidEsales",
... | Updates order date to current date | [
"Updates",
"order",
"date",
"to",
"current",
"date"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1086-L1093 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.getDelAddressInfo | public function getDelAddressInfo()
{
$oDelAdress = null;
if (!($soxAddressId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('deladrid'))) {
$soxAddressId = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('deladrid');
}
if ($soxAddressId) {
$oDelAdress = oxNew(\OxidEsales\Eshop\Application\Model\Address::class);
$oDelAdress->load($soxAddressId);
//get delivery country name from delivery country id
if ($oDelAdress->oxaddress__oxcountryid->value && $oDelAdress->oxaddress__oxcountryid->value != -1) {
$oCountry = oxNew(\OxidEsales\Eshop\Application\Model\Country::class);
$oCountry->load($oDelAdress->oxaddress__oxcountryid->value);
$oDelAdress->oxaddress__oxcountry = clone $oCountry->oxcountry__oxtitle;
}
}
return $oDelAdress;
} | php | public function getDelAddressInfo()
{
$oDelAdress = null;
if (!($soxAddressId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('deladrid'))) {
$soxAddressId = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('deladrid');
}
if ($soxAddressId) {
$oDelAdress = oxNew(\OxidEsales\Eshop\Application\Model\Address::class);
$oDelAdress->load($soxAddressId);
//get delivery country name from delivery country id
if ($oDelAdress->oxaddress__oxcountryid->value && $oDelAdress->oxaddress__oxcountryid->value != -1) {
$oCountry = oxNew(\OxidEsales\Eshop\Application\Model\Country::class);
$oCountry->load($oDelAdress->oxaddress__oxcountryid->value);
$oDelAdress->oxaddress__oxcountry = clone $oCountry->oxcountry__oxtitle;
}
}
return $oDelAdress;
} | [
"public",
"function",
"getDelAddressInfo",
"(",
")",
"{",
"$",
"oDelAdress",
"=",
"null",
";",
"if",
"(",
"!",
"(",
"$",
"soxAddressId",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getReques... | Loads and returns delivery address object or null
if deladrid is not configured, or object was not loaded
@return \OxidEsales\Eshop\Application\Model\Address|null | [
"Loads",
"and",
"returns",
"delivery",
"address",
"object",
"or",
"null",
"if",
"deladrid",
"is",
"not",
"configured",
"or",
"object",
"was",
"not",
"loaded"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1143-L1162 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.validateStock | public function validateStock($oBasket)
{
foreach ($oBasket->getContents() as $key => $oContent) {
try {
$oProd = $oContent->getArticle(true, null, true);
} catch (\OxidEsales\Eshop\Core\Exception\NoArticleException $oEx) {
$oBasket->removeItem($key);
throw $oEx;
} catch (\OxidEsales\Eshop\Core\Exception\ArticleInputException $oEx) {
$oBasket->removeItem($key);
throw $oEx;
}
// check if its still available
$dArtStockAmount = $oBasket->getArtStockInBasket($oProd->getId(), $key);
$iOnStock = $oProd->checkForStock($oContent->getAmount(), $dArtStockAmount);
if ($iOnStock !== true) {
/** @var \OxidEsales\Eshop\Core\Exception\OutOfStockException $oEx */
$oEx = oxNew(\OxidEsales\Eshop\Core\Exception\OutOfStockException::class);
$oEx->setMessage('ERROR_MESSAGE_OUTOFSTOCK_OUTOFSTOCK');
$oEx->setArticleNr($oProd->oxarticles__oxartnum->value);
$oEx->setProductId($oProd->getId());
$oEx->setBasketIndex($key);
if (!is_numeric($iOnStock)) {
$iOnStock = 0;
}
$oEx->setRemainingAmount($iOnStock);
throw $oEx;
}
}
} | php | public function validateStock($oBasket)
{
foreach ($oBasket->getContents() as $key => $oContent) {
try {
$oProd = $oContent->getArticle(true, null, true);
} catch (\OxidEsales\Eshop\Core\Exception\NoArticleException $oEx) {
$oBasket->removeItem($key);
throw $oEx;
} catch (\OxidEsales\Eshop\Core\Exception\ArticleInputException $oEx) {
$oBasket->removeItem($key);
throw $oEx;
}
// check if its still available
$dArtStockAmount = $oBasket->getArtStockInBasket($oProd->getId(), $key);
$iOnStock = $oProd->checkForStock($oContent->getAmount(), $dArtStockAmount);
if ($iOnStock !== true) {
/** @var \OxidEsales\Eshop\Core\Exception\OutOfStockException $oEx */
$oEx = oxNew(\OxidEsales\Eshop\Core\Exception\OutOfStockException::class);
$oEx->setMessage('ERROR_MESSAGE_OUTOFSTOCK_OUTOFSTOCK');
$oEx->setArticleNr($oProd->oxarticles__oxartnum->value);
$oEx->setProductId($oProd->getId());
$oEx->setBasketIndex($key);
if (!is_numeric($iOnStock)) {
$iOnStock = 0;
}
$oEx->setRemainingAmount($iOnStock);
throw $oEx;
}
}
} | [
"public",
"function",
"validateStock",
"(",
"$",
"oBasket",
")",
"{",
"foreach",
"(",
"$",
"oBasket",
"->",
"getContents",
"(",
")",
"as",
"$",
"key",
"=>",
"$",
"oContent",
")",
"{",
"try",
"{",
"$",
"oProd",
"=",
"$",
"oContent",
"->",
"getArticle",
... | Function which checks if article stock is valid.
If not displays error and returns false.
@param object $oBasket basket object
@throws \OxidEsales\Eshop\Core\Exception\NoArticleException
@throws \OxidEsales\Eshop\Core\Exception\ArticleInputException
@throws \OxidEsales\Eshop\Core\Exception\OutOfStockException | [
"Function",
"which",
"checks",
"if",
"article",
"stock",
"is",
"valid",
".",
"If",
"not",
"displays",
"error",
"and",
"returns",
"false",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1174-L1205 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._insert | protected function _insert()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$oUtilsDate = \OxidEsales\Eshop\Core\Registry::getUtilsDate();
//V #M525 orderdate must be the same as it was
if (!$this->oxorder__oxorderdate || !$this->oxorder__oxorderdate->value) {
$this->oxorder__oxorderdate = new \OxidEsales\Eshop\Core\Field(date('Y-m-d H:i:s', $oUtilsDate->getTime()), \OxidEsales\Eshop\Core\Field::T_RAW);
} else {
$this->oxorder__oxorderdate = new \OxidEsales\Eshop\Core\Field(
$oUtilsDate->formatDBDate(
$this->oxorder__oxorderdate ? $this->oxorder__oxorderdate->value : null,
true
)
);
}
$this->oxorder__oxshopid = new \OxidEsales\Eshop\Core\Field($myConfig->getShopId(), \OxidEsales\Eshop\Core\Field::T_RAW);
$this->oxorder__oxsenddate = new \OxidEsales\Eshop\Core\Field(
$oUtilsDate->formatDBDate(
$this->oxorder__oxsenddate ? $this->oxorder__oxsenddate->value : null,
true
)
);
$blInsert = parent::_insert();
return $blInsert;
} | php | protected function _insert()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$oUtilsDate = \OxidEsales\Eshop\Core\Registry::getUtilsDate();
//V #M525 orderdate must be the same as it was
if (!$this->oxorder__oxorderdate || !$this->oxorder__oxorderdate->value) {
$this->oxorder__oxorderdate = new \OxidEsales\Eshop\Core\Field(date('Y-m-d H:i:s', $oUtilsDate->getTime()), \OxidEsales\Eshop\Core\Field::T_RAW);
} else {
$this->oxorder__oxorderdate = new \OxidEsales\Eshop\Core\Field(
$oUtilsDate->formatDBDate(
$this->oxorder__oxorderdate ? $this->oxorder__oxorderdate->value : null,
true
)
);
}
$this->oxorder__oxshopid = new \OxidEsales\Eshop\Core\Field($myConfig->getShopId(), \OxidEsales\Eshop\Core\Field::T_RAW);
$this->oxorder__oxsenddate = new \OxidEsales\Eshop\Core\Field(
$oUtilsDate->formatDBDate(
$this->oxorder__oxsenddate ? $this->oxorder__oxsenddate->value : null,
true
)
);
$blInsert = parent::_insert();
return $blInsert;
} | [
"protected",
"function",
"_insert",
"(",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"$",
"oUtilsDate",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
... | Inserts order object information in DB. Returns true on success.
@return bool | [
"Inserts",
"order",
"object",
"information",
"in",
"DB",
".",
"Returns",
"true",
"on",
"success",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1212-L1240 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._getCounterIdent | protected function _getCounterIdent()
{
$sCounterIdent = ($this->_blSeparateNumbering) ? 'oxOrder_' . \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId() : 'oxOrder';
return $sCounterIdent;
} | php | protected function _getCounterIdent()
{
$sCounterIdent = ($this->_blSeparateNumbering) ? 'oxOrder_' . \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId() : 'oxOrder';
return $sCounterIdent;
} | [
"protected",
"function",
"_getCounterIdent",
"(",
")",
"{",
"$",
"sCounterIdent",
"=",
"(",
"$",
"this",
"->",
"_blSeparateNumbering",
")",
"?",
"'oxOrder_'",
".",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")"... | creates counter ident
@return String | [
"creates",
"counter",
"ident"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1247-L1252 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._setNumber | protected function _setNumber()
{
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$iCnt = oxNew(\OxidEsales\Eshop\Core\Counter::class)->getNext($this->_getCounterIdent());
$sQ = "update oxorder set oxordernr = ? where oxid = ?";
$blUpdate = ( bool ) $oDb->execute($sQ, [$iCnt, $this->getId()]);
if ($blUpdate) {
$this->oxorder__oxordernr = new \OxidEsales\Eshop\Core\Field($iCnt);
}
return $blUpdate;
} | php | protected function _setNumber()
{
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$iCnt = oxNew(\OxidEsales\Eshop\Core\Counter::class)->getNext($this->_getCounterIdent());
$sQ = "update oxorder set oxordernr = ? where oxid = ?";
$blUpdate = ( bool ) $oDb->execute($sQ, [$iCnt, $this->getId()]);
if ($blUpdate) {
$this->oxorder__oxordernr = new \OxidEsales\Eshop\Core\Field($iCnt);
}
return $blUpdate;
} | [
"protected",
"function",
"_setNumber",
"(",
")",
"{",
"$",
"oDb",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"DatabaseProvider",
"::",
"getDb",
"(",
")",
";",
"$",
"iCnt",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Co... | Tries to fetch and set next record number in DB. Returns true on success
@return bool | [
"Tries",
"to",
"fetch",
"and",
"set",
"next",
"record",
"number",
"in",
"DB",
".",
"Returns",
"true",
"on",
"success"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1260-L1273 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._update | protected function _update()
{
$this->_aSkipSaveFields = ['oxtimestamp', 'oxorderdate'];
$this->oxorder__oxsenddate = new \OxidEsales\Eshop\Core\Field(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxorder__oxsenddate->value, true));
return parent::_update();
} | php | protected function _update()
{
$this->_aSkipSaveFields = ['oxtimestamp', 'oxorderdate'];
$this->oxorder__oxsenddate = new \OxidEsales\Eshop\Core\Field(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxorder__oxsenddate->value, true));
return parent::_update();
} | [
"protected",
"function",
"_update",
"(",
")",
"{",
"$",
"this",
"->",
"_aSkipSaveFields",
"=",
"[",
"'oxtimestamp'",
",",
"'oxorderdate'",
"]",
";",
"$",
"this",
"->",
"oxorder__oxsenddate",
"=",
"new",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
... | Updates object parameters to DB.
@return null | [
"Updates",
"object",
"parameters",
"to",
"DB",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1280-L1286 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.delete | public function delete($sOxId = null)
{
if ($sOxId) {
if (!$this->load($sOxId)) {
// such order does not exist
return false;
}
} elseif (!$sOxId) {
$sOxId = $this->getId();
}
// no order id is passed
if (!$sOxId) {
return false;
}
// delete order articles
$oOrderArticles = $this->getOrderArticles(false);
foreach ($oOrderArticles as $oOrderArticle) {
$oOrderArticle->delete();
}
// #440 - deleting user payment info
if ($oPaymentType = $this->getPaymentType()) {
$oPaymentType->delete();
}
return parent::delete($sOxId);
} | php | public function delete($sOxId = null)
{
if ($sOxId) {
if (!$this->load($sOxId)) {
// such order does not exist
return false;
}
} elseif (!$sOxId) {
$sOxId = $this->getId();
}
// no order id is passed
if (!$sOxId) {
return false;
}
// delete order articles
$oOrderArticles = $this->getOrderArticles(false);
foreach ($oOrderArticles as $oOrderArticle) {
$oOrderArticle->delete();
}
// #440 - deleting user payment info
if ($oPaymentType = $this->getPaymentType()) {
$oPaymentType->delete();
}
return parent::delete($sOxId);
} | [
"public",
"function",
"delete",
"(",
"$",
"sOxId",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"sOxId",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"load",
"(",
"$",
"sOxId",
")",
")",
"{",
"// such order does not exist",
"return",
"false",
";",
"}",
"... | Updates stock information, deletes current ordering details from DB,
returns true on success.
@param string $sOxId Ordering ID (default null)
@return bool | [
"Updates",
"stock",
"information",
"deletes",
"current",
"ordering",
"details",
"from",
"DB",
"returns",
"true",
"on",
"success",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1296-L1324 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order._getOrderBasket | protected function _getOrderBasket($blStockCheck = true)
{
$this->_oOrderBasket = oxNew(\OxidEsales\Eshop\Application\Model\Basket::class);
$this->_oOrderBasket->enableSaveToDataBase(false);
//setting recalculation mode
$this->_oOrderBasket->setCalculationModeNetto($this->isNettoMode());
// setting stock check mode
$this->_oOrderBasket->setStockCheckMode($blStockCheck);
// setting virtual basket user
$this->_oOrderBasket->setBasketUser($this->getOrderUser());
// transferring order id
$this->_oOrderBasket->setOrderId($this->getId());
// setting basket currency order uses
$aCurrencies = \OxidEsales\Eshop\Core\Registry::getConfig()->getCurrencyArray();
foreach ($aCurrencies as $oCur) {
if ($oCur->name == $this->oxorder__oxcurrency->value) {
$oBasketCur = $oCur;
break;
}
}
// setting currency
$this->_oOrderBasket->setBasketCurrency($oBasketCur);
// set basket card id and message
$this->_oOrderBasket->setCardId($this->oxorder__oxcardid->value);
$this->_oOrderBasket->setCardMessage($this->oxorder__oxcardtext->value);
if ($this->_blReloadDiscount) {
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
// disabling availability check
$this->_oOrderBasket->setSkipVouchersChecking(true);
// add previously used vouchers
$sQ = 'select oxid from oxvouchers where oxorderid = ' . $oDb->quote($this->getId());
$aVouchers = $oDb->getAll($sQ);
foreach ($aVouchers as $aVoucher) {
$this->_oOrderBasket->addVoucher($aVoucher['oxid']);
}
} else {
$this->_oOrderBasket->setDiscountCalcMode(false);
$this->_oOrderBasket->setVoucherDiscount($this->oxorder__oxvoucherdiscount->value);
$this->_oOrderBasket->setTotalDiscount($this->oxorder__oxdiscount->value);
}
// must be kept old delivery?
if (!$this->_blReloadDelivery) {
$this->_oOrderBasket->setDeliveryPrice($this->getOrderDeliveryPrice());
} else {
// set shipping
$this->_oOrderBasket->setShipping($this->oxorder__oxdeltype->value);
$this->_oOrderBasket->setDeliveryPrice(null);
}
//set basket payment
$this->_oOrderBasket->setPayment($this->oxorder__oxpaymenttype->value);
return $this->_oOrderBasket;
} | php | protected function _getOrderBasket($blStockCheck = true)
{
$this->_oOrderBasket = oxNew(\OxidEsales\Eshop\Application\Model\Basket::class);
$this->_oOrderBasket->enableSaveToDataBase(false);
//setting recalculation mode
$this->_oOrderBasket->setCalculationModeNetto($this->isNettoMode());
// setting stock check mode
$this->_oOrderBasket->setStockCheckMode($blStockCheck);
// setting virtual basket user
$this->_oOrderBasket->setBasketUser($this->getOrderUser());
// transferring order id
$this->_oOrderBasket->setOrderId($this->getId());
// setting basket currency order uses
$aCurrencies = \OxidEsales\Eshop\Core\Registry::getConfig()->getCurrencyArray();
foreach ($aCurrencies as $oCur) {
if ($oCur->name == $this->oxorder__oxcurrency->value) {
$oBasketCur = $oCur;
break;
}
}
// setting currency
$this->_oOrderBasket->setBasketCurrency($oBasketCur);
// set basket card id and message
$this->_oOrderBasket->setCardId($this->oxorder__oxcardid->value);
$this->_oOrderBasket->setCardMessage($this->oxorder__oxcardtext->value);
if ($this->_blReloadDiscount) {
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
// disabling availability check
$this->_oOrderBasket->setSkipVouchersChecking(true);
// add previously used vouchers
$sQ = 'select oxid from oxvouchers where oxorderid = ' . $oDb->quote($this->getId());
$aVouchers = $oDb->getAll($sQ);
foreach ($aVouchers as $aVoucher) {
$this->_oOrderBasket->addVoucher($aVoucher['oxid']);
}
} else {
$this->_oOrderBasket->setDiscountCalcMode(false);
$this->_oOrderBasket->setVoucherDiscount($this->oxorder__oxvoucherdiscount->value);
$this->_oOrderBasket->setTotalDiscount($this->oxorder__oxdiscount->value);
}
// must be kept old delivery?
if (!$this->_blReloadDelivery) {
$this->_oOrderBasket->setDeliveryPrice($this->getOrderDeliveryPrice());
} else {
// set shipping
$this->_oOrderBasket->setShipping($this->oxorder__oxdeltype->value);
$this->_oOrderBasket->setDeliveryPrice(null);
}
//set basket payment
$this->_oOrderBasket->setPayment($this->oxorder__oxpaymenttype->value);
return $this->_oOrderBasket;
} | [
"protected",
"function",
"_getOrderBasket",
"(",
"$",
"blStockCheck",
"=",
"true",
")",
"{",
"$",
"this",
"->",
"_oOrderBasket",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Application",
"\\",
"Model",
"\\",
"Basket",
"::",
"class",
")",
"... | Returns basket object filled up with discount, delivery, wrapping and all other info
@param bool $blStockCheck perform stock check or not (default true)
@return \OxidEsales\Eshop\Application\Model\Basket | [
"Returns",
"basket",
"object",
"filled",
"up",
"with",
"discount",
"delivery",
"wrapping",
"and",
"all",
"other",
"info"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1373-L1436 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.getOrderUser | public function getOrderUser()
{
if ($this->_oUser === null) {
$this->_oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
$this->_oUser->load($this->oxorder__oxuserid->value);
// if object is loaded then reusing its order info
if ($this->_isLoaded) {
// bill address
$this->_oUser->oxuser__oxcompany = clone $this->oxorder__oxbillcompany;
$this->_oUser->oxuser__oxusername = clone $this->oxorder__oxbillemail;
$this->_oUser->oxuser__oxfname = clone $this->oxorder__oxbillfname;
$this->_oUser->oxuser__oxlname = clone $this->oxorder__oxbilllname;
$this->_oUser->oxuser__oxstreet = clone $this->oxorder__oxbillstreet;
$this->_oUser->oxuser__oxstreetnr = clone $this->oxorder__oxbillstreetnr;
$this->_oUser->oxuser__oxaddinfo = clone $this->oxorder__oxbilladdinfo;
$this->_oUser->oxuser__oxustid = clone $this->oxorder__oxbillustid;
$this->_oUser->oxuser__oxcity = clone $this->oxorder__oxbillcity;
$this->_oUser->oxuser__oxcountryid = clone $this->oxorder__oxbillcountryid;
$this->_oUser->oxuser__oxstateid = clone $this->oxorder__oxbillstateid;
$this->_oUser->oxuser__oxzip = clone $this->oxorder__oxbillzip;
$this->_oUser->oxuser__oxfon = clone $this->oxorder__oxbillfon;
$this->_oUser->oxuser__oxfax = clone $this->oxorder__oxbillfax;
$this->_oUser->oxuser__oxsal = clone $this->oxorder__oxbillsal;
}
}
return $this->_oUser;
} | php | public function getOrderUser()
{
if ($this->_oUser === null) {
$this->_oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
$this->_oUser->load($this->oxorder__oxuserid->value);
// if object is loaded then reusing its order info
if ($this->_isLoaded) {
// bill address
$this->_oUser->oxuser__oxcompany = clone $this->oxorder__oxbillcompany;
$this->_oUser->oxuser__oxusername = clone $this->oxorder__oxbillemail;
$this->_oUser->oxuser__oxfname = clone $this->oxorder__oxbillfname;
$this->_oUser->oxuser__oxlname = clone $this->oxorder__oxbilllname;
$this->_oUser->oxuser__oxstreet = clone $this->oxorder__oxbillstreet;
$this->_oUser->oxuser__oxstreetnr = clone $this->oxorder__oxbillstreetnr;
$this->_oUser->oxuser__oxaddinfo = clone $this->oxorder__oxbilladdinfo;
$this->_oUser->oxuser__oxustid = clone $this->oxorder__oxbillustid;
$this->_oUser->oxuser__oxcity = clone $this->oxorder__oxbillcity;
$this->_oUser->oxuser__oxcountryid = clone $this->oxorder__oxbillcountryid;
$this->_oUser->oxuser__oxstateid = clone $this->oxorder__oxbillstateid;
$this->_oUser->oxuser__oxzip = clone $this->oxorder__oxbillzip;
$this->_oUser->oxuser__oxfon = clone $this->oxorder__oxbillfon;
$this->_oUser->oxuser__oxfax = clone $this->oxorder__oxbillfax;
$this->_oUser->oxuser__oxsal = clone $this->oxorder__oxbillsal;
}
}
return $this->_oUser;
} | [
"public",
"function",
"getOrderUser",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oUser",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oUser",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Application",
"\\",
"Model",
"\\",
"User",
... | Returns current order user object
@return \OxidEsales\Eshop\Application\Model\User | [
"Returns",
"current",
"order",
"user",
"object"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1455-L1484 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.getInvoiceNum | public function getInvoiceNum()
{
$sQ = 'select max(oxorder.oxinvoicenr) from oxorder where oxorder.oxshopid = "' . \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId() . '" ';
return (( int ) \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($sQ, false) + 1);
} | php | public function getInvoiceNum()
{
$sQ = 'select max(oxorder.oxinvoicenr) from oxorder where oxorder.oxshopid = "' . \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId() . '" ';
return (( int ) \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($sQ, false) + 1);
} | [
"public",
"function",
"getInvoiceNum",
"(",
")",
"{",
"$",
"sQ",
"=",
"'select max(oxorder.oxinvoicenr) from oxorder where oxorder.oxshopid = \"'",
".",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getShopId",
... | Returns order invoice number.
@return integer | [
"Returns",
"order",
"invoice",
"number",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1528-L1533 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.getShippingSetList | public function getShippingSetList()
{
// in which country we deliver
if (!($sShipId = $this->oxorder__oxdelcountryid->value)) {
$sShipId = $this->oxorder__oxbillcountryid->value;
}
$oBasket = $this->_getOrderBasket(false);
// unsetting bundles
$oOrderArticles = $this->getOrderArticles();
foreach ($oOrderArticles as $sItemId => $oItem) {
if ($oItem->isBundle()) {
$oOrderArticles->offsetUnset($sItemId);
}
}
// add this order articles to basket and recalculate basket
$this->_addOrderArticlesToBasket($oBasket, $oOrderArticles);
// recalculating basket
$oBasket->calculateBasket(true);
// load fitting deliveries list
$oDeliveryList = oxNew(\OxidEsales\Eshop\Application\Model\DeliveryList::class, "core");
$oDeliveryList->setCollectFittingDeliveriesSets(true);
return $oDeliveryList->getDeliveryList($oBasket, $this->getOrderUser(), $sShipId);
} | php | public function getShippingSetList()
{
// in which country we deliver
if (!($sShipId = $this->oxorder__oxdelcountryid->value)) {
$sShipId = $this->oxorder__oxbillcountryid->value;
}
$oBasket = $this->_getOrderBasket(false);
// unsetting bundles
$oOrderArticles = $this->getOrderArticles();
foreach ($oOrderArticles as $sItemId => $oItem) {
if ($oItem->isBundle()) {
$oOrderArticles->offsetUnset($sItemId);
}
}
// add this order articles to basket and recalculate basket
$this->_addOrderArticlesToBasket($oBasket, $oOrderArticles);
// recalculating basket
$oBasket->calculateBasket(true);
// load fitting deliveries list
$oDeliveryList = oxNew(\OxidEsales\Eshop\Application\Model\DeliveryList::class, "core");
$oDeliveryList->setCollectFittingDeliveriesSets(true);
return $oDeliveryList->getDeliveryList($oBasket, $this->getOrderUser(), $sShipId);
} | [
"public",
"function",
"getShippingSetList",
"(",
")",
"{",
"// in which country we deliver",
"if",
"(",
"!",
"(",
"$",
"sShipId",
"=",
"$",
"this",
"->",
"oxorder__oxdelcountryid",
"->",
"value",
")",
")",
"{",
"$",
"sShipId",
"=",
"$",
"this",
"->",
"oxorde... | Loads possible shipping sets for this order
@return oxdeliverysetlist | [
"Loads",
"possible",
"shipping",
"sets",
"for",
"this",
"order"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1552-L1580 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/Order.php | Order.getVoucherNrList | public function getVoucherNrList()
{
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
$aVouchers = [];
$sSelect = "select oxvouchernr from oxvouchers where oxorderid = " . $oDb->quote($this->oxorder__oxid->value);
$rs = $oDb->select($sSelect);
if ($rs != false && $rs->count() > 0) {
while (!$rs->EOF) {
$aVouchers[] = $rs->fields['oxvouchernr'];
$rs->fetchRow();
}
}
return $aVouchers;
} | php | public function getVoucherNrList()
{
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
$aVouchers = [];
$sSelect = "select oxvouchernr from oxvouchers where oxorderid = " . $oDb->quote($this->oxorder__oxid->value);
$rs = $oDb->select($sSelect);
if ($rs != false && $rs->count() > 0) {
while (!$rs->EOF) {
$aVouchers[] = $rs->fields['oxvouchernr'];
$rs->fetchRow();
}
}
return $aVouchers;
} | [
"public",
"function",
"getVoucherNrList",
"(",
")",
"{",
"$",
"oDb",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"DatabaseProvider",
"::",
"getDb",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"DatabaseProvider",
"::",
"FETCH_M... | Get vouchers numbers list which were used with this order
@return array | [
"Get",
"vouchers",
"numbers",
"list",
"which",
"were",
"used",
"with",
"this",
"order"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/Order.php#L1587-L1601 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.