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
TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category
loadFromNode
* @param string $sId - shop category id * * @return bool
if (false === $oNode->fieldActive) { return false;
-
TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category
getAChildren
* @param TdbShopCategory $oNode * * @return bool
if (true === $this->bDisableSubmenu) { return null;
-
TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category
getBIsActive
* @return AbstractPkgCmsNavigationNode[]|null
if (null === $this->bIsActive) { $this->bIsActive = false; /** @var $oNode TdbShopCategory */ $oNode = $this->getNodeCopy(); $oActiveCategory = TdbShop::GetInstance()->GetActiveCategory(); if ($oActiveCategory && $oNode && $oActiveCategory->id === $oNode->id) { $this->bIsActive = true;
-
TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category
getBIsExpanded
@var $oNode TdbShopCategory
if (null === $this->bIsExpanded) { $this->bIsExpanded = $this->getBIsActive(); if (false === $this->bIsExpanded) { /** @var $oNode TdbShopCategory */ $oNode = $this->getNodeCopy(); $aCategoryPath = TdbShop::GetInstance()->GetActiveCategoryPath(); if ($oNode && is_array($aCategoryPath) && isset($aCategoryPath[$oNode->id])) { $this->bIsExpanded = true;
-
TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category
getNodeIconURL
@var TdbShopCategory[] $categoryList
$sURL = null; /** @var $oNode TdbShopCategory */ $oNode = $this->getNodeCopy(); $oImage = $oNode->GetImage(0, 'navi_icon_cms_media_id', $this->dummyImagesAllowed()); if ($oImage) { $sURL = $oImage->GetRelativeURL(); $this->sNavigationIconId = $oImage->id;
-
TPkgShopPrimaryNavigation_TShop
GetFieldShopPrimaryNaviList
* @var TdbPkgShopPrimaryNaviList[]
$activePortal = self::getPortalDomainService()->getActivePortal(); if (null === $activePortal) { if (false === isset($this->primaryNavigationList['no-portal'])) { $this->primaryNavigationList['no-portal'] = TdbPkgShopPrimaryNaviList::GetList();
-
MTPkgShopPrimaryNavigation
Accept
* {@inheritdoc}
$activePortal = $this->getPortalDomainService()->getActivePortal(); if ($bCachingEnabled) { $oCacheTriggerManager->addTrigger($activePortal->table, $activePortal->id);
-
MTPkgShopPrimaryNavigation
_AllowCache
* @return null|string
return true;
-
MTPkgShopPrimaryNavigation
_GetCacheParameters
@var ActivePageServiceInterface $activePageService
$parameters = parent::_GetCacheParameters(); $parameters['sActivePageId'] = $this->getActivePageId(); $parameters['activeUserGroups'] = implode(',', $this->getActiveUserGroups()); $parameters['activeCategoryId'] = $this->getActiveCategoryId(); return $parameters;
-
ChameleonSystemShopProductExportBundle
build
* @return void
parent::build($container); $container->addCompilerPass(new ExportHandlerPass());
-
ShopProductExporter
__construct( ResultFactoryInterface $resultFactory, ShopServiceInterface $activeShopService, StateFactoryInterface $stateFactory )
* @var \ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\ResultFactoryInterface
$this->resultFactory = $resultFactory; $shopConfig = $activeShopService->getConfiguration(); $this->validShopExportKey = $shopConfig['export_key']; $this->stateFactory = $stateFactory;
-
ShopProductExporter
registerHandler
* @var ShopProductExportHandlerInterface[]
$this->exportHandler[$alias] = $exportHandler;
-
ShopProductExporter
isValidExportKey
* @var string
return $exportKey === $this->validShopExportKey;
-
ShopProductExporter
export
* @var StateFactoryInterface
if (false === $this->aliasExists($alias)) { throw new \ErrorException("alias [{$alias
-
ShopProductExporter
aliasExists
* @param ResultFactoryInterface $resultFactory * @param ShopServiceInterface $activeShopService * @param StateFactoryInterface $stateFactory
return array_key_exists($alias, $this->exportHandler);
-
ChameleonSystemShopProductExportExtension
load
* @return void
$loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); $loader->load('services.xml');
-
ExportHandlerPass
process
* You can modify the container here before it is dumped to PHP code. * * @param ContainerBuilder $container * * @api * * @return void
$exporter = $container->getDefinition('chameleon_system_shop_product_export.exporter'); $exportHandlerIds = $container->findTaggedServiceIds('chameleon_system_shop_product_export.export_handler'); $aliasRegistered = array(); foreach ($exportHandlerIds as $exportHandlerId => $tagAttributes) { foreach ($tagAttributes as $attributes) { $alias = (isset($attributes['alias'])) ? $attributes['alias'] : null; if (null === $alias) { throw new \ErrorException("the service {$exportHandlerId
-
ShopProductExportModule
__construct
* @var string
parent::__construct(); $this->productExporter = $productExporter; $this->dbAdapter = $dbAdapter; $this->inputFilterUtil = $inputFilterUtil; $this->cacheDir = $cacheDir;
-
ShopProductExportModule
Init
* @var string
parent::Init(); $this->loadConfiguration(); $this->getStateDataFromRequest(); if (false === is_dir($this->cacheDir)) { if (!@mkdir($this->cacheDir, 0777, true) && !is_dir($this->cacheDir)) { throw new ErrorException(sprintf('failed to create cache folder: %s', $this->cacheDir));
-
ShopProductExportModule
Accept( IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager )
* @var \ChameleonSystem\ShopProductExportBundle\Interfaces\ShopProductExporterInterface
$responseData = array( 'exportData' => null, 'error' => false, 'spotName' => $this->sModuleSpotName, ); if (false === $this->productExporter->aliasExists($this->exportView)) { $responseData['error'] = 'no-view';
-
ShopProductExportModule
_AllowCache
* @var \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\DbAdapterInterface
return false;
-
TPkgShopProductExportBaseEndPoint
Init
* article list loaded by module or something else that calls this class. * * @var TIterator|null
null
-
TPkgShopProductExportBaseEndPoint
Run
* absolute path to the cache file. * * @var string|null
$bSuccess = false; set_time_limit(1800); $this->getCache()->disable(); TCacheManagerRuntimeCache::SetEnableAutoCaching(false); if ($this->Prepare()) { $bSuccess = $this->Perform();
-
TPkgShopProductExportBaseEndPoint
getAttributeName
* false if the export is in cache so load the cache file and pass it to the output * true if there is no cache enabled or cache item is out of date. * * @var bool
/** @var array<string, string> $aAttributesForSystemNames */ static $aAttributesForSystemNames = null; /** @var array<string, string> $aAttributesForIds */ static $aAttributesForIds = null; if (null === $aAttributesForSystemNames && null === $aAttributesForIds) { $oAttributesList = TdbShopAttributeList::GetList(); while ($oAttribute = $oAttributesList->Next()) { $sName = $oAttribute->GetName(); $aAttributesForSystemNames[$oAttribute->fieldSystemName] = $sName; $aAttributesForIds[$oAttribute->id] = $sName;
-
TPkgShopProductExportBaseEndPoint
GetArticleAttributeValueListForAttributeNames( $oArticle, $aAttributeNames, $sFieldName = 'system_name' )
* only set if cached file is set - output will be written into file instead of output buffer. * * @var bool|resource
$aList = array(); foreach ($aAttributeNames as $sAttributeName) { $aList[$sAttributeName] = $this->GetArticleAttributeValueForAttributeName( $oArticle, $sAttributeName, $sFieldName, false );
-
TPkgShopProductExportBaseEndPoint
SetArticleList
* set to true on debug state. * * @var bool
$this->oArticleList = $oArticleList;
-
TPkgShopProductExportBaseEndPoint
GetArticleList
* key will be accessed by exports - value should be system_name of the attribute that will be fetched. * * @var array
return $this->oArticleList;
-
TPkgShopProductExportBaseEndPoint
GetCacheFile
* hook is called before an article is exported. * * @param TdbShopArticle $oArticle * * @return TdbShopArticle
return $this->sCacheFile;
-
TPkgShopProductExportBaseEndPoint
GetGenerateFile
* do any initialization work that needs to be done before you want to run the export. * * @return void
return $this->bGenerateFile;
-
TPkgShopProductExportBaseEndPoint
SetDebug
* Run the export. returns true if the export was successful, otherwise false * this method should not be overwritten in child classes. * * @return bool * @final
$this->bDebug = $bDebug;
-
TPkgShopProductExportBaseEndPoint
GetDebug
* prepare the export - setup temp tables etc * return false if the preparation failed. * * @return bool
return $this->bDebug;
-
TPkgShopProductExportBaseEndPoint
GetAllowedAttributes
* method is called once on prepare of export * set attributes system names specific keys that will be used by exports * by default we set the ean and mpnr * you can overwrite these keys (and add custom keys) with the help of the virtual class manager. * * e.g.$this->aAttributes['brand'] = 'hersteller'; * * @return void
static $aAttributes = null; if (null === $aAttributes) { $aAttributes = array(); $oAttributeList = TdbShopAttributeList::GetList(); $oAttributeList->GoToStart(); while ($oAttribute = $oAttributeList->Next()) { $aAttributes[] = $oAttribute->fieldSystemName;
-
TCMSFieldText_ShowExportURL
GetExportURLList
* varchar field with javascript to set the blog post url onblur. * /*
$sReturn = ''; if (isset($this->oTableRow) && $this->oTableRow instanceof TdbShop) { /* @var $oShop TdbShop */ $oShop = $this->oTableRow; $oPortalList = $oShop->GetFieldCmsPortalList(); $systemPageService = $this->getSystemPageService(); while ($oPortal = $oPortalList->Next()) { $sExportPageURL = $systemPageService->getLinkToSystemPageRelative('productexport', array(), $oPortal); if (strstr($sExportPageURL, 'javascript:alert')) { $sReturn = '<div>'.TGlobal::OutHTML(TGlobal::Translate('chameleon_system_shop_product_export.field_show_export_url.error_export_page_missing')).'</div>'; continue;
-
TCMSFieldText_ShowExportURL
GetHTML
* sets methods that are allowed to be called via URL (ajax call). * * @return void
$sHtml = parent::GetHTML(); $sHtml .= '<input id="showExportURLList" type="button" class="btn btn-sm btn-secondary mt-2" value="'.TGlobal::OutHTML($this->getTranslator()->trans('chameleon_system_shop_product_export.field_show_export_url.show_list_button_title')).'"/>'; $sHtml .= '<div id="exportURLListcontainer" class="mt-2"></div>'; $sHtml .= " <script type=\"text/javascript\"> $(document).ready(function() { $('#showExportURLList').click(function(){ GetAjaxCallTransparent('".$this->GenerateAjaxURL( array('_fnc' => 'GetExportURLList', '_fieldName' => $this->name) )."', GetExportURLList); return false;
-
null
getItemCountForRemoteKey; /** * @param array<string, mixed> $data * @psalm-param array
* @param string $remoteKey * @return int
* insertId: string, * pkgShopRatingServiceId: string, * remoteKey: string, * score: int|'', * rawData: string, * ratingUser: string, * ratingText: string, * ratingDate: string, *
-
CacheUtil
__construct
* @var string
$this->cacheBaseDir = $cacheBaseDir;
-
CacheUtil
getCacheDirectory
* @param string $cacheBaseDir
$dir = $this->cacheBaseDir.'/RatingServicesCache/'; if (!file_exists($dir)) { mkdir($dir, 0777, true); if (!file_exists($dir)) { $dir = null;
-
ShopRatingServiceTrustedShopsDataAccess
__construct
* @var Connection
$this->databaseConnection = $databaseConnection;
-
Configuration
getConfigTreeBuilder
* {@inheritdoc}
$treeBuilder = new TreeBuilder('chameleon_system_shop_rating_service'); $root = $treeBuilder->getRootNode(); $root ->children() ->arrayNode('ekomi') ->canBeEnabled() ->end() ->end() ; return $treeBuilder;
-
TPkgRatingServiceEkomiMapper
GetRequirements
* {@inheritdoc}
null
-
TPkgRatingServiceEkomiMapper
Accept
* {@inheritdoc}
$oRatingService = TdbPkgShopRatingService::GetInstanceFromSystemName('ekomi'); if ($oRatingService) { $oVisitor->SetMappedValue('sRatingApiId', $oRatingService->fieldRatingApiId); $oVisitor->SetMappedValue('current_rating', $oRatingService->fieldCurrentRating); if ($bCachingEnabled) { $oCacheTriggerManager->addTrigger($oRatingService->table, $oRatingService->id);
-
XmlStreamer
__construct
https://github.com/prewk/XmlStreamer Licensed under MIT: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
if (is_string($mixed)) { $this->handle = fopen($mixed, 'r'); if (isset($totalBytes)) { $this->totalBytes = $totalBytes;
-
XmlStreamer
init
* @param string|resource $mixed Path to XML file OR file handle * @param int $chunkSize Bytes to read per cycle (Optional, default is 16 KiB) * @param string|null $customRootNode Specific root node to use (Optional) * @param int|null $totalBytes Xml file size - Required if supplied file handle
null
-
XmlStreamer
chunkCompleted
* Called after the constructor completed setup of the class. Can be overriden in a child class.
null
-
XmlStreamer
processNode; /** * Gets the total read bytes so far. */ public function getReadBytes
* Called after a chunk was completed. Useful to chunk INSERT data into DB.
return $this->readBytes;
-
XmlStreamer
getTotalBytes
* Gets called for every XML node that is found as a child to the root node. * * @param string $xmlString Complete XML tree of the node as a string * @param string $elementName Name of the node for easy access * @param int $nodeIndex Zero-based index that increments for every node * * @return bool - If false is returned, the streaming will stop
return $this->totalBytes;
-
XmlStreamer
parse
* Gets the total read bytes so far.
$counter = 0; $continue = true; while ($continue) { $continue = $this->readNextChunk(); ++$counter; if (!isset($this->rootNode)) { // Find root node if (isset($this->customRootNode)) { $customRootNodePos = strpos($this->chunk, "<{$this->customRootNode
-
ShopauskunftXmlStreamer
processNode
* Class ShopauskunftXmlStreamer.
$rating = simplexml_load_string($xmlString); $ratingId = (string) $rating->attributes()->id; if (!$this->checkIfRatingExists($ratingId)) { $averageScore = $this->getCriterionsAverageScore($rating); if ($averageScore < 0) { $averageScore = '';
-
ShopauskunftXmlStreamer
setRatingServiceId
@var string|null
$this->ratingServiceId = $ratingServiceId;
-
TPkgShopRatingService_EkomiEndPoint
SendShopRatingEmail
@var bool
return true;
-
TPkgShopRatingService_EkomiEndPoint
Import
@var string
$bSuccess = false; $cacheDir = $this->getCacheUtil()->getCacheDirectory(); if (null === $cacheDir) { $this->WriteLogEntry("Cache directory $cacheDir could not be found or written.", __LINE__); return false;
-
TPkgShopRatingService_Idealo
Render( $sViewName = 'RatingService_standard', $sViewSubType = 'pkgShopRatingService/views', $sViewType = 'Customer', $sSpotName = null, $aCallTimeVars = array )
* {@inheritdoc}
$aCallTimeVars['sRatingURL'] = $this->fieldRatingUrl; $aCallTimeVars['sRatingApiId'] = $this->fieldRatingApiId; $aCallTimeVars['oRatingServiceImage'] = $this->GetImage(0, 'icon_cms_media_id'); //please call parent here to render! $sHTML = parent::Render($sViewName, $sViewSubType, $sViewType, $sSpotName, $aCallTimeVars); return $sHTML;
-
TPkgShopRatingService_Shopauskunft
Import
* Import all ratings. * * @return bool
$cacheDirectoryPath = $this->getCacheUtil()->getCacheDirectory(); $xmlFileOrData = null; if (null !== $cacheDirectoryPath) { $cacheFilePath = $cacheDirectoryPath.'ShopAuskunftAPI_data.xml'; $this->downloadXml($cacheFilePath); if (file_exists($cacheFilePath)) { $xmlFileOrData = $cacheFilePath;
-
TPkgShopRatingService_Shopauskunft
Render( $sViewName = 'RatingService_standard', $sViewSubType = 'pkgShopRatingService/views', $sViewType = 'Customer', $sSpotName = null, $aCallTimeVars = array )
* streamer will only process elements with tag "rating" in element with tag "ratinglist".
$aCallTimeVars['sRatingURL'] = $this->fieldRatingUrl; $aCallTimeVars['sRatingApiId'] = $this->fieldRatingApiId; $aCallTimeVars['oRatingServiceImage'] = $this->GetImage(0, 'icon_cms_media_id'); //please call parent here to render! $sHTML = parent::Render($sViewName, $sViewSubType, $sViewType, $sSpotName, $aCallTimeVars); return $sHTML;
-
TPkgShopRatingService_TrustedShops
Import
* @var SimplePie
if ($this->LoadFeed()) { $dataAccess = $this->getDataAccess(); /** @var $item SimplePie_Item */ foreach ($this->data->get_items() as $item) { $itemCount = $dataAccess->getItemCountForRemoteKey($item->get_id()); if ($itemCount < 1) { $content = $this->ParseContentData($item->get_content(true)); $sRaw = $this->getRawData($item, $content); $iScoreValue = $this->ParseScoreFromRatingContent($item->get_content(true)); if ($iScoreValue < 0) { $iScoreValue = '';
-
TPkgShopRatingService_TrustedShops
TrustedShopsImage_CacheCheck
* @var bool
$bRet = false; if (file_exists($filename_cache)) { $timestamp = filemtime($filename_cache); // Seconds if (time() - $timestamp < $timeout) { $bRet = true;
-
TPkgShopRatingService_TrustedShops
Render( $sViewName = 'RatingService_standard', $sViewSubType = 'pkgShopRatingService/views', $sViewType = 'Customer', $sSpotName = null, $aCallTimeVars = array )
* @var string
$aCallTimeVars['oRatingServiceImage'] = $this->GetImage(0, 'icon_cms_media_id'); $aCallTimeVars['sWidgetImageURL'] = $this->GetUserRatingWidgetImage(); $aCallTimeVars['sRatingApiId'] = $this->fieldRatingApiId; //please call parent here to render! return parent::Render($sViewName, $sViewSubType, $sViewType, $sSpotName, $aCallTimeVars);
-
TShopAuskunftAPI
__construct
* TShopAuskunftAPI Class to fetch data. * /*
if (!($this->parser = xml_parser_create())) { die('Cannot create parser');
-
TShopAuskunftAPI
TShopAuskunftAPI
@var XMLParser
$this->callConstructorAndLogDeprecation(func_get_args());
-
TShopAuskunftAPI
ReadFromURI
@var bool
$sBuf = ''; $fp = @fopen($sURL, 'r'); if (!$fp) { echo "<!-- shopauskunft - no connection! -->\n";
-
TShopAuskunftAPI
start_tag
@var array<string, string>
$this->current = $name; $this->inside_data = false; //if ($name == "RATINGLIST") { echo "<pre>liste begin\n";
-
TShopAuskunftAPI
end_tag
@var bool
//if ($name == "RATINGLIST") { echo "liste end</pre>";
-
TShopAuskunftAPI
tag_contents
@var array array<string, string>
if (strlen(trim($data)) > 0) { if ('SHOPAUSKUNFTID' == $this->current) { $this->aAPIData['Shopauskunft']['Shop']['shopauskunftID'] = $data;
-
TShopAuskunftAPI
parse
* Current active tag * @var string
if (!empty($data)) { //$data = eregi_replace(">"."[[:space:]]+"."< ",">< ",$data); $data = preg_replace("/>\s+</i", '><', $data); if (!xml_parse($this->parser, $data, true)) { $this->xmlParsingError = ''; $this->xmlParsingError = xml_error_string(xml_get_error_code($this->parser)); $this->xmlParsingError .= xml_get_current_line_number($this->parser); return false; //+++ die($reason);
-
TShopAuskunftAPI
ParseXML
@var bool
/* $encoding = 'UTF-8'; $php_errormsg=""; $this->result=""; $this->evalCode=""; $values=""; if (!$data) return 'Cannot open xml document: ' . (isset($php_errormsg) ? $php_errormsg : $file); $parser = xml_parser_create($encoding); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); $ok = xml_parse_into_struct($parser, $data, $values); if (!$ok) { $errmsg = sprintf("XML parse error %d '%s' at line %d, column %d (byte index %d)", xml_get_error_code($parser), xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser), xml_get_current_column_number($parser), xml_get_current_byte_index($parser));
-
TPkgShopRating_CronJob_SendRatingMails
GetShippingDateLowerBound
* the cronjob sends a rating mail to compleat shipped orders * see #10393. * /*
$iAgeInDays = $this->Shopreviewmail_MailDelay; $iNow = time(); $hour = date('G', $iNow); $minute = date('i', $iNow); if ('0' == substr($minute, 0, 1)) { $minute = substr($minute, 1);
-
TPkgShopRating_CronJob_SendRatingMails
SendCustomersMailOnlyOnce
@var bool
return '0' == $this->Shopreviewmail_SendForEachOrder;
-
TPkgShopRating_CronJob_SendRatingMails
AllowSendingMailForOrder
* set to true if you do not want to insert the info into the db if the mail was sent. * * @var bool
$bAllowSendingMail = true; // make sure the order is a DE order if ($aOrder['cms_language_id'] != $this->sLanguageID) { $bAllowSendingMail = false;
-
TPkgShopRating_CronJob_SendRatingMails
SendShopReviewMail
@var int
$bMailWasSend = false; $oUser = TdbDataExtranetUser::GetNewInstance(); $oUser->Load($aOrder['data_extranet_user_id']); if ($this->AllowSendingMailForOrder($oUser, $aOrder)) { $oRatingService = $this->GetSuitableRatingService($oUser, $aOrder); if (null !== $oRatingService) { $bMailWasSend = $oRatingService->SendShopRatingEmail($oUser, $aOrder); if ($bMailWasSend) { $query = "UPDATE `shop_order` SET `pkg_shop_rating_service_mail_sent` = '1', `pkg_shop_rating_service_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oRatingService->id)."' WHERE `id` = '".MySqlLegacySupport::getInstance()->real_escape_string($aOrder['id'])."'"; MySqlLegacySupport::getInstance()->query($query); if (false == $this->bDisableSentHistory) { $sNewID = TTools::GetUUID(); $iSendDate = date('Y-m-d H:i:s'); $query = "INSERT INTO `pkg_shop_rating_service_history` SET `id` = '".MySqlLegacySupport::getInstance()->real_escape_string($sNewID)."', `data_extranet_user_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oUser->id)."', `shop_order_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($aOrder['id'])."', `date` = '".MySqlLegacySupport::getInstance()->real_escape_string($iSendDate)."', `pkg_shop_rating_service_id_list` = '".MySqlLegacySupport::getInstance()->real_escape_string($oRatingService->id)."' "; if ($this->bDebug) { echo __LINE__.': '.$query."\n<br />\n";
-
TPkgShopRating_CronJob_SendRatingMails
GetMaxNumberOfShopReviewMailsToSend
@var float
if ($this->bDebug) { echo '<br><br>';
-
TPkgShopRating_CronJob_SendRatingMails
SetDisableSentHistory
@var bool
$this->bDisableSentHistory = $bDisableSentHistory;
-
TPkgShopRatingService
Render
* return the rating service via system name. * * @static * * @param string $sSystemName * * @return TdbPkgShopRatingService|null
$sHTML = ''; $oView = new TViewParser(); /** @var $oView TViewParser */ //create view name for this "active" rating-service if (!empty($this->fieldAffiliateValue)) { $sViewName = $sViewName.'_'.trim($this->fieldAffiliateValue);
-
TPkgShopRatingService
Import
* Return new instance of "row-object". * * factory creates a new instance and returns it. * * @param string|array $sData - either the id of the object to load, or the row with which the instance should be initialized * @param string $sLanguage - init with the language passed * * @return TdbPkgShopRatingService
return false;
-
TPkgShopRatingService
GetLinkRating
@var $oInterface TCMSInterfaceManagerBase
$sRetLink = ''; if (!empty($this->fieldRatingUrl)) { $sRetLink = $this->fieldRatingUrl;
-
TPkgShopRatingService
GetLinkInfoPage
* Render rating-widget for active rating-service. * * @param string $sViewName * @param string $sViewSubType * @param string $sViewType * @param null $sSpotName * @param array $aCallTimeVars * * @return string
$sRetLink = ''; if (!empty($this->fieldRatingUserinfoUrl)) { $sRetLink = $this->fieldRatingUserinfoUrl;
-
TPkgShopRatingService
SendShopRatingEmail
@var $oView TViewParser
$oMailProfile = TdbDataMailProfile::GetProfile('shop_rating_request'); $sSalutationName = ''; $oSalutation = TdbDataExtranetSalutation::GetNewInstance(); if ($oSalutation->Load($aOrder['adr_billing_salutation_id'])) { $sSalutationName = $oSalutation->fieldName;
-
TPkgShopRatingServiceRating
Render
* Render object. * * @param string $sViewName * @param string $sViewSubType * @param string $sViewType * @param null $sSpotName * @param array $aCallTimeVars * * @return string
$oView = new TViewParser(); $oRatingService = $this->GetFieldPkgShopRatingService(); $oView->AddVar('oRating', $this); $oView->AddVar('oRatingService', $oRatingService); $oView->AddVar('fieldRatingDate', $this->fieldRatingDate); $sRatingText = $this->fieldRatingText; if (false == $oRatingService->fieldRatingsContainHtml) { $sRatingText = nl2br(TGlobal::OutHTML(strip_tags($sRatingText)));
-
for
Init
* Module class for RatingList-Module.
parent::Init(); // get page size from session $this->iPageSize = intval($this->GetModuleSessionParameter('pagesize', $this->iPageSize)); /** @psalm-suppress InvalidPropertyAssignmentValue */ $this->iActivePage = $this->GetUserInput('page', $this->iActivePage, TCMSUserInput::FILTER_INT); /** @psalm-suppress InvalidPropertyAssignmentValue */ $this->iPageSize = $this->GetUserInput('pagesize', $this->iPageSize, TCMSUserInput::FILTER_INT); if (!in_array($this->iPageSize, $this->aPageSizes)) { $this->iPageSize = $this->aPageSizes[0];
-
for
Execute
* @var int
parent::Execute(); $sOrderBy = ' `rating_date` DESC'; switch ($this->sActivePageSort) { case $this->aPageSort[0]['id']: $sOrderBy = ' `rating_date` DESC'; break; case $this->aPageSort[1]['id']: $sOrderBy = ' `score` DESC, `rating_date` DESC '; break; case $this->aPageSort[2]['id']: $sOrderBy = ' `score` ASC'; break;
-
for
Execute
* Module class for RatingServiceWidget. * /*
parent::Execute(); $this->data['oModuleConfig'] = $this->GetModuleConfig(); $this->data['oRatingService'] = $this->GetRatingService(); return $this->data;
-
for
GetHtmlHeadIncludes
* @var TdbPkgShopRatingServiceWidgetConfig|null
$aIncludes = parent::GetHtmlHeadIncludes(); //if (!is_array($aIncludes)) $aIncludes = array(); //$aIncludes[] = "<link type='text/css' rel='stylesheet' href='/assets/css/PkgShopRatingServiceWidget.css' />"; //$aIncludes[] = "<script type='text/javascript' src='/assets/js/PkgShopRatingServiceWidget.js'></script>"; return $aIncludes;
-
for
_AllowCache
* Select right RatingService object. * * @return TdbPkgShopRatingService|null
return false;
-
for
_GetCacheTableInfos
* loads config for instance. * * @return TdbPkgShopRatingServiceWidgetConfig|null
$aTrigger = parent::_GetCacheTableInfos(); if (!is_array($aTrigger)) { $aTrigger = array();
-
for
Execute
* Module class for RatingTeaser-Module. * /*
parent::Execute(); $this->data['oModuleConfig'] = $this->GetModuleConfig(); $oItem = $this->GetRatingItem(); if ($oItem) { $this->data['sRatingItemContent'] = $oItem->Render();
-
for
_AllowCache
* @var TdbPkgShopRatingServiceTeaserCnf|null
return false;
-
for
_GetCacheTableInfos
* Select one (random) rating item. * * @return TdbPkgShopRatingServiceRating|null
$aTrigger = parent::_GetCacheTableInfos(); if (!is_array($aTrigger)) { $aTrigger = array();
-
ChameleonSystemShopWishlistExtension
load
* {@inheritdoc} * * @return void
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); $loader->load('services.xml');
-
TCMSCronJob_CleanWishlist
__construct
* @return void
parent::__construct();
-
TPkgShopWishlist
AddArticle
* adds an article to the wishlist - returns the new amount of that article on the list. * * @param string $sArticleId * @param float $dAmount * @param string $sComment - optional comment * * @return float
$dNewAmount = 0; $aItemData = array(); $oItem = TdbPkgShopWishlistArticle::GetNewInstance(); /** @var $oItem TdbPkgShopWishlistArticle */ if ($oItem->LoadFromFields(array('pkg_shop_wishlist_id' => $this->id, 'shop_article_id' => $sArticleId))) { $aItemData = $oItem->sqlData; $aItemData['amount'] += $dAmount;
-
TPkgShopWishlist
GetMsgConsumerName
@var $oItem TdbPkgShopWishlistArticle
return TdbPkgShopWishlist::MSG_CONSUMER_BASE_NAME.$this->id;
-
TPkgShopWishlist
Render
* return the msg consumer name for the wishlist instance. * * @return string
$oView = new TViewParser(); $oMsgManager = TCMSMessageManager::GetInstance(); $sMessages = ''; if ($oMsgManager->ConsumerHasMessages($this->GetMsgConsumerName())) { $sMessages = $oMsgManager->RenderMessages($this->GetMsgConsumerName());
-
TPkgShopWishlist
GetLink
* render the filter. * * @param string $sViewName - name of the view * @param string $sViewType - where to look for the view * @param array $aCallTimeVars - optional parameters to pass to render method * * @return string
if (!empty($sMode)) { $aAdditionalParameter[MTPkgShopWishlistCore::URL_MODE_PARAMETER_NAME] = $sMode;
-
TPkgShopWishlist
GetPublicLink
* return link to the private view of the wishlist. * * @param string $sMode - select a mode of the wishlist (such as SendForm) * @param array $aAdditionalParameter * * @return string
$oShopConfig = TdbShop::GetInstance(); $aAdditionalParameter[MTPkgShopWishlistPublicCore::URL_PARAMETER_NAME] = array('id' => $this->id); return $oShopConfig->GetLinkToSystemPage('wishlist-public', $aAdditionalParameter, true);
-
TPkgShopWishlist
GetNumberOfItemsInList
* return the public link to the wishlist. * * @param array $aAdditionalParameter * * @return string
$oWishlistItems = $this->GetFieldPkgShopWishlistArticleList(); return $oWishlistItems->Length();
-
TPkgShopWishlist
GetFieldPkgShopWishlistArticleList
* returns the number of wishlist items on the list. * * @return int
$oWishlistItems = $this->GetFromInternalCache('oPkgShopWishlistArticleList'); if (is_null($oWishlistItems)) { $oWishlistItems = TdbPkgShopWishlistArticleList::GetListForPkgShopWishlistId($this->id, $this->iLanguageId); $oWishlistItems->bAllowItemCache = true; $this->SetInternalCache('oPkgShopWishlistArticleList', $oWishlistItems);
-
TPkgShopWishlist
GetFieldPkgShopWishlistMailHistoryList
* Artikel der Wunschliste. * * @return TdbPkgShopWishlistArticleList
$oWishlistHistoryItems = $this->GetFromInternalCache('oPkgShopWishlistMailHistoryList'); if (is_null($oWishlistHistoryItems)) { $oWishlistHistoryItems = TdbPkgShopWishlistMailHistoryList::GetListForPkgShopWishlistId($this->id, $this->iLanguageId); $oWishlistHistoryItems->bAllowItemCache = true; $this->SetInternalCache('oPkgShopWishlistMailHistoryList', $oWishlistHistoryItems);
-
TPkgShopWishlist
GetDescriptionAsHTML
* Wunschslisten Mailhistory. * * @return TdbPkgShopWishlistMailHistoryList
$sText = trim($this->fieldDescription); $sText = TGlobal::OutHTML($sText); $sText = nl2br($sText); return $sText;
-
TPkgShopWishlist
SendPerMail
* use this method to add any variables to the render method that you may * require for some view. * * @param string $sViewName - the view being requested * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) * * @return array
$bSendSuccess = false; $oOwner = $this->GetFieldDataExtranetUser(); $oMail = TdbDataMailProfile::GetProfile('SendWishlist'); $aMailData = array('to_name' => $sToName, 'to_mail' => $sToMail, 'comment' => $sComment, 'sWishlistURL' => $this->GetPublicLink()); $oMail->AddDataArray($aMailData); $aUserData = $oOwner->GetObjectPropertiesAsArray(); $oMail->AddDataArray($aUserData); $oMail->ChangeFromAddress($oOwner->GetUserEMail(), $oOwner->fieldFirstname.' '.$oOwner->fieldLastname); $oMail->ChangeToAddress($sToMail, $sToName); if ($oMail->SendUsingObjectView('emails', 'Customer')) { $bSendSuccess = true; $oHistory = TdbPkgShopWishlistMailHistory::GetNewInstance(); /** @var $oHistory TdbPkgShopWishlistMailHistory */ $aData = array('to_name' => $sToName, 'to_email' => $sToMail, 'comment' => $sComment, 'datesend' => date('Y-m-d H:i:s'), 'pkg_shop_wishlist_id' => $this->id); $oHistory->LoadFromRow($aData); $oHistory->AllowEditByAll(true); $oHistory->Save();
-
TPkgShopWishlistArticle
GetCommentAsHTML
* return comment text as html. * * @return string
$sText = trim($this->fieldComment); $sText = TGlobal::OutHTML($sText); $sText = nl2br($sText); return $sText;
-
TPkgShopWishlistArticle
GetRemoveFromWishlistLink
* get link to remove item from wishlist. * * @param bool $bIncludePortalLink * * @return string
$oShopConfig = TdbShop::GetInstance(); $aParameters = array('module_fnc['.$oShopConfig->GetBasketModuleSpotName().']' => 'RemoveFromWishlist', MTShopBasketCore::URL_ITEM_ID => $this->id, MTShopBasketCore::URL_MESSAGE_CONSUMER => MTShopBasketCore::MSG_CONSUMER_NAME); return $this->getActivePageService()->getLinkToActivePageRelative($aParameters);
-