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
TShopWishlistArticle
GetToWishlistLink
* return the link that can be used to add the article to the users wishlist. * * @param bool $bIncludePortalLink * @param bool $bRedirectToLoginPage * * @return string
$oShopConfig = TdbShop::GetInstance(); $aParameters = array('module_fnc['.$oShopConfig->GetBasketModuleSpotName().']' => 'AddToWishlist', MTShopBasketCore::URL_ITEM_ID => $this->id, MTShopBasketCore::URL_ITEM_AMOUNT => 1, MTShopBasketCore::URL_MESSAGE_CONSUMER => $this->GetMessageConsumerName()); $aIncludeParams = TdbShop::GetURLPageStateParameters(); $oGlobal = TGlobal::instance(); foreach ($aIncludeParams as $sKeyName) { if ($oGlobal->UserDataExists($sKeyName) && !array_key_exists($sKeyName, $aParameters)) { $aParameters[$sKeyName] = $oGlobal->GetUserData($sKeyName);
-
MTPkgShopWishlistCore
Init
* controlls the mode of the module.
parent::Init(); $this->aUserInput = $this->global->GetUserData(TdbPkgShopWishlist::URL_PARAMETER_FILTER_DATA); if ($this->global->userdataExists(self::URL_MODE_PARAMETER_NAME)) { $aAllowedModes = array('', 'SendForm'); $sMode = $this->global->GetUserData(self::URL_MODE_PARAMETER_NAME); if (in_array($sMode, $aAllowedModes)) { $this->sActiveMode = $sMode;
-
MTPkgShopWishlistCore
Execute
* @var string
parent::Execute(); if (!empty($this->sActiveMode)) { switch ($this->sActiveMode) { case 'SendForm': $this->ExecuteSendFormMode(); break; default: break;
-
MTPkgShopWishlistPublicCore
Init
* module is used to allow a user to search for public wishlist, and to display * the detailpage of a wishlist when given the lists id. /*
parent::Init(); if ($this->global->userdataExists(self::URL_PARAMETER_NAME)) { $this->aUserInput = $this->global->GetUserData(self::URL_PARAMETER_NAME); if (!is_array($this->aUserInput)) { $this->aUserInput = array();
-
MTPkgShopWishlistPublicCore
Execute
* active wishlist if there is one. * * @var TdbPkgShopWishlist
parent::Execute(); $this->data['oActiveWishlist'] = $this->oActiveWishlist; return $this->data;
-
MTShopWishlistBasketCore
GetHtmlHeadIncludes
* Adds the article passed to the wishlist of the user (if the user is logged in). * * @param string $sArticleId * @param float $dAmount * @param string $sMessageHandler * @param bool $bIsInternalCall * * @return void
$aIncludes = parent::GetHtmlHeadIncludes(); $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/shopBasket')); return $aIncludes;
-
TShopWishlistDataExtranetUser
AddArticleIdToWishlist
* add an article to the wishlist. * * @param string $sArticleId * @param float $dAmount * * @return float - new amount on list
$dNewAmountOnList = 0; $oWishlist = $this->GetWishlist(true); $dNewAmountOnList = $oWishlist->AddArticle($sArticleId, $dAmount); return $dNewAmountOnList;
-
TShopWishlistDataExtranetUser
RemoveArticleFromWishlist
* remove an article form the wishlist. * * @param string $sPkgShopWishlistArticleId - the id of the item on the list * * @return void
$oWishlist = $this->GetWishlist(true); $oWishlistItem = TdbPkgShopWishlistArticle::GetNewInstance(); /** @var $oWishlistItem TdbPkgShopWishlistArticle */ if ($oWishlistItem->LoadFromFields(array('pkg_shop_wishlist_id' => $oWishlist->id, 'id' => $sPkgShopWishlistArticleId))) { $oWishlistItem->AllowEditByAll(true); $oWishlistItem->Delete();
-
TShopWishlistDataExtranetUser
GetWishlist
@var $oWishlistItem TdbPkgShopWishlistArticle
/** @var TdbPkgShopWishlist|null $oWishlist */ $oWishlist = $this->GetFromInternalCache('oUserWishlist'); if (is_null($oWishlist)) { $oWishlists = $this->GetFieldPkgShopWishlistList(); if ($oWishlists->Length() > 0) { /** @var TdbPkgShopWishlist $oWishlist */ $oWishlist = $oWishlists->Current();
-