idx int64 0 60.3k | question stringlengths 101 6.21k | target stringlengths 7 803 |
|---|---|---|
36,300 | public function getNrOfCatArticles ( ) { $ sListType = \ OxidEsales \ Eshop \ Core \ Registry :: getSession ( ) -> getVariable ( 'ldtype' ) ; if ( is_null ( $ sListType ) ) { $ sListType = $ this -> getConfig ( ) -> getConfigParam ( 'sDefaultListDisplayType' ) ; } if ( 'grid' === $ sListType ) { $ aNrOfCatArticles = $ ... | Returns config param aNrofCatArticles value |
36,301 | public function getShowCompareList ( ) { $ myConfig = $ this -> getConfig ( ) ; $ blShowCompareList = true ; if ( ! $ myConfig -> getConfigParam ( 'bl_showCompareList' ) || ( $ myConfig -> getConfigParam ( 'blDisableNavBars' ) && $ myConfig -> getActiveView ( ) -> getIsOrderStep ( ) ) ) { $ blShowCompareList = false ; ... | Returns config param bl_showCompareList value |
36,302 | public function getActLanguageId ( ) { if ( ( $ sValue = $ this -> getViewConfigParam ( 'lang' ) ) === null ) { $ iLang = $ this -> getConfig ( ) -> getRequestParameter ( 'lang' ) ; $ sValue = ( $ iLang !== null ) ? $ iLang : \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) -> getBaseLanguage ( ) ; $ this -> setVi... | Returns session language id |
36,303 | public function getNavUrlParams ( ) { if ( ( $ sParams = $ this -> getViewConfigParam ( 'navurlparams' ) ) === null ) { $ sParams = '' ; $ aNavParams = $ this -> getConfig ( ) -> getActiveView ( ) -> getNavigationParams ( ) ; foreach ( $ aNavParams as $ sName => $ sValue ) { if ( isset ( $ sValue ) ) { if ( $ sParams )... | Returns navigation url parameters |
36,304 | public function getNavFormParams ( ) { if ( ( $ sParams = $ this -> getViewConfigParam ( 'navformparams' ) ) === null ) { $ oStr = getStr ( ) ; $ sParams = '' ; $ aNavParams = $ this -> getConfig ( ) -> getTopActiveView ( ) -> getNavigationParams ( ) ; foreach ( $ aNavParams as $ sName => $ sValue ) { if ( isset ( $ sV... | Returns navigation forms parameters |
36,305 | public function isMultiShop ( ) { $ oShop = $ this -> getConfig ( ) -> getActiveShop ( ) ; return isset ( $ oShop -> oxshops__oxismultishop ) ? ( ( bool ) $ oShop -> oxshops__oxismultishop -> value ) : false ; } | Returns multishop status |
36,306 | public function getBasketTimeLeft ( ) { if ( ! isset ( $ this -> _dBasketTimeLeft ) ) { $ this -> _dBasketTimeLeft = $ this -> getSession ( ) -> getBasketReservations ( ) -> getTimeLeft ( ) ; } return $ this -> _dBasketTimeLeft ; } | return the seconds left until basket expiration |
36,307 | public function getCountryList ( ) { if ( $ this -> _oCountryList === null ) { $ this -> _oCountryList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ CountryList :: class ) ; $ this -> _oCountryList -> loadActiveCountries ( ) ; } return $ this -> _oCountryList ; } | Return country list |
36,308 | public function getModulePath ( $ sModule , $ sFile = '' ) { if ( ! $ sFile || ( $ sFile [ 0 ] != '/' ) ) { $ sFile = '/' . $ sFile ; } $ oModule = oxNew ( \ OxidEsales \ Eshop \ Core \ Module \ Module :: class ) ; $ sModulePath = $ oModule -> getModulePath ( $ sModule ) ; $ sFile = $ this -> getConfig ( ) -> getModule... | return path to the requested module file |
36,309 | public function getModuleUrl ( $ sModule , $ sFile = '' ) { $ c = $ this -> getConfig ( ) ; $ shopUrl = null ; if ( $ this -> isAdmin ( ) ) { if ( $ c -> isSsl ( ) ) { $ shopUrl = $ c -> getConfigParam ( 'sAdminSSLURL' ) ; if ( $ shopUrl ) { $ adminDir = '/' . $ c -> getConfigParam ( 'sAdminDir' ) ; $ shopUrl = substr ... | return url to the requested module file |
36,310 | public function isModuleActive ( $ sModuleId , $ sVersionFrom = null , $ sVersionTo = null ) { $ blModuleIsActive = false ; $ aModuleVersions = $ this -> getConfig ( ) -> getConfigParam ( 'aModuleVersions' ) ; if ( is_array ( $ aModuleVersions ) ) { $ blModuleIsActive = $ this -> _moduleExists ( $ sModuleId , $ aModule... | Check if module is active . If versionFrom or|and versionTo is defined - also checks module versions . |
36,311 | public function getViewThemeParam ( $ sName ) { $ sValue = false ; if ( $ this -> getConfig ( ) -> isThemeOption ( $ sName ) ) { $ sValue = $ this -> getConfig ( ) -> getConfigParam ( $ sName ) ; } return $ sValue ; } | return param value |
36,312 | public function isAltImageServerConfigured ( ) { $ oConfig = $ this -> getConfig ( ) ; return $ oConfig -> getConfigParam ( 'sAltImageUrl' ) || $ oConfig -> getConfigParam ( 'sSSLAltImageUrl' ) || $ oConfig -> getConfigParam ( 'sAltImageDir' ) || $ oConfig -> getConfigParam ( 'sSSLAltImageDir' ) ; } | Checks if alternative image server is configured . |
36,313 | public function getActiveTheme ( ) { if ( $ this -> _sActiveTheme === null ) { $ oTheme = oxNew ( \ OxidEsales \ Eshop \ Core \ Theme :: class ) ; $ this -> _sActiveTheme = $ oTheme -> getActiveThemeId ( ) ; } return $ this -> _sActiveTheme ; } | Returns active theme name |
36,314 | public function getShopLogo ( ) { if ( is_null ( $ this -> _sShopLogo ) ) { $ sLogoImage = $ this -> getConfig ( ) -> getConfigParam ( 'sShopLogo' ) ; if ( empty ( $ sLogoImage ) ) { $ editionSelector = new EditionSelector ( ) ; $ sLogoImage = "logo_" . strtolower ( $ editionSelector -> getEdition ( ) ) . ".png" ; } $ ... | Returns shop logo image file name from config option |
36,315 | private function _isModuleVersionCorrect ( $ sModuleId , $ sVersionFrom , $ sVersionTo ) { $ blModuleIsActive = true ; $ aModuleVersions = $ this -> getConfig ( ) -> getConfigParam ( 'aModuleVersions' ) ; if ( $ sVersionFrom && ! version_compare ( $ aModuleVersions [ $ sModuleId ] , $ sVersionFrom , '>=' ) ) { $ blModu... | Checks whether module version is between given range . |
36,316 | public function getViewParameter ( $ sKey ) { return ( isset ( $ this -> _aViewParams [ $ sKey ] ) ) ? $ this -> _aViewParams [ $ sKey ] : \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( $ sKey ) ; } | Get parameters to controllers |
36,317 | public function getBelboonParam ( ) { if ( $ sBelboon = $ this -> getSession ( ) -> getVariable ( 'belboon' ) ) { return $ sBelboon ; } if ( ( $ sBelboon = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'belboon' ) ) ) { $ this -> getSession ( ) -> setVariable ( 'belboon' , $ sBelboon ... | Returns belboon parameter |
36,318 | public function getViewConfig ( ) { if ( $ this -> _oViewConf === null ) { $ this -> _oViewConf = oxNew ( \ OxidEsales \ Eshop \ Core \ ViewConfig :: class ) ; } return $ this -> _oViewConf ; } | Returns view config object |
36,319 | public function getViewDataElement ( $ sParamId = null ) { $ return = null ; if ( $ sParamId && isset ( $ this -> _aViewData [ $ sParamId ] ) ) { $ return = $ this -> _aViewData [ $ sParamId ] ; } return $ return ; } | Get view data single array element |
36,320 | protected function _executeNewAction ( $ sNewAction ) { if ( $ sNewAction ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ params = explode ( '?' , $ sNewAction ) ; $ pageParams = isset ( $ params [ 1 ] ) ? $ params [ 1 ] : null ; $ params = explode ( '/' , $ params [ 0 ] ) ; $ className = $... | Formats header for new controller action |
36,321 | public function getCharSet ( ) { if ( $ this -> _sCharSet == null ) { $ this -> _sCharSet = \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) -> translateString ( 'charset' ) ; } return $ this -> _sCharSet ; } | Returns active charset |
36,322 | public function getShopFullEdition ( ) { $ sEdition = $ this -> getShopEdition ( ) ; $ sFullEdition = "Community Edition" ; if ( $ sEdition == "PE" ) { $ sFullEdition = "Professional Edition" ; } if ( $ sEdition == "EE" ) { $ sFullEdition = "Enterprise Edition" ; } return $ sFullEdition ; } | Returns shop full edition |
36,323 | public function isDemoVersion ( ) { if ( $ this -> _blDemoVersion == null ) { $ this -> _blDemoVersion = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> detectVersion ( ) == 1 ; } return $ this -> _blDemoVersion ; } | Returns if current shop is demo version |
36,324 | public function isDemoShop ( ) { if ( $ this -> _blDemoShop == null ) { $ this -> _blDemoShop = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> isDemoShop ( ) ; } return $ this -> _blDemoShop ; } | Returns if current shop is demo shop |
36,325 | public function getActCategory ( ) { if ( $ this -> _oClickCat === null ) { $ this -> _oClickCat = false ; $ oCategory = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Category :: class ) ; if ( $ oCategory -> load ( $ this -> getCategoryId ( ) ) ) { $ this -> _oClickCat = $ oCategory ; } } return $ this -> _oCli... | Returns active category set by categories component ; if category is not set by component - will create category object and will try to load by id passed by request |
36,326 | public function getCategoryId ( ) { if ( $ this -> _sCategoryId == null && ( $ sCatId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'cnid' ) ) ) { $ this -> _sCategoryId = $ sCatId ; } return $ this -> _sCategoryId ; } | Get category ID |
36,327 | public function getSidForWidget ( ) { $ oSession = $ this -> getSession ( ) ; $ sid = null ; if ( ! $ oSession -> isActualSidInCookie ( ) ) { $ sid = $ oSession -> getId ( ) ; } return $ sid ; } | Returns session ID but only in case it is needed to be included for widget calls . This basically happens on session change when session cookie is not equals to the actual session ID . |
36,328 | public function load ( $ oxID ) { if ( $ blRet = parent :: load ( $ oxID ) ) { $ this -> oxremark__oxcreate = new \ OxidEsales \ Eshop \ Core \ Field ( \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsDate ( ) -> formatDBDate ( $ this -> oxremark__oxcreate -> value ) , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; ... | Loads object information from DB . Returns true on success . |
36,329 | protected function _insert ( ) { $ sNow = date ( 'Y-m-d H:i:s' , \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsDate ( ) -> getTime ( ) ) ; $ this -> oxremark__oxcreate = new \ OxidEsales \ Eshop \ Core \ Field ( $ sNow , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; $ this -> oxremark__oxheader = new \ OxidEsale... | Inserts object data fields in DB . Returns true on success . |
36,330 | public function getOrderFilesList ( ) { if ( $ this -> _oOrderFilesList !== null ) { return $ this -> _oOrderFilesList ; } $ oOrderFileList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ OrderFileList :: class ) ; $ oOrderFileList -> loadUserFiles ( $ this -> getUser ( ) -> getId ( ) ) ; $ this -> _oOrderFilesL... | Returns article list which was ordered and has downloadable files |
36,331 | protected function _prepareForTemplate ( $ oOrderFileList ) { $ oOrderArticles = [ ] ; foreach ( $ oOrderFileList as $ oOrderFile ) { $ sOrderArticleIdField = 'oxorderfiles__oxorderarticleid' ; $ sOrderNumberField = 'oxorderfiles__oxordernr' ; $ sOrderDateField = 'oxorderfiles__oxorderdate' ; $ sOrderTitleField = 'oxor... | Returns prepared orders files list |
36,332 | protected function _getStateObject ( ) { if ( is_null ( $ this -> _oStateObject ) ) { $ this -> _oStateObject = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ State :: class ) ; } return $ this -> _oStateObject ; } | Gets state object . |
36,333 | public function getNewsSubscription ( ) { if ( $ this -> _oNewsSubscription !== null ) { return $ this -> _oNewsSubscription ; } $ this -> _oNewsSubscription = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ NewsSubscribed :: class ) ; if ( ! $ this -> _oNewsSubscription -> loadFromUserId ( $ this -> getId ( ) ) )... | Returns user newsletter subscription controller object |
36,334 | public function getUserCountryId ( $ sCountry = null ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sQ = "select oxid from " . getviewName ( "oxcountry" ) . " where oxactive = '1' and oxisoalpha2 = " . $ oDb -> quote ( $ sCountry ) . " " ; $ sCountryId = $ oDb -> getOne ( $ sQ ) ; return $ ... | Returns user countryid according to passed name |
36,335 | public function getUserAddresses ( $ sUserId = null ) { $ sUserId = isset ( $ sUserId ) ? $ sUserId : $ this -> getId ( ) ; if ( ! isset ( $ this -> _aAddresses [ $ sUserId ] ) ) { $ oUserAddressList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ UserAddressList :: class ) ; $ oUserAddressList -> load ( $ sUser... | Returns user defined Address list object |
36,336 | protected function _getWishListId ( ) { $ this -> _sWishId = null ; $ oBasket = $ this -> getSession ( ) -> getBasket ( ) ; foreach ( $ oBasket -> getContents ( ) as $ oBasketItem ) { if ( $ this -> _sWishId = $ oBasketItem -> getWishId ( ) ) { break ; } } return $ this -> _sWishId ; } | Checks if product from wishlist is added |
36,337 | public function getUserPayments ( $ sOXID = null ) { if ( $ this -> _oPayments === null ) { if ( ! $ sOXID ) { $ sOXID = $ this -> getId ( ) ; } $ sSelect = 'select * from oxuserpayments where oxuserid = ' . \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> quote ( $ sOXID ) . ' ' ; $ this -> _oPayments = ... | Returns user payment history list object |
36,338 | public function exists ( $ sOXID = null ) { if ( ! $ sOXID ) { $ sOXID = $ this -> getId ( ) ; } if ( parent :: exists ( $ sOXID ) ) { $ this -> setId ( $ sOXID ) ; return true ; } $ sShopSelect = '' ; if ( ! $ this -> _blMallUsers && $ this -> oxuser__oxrights -> value != 'malladmin' ) { $ sShopSelect = ' AND oxshopid... | Checks if user exists in database . |
36,339 | public function getOrderCount ( ) { $ iCnt = 0 ; if ( $ this -> getId ( ) && $ this -> oxuser__oxregister -> value > 1 ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sQ = 'select count(*) from oxorder where oxuserid = ' . $ oDb -> quote ( $ this -> getId ( ) ) . ' AND oxorderdate >= ' . $ o... | Caclulates amount of orders made by user |
36,340 | public function getNoticeListArtCnt ( ) { if ( $ this -> _iCntNoticeListArticles === null ) { $ this -> _iCntNoticeListArticles = 0 ; if ( $ this -> getId ( ) ) { $ this -> _iCntNoticeListArticles = $ this -> getBasket ( 'noticelist' ) -> getItemCount ( ) ; } } return $ this -> _iCntNoticeListArticles ; } | Returns amount of articles in noticelist |
36,341 | public function getWishListArtCnt ( ) { if ( $ this -> _iCntWishListArticles === null ) { $ this -> _iCntWishListArticles = false ; if ( $ this -> getId ( ) ) { $ this -> _iCntWishListArticles = $ this -> getBasket ( 'wishlist' ) -> getItemCount ( ) ; } } return $ this -> _iCntWishListArticles ; } | Calculating user wishlist item count |
36,342 | public function getActiveCountry ( ) { $ sDeliveryCountry = '' ; $ soxAddressId = Registry :: getSession ( ) -> getVariable ( 'deladrid' ) ; if ( $ soxAddressId ) { $ oDelAddress = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Address :: class ) ; $ oDelAddress -> load ( $ soxAddressId ) ; $ sDeliveryCountry = $... | Returns user country ID but If delivery address is given - returns delivery country . |
36,343 | public function createUser ( ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sShopID = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getShopId ( ) ; $ sSelect = "select oxid from oxuser where oxusername = " . $ oDb -> quote ( $ this -> oxuser__oxusername -> value ) . " and oxpas... | Inserts new or updates existing user |
36,344 | public function addToGroup ( $ sGroupID ) { if ( ! $ this -> inGroup ( $ sGroupID ) ) { $ oGroup = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Groups :: class ) ; if ( $ oGroup -> load ( $ sGroupID ) ) { $ oNewGroup = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Object2Group :: class ) ; $ oNewGroup ->... | Adds user to the group |
36,345 | public function removeFromGroup ( $ sGroupID = null ) { if ( $ sGroupID != null && $ this -> inGroup ( $ sGroupID ) ) { $ oGroups = oxNew ( \ OxidEsales \ Eshop \ Core \ Model \ ListModel :: class ) ; $ oGroups -> init ( 'oxobject2group' ) ; $ sSelect = 'select * from oxobject2group where oxobject2group.oxobjectid = "'... | Removes user from passed user group . |
36,346 | public function onOrderExecute ( $ oBasket , $ iSuccess ) { if ( is_numeric ( $ iSuccess ) && $ iSuccess != 2 && $ iSuccess <= 3 ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ dMidlleCustPrice = ( float ) $ myConfig -> getConfigParam ( 'sMidlleCustPrice' ) ; $ dLargeCustPrice = ( float ) $... | Called after saving an order . |
36,347 | public function getBasket ( $ sName ) { if ( ! isset ( $ this -> _aBaskets [ $ sName ] ) ) { $ oBasket = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ UserBasket :: class ) ; $ aWhere = [ 'oxuserbaskets.oxuserid' => $ this -> getId ( ) , 'oxuserbaskets.oxtitle' => $ sName ] ; if ( ! $ oBasket -> assignRecord ( $... | Returns notice wishlist or saved basket object |
36,348 | public function convertBirthday ( $ aData ) { $ iYear = isset ( $ aData [ 'year' ] ) ? ( ( int ) $ aData [ 'year' ] ) : false ; $ iMonth = isset ( $ aData [ 'month' ] ) ? ( ( int ) $ aData [ 'month' ] ) : false ; $ iDay = isset ( $ aData [ 'day' ] ) ? ( ( int ) $ aData [ 'day' ] ) : false ; if ( ! $ iYear && ! $ iMonth... | User birthday converter . Usually this data comes in array form so before writing into DB it must be converted into string |
36,349 | public function getBoni ( ) { if ( ! $ iBoni = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'iCreditRating' ) ) { $ iBoni = 1000 ; } return $ iBoni ; } | Return standard credit rating can be set in config option iCreditRating ; |
36,350 | public function checkValues ( $ sLogin , $ sPassword , $ sPassword2 , $ aInvAddress , $ aDelAddress ) { $ oInputValidator = Registry :: getInputValidator ( ) ; $ sLogin = $ oInputValidator -> checkLogin ( $ this , $ sLogin , $ aInvAddress ) ; $ oInputValidator -> checkEmail ( $ this , $ sLogin ) ; $ oInputValidator -> ... | Performs bunch of checks if user profile data is correct ; on any error exception is thrown |
36,351 | public function setNewsSubscription ( $ blSubscribe , $ blSendOptIn , $ blForceCheckOptIn = false ) { $ blSuccess = false ; $ oNewsSubscription = $ this -> getNewsSubscription ( ) ; if ( $ oNewsSubscription ) { if ( $ blSubscribe && ( $ blForceCheckOptIn || ( $ iOptInStatus = $ oNewsSubscription -> getOptInStatus ( ) )... | Sets newsletter subscription status to user |
36,352 | protected function _getMergedAddressFields ( ) { $ sDelAddress = '' ; $ sDelAddress .= $ this -> oxuser__oxcompany ; $ sDelAddress .= $ this -> oxuser__oxusername ; $ sDelAddress .= $ this -> oxuser__oxfname ; $ sDelAddress .= $ this -> oxuser__oxlname ; $ sDelAddress .= $ this -> oxuser__oxstreet ; $ sDelAddress .= $ ... | Returns merged delivery address fields . |
36,353 | protected function _assignAddress ( $ aDelAddress ) { if ( is_array ( $ aDelAddress ) && count ( $ aDelAddress ) ) { $ sAddressId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'oxaddressid' ) ; $ sAddressId = ( $ sAddressId === null || $ sAddressId == - 1 || $ sAddressId == - 2 ) ? ... | creates new address entry or updates existing |
36,354 | protected function _getLoginQueryHashedWithMD5 ( $ userName , $ password , $ shopId , $ isAdmin ) { $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ userNameCondition = $ this -> formQueryPartForUserName ( $ userName , $ database ) ; $ passwordCondition = $ this -> formQueryPartForMD5Passwor... | Builds and returns user login query . |
36,355 | protected function _getLoginQuery ( $ userName , $ password , $ shopId , $ isAdmin ) { $ database = DatabaseProvider :: getDb ( ) ; $ userNameCondition = $ this -> formQueryPartForUserName ( $ userName , $ database ) ; $ shopOrRightsCondition = $ this -> formQueryPartForAdminView ( $ shopId , $ isAdmin ) ; $ passwordCo... | Builds and returns user login query |
36,356 | protected function _getShopSelect ( $ myConfig , $ sShopID , $ blAdmin ) { $ sShopSelect = $ this -> formQueryPartForAdminView ( $ sShopID , $ blAdmin ) ; return $ sShopSelect ; } | Returns shopselect part of login query sql |
36,357 | public function login ( $ userName , $ password , $ setSessionCookie = false ) { $ isLoginAttemptToAdminBackend = $ this -> isAdmin ( ) ; $ cookie = Registry :: getUtilsServer ( ) -> getOxCookie ( ) ; if ( $ cookie === null && $ isLoginAttemptToAdminBackend ) { throw oxNew ( CookieException :: class , 'ERROR_MESSAGE_CO... | Performs user login by username and password . Fetches user data from DB . Registers in session . Returns true on success FALSE otherwise . |
36,358 | public function logout ( ) { Registry :: getSession ( ) -> deleteVariable ( 'usr' ) ; Registry :: getSession ( ) -> deleteVariable ( 'auth' ) ; Registry :: getSession ( ) -> deleteVariable ( 'dynvalue' ) ; Registry :: getSession ( ) -> deleteVariable ( 'paymentid' ) ; Registry :: getUtilsServer ( ) -> deleteUserCookie ... | Logs out session user . Returns true on success |
36,359 | public function loadActiveUser ( $ blForceAdmin = false ) { $ oConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ blAdmin = $ this -> isAdmin ( ) || $ blForceAdmin ; $ sUserID = $ blAdmin ? Registry :: getSession ( ) -> getVariable ( 'auth' ) : Registry :: getSession ( ) -> getVariable ( 'usr' ) ; $ b... | Loads active user object . If user is not available - returns false . |
36,360 | protected function _getCookieUserId ( ) { $ sUserID = null ; $ oConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ sShopID = $ oConfig -> getShopId ( ) ; if ( ( $ sSet = Registry :: getUtilsServer ( ) -> getUserCookie ( $ sShopID ) ) ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ... | Checks if user is connected via cookies and if so returns user id . |
36,361 | protected function _ldapLogin ( $ sUser , $ sPassword , $ sShopID , $ sShopSelect ) { $ aLDAPParams = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'aLDAPParams' ) ; $ oLDAP = oxNew ( \ OxidEsales \ Eshop \ Core \ LDAP :: class , $ aLDAPParams [ 'HOST' ] , $ aLDAPParams [ 'PORT' ] ) ; $ oD... | Login for Ldap |
36,362 | protected function _getUserRights ( ) { if ( ! $ this -> oxuser__oxrights instanceof \ OxidEsales \ Eshop \ Core \ Field || ! $ this -> oxuser__oxrights -> value ) { return 'user' ; } $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig (... | Returns user rights index . Index cannot be higher than current session user rights index . |
36,363 | protected function _insert ( ) { $ this -> oxuser__oxcreate = new \ OxidEsales \ Eshop \ Core \ Field ( date ( 'Y-m-d H:i:s' ) , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; if ( ! isset ( $ this -> oxuser__oxboni -> value ) ) { $ this -> oxuser__oxboni = new \ OxidEsales \ Eshop \ Core \ Field ( $ this -> getBoni ... | Inserts user object data to DB . Returns true on success . |
36,364 | protected function _update ( ) { if ( ! $ this -> oxuser__oxpassword -> value && $ this -> oxuser__oxregister -> value < 1 ) { $ this -> _aSkipSaveFields [ ] = 'oxboni' ; } $ this -> _aSkipSaveFields [ ] = 'oxcreate' ; if ( ! $ this -> isAdmin ( ) ) { $ this -> _aSkipSaveFields [ ] = 'oxcustnr' ; $ this -> _aSkipSaveFi... | Updates changed user object data to DB . Returns true on success . |
36,365 | public function checkIfEmailExists ( $ sEmail ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ masterDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getMaster ( ) ; $ iShopId = $ myConfig -> getShopId ( ) ; $ blExists = false ; $ sQ = 'select oxshopid, oxrights, oxpassword from oxuser... | Checks for already used email |
36,366 | public function getUserRecommLists ( $ sOXID = null ) { if ( ! $ sOXID ) { $ sOXID = $ this -> getId ( ) ; } $ iActPage = ( int ) Registry :: getConfig ( ) -> getRequestParameter ( 'pgNr' ) ; $ iActPage = ( $ iActPage < 0 ) ? 0 : $ iActPage ; $ iNrofCatArticles = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ... | Returns user recommendation list object |
36,367 | public function getRecommListsCount ( $ sOx = null ) { if ( ! $ sOx ) { $ sOx = $ this -> getId ( ) ; } if ( $ this -> _iCntRecommLists === null || $ sOx ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ this -> _iCntRecommLists = 0 ; $ iShopId = \ OxidEsales \ Eshop \ Core \ Registry :: getCo... | Returns recommlist count |
36,368 | protected function _setAutoGroups ( $ sCountryId ) { $ blForeigner = true ; $ blForeignGroupExists = false ; $ blInlandGroupExists = false ; $ aHomeCountry = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'aHomeCountry' ) ; if ( is_array ( $ aHomeCountry ) ) { if ( in_array ( $ sCountryId ,... | Automatically assigns user to specific groups according to users country information |
36,369 | public function loadUserByUpdateId ( $ sUid ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sQ = "select oxid from " . $ this -> getViewName ( ) . " where oxupdateexp >= " . time ( ) . " and MD5( CONCAT( oxid, oxshopid, oxupdatekey ) ) = " . $ oDb -> quote ( $ sUid ) ; if ( $ sUserId = $ oDb... | Tries to load user object by passed update id . Update id is generated when user forgot passwords and wants to update it |
36,370 | public function setUpdateKey ( $ blReset = false ) { $ utilsObject = $ this -> getUtilsObjectInstance ( ) ; $ sUpKey = $ blReset ? '' : $ utilsObject -> generateUId ( ) ; $ iUpTime = $ blReset ? 0 : Registry :: getUtilsDate ( ) -> getTime ( ) + $ this -> getUpdateLinkTerm ( ) ; $ this -> oxuser__oxupdatekey = new \ Oxi... | Generates or resets and saves users update key |
36,371 | public function isExpiredUpdateId ( $ sKey ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sQ = "select 1 from " . $ this -> getViewName ( ) . " where oxupdateexp >= " . time ( ) . " and MD5( CONCAT( oxid, oxshopid, oxupdatekey ) ) = " . $ oDb -> quote ( $ sKey ) ; return ! ( ( bool ) $ oDb ... | Checks if password update key is not expired yet |
36,372 | public function getUpdateId ( ) { if ( $ this -> _sUpdateKey === null ) { $ this -> setUpdateKey ( ) ; $ this -> _sUpdateKey = md5 ( $ this -> getId ( ) . $ this -> oxuser__oxshopid -> value . $ this -> oxuser__oxupdatekey -> value ) ; } return $ this -> _sUpdateKey ; } | Returns user passwords update id |
36,373 | public function encodePassword ( $ sPassword , $ sSalt ) { $ oSha512Hasher = oxNew ( 'oxSha512Hasher' ) ; $ oHasher = oxNew ( 'oxPasswordHasher' , $ oSha512Hasher ) ; return $ oHasher -> hash ( $ sPassword , $ sSalt ) ; } | Encodes and returns given password |
36,374 | public function getReviewUserHash ( $ sUserId ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sReviewUserHash = $ oDb -> getOne ( 'select md5(concat("oxid", oxpassword, oxusername )) from oxuser where oxid = ' . $ oDb -> quote ( $ sUserId ) . '' ) ; return $ sReviewUserHash ; } | Generates user password and username hash for review |
36,375 | public function isTermsAccepted ( ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sShopId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getShopId ( ) ; $ sUserId = $ oDb -> quote ( $ this -> getId ( ) ) ; return ( bool ) $ oDb -> getOne ( "select 1 from oxacceptedterms where o... | Checks if user accepted latest shopping terms and conditions version |
36,376 | public function acceptTerms ( ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sUserId = $ oDb -> quote ( $ this -> getId ( ) ) ; $ sShopId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getShopId ( ) ; $ sVersion = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Content ::... | Writes terms acceptance info to db |
36,377 | public function setCreditPointsForInviter ( ) { $ blSet = false ; $ iPoints = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'dPointsForInvitation' ) ; if ( $ iPoints ) { $ iNewPoints = $ this -> oxuser__oxpoints -> value + $ iPoints ; $ this -> oxuser__oxpoints = new Field ( $ iNewPoints ,... | Assigns credit points to inviter |
36,378 | public function updateInvitationStatistics ( $ aRecEmail ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sUserId = $ this -> getId ( ) ; if ( $ sUserId && is_array ( $ aRecEmail ) && count ( $ aRecEmail ) > 0 ) { $ sDate = Registry :: getUtilsDate ( ) -> formatDBDate ( date ( "Y-m-d" ) , tru... | Updating invitations statistics |
36,379 | public function getIdByUserName ( $ userName ) { $ shopId = Registry :: getConfig ( ) -> getShopId ( ) ; $ userId = DatabaseProvider :: getDb ( ) -> getOne ( 'SELECT `OXID` FROM `oxuser` WHERE `OXUSERNAME` = ? AND `OXSHOPID` = ?' , [ $ userName , $ shopId ] ) ; return $ userId ; } | return user id by user name |
36,380 | protected function _dbLogin ( string $ userName , $ password , $ shopID ) { $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ userId = $ database -> getOne ( $ this -> _getLoginQuery ( $ userName , $ password , $ shopID , $ this -> isAdmin ( ) ) ) ; if ( ! $ userId ) { $ userId = $ database -... | Initiates user login against data in DB . |
36,381 | protected function _isDemoShop ( ) { $ blDemoMode = false ; if ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> isDemoShop ( ) ) { $ blDemoMode = true ; } return $ blDemoMode ; } | Return true - if shop is in demo mode |
36,382 | protected function _getDemoShopLoginQuery ( $ sUser , $ sPassword ) { if ( $ sPassword == "admin" && $ sUser == "admin" ) { $ sSelect = "SELECT `oxid` FROM `oxuser` WHERE `oxrights` = 'malladmin' " ; } else { $ oEx = oxNew ( UserException :: class ) ; $ oEx -> setMessage ( 'ERROR_MESSAGE_USER_NOVALIDLOGIN' ) ; throw $ ... | Return sql to get id of mall admin in demo shop |
36,383 | protected function onLogin ( $ userName , $ password ) { if ( ! $ this -> isLoaded ( ) && $ this -> _isDemoShop ( ) && $ this -> isAdmin ( ) ) { $ database = DatabaseProvider :: getDb ( ) ; $ userId = $ database -> getOne ( $ this -> _getDemoShopLoginQuery ( $ userName , $ password ) ) ; if ( $ userId ) { $ this -> loa... | Method is used for overriding and add additional actions when logging in . |
36,384 | private function deleteAddresses ( DatabaseInterface $ database ) { $ ids = $ database -> getCol ( 'SELECT oxid FROM oxaddress WHERE oxuserid = ?' , [ $ this -> getId ( ) ] ) ; array_walk ( $ ids , [ $ this , 'deleteItemById' ] , \ OxidEsales \ Eshop \ Application \ Model \ Address :: class ) ; } | Deletes User addresses . |
36,385 | private function deleteBaskets ( DatabaseInterface $ database ) { $ ids = $ database -> getCol ( 'SELECT oxid FROM oxuserbaskets WHERE oxuserid = ?' , [ $ this -> getId ( ) ] ) ; array_walk ( $ ids , [ $ this , 'deleteItemById' ] , \ OxidEsales \ Eshop \ Application \ Model \ UserBasket :: class ) ; } | Deletes noticelists wishlists or saved baskets |
36,386 | private function deleteNotOrderRelatedRemarks ( DatabaseInterface $ database ) { $ ids = $ database -> getCol ( 'SELECT oxid FROM oxremark WHERE oxparentid = ? and oxtype !=\'o\'' , [ $ this -> getId ( ) ] ) ; array_walk ( $ ids , [ $ this , 'deleteItemById' ] , \ OxidEsales \ Eshop \ Application \ Model \ Remark :: cl... | Deletes not Order related remarks . |
36,387 | private function deleteRecommendationLists ( DatabaseInterface $ database ) { $ ids = $ database -> getCol ( 'SELECT oxid FROM oxrecommlists WHERE oxuserid = ? ' , [ $ this -> getId ( ) ] ) ; array_walk ( $ ids , [ $ this , 'deleteItemById' ] , \ OxidEsales \ Eshop \ Application \ Model \ RecommendationList :: class ) ... | Deletes recommendation lists . |
36,388 | private function deleteNewsletterSubscriptions ( DatabaseInterface $ database ) { $ ids = $ database -> getCol ( 'SELECT oxid FROM oxnewssubscribed WHERE oxuserid = ? ' , [ $ this -> getId ( ) ] ) ; array_walk ( $ ids , [ $ this , 'deleteItemById' ] , \ OxidEsales \ Eshop \ Application \ Model \ NewsSubscribed :: class... | Deletes newsletter subscriptions . |
36,389 | private function deleteReviews ( DatabaseInterface $ database ) { $ ids = $ database -> getCol ( 'select oxid from oxreviews where oxuserid = ?' , [ $ this -> getId ( ) ] ) ; array_walk ( $ ids , [ $ this , 'deleteItemById' ] , \ OxidEsales \ Eshop \ Application \ Model \ Review :: class ) ; } | Deletes User reviews . |
36,390 | private function deleteRatings ( DatabaseInterface $ database ) { $ ids = $ database -> getCol ( 'SELECT oxid FROM oxratings WHERE oxuserid = ?' , [ $ this -> getId ( ) ] ) ; array_walk ( $ ids , [ $ this , 'deleteItemById' ] , \ OxidEsales \ Eshop \ Application \ Model \ Rating :: class ) ; } | Deletes User ratings . |
36,391 | private function deletePriceAlarms ( DatabaseInterface $ database ) { $ ids = $ database -> getCol ( 'SELECT oxid FROM oxpricealarm WHERE oxuserid = ?' , [ $ this -> getId ( ) ] ) ; array_walk ( $ ids , [ $ this , 'deleteItemById' ] , \ OxidEsales \ Eshop \ Application \ Model \ PriceAlarm :: class ) ; } | Deletes price alarms . |
36,392 | private function deleteItemById ( $ id , $ key , $ className ) { $ modelObject = oxNew ( $ className ) ; if ( $ modelObject -> load ( $ id ) ) { if ( $ this -> _blMallUsers ) { $ modelObject -> setIsDerived ( false ) ; } $ modelObject -> delete ( ) ; } } | Callback function for array_walk to delete items using the delete method of the given model class |
36,393 | protected function formUserCookieQuery ( $ user , $ shopId ) { $ query = 'select oxid, oxpassword, oxpasssalt from oxuser ' . 'where oxuser.oxpassword != "" and oxuser.oxactive = 1 and oxuser.oxusername = ' . \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> quote ( $ user ) ; return $ query ; } | Updates given query . Method is for overriding . |
36,394 | protected function _getLoadActionsParam ( ) { if ( $ this -> _blLoadActions === null ) { $ this -> _blLoadActions = false ; if ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'bl_perfLoadAktion' ) ) { $ this -> _blLoadActions = true ; } } return $ this -> _blLoadActions ; } | Template variable getter . Returns if actions are ON |
36,395 | public function getNewestArticles ( ) { if ( $ this -> _aNewArticleList === null ) { $ this -> _aNewArticleList = [ ] ; if ( $ this -> _getLoadActionsParam ( ) ) { $ oArtList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ ArticleList :: class ) ; $ oArtList -> loadNewestArticles ( ) ; if ( $ oArtList -> count (... | Template variable getter . Returns newest article list |
36,396 | public function getFirstArticle ( ) { if ( $ this -> _oFirstArticle === null ) { $ this -> _oFirstArticle = false ; if ( $ this -> _getLoadActionsParam ( ) ) { $ oArtList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ ArticleList :: class ) ; $ oArtList -> loadActionArticles ( 'OXFIRSTSTART' ) ; if ( $ oArtList... | Template variable getter . Returns first article |
36,397 | public function getBanners ( ) { $ oBannerList = null ; if ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'bl_perfLoadAktion' ) ) { $ oBannerList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ ActionList :: class ) ; $ oBannerList -> loadBanners ( ) ; } return $ oBannerList ; } | Returns active banner list |
36,398 | public function getManufacturerForSlider ( ) { $ oList = null ; if ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'bl_perfLoadManufacturerTree' ) ) { $ oList = $ this -> getManufacturerlist ( ) ; } return $ oList ; } | Returns manufacturer list for manufacturer slider |
36,399 | public function resetInstanceCache ( $ className = null ) { if ( $ className && isset ( static :: $ _aInstanceCache [ $ className ] ) ) { unset ( static :: $ _aInstanceCache [ $ className ] ) ; return ; } $ storageKey = Registry :: getStorageKey ( $ className ) ; if ( $ className && isset ( static :: $ _aInstanceCache ... | Resets instance cache |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.