classname
stringlengths 2
79
⌀ | method_name
stringlengths 3
5.05k
| description
stringlengths 6
3.95k
| method_code
stringlengths 7
8.51k
⌀ | explanation
stringclasses 1
value |
---|---|---|---|---|
ShopPaymentConfigLoaderDatabaseAccess | loadPaymentHandlerConfig | * {@inheritdoc} | $query = 'SELECT `shop_payment_handler_parameter`.`systemname`, `shop_payment_handler_parameter`.`value`, `shop_payment_handler_parameter`.`type`, `shop_payment_handler_parameter`.`cms_portal_id`
FROM `shop_payment_handler_parameter`
WHERE `shop_payment_handler_parameter`.`shop_payment_handler_id` = :shopPaymentHandlerId';
try {
$configDataRaw = $this->databaseConnection->fetchAllAssociative(
$query,
array('shopPaymentHandlerId' => $shopPaymentHandlerId)
); | - |
ShopPaymentConfigLoaderRequestLevelCacheDecorator | __construct | * @var ShopPaymentConfigLoaderInterface | $this->subject = $subject; | - |
ShopPaymentConfigLoaderRequestLevelCacheDecorator | loadFromOrderId | * @var array | // Do not cache, because we can't generate an efficient cache key here.
return $this->subject->loadFromOrderId($orderId); | - |
ShopPaymentConfigLoaderRequestLevelCacheDecorator | loadFromPaymentHandlerId | * @param ShopPaymentConfigLoaderInterface $subject | $cacheKey = "loadFromPaymentHandlerId-$paymentHandlerId-$portalId";
if (false === isset($this->cache[$cacheKey])) {
$this->cache[$cacheKey] = $this->subject->loadFromPaymentHandlerId($paymentHandlerId, $portalId); | - |
ShopPaymentConfigLoaderRequestLevelCacheDecorator | loadFromPaymentHandlerGroupId | * {@inheritdoc} | $cacheKey = "loadFromPaymentHandlerGroupId-$paymentGroupId-$portalId";
if (false === isset($this->cache[$cacheKey])) {
$this->cache[$cacheKey] = $this->subject->loadFromPaymentHandlerGroupId($paymentGroupId, $portalId); | - |
ShopPaymentConfigLoaderRequestLevelCacheDecorator | loadFromPaymentHandlerGroupSystemName | * {@inheritdoc} | $cacheKey = "loadFromPaymentHandlerGroupSystemName-$systemName-$portalId";
if (false === isset($this->cache[$cacheKey])) {
$this->cache[$cacheKey] = $this->subject->loadFromPaymentHandlerGroupSystemName($systemName, $portalId); | - |
ShopPaymentConfigRawValue | __construct | * ShopPaymentConfigRawValue describes a configuration parameter that has been read from a data source, but is
* not computed yet. | $this->name = $name;
$this->value = $value;
$this->environment = $environment;
$this->portalId = $portalId;
$this->source = $source; | - |
ShopPaymentConfigRawValue | getName | @var string | return $this->name; | - |
ShopPaymentConfigRawValue | getValue | @var string | return $this->value; | - |
ShopPaymentConfigRawValue | getEnvironment | @var string | return $this->environment; | - |
ShopPaymentConfigRawValue | getPortalId | @var string | return $this->portalId; | - |
ShopPaymentConfigRawValue | getSource | * @var int
* @psalm-var self::SOURCE_* | return $this->source; | - |
ShopPaymentHandlerDataAccessRequestLevelCacheDecorator | __construct | * @var ShopPaymentHandlerDataAccessInterface | $this->subject = $subject; | - |
ShopPaymentHandlerDataAccessRequestLevelCacheDecorator | getBarePaymentHandler | * @var array | $cacheKey = $paymentHandlerId;
if (false === isset($this->cache[$cacheKey])) {
$paymentHandler = $this->subject->getBarePaymentHandler($paymentHandlerId, $languageId);
if (null === $paymentHandler) {
return null; | - |
ShopPaymentHandlerDatabaseAccess | getBarePaymentHandler | * {@inheritdoc} | $paymentHandler = TdbShopPaymentHandler::GetInstance($paymentHandlerId);
if (null === $paymentHandler || false === $paymentHandler->sqlData) {
return null; | - |
ShopPaymentHandlerFactory | __construct | * @var ShopPaymentConfigLoaderInterface | $this->shopPaymentConfigLoader = $shopPaymentConfigLoader;
$this->shopPaymentHandlerDataAccess = $shopPaymentHandlerDataAccess; | - |
ShopPaymentHandlerFactory | createPaymentHandler | * @var ShopPaymentHandlerDataAccessInterface | $paymentHandler = $this->shopPaymentHandlerDataAccess->getBarePaymentHandler($paymentHandlerId);
$configData = $this->shopPaymentConfigLoader->loadFromPaymentHandlerId($paymentHandlerId, $portalId);
$paymentHandler->setConfigData($configData);
$paymentHandler->SetPaymentUserData($userParameterList);
return $paymentHandler; | - |
TShopDataExtranetCore | GetLinkLogout | * returns link to current page with logout method as parameter for given spotname of extranet module if not on "thank you" page of order process
* otherwise it would return link to home page with logout method as parameter for given spotname.
*
* @param string $sSpotName
*
* @return string | $oGlobal = TGlobal::instance();
// if we are on the last page of checkout process we can't use the active page url for logout
// so we redirect to the home url with logout method as parameter
if ($oGlobal->UserDataExists(MTShopOrderWizardCore::URL_PARAM_STEP_SYSTEM_NAME) && 'thankyou' == $oGlobal->GetUserData(MTShopOrderWizardCore::URL_PARAM_STEP_SYSTEM_NAME)) {
return self::getPageService()->getLinkToPortalHomePageAbsolute().'?'.TTools::GetArrayAsURL(array('module_fnc['.$sSpotName.']' => 'Logout')); | - |
TShopDataExtranetUser | __sleep | * shop specific extranet user extensions.
/* | $aData = parent::__sleep();
$aData[] = 'aArticleViewHistory';
$aData[] = 'aNoticeList';
return $aData; | - |
TShopDataExtranetUser | GetCustomerNumber | * the article ids last viewed by the user (ie. on the detail page) will be stored here
* Note: the although the list may grow longer (the complete history will be saved for logged in users)
* we will only keep the first 100 in this list.
*
* @var array | $sCustNr = parent::GetCustomerNumber();
if (empty($sCustNr)) {
$oShop = TdbShop::GetInstance();
$sCustNr = $oShop->GetNextFreeCustomerNumber();
$aData = $this->sqlData;
$aData['customer_number'] = $sCustNr;
$this->LoadFromRow($aData); | - |
TShopDataExtranetUser | GetUserAlias | * the notice list (merkzettel) of the user. Note: this list is stored in session and for logged in users
* in the database.
*
* @var array | $sAlias = trim($this->fieldAliasName);
if (empty($sAlias)) {
$sAlias = $this->fieldFirstname.' '.mb_substr($this->fieldLastname, 0, 1).'.'; | - |
TShopDataExtranetUser | GetReviewsPublished | * we use the post insert hook to set the customer number. | return TdbShopArticleReviewList::GetPublishedReviewsForUser($this->id, $this->iLanguageId); | - |
TShopDataExtranetUser | AddArticleIdToViewHistory | * @return void | if (is_null($this->aArticleViewHistory)) {
$this->GetArticleViewHistory(); | - |
TShopDataExtranetUser | GetArticleViewHistory | * returns the users customer number, if set.
*
* @return int | if (is_null($this->aArticleViewHistory)) {
$this->aArticleViewHistory = array();
$iMaxQueueLength = 100;
$shop = $this->getShopService()->getActiveShop();
if ($shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount < $iMaxQueueLength && $shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount > 0) {
$iMaxQueueLength = $shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount; | - |
TShopDataExtranetUser | GetNoticeListArticles | * save view history to user data... | if (is_null($this->aNoticeList)) {
$this->aNoticeList = array();
$iMaxQueueLength = 1000;
if ($this->IsLoggedIn()) {
// fetch from user
$iNumRecsAdded = 0;
$oNoticeList = $this->GetFieldShopUserNoticeListList();
while (($oNoticeListItem = $oNoticeList->Next()) && $iNumRecsAdded <= $iMaxQueueLength) {
if (!empty($oNoticeListItem->fieldShopArticleId)) {
$this->aNoticeList[$oNoticeListItem->fieldShopArticleId] = $oNoticeListItem->sqlData; | - |
TShopDataExtranetUser | AddArticleIdToNoticeList | * takes the article view history from session and merges it with the data
* in the database. this is done when the user logs in to make the history permanent.
*
* @return void | $dNewAmountOnList = 0;
if (is_null($this->aNoticeList)) {
$this->GetNoticeListArticles(); | - |
TShopDataExtranetUser | RemoveArticleFromNoticeList | * takes the notice list from session and merges it with the data
* in the database. this is done when the user logs in to make the notice list permanent.
*
* @return void | $this->GetNoticeListArticles();
if (array_key_exists($sArticleId, $this->aNoticeList)) {
unset($this->aNoticeList[$sArticleId]);
if ($this->IsLoggedIn()) {
$noticeListItemObject = TdbShopUserNoticeList::GetNewInstance();
if (true === $noticeListItemObject->LoadFromFields(
array(
'data_extranet_user_id' => $this->id,
'shop_article_id' => $sArticleId,
)
)) {
$noticeListItemObject->Delete(); | - |
TShopDataExtranetUser | ValidateData | @var $oItem TdbShopUserNoticeList | if (is_null($sFormDataName)) {
$sFormDataName = TdbDataExtranetUser::MSG_FORM_FIELD; | - |
TShopDataExtranetUser | GetTotalOrderValue | * return alias for the user.
*
* @return string | $query = "SELECT SUM(value_total) AS ordervalue
FROM `shop_order`
WHERE `data_extranet_user_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
AND (`shop_order`.`id` IS NULL OR `shop_order`.`canceled` = '0')
";
if (!is_null($sStartDate)) {
$query .= " AND `datecreated` >= '".MySqlLegacySupport::getInstance()->real_escape_string($sStartDate)."' "; | - |
TShopDataExtranetUser | Logout | * get all reviews that have been published.
*
* @return TdbShopArticleReviewList | $oBasket = TShopBasket::GetInstance();
if (is_array($oBasket->aCompletedOrderStepList)) {
reset($oBasket->aCompletedOrderStepList);
foreach ($oBasket->aCompletedOrderStepList as $sStepName => $bValue) {
$oBasket->aCompletedOrderStepList[$sStepName] = false; | - |
TShopDataExtranetUser | UpdateShippingAddress | * add an article to the view history.
*
* @param int $iArticleId
*
* @return void | $oOldAddress = clone $this->GetShippingAddress();
$oOldBillingAddress = clone $this->GetBillingAddress();
$bUpdated = parent::UpdateShippingAddress($aAddressData);
$oNewAddress = $this->GetShippingAddress();
if (false === $oNewAddress->hasSameDataInSqlData($oOldAddress)) {
$this->hookChangedShippingAddress($oOldAddress, $oNewAddress); | - |
TShopDataExtranetUser | SetAddressAsShippingAddress | * returns the ids of up to the last 100 articles viewed.
*
* @return array | $oOldShippingAddress = clone $this->GetShippingAddress();
$oOldBillingAddress = clone $this->GetBillingAddress();
$oNewShippingAddress = parent::SetAddressAsShippingAddress($sAddressId);
if (false === $oNewShippingAddress->hasSameDataInSqlData($oOldShippingAddress)) {
$this->hookChangedShippingAddress($oOldShippingAddress, $oNewShippingAddress); | - |
TShopDataExtranetUser | ShipToAddressOtherThanBillingAddress | * returns the of the articles on the notice list. note: we limit the notice list to 1000 items.
*
* @return array | $oOldAddress = clone $this->GetShippingAddress();
$oOldBillingAddress = clone $this->GetBillingAddress();
$bUpdated = parent::ShipToAddressOtherThanBillingAddress();
$oNewAddress = $this->GetShippingAddress();
if (false === $oNewAddress->hasSameDataInSqlData($oOldAddress)) {
$this->hookChangedShippingAddress($oOldAddress, $oNewAddress); | - |
TShopDataExtranetUser | ShipToBillingAddress | * add an article to the notice list.
*
* @param int $iArticleId
* @param float $iAmount
*
* @return float|false - new amount on list | $oOldAddress = clone $this->GetShippingAddress();
$oOldBillingAddress = clone $this->GetBillingAddress();
$bUpdated = parent::ShipToBillingAddress($bSetShippingToBillingAddress);
$oNewAddress = $this->GetShippingAddress();
if (false === $oNewAddress->hasSameDataInSqlData($oOldAddress)) {
$this->hookChangedShippingAddress($oOldAddress, $oNewAddress); | - |
TShopDataExtranetUser | SetAddressAsBillingAddress | @var $oNoticeListItem TdbShopUserNoticeList | $oOldShippingAddress = clone $this->GetShippingAddress();
$oOldBillingAddress = clone $this->GetBillingAddress();
$oNewBillingAddress = parent::SetAddressAsBillingAddress($sAddressId);
$oNewShippingAddress = $this->GetShippingAddress();
if (false === $oNewShippingAddress->hasSameDataInSqlData($oOldShippingAddress)) {
$this->hookChangedShippingAddress($oOldShippingAddress, $oNewShippingAddress); | - |
TShopDataExtranetUser | UpdateBillingAddress | * save user notice list to cookie.
*
* @return void | $oOldShippingAddress = clone $this->GetShippingAddress();
$oOldBillingAddress = clone $this->GetBillingAddress();
$bUpdated = parent::UpdateBillingAddress($aAddressData);
$oNewShippingAddress = $this->GetShippingAddress();
if (false === $oNewShippingAddress->hasSameDataInSqlData($oOldShippingAddress)) {
$this->hookChangedShippingAddress($oOldShippingAddress, $oNewShippingAddress); | - |
MTShopMyAccountCore | Execute | * @return void | parent::Execute();
$activePage = $this->getActivePageService()->getActivePage();
$aSignup = array('module_fnc' => array($this->sModuleSpotName => 'NewsletterSubscribe'));
$this->data['sNewsSignupLink'] = $activePage->GetRealURLPlain($aSignup);
$aSignout = array('module_fnc' => array($this->sModuleSpotName => 'NewsletterUnsubscribe'));
$this->data['sNewsSignoutLink'] = $activePage->GetRealURLPlain($aSignout);
return $this->data; | - |
MTShopMyAccountCore | NewsletterSubscribe | * There are different ways of opting in into the newsletter table:
* - Subscribe on Website
* - Subscribe on MyAccount page
* - Subscribe while ordering
* This information is now put into the optincode field. | // subscribe shop user to newsletter
$oUser = TdbDataExtranetUser::GetInstance();
$oNewsletter = TdbPkgNewsletterUser::GetInstanceForActiveUser();
if (is_null($oNewsletter)) {
$oNewsletter = TdbPkgNewsletterUser::GetNewInstance();
$aData = array();
$sNow = date('Y-m-d H:i:s');
$aData['email'] = $oUser->GetUserEMail();
$aData['data_extranet_salutation_id'] = $oUser->fieldDataExtranetSalutationId;
$aData['lastname'] = $oUser->fieldLastname;
$aData['firstname'] = $oUser->fieldFirstname;
$aData['signup_date'] = $sNow;
/**
* There are different ways of opting in into the newsletter table:
* - Subscribe on Website
* - Subscribe on MyAccount page
* - Subscribe while ordering
* This information is now put into the optincode field.
*/
$aData['optincode'] = 'MyAccount';
$aData['data_extranet_user_id'] = $oUser->id;
$aData['cms_portal_id'] = $oUser->fieldCmsPortalId;
$oNewsletter->LoadFromRow($aData);
$oNewsletter->ConfirmSignup();
$oNewsletter->Save();
$oNewsletter->PostSignUpNewsletterUserOnly();
TdbPkgNewsletterUser::GetInstanceForActiveUser(true);
$oMsgManager = TCMSMessageManager::GetInstance();
$oMsgManager->AddMessage(self::MSG_BASE_NAME.'-newsletter', 'NEWSLETTER-USER-SUBSCRIBED'); | - |
MTShopMyAccountCore | NewsletterUnsubscribe | * @return void | $oNewsletter = TdbPkgNewsletterUser::GetInstanceForActiveUser();
if (!is_null($oNewsletter)) {
$oNewsletter->SignOut();
TdbPkgNewsletterUser::GetInstanceForActiveUser(true);
$oMsgManager = TCMSMessageManager::GetInstance();
$oMsgManager->AddMessage(self::MSG_BASE_NAME.'-newsletter', 'NEWSLETTER-USER-UNSUBSCRIBED'); | - |
MTShopMyAccountCore | GetHtmlHeadIncludes | * @return never | $aIncludes = parent::GetHtmlHeadIncludes();
$aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgNewsletter'));
return $aIncludes; | - |
MTShopMyAccountCore | _AllowCache | * @return string[] | return false; | - |
TPkgRunFrontendAction_SendOrderEMail | runAction | * @param array $aParameter
*
* @return TPkgRunFrontendActionStatus | $oStatus = new TPkgRunFrontendActionStatus();
if (isset($aParameter['email']) && isset($aParameter['order_id']) && !empty($aParameter['email']) && !empty($aParameter['order_id'])) {
$oOrder = TdbShopOrder::GetNewInstance();
if ($oOrder->Load($aParameter['order_id'])) {
$bSuccess = $oOrder->SendOrderNotification($aParameter['email']);
if ($bSuccess) {
$oStatus->sMessage = TGlobal::Translate('chameleon_system_shop.orders.msg_order_confirm_sent', array('%mail%' => $aParameter['email']));
$oStatus->sMessageType = 'MESSAGE'; | - |
ProductStatistics | setDetailViews | @var int | $this->detailViews = $detailViews; | - |
ProductStatistics | getDetailViews | @var int | return (null !== $this->detailViews) ? $this->detailViews : 0; | - |
ProductStatistics | setReviewAverage | @var int | $this->reviewAverage = $reviewAverage; | - |
ProductStatistics | getReviewAverage | @var int | return (null !== $this->reviewAverage) ? $this->reviewAverage : 0; | - |
ProductStatistics | setReviews | * @param int $detailViews
*
* @return void | $this->reviews = $reviews; | - |
ProductStatistics | getReviews | * @return int | return (null !== $this->reviews) ? $this->reviews : 0; | - |
ProductStatistics | setSales | * @param int $reviewAverage
*
* @return void | $this->sales = $sales; | - |
ProductStatistics | getSales | * @return int | return (null !== $this->sales) ? $this->sales : 0; | - |
ProductVariantNameGenerator | generateName | * {@inheritdoc} | if (false === $product->IsVariant()) {
return null; | - |
ProductVariantNameGenerator | generateNamesForAllLanguages | * @param \TdbShopArticle $product
* @param string $variantNameType
* @param string $languageId
*
* @return string | if (false === $product->IsVariant()) {
return null; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | __construct | * @var PaymentMethodDataAccessInterface | $this->subject = $subject; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | getShippingCountryIds | * @var array | $key = sprintf('shippingCountryIds-%s', $paymentMethodId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | getBillingCountryIds | * @param PaymentMethodDataAccessInterface $subject | $key = sprintf('billingCountryIds-%s', $paymentMethodId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | getPermittedUserIds | * {@inheritdoc} | $key = sprintf('permittedUserIds-%s', $paymentMethodId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | getPermittedUserGroupIds | * {@inheritdoc} | $key = sprintf('permittedUserGroupIds-%s', $paymentMethodId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | getPermittedArticleIds | * {@inheritdoc} | $key = sprintf('articleIdRestrictions-%s', $paymentMethodId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | getPermittedCategoryIds | * {@inheritdoc} | $key = sprintf('categoryIdRestrictions-%s', $paymentMethodId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | getPermittedArticleGroupIds | * {@inheritdoc} | $key = sprintf('articleGroupIdRestrictions-%s', $paymentMethodId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | getInvalidArticleIds | * {@inheritdoc} | $key = sprintf('invalidArticleIds-%s', $paymentMethodId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | getInvalidCategoryIds | * {@inheritdoc} | $key = sprintf('invalidCategoryIds-%s', $paymentMethodId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
PaymentMethodDataAccessRuntimeCacheDecorator | getInvalidArticleGroupIds | * {@inheritdoc} | $key = sprintf('invalidArticleGroupIds-%s', $paymentMethodId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ProductStatisticsServiceRuntimeCacheDecorator | __construct | * @var ProductStatisticsServiceInterface | $this->subject = $subject; | - |
ProductStatisticsServiceRuntimeCacheDecorator | getStats | * @var ProductStatisticsInterface[] | if (isset($this->cacheStats[$articleId])) {
return $this->cacheStats[$articleId]; | - |
ProductStatisticsServiceRuntimeCacheDecorator | add | * @param ProductStatisticsServiceInterface $subject | $this->subject->add($articleId, $type, $amount);
$this->resetStatsCache($articleId); | - |
ProductStatisticsServiceRuntimeCacheDecorator | set | * {@inheritdoc} | $this->subject->set($articleId, $type, $amount);
$this->resetStatsCache($articleId); | - |
ProductStatisticsServiceRuntimeCacheDecorator | updateAllBasedOnVariants | * {@inheritdoc} | $this->subject->updateAllBasedOnVariants($parentArticleId);
$this->cacheStats = array(); | - |
ShopCategoryDataAccessRuntimeCacheDecorator | __construct | * root categories do not have a parent id - so we force a key to use in the parentChildMapping. | $this->subject = $subject; | - |
ShopCategoryDataAccessRuntimeCacheDecorator | getAllActive | * @var ShopCategoryDataAccessInterface | if (null !== $this->categoryCache) {
return $this->categoryCache; | - |
ShopCategoryDataAccessRuntimeCacheDecorator | getActiveChildren | * @var array|null | $childIds = $this->getChildrenIds($categoryId);
$children = array();
foreach ($childIds as $childId) {
$children[] = $this->getCategory($childId); | - |
ShopCategoryDataAccessRuntimeCacheDecorator | getCategory | * @var array|null | $categoryCache = $this->getAllActive();
if (isset($categoryCache[$categoryId])) {
return $categoryCache[$categoryId]; | - |
ShopShippingGroupDataAccessRuntimeCacheDecorator | __construct | * @var ShopShippingGroupDataAccessInterface | $this->subject = $subject; | - |
ShopShippingGroupDataAccessRuntimeCacheDecorator | getPermittedUserIds | * @var array | $key = sprintf('permittedUserIds-%s', $shippingGroupId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ShopShippingGroupDataAccessRuntimeCacheDecorator | getPermittedUserGroupIds | * @param ShopShippingGroupDataAccessInterface $subject | $key = sprintf('permittedUserGroupIds-%s', $shippingGroupId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ShopShippingGroupDataAccessRuntimeCacheDecorator | getPermittedPortalIds | * {@inheritdoc} | $key = sprintf('permittedPortalIds-%s', $shippingGroupId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ShopShippingTypeDataAccessRuntimeCacheDecorator | __construct | * @var ShopShippingTypeDataAccessInterface | $this->subject = $subject; | - |
ShopShippingTypeDataAccessRuntimeCacheDecorator | getPermittedArticleGroupIds | * @var array<string, mixed> | $key = sprintf('permittedArticleGroupIds-%s', $shippingTypeId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ShopShippingTypeDataAccessRuntimeCacheDecorator | getPermittedArticleIds | * @param ShopShippingTypeDataAccessInterface $subject | $key = sprintf('permittedArticleIds-%s', $shippingTypeId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ShopShippingTypeDataAccessRuntimeCacheDecorator | getPermittedCategoryIds | * {@inheritdoc} | $key = sprintf('permittedCategoryIds-%s', $shippingTypeId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ShopShippingTypeDataAccessRuntimeCacheDecorator | getPermittedPortalIds | * {@inheritdoc} | $key = sprintf('permittedPortalIds-%s', $shippingTypeId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ShopShippingTypeDataAccessRuntimeCacheDecorator | getPermittedCountryIds | * {@inheritdoc} | $key = sprintf('permittedCountryIds-%s', $shippingTypeId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ShopShippingTypeDataAccessRuntimeCacheDecorator | getPermittedUserGroupIds | * {@inheritdoc} | $key = sprintf('permittedUserGroupIds-%s', $shippingTypeId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ShopShippingTypeDataAccessRuntimeCacheDecorator | getPermittedUserIds | * {@inheritdoc} | $key = sprintf('permittedUserIds-%s', $shippingTypeId);
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
ShopShippingTypeDataAccessRuntimeCacheDecorator | getAvailableShippingTypes | * {@inheritdoc} | $parameter = array(
'iGroupId' => $shippingGroupId,
'dNumberOfArticles' => $basket->dTotalNumberOfArticles,
'dWeight' => $basket->dTotalWeight,
'dBasketVolume' => $basket->dTotalVolume,
'dBasketValue' => $basket->dCostArticlesTotalAfterDiscounts,
);
if ('' !== $shippingCountryId) {
$parameter['sActiveShippingCountryId'] = $shippingCountryId; | - |
ShopStockMessageDataAccessRuntimeCacheDecorator | __construct | * @var ShopStockMessageDataAccessInterface | $this->subject = $subject; | - |
ShopStockMessageDataAccessRuntimeCacheDecorator | getStockMessage | * @var array | $cache = $this->getAll();
if (isset($cache[$id])) {
return TdbShopStockMessage::GetNewInstance($cache[$id], $languageId); | - |
ShopStockMessageDataAccessRuntimeCacheDecorator | getAll | * @param ShopStockMessageDataAccessInterface $subject | $key = 'all';
if (array_key_exists($key, $this->cache)) {
return $this->cache[$key]; | - |
OrderStepPageService | __construct | * @var PortalAndLanguageAwareRouterInterface | $this->router = $router;
$this->urlUtil = $urlUtil;
$this->routingUtil = $routingUtil; | - |
OrderStepPageService | getLinkToOrderStepPageRelative | * @var UrlUtil | $orderStep = $this->getOrderStepInCorrectLanguage($orderStep, $language);
$parameters = $this->addBasketStepParameter($parameters, $orderStep);
return $this->router->generateWithPrefixes($this->getBasketStepRouteName($orderStep), $parameters, $portal, $language, UrlGeneratorInterface::ABSOLUTE_PATH); | - |
OrderStepPageService | getLinkToOrderStepPageAbsolute | * @var RoutingUtilInterface | $orderStep = $this->getOrderStepInCorrectLanguage($orderStep, $language);
$parameters = $this->addBasketStepParameter($parameters, $orderStep);
$url = $this->router->generateWithPrefixes($this->getBasketStepRouteName($orderStep), $parameters, $portal, $language, UrlGeneratorInterface::ABSOLUTE_URL);
if (true === $forceSecure) {
$url = $this->getSecureUrlIfNeeded($url, $portal, $language); | - |
PaymentInfoService | __construct | * @var Connection | $this->databaseConnection = $databaseConnection; | - |
PaymentInfoService | isPaymentMethodActive | * @param Connection $databaseConnection | $query = 'SELECT COUNT(*) FROM `shop_payment_method`';
$parameters = array();
if (null !== $portal) {
$query .= "\nLEFT JOIN `shop_payment_method_cms_portal_mlt` ON `shop_payment_method`.`id` = `shop_payment_method_cms_portal_mlt`.`source_id`
WHERE (`shop_payment_method_cms_portal_mlt`.`target_id` = :portalId OR `shop_payment_method_cms_portal_mlt`.`target_id` IS NULL)";
$query .= ' AND ';
$parameters['portalId'] = $portal->id; | - |
ProductInventoryService | getAvailableStock | * @var Connection | /** @var int[]|false $stock */
$stock = $this->databaseConnection->fetchNumeric(
'SELECT `amount` FROM `shop_article_stock` WHERE `shop_article_id` = :id',
array('id' => $shopArticleId)
);
if (is_array($stock) && isset($stock[0])) {
return (int) $stock[0]; | - |
ProductInventoryService | addStock | * {@inheritdoc} | $query = 'INSERT INTO `shop_article_stock`
SET `id` = :id,
`amount` = :amount,
`shop_article_id` = :articleId
ON DUPLICATE KEY UPDATE `amount` = `amount` + :amount
';
$this->databaseConnection->executeQuery(
$query,
array('id' => \TTools::GetUUID(), 'amount' => $stock, 'articleId' => $shopArticleId),
array('amount' => \PDO::PARAM_INT)
); | - |
ProductInventoryService | setStock | @var int[]|false $stock | $query = 'INSERT INTO `shop_article_stock`
SET `id` = :id,
`amount` = :amount,
`shop_article_id` = :articleId
ON DUPLICATE KEY UPDATE `amount` = :amount
';
$this->databaseConnection->executeQuery(
$query,
array('id' => \TTools::GetUUID(), 'amount' => $stock, 'articleId' => $shopArticleId),
array('amount' => \PDO::PARAM_INT)
); | - |
ProductInventoryService | updateVariantParentStock | @var false $stock | $query = 'SELECT
SUM(`shop_article_stock`.amount) AS amount
FROM `shop_article_stock`
INNER JOIN `shop_article` ON `shop_article_stock`.`shop_article_id` = `shop_article`.`id`
WHERE `shop_article`.`variant_parent_id` = :articleId
';
$result = $this->databaseConnection->fetchNumeric($query, array('articleId' => $parentArticleId));
$amount = (is_array($result) && isset($result[0])) ? (int) $result[0] : 0;
$updateData = array(
'amount' => $amount,
'articleId' => $parentArticleId,
);
$query = 'INSERT INTO `shop_article_stock`
SET `amount` = :amount,
`shop_article_id` = :articleId,
`id` = :id
ON DUPLICATE KEY UPDATE `amount` = :amount
';
$updateData['id'] = \TTools::GetUUID();
$this->databaseConnection->executeQuery(
$query,
$updateData,
array('amount' => \PDO::PARAM_INT)
); | - |
ProductInventoryService | setDatabaseConnection | * {@inheritdoc} | $this->databaseConnection = $connection; | - |
ProductInventoryServiceCacheProxy | __construct | * @var ProductInventoryServiceInterface | $this->subject = $subject; | - |
ProductInventoryServiceCacheProxy | getAvailableStock | @var array<string, mixed> | if (isset($this->cache['x'.$shopArticleId])) {
return $this->cache['x'.$shopArticleId]; | - |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.