Table of contents
- CountyCore
- RangePriceCore
- RangeWeightCore
- TagCore
- RequestSqlCore
- GenderCore
- CookieCore
- CurrencyCore
- ConfigurationKPICore
- HTMLTemplateCore (abstract)
- PDFGeneratorCore
- HTMLTemplateSupplyOrderFormCore
- PDFCore
- HTMLTemplateOrderReturnCore
- HTMLTemplateDeliverySlipCore
- HTMLTemplateInvoiceCore
- HTMLTemplateOrderSlipCore
- ReferrerCore
- ModuleCore (abstract)
- ModuleGridCore (abstract)
- CurrencyRateModuleCore (abstract)
- ModuleGraphEngineCore (abstract)
- ModuleGridEngineCore (abstract)
- CarrierModuleCore (abstract)
- ImportModuleCore (abstract)
- PaymentModuleCore (abstract)
- ModuleGraphCore (abstract)
- ChartCore
- CarrierCore
- ModuleAdminControllerCore (abstract)
- ControllerCore (abstract)
- AdminControllerCore
- FrontControllerCore
- ModuleFrontControllerCore
- DbPDOCore
- DbQueryCore
- DbCore (abstract)
- CMSCore
- GuestCore
- ValidateCore
- CountryCore
- LocalizationPackCore
- RijndaelCore
- ImageCore
- ImageManagerCore
- CustomerCore
- ContextCore
- EncryptorCore
- TreeToolbarButtonCore (abstract)
- TreeToolbarSearchCategoriesCore
- TreeToolbarCore
- TreeToolbarLinkCore
- TreeToolbarSearchCore
- ITreeToolbarButtonCore (interface)
- TreeCore
- ITreeToolbarCore (interface)
- SmartyCustomCore
- PageCore
- CartRuleCore
- AttributeCore
- SearchCore
- ZoneCore
- CartCore
- DateRangeCore
- SpecificPriceCore
- StateCore
- CustomerMessageCore
- PrestaShopAutoload
- CacheCore (abstract)
- CacheMemcachedCore
- CacheMemcacheCore
- CacheFsCore
- CacheRedisCore
- CacheApcuCore
- ProfileCore
- DispatcherCore
- AttributeGroupCore
- ThemeCore
- PrestaShopLoggerCore
- ImageTypeCore
- WebserviceSpecificManagementSearchCore
- WebserviceSpecificManagementImagesCore
- WebserviceOutputXMLCore
- WebserviceSpecificManagementInterface (interface)
- WebserviceOutputInterface (interface)
- WebserviceOutputBuilderCore
- WebserviceRequestCore
- WebserviceOutputJSONCore
- WebserviceExceptionCore
- WebserviceKeyCore
- PaymentCCCore
- MessageCore
- CustomerThreadCore
- PackCore
- ProductSaleCore
- MediaCore
- ConnectionsSourceCore
- MetaCore
- SearchEngineCore
- ConnectionCore
- CustomizationFieldCore
- AbstractLoggerCore (abstract)
- FileLoggerCore
- CMSCategoryCore
- TranslateCore
- CryptBlowfishCore
- SpecificPriceRuleCore
- ToolsCore
- UploaderCore
- PageCacheCore
- RiskCore
- TaxManagerFactoryCore
- TaxManagerInterface (interface)
- TaxCalculatorCore
- TaxCore
- AverageTaxOfProductsTaxCalculator
- TaxRulesTaxManagerCore
- TaxRulesGroupCore
- TaxManagerModuleCore (abstract)
- TaxRuleCore
- EmployeeCore
- ObjectModelCore (abstract)
- UpgraderCore
- DeliveryCore
- LinkCore
- FeatureValueCore
- AddressCore
- BlowfishCore
- AdminTabCore (abstract)
- HelperCalendarCore
- HelperOptionsCore
- HelperCore
- HelperShopCore
- HelperKpiRowCore
- HelperViewCore
- HelperImageUploaderCore
- HelperFormCore
- HelperTreeShopsCore
- HelperKpiCore
- HelperUploaderCore
- HelperListCore
- HelperTreeCategoriesCore
- SceneCore
- PhpEncryptionCore
- UrlRewriteCore
- HookCore
- TabCore
- PrestaShopBackupCore
- AliasCore
- GroupCore
- PrestaShopModuleExceptionCore
- PrestaShopPaymentExceptionCore
- PrestaShopDatabaseExceptionCore
- PrestaShopExceptionCore
- TranslatedConfigurationCore
- PrestaShopCollectionCore
- FileUploaderCore
- StockManagerCore
- StockMvtReasonCore
- WarehouseCore
- SupplyOrderStateCore
- WarehouseProductLocationCore
- SupplyOrderCore
- SupplyOrderDetailCore
- StockManagerFactoryCore
- SupplyOrderHistoryCore
- StockMvtCore
- StockCore
- StockMvtWSCore
- StockManagerModuleCore (abstract)
- StockAvailableCore
- SupplyOrderReceiptHistoryCore
- StockManagerInterface (interface)
- QuickAccessCore
- ProductSupplierCore
- ManufacturerCore
- ConfigurationTestCore
- CombinationCore
- CMSRoleCore
- CSVCore
- SupplierCore
- MailCore
- CustomizationCore
- ContactCore
- AttachmentCore
- CompareProductCore
- LanguageCore
- NotificationCore
- ProductDownloadCore
- FeatureCore
- OrderHistoryCore
- OrderMessageCore
- OrderStateCore
- OrderCore
- OrderCartRuleCore
- OrderReturnCore
- OrderSlipCore
- OrderPaymentCore
- OrderDetailCore
- OrderReturnStateCore
- OrderCarrierCore
- OrderInvoiceCore
- ProductCore
- CategoryCore
- ShopGroupCore
- ShopCore
- ShopUrlCore
- StoreCore
- ControllerFactoryCore
- ConfigurationCore
- GroupReductionCore
- AddressFormatCore
Class: CountyCore
DEPRECATED 1.0.0
Visibility | Function |
---|---|
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - since 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: RangePriceCore
Class RangePriceCore
Visibility | Property | Type |
---|---|---|
public | id_carrier | int |
public | delimiter1 | float |
public | delimiter2 | float |
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool Insertion result Override add to create delivery value for all zones |
public static | getRanges(mixed $idCarrier) : array Ranges Get all available price ranges |
public static | isOverlapping(mixed $id_carrier, mixed $delimiter1, mixed $delimiter2, null $id_rang=null) : false/null/string |
public static | rangeExist(mixed $idCarrier, mixed $delimiter1, mixed $delimiter2, null $idReference=null) : false/null/string |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: RangeWeightCore
Class RangeWeightCore
Visibility | Property | Type |
---|---|---|
public | id_carrier | int |
public | delimiter1 | float |
public | delimiter2 | float |
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool Insertion result Override add to create delivery value for all zones |
public static | getRanges(mixed $idCarrier) : array Ranges Get all available price ranges |
public static | isOverlapping(mixed $idCarrier, mixed $delimiter1, mixed $delimiter2, null $id_rang=null) : false/null/string |
public static | rangeExist(mixed $idCarrier, mixed $delimiter1, mixed $delimiter2, null $idReference=null) : false/null/string |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: TagCore
Class TagCore
Visibility | Property | Type |
---|---|---|
public | id_lang | int |
public | name | string |
Visibility | Function |
---|---|
public | __construct(int/null $id=null, string/null $name=null, int/null $idLang=null) : void TagCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | addTags(int $idLang, int $idProduct, string/array $tagList, string $separator=',' ) : bool Operation successAdd several tags in database and link it to a product |
public static | deleteTagsForProduct(int $idProduct) : bool |
public static | getMainTags(int $idLang, int $nb=10) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getProductTags(int $idProduct) : array/bool |
public | getProducts(bool $associated=true, \Context/null/\Context $context=null) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | setProducts(mixed $array) : bool |
public static | updateTagCount(array/null $tagList=null) : void |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: RequestSqlCore
Class RequestSqlCore
Visibility | Property | Type |
---|---|---|
public | name | string |
public | sql | string |
Visibility | Function |
---|---|
public | attributExistInTable(mixed $attr, mixed $table) : bool Check if an attributes existe in an table |
public | checkedFrom(mixed $from) : bool Check a "FROM" sentence |
public | checkedGroupBy(mixed $group, mixed $from) : bool Check a "GROUP BY" sentence |
public | checkedHaving(mixed $having, mixed $from) : bool Check a "HAVING" sentence |
public | checkedLimit(mixed $limit) : bool Check a "LIMIT" sentence |
public | checkedOrder(mixed $order, mixed $from) : bool Check a "ORDER" sentence |
public | checkedSelect(mixed $select, mixed $from, bool $in=false) : bool Check a "SELECT" sentence |
public | checkedWhere(mixed $where, mixed $from, mixed $sql) : bool Check a "WHERE" sentence |
public | cutAttribute(mixed $attr, mixed $from) : array/bool Cut an attribute with or without the alias |
public | cutJoin(mixed $attrs, mixed $from) : array/bool Cut an join sentence |
public | getAttributesByTable(mixed $table) : array Get list of all attributes by an table |
public static | getRequestSql() : array/bool Get list of request SQL |
public static | getRequestSqlById(int $id) : array Get list of request SQL by id request |
public | getTables() : array Get list of all tables |
public | parsingSql(mixed $sql) : bool Call the parserSQL() method in Tools class Cut the request in table for check it |
public | returnNameTable(bool $alias=false, mixed $tables, mixed $attr=null) : array/bool Get name of table by alias |
public | testedRequired(mixed $tab) : bool Check if all required sentence existing |
public | testedUnauthorized(mixed $tab) : bool Check if an unauthorized existing in an array |
public | validateParser(mixed $tab, bool $in=false, mixed $sql) : bool Check if the parsing of the SQL request is good or not |
public | validateSql(mixed $tab, mixed $in, mixed $sql) : bool Cut the request for check each cutting |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: GenderCore
Visibility | Property | Type |
---|---|---|
public | id_gender | int |
public | name | string |
public | type | int |
Visibility | Function |
---|---|
public | __construct(int/null $id=null, int/null $idLang=null, int/null $idShop=null) : void GenderCore constructor. |
public static | getGenders(null $idLang=null) : \PrestaShopCollection |
public | getImage(bool $useUnknown=false) : string |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CookieCore
Class CookieCore
Visibility | Property | Type |
---|---|---|
protected | _content | array |
protected | _name | array |
protected | _expire | array |
protected | _domain | array |
protected | _path | array |
protected | _cipherTool | object |
protected | _modified | bool |
protected | _allow_writing | bool |
protected | _salt | string |
protected | _standalone | bool |
protected | _secure | bool |
Visibility | Function |
---|---|
public | __construct(mixed $name, string/mixed $path='' , mixed $expire=null, mixed $sharedUrls=null, bool $standalone=false, bool $secure=false) : voidGet data if the cookie exists and else initialize an new one |
public | __destruct() : void |
public | __get(string $key) : string value corresponding to the key Magic method wich return cookie data from _content array |
public | __isset(string $key) : bool key existence Magic method which check if key exists in the cookie |
public | __set(string $key, mixed $value) : void Magic method which adds data into _content array |
public | __unset(string $key) : void Magic method wich delete data into _content array |
public | disallowWriting() : void |
public | exists() : bool Check if the cookie exists |
public | getAll() : array |
public | getCipherTool() : \Blowfish/\Rijndael/\PhpEncryption Get the cipher tool instance used by this cookie instance |
public | getFamily(mixed $origin) : mixed Get a family of variables (e.g. "filter_") |
public | getName() : String name of cookie |
public | DEPRECATED - 1.0.0 use Customer::isLogged() instead |
public | DEPRECATED - 1.0.0 use Employee::isLoggedBack() instead |
public | DEPRECATED - 1.0.0 Use Customer::logout() or Employee::logout() instead; |
public | makeNewLog() : void |
public | DEPRECATED - 1.0.0 use Customer::mylogout() instead; |
public | setExpire(int $expire) : void Set expiration date |
public | unsetFamily(mixed $origin) : void |
public | update(bool $nullValues=false) : void Get cookie content |
public | write() : void Save cookie with setcookie() |
protected | _setcookie(mixed $cookie=null) : void Setcookie according to php version |
protected | getDomain(null $sharedUrls=null) : bool/string |
Class: CurrencyCore
Class CurrencyCore
Visibility | Function |
---|---|
public | __construct(null $id=null, null $idLang=null, null $idShop=null) : void CurrencyCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : void Overriding check if currency rate is not empty and if currency with the same iso code already exists. If it's true, currency is not added. |
public static | checkPaymentCurrencies(mixed $idModule, null $idShop=null) : array/bool/false/\mysqli_result/null/\PDOStatement/\resource |
public static | countActiveCurrencies(null $idShop=null) : mixed |
public | delete() : bool |
public | deleteSelection(array $selection) : bool |
public static | exists(int/string $isoCode, mixed $isoCodeNum, mixed $idShop) : bool Check if a curency already exists. |
public | getConversationRate() : int/string |
public static | getCurrencies(bool $object=false, bool $active=true, bool $groupBy=false) : array Currencies Return available currencies |
public static | getCurrenciesByIdShop(int $idShop) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getCurrency(mixed $idCurrency) : array/bool/null/object |
public static | getCurrencyInstance(mixed $id) : mixed |
public static | DEPRECATED - 1.0.0 use $context->currency instead |
public static | getDefaultCurrency() : bool/\Currency |
public static | getIdByIsoCode(mixed $isoCode, int $idShop) : int |
public static | getIdByIsoCodeNum(mixed $isoCodeNum, int $idShop) : int |
public static | getIdByQuery(int $idShop) : \DbQuery |
public static | getPaymentCurrencies(mixed $idModule, null $idShop=null) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getPaymentCurrenciesSpecial(mixed $idModule, null $idShop=null) : array/bool/null/object |
public | getSign(string $side=null) : string formated sign Return formated sign |
public static | isMultiCurrencyActivated(null $idShop=null) : bool |
public static | refreshCurrencies() : string/null |
public | DEPRECATED - 1.0.0 |
public | update(bool $autodate=true, bool $nullValues=false) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ConfigurationKPICore
Class ConfigurationKPICore
Visibility | Function |
---|---|
public static | deleteByName(string $key) : bool |
public static | deleteFromContext(string $key) : void |
public static | get(string $key, null $idLang=null, null $idShopGroup=null, null $idShop=null) : string |
public static | getGlobalValue(mixed $key, null $idLang=null) : string |
public static | getIdByName(string $key, null $idShopGroup=null, null $idShop=null) : int |
public static | getInt(string $key, null $idShopGroup=null, null $idShop=null) : array |
public static | getMultiple(array $keys, null $idLang=null, null $idShopGroup=null, null $idShop=null) : array |
public static | hasContext(string $key, int $idLang, int $context) : bool |
public static | hasKey(string $key, null $idLang=null, null $idShopGroup=null, null $idShop=null) : bool |
public static | isLangKey(string $key) : bool |
public static | isOverridenByCurrentContext(mixed $key) : bool |
public static | loadConfiguration() : mixed |
public static | set(string $key, mixed $values, null $idShopGroup=null, null $idShop=null) : void |
public static | setKpiDefinition() : void |
public static | unsetKpiDefinition() : void |
public static | updateGlobalValue(string $key, mixed $values, bool $html=false) : bool |
public static | updateValue(string $key, mixed $values, bool $html=false, null $idShopGroup=null, null $idShop=null) : bool |
protected static | sqlRestriction(int $idShopGroup, int $idShop) : string |
This class extends \Configuration
This class implements \Core_Foundation_Database_EntityInterface
Class: HTMLTemplateCore (abstract)
Class HTMLTemplateCore
Visibility | Function |
---|---|
public | assignCommonHeaderData() : void Assign common header data to smarty variables |
public | assignHookData(\ObjectModel $object) : void Assign hook data |
public | abstract getBulkFilename() : string filename Returns the template filename when using bulk rendering |
public | abstract getContent() : string HTML content Returns the template's HTML content |
public | abstract getFilename() : string filename Returns the template filename |
public | getFooter() : string HTML footer Returns the template's HTML footer |
public | getHeader() : string HTML header Returns the template's HTML header |
public | getPagination() : string HTML pagination block Returns the template's HTML pagination block |
protected | getLogo() : mixed Returns the invoice logo |
protected | getShopAddress() : string Returns the shop address |
protected | getTemplate(mixed $templateName) : string If the template is not present in the theme directory, it will return the default template in PS_PDF_DIR directory |
protected static | l(string $string) : string translated text Translation method |
protected | setShopId() : void |
Class: PDFGeneratorCore
Class PDFGeneratorCore
Visibility | Function |
---|---|
public | Footer() : void |
public | Header() : void |
public | __construct(bool $useCache=false, string $orientation='P' ) : void |
public | createContent(string $content) : mixed create the PDF content |
public | createFooter(string $footer) : mixed set the PDF footer |
public | createHeader(string $header) : mixed set the PDF header |
public | createPagination(string $pagination) : mixed create the PDF pagination |
public | render(string $filename, bool $display=true) : string HTML rendered Render HTML template |
public | setEncoding(string $encoding) : void set the PDF encoding |
public | setFontForLang(string $isoLang) : void Change the font |
public | writePage() : void Write a PDF page |
protected | getRandomSeed(string $seed='' ) : mixedOverride of TCPDF::getRandomSeed() - getmypid() is blocked on several hosting |
This class extends \TCPDF
Class: HTMLTemplateSupplyOrderFormCore
Class HTMLTemplateSupplyOrderFormCore
Visibility | Function |
---|---|
public | __construct(\SupplyOrder $supplyOrder, \Smarty $smarty) : void |
public | getBulkFilename() : mixed |
public | getContent() : mixed |
public | getFilename() : mixed |
public | getFooter() : mixed |
public | getHeader() : mixed |
protected | getLogo() : String Logo path Returns the invoice logo |
protected | getTaxOrderSummary() : array/false/\mysqli_result/null/\PDOStatement/\resource Get order taxes summary |
protected | roundSupplyOrder(\SupplyOrder $supplyOrder) : void Rounds values of a SupplyOrder object |
protected | roundSupplyOrderDetails(array/\PrestaShopCollection $collection) : void Rounds values of a SupplyOrderDetail object |
This class extends \HTMLTemplate
Class: PDFCore
Class PDFCore
Visibility | Function |
---|---|
public | __construct(mixed $objects, mixed $template, mixed $smarty, string $orientation='P' ) : void |
public | getTemplateObject(mixed $object) : \HTMLTemplate/false Get correct PDF template classes |
public | render(bool $display=true) : mixed Render PDF |
Class: HTMLTemplateOrderReturnCore
Class HTMLTemplateOrderReturnCore
Visibility | Function |
---|---|
public | __construct(\OrderReturn $orderReturn, \Smarty $smarty) : void |
public | getBulkFilename() : string filename Returns the template filename when using bulk rendering |
public | getContent() : string HTML content Returns the template's HTML content |
public | getFilename() : string filename Returns the template filename |
public | getHeader() : string HTML header Returns the template's HTML header |
This class extends \HTMLTemplate
Class: HTMLTemplateDeliverySlipCore
Visibility | Function |
---|---|
public | __construct(\OrderInvoice $orderInvoice, \Smarty $smarty, bool $bulkMode=false) : void |
public | getBulkFilename() : string filename Returns the template filename when using bulk rendering |
public | getContent() : string HTML content Returns the template's HTML content |
public | getFilename() : string filename Returns the template filename |
public | getHeader() : string HTML header Returns the template's HTML header |
This class extends \HTMLTemplate
Class: HTMLTemplateInvoiceCore
Visibility | Function |
---|---|
public | __construct(\OrderInvoice $orderInvoice, \Smarty $smarty, bool $bulkMode=false) : void |
public | getBulkFilename() : string filename Returns the template filename when using bulk rendering |
public | getContent() : string HTML content Returns the template's HTML content |
public | getFilename() : string filename Returns the template filename |
public | getHeader() : string HTML header Returns the template's HTML header |
public | getTaxTabContent() : String Tax tab html content Returns the tax tab content |
protected | computeLayout(mixed $params) : array Layout elements columns size Compute layout elements size |
protected | getTaxBreakdown() : array Different tax breakdown elements Returns different tax breakdown elements |
protected | getTemplateByCountry(string $isoCountry) : mixed Returns the invoice template associated to the country iso_code |
This class extends \HTMLTemplate
Class: HTMLTemplateOrderSlipCore
Class HTMLTemplateOrderSlipCore
Visibility | Function |
---|---|
public | __construct(\OrderSlip $orderSlip, \Smarty $smarty) : void |
public | getBulkFilename() : string filename Returns the template filename when using bulk rendering |
public | getContent() : string HTML content Returns the template's HTML content |
public | getFilename() : string filename Returns the template filename |
public | getHeader() : string HTML header Returns the template's HTML header |
public | getProductTaxesBreakdown() : array |
public | getShippingTaxesBreakdown() : array Shipping tax breakdown elements Returns Shipping tax breakdown elements |
public | getTaxTabContent() : String Tax tab html content Returns the tax tab content |
protected | getTaxBreakdown() : array Different tax breakdown elements Returns different tax breakdown elements |
This class extends \HTMLTemplateInvoice
Class: ReferrerCore
Class ReferrerCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | cacheNewSource(int $idConnectionsSource) : void |
public static | getAjaxProduct(int $idReferrer, int $idProduct, null $employee=null) : mixed |
public static | getReferrers(int $idCustomer) : mixed Get list of referrers connections of a customer |
public | getRegistrations(int $idProduct, int $employee) : mixed Get some statistics on customers registrations for current referrer |
public | getStatsSales(int $idProduct, int $employee) : mixed Get some statistics on orders for current referrer |
public | getStatsVisits(int $idProduct, int $employee) : array/bool/null/object Get some statistics on visitors connection for current referrer |
public static | refreshCache(array $referrers=null, int $employee=null) : true Refresh cache data of referrer statistics in referrer_shop table |
public static | refreshIndex(array $referrers=null) : void Cache liaison between connections_source data and referrers data |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ModuleCore (abstract)
Class ModuleCore
Visibility | Function |
---|---|
public | __construct(string $name=null, \Context $context=null) : void Constructor |
public static | _deferedClearCache(string $templatePath, int/null $cacheId, int/null $compileId) : int Number of template cleared Clear deferred template cache |
public | addOverride(string $classname) : bool Add all methods in a module override to the override class |
public | adminDisplayWarning(string $msg) : void add a warning message to display at the top of the admin page |
public | checkCompliancy() : bool |
public static | DEPRECATED - 1.0.0 |
public | cleanPositions(bool $idHook, array $shopList=null) : void Reorder modules position |
public static | configXmlStringFormat(mixed $string) : string |
public | disable(bool $force_all=false) : void Desactivate current module. |
public static | disableByName(array/string $name) : true if succeed This function disable module $name. If an $name is an array, this will disable all of them |
public | disableDevice(mixed $device) : bool |
public | display(mixed $file, mixed $template, null $cache_id=null, null $compile_id=null) : string |
public | displayConfirmation(mixed $string) : string |
public | displayError(string/array $error) : string Helper displaying error message(s) |
public | DEPRECATED - 2.0.0 |
public | displayWarning(mixed $warning) : string Helper displaying warning message(s) |
public | editExceptions(mixed $idHook, array $excepts) : bool result Edit exceptions for module->Hook |
public | enable(bool $forceAll=false) : void Activate current module. |
public static | enableByName(array/string $name) : true if succeed This function enable module $name. If an $name is an array, this will enable all of them |
public | enableDevice(mixed $device) : bool |
public static | DEPRECATED - 2.0.0 Use Translate::getModuleTranslation() |
public static | DEPRECATED - 1.0.0 |
public static | getAuthorizedModules(int $groupId) : array/null Get Unauthorized modules for a client group |
public static | getBatchMode() : bool |
public | getConfirmations() : array conf Get module messages confirmation |
public | getErrors() : array errors Get module errors |
public | getExceptions(int $idHook, bool $dispatch=false) : array Exceptions Return exceptions for module in hook |
public static | getExceptionsStatic(int $id_module, int $id_hook, bool $dispatch=false) : array Exceptions Return exceptions for module in hook |
public static | getInstanceById(int $id_module) : Module instance Return an instance of the specified module |
public static | getInstanceByName(string $moduleName) : \Module/bool Return an instance of the specified module |
public | getLocalPath() : string Get local path for module |
public static | getModuleIdByName(string $name) : int Module ID Get ID module by name |
public static | getModuleName(mixed $module) : string |
public static | getModuleNameFromClass(mixed $currentClass) : bool/string if the class belongs to a module, will return the module name. Otherwise, return false. This function is used to determine the module name of an AdminTab which belongs to a module, in order to keep translation related to a module in its directory (instead of $_LANGADM) |
public static | getModulesDirOnDisk() : array Modules Directory List Return modules directory list |
public static | getModulesInstalled(int $position) : array Modules Return installed modules |
public static | getModulesOnDisk(bool $use_config=false, bool $loggedOnAddons=false, bool $idEmployee=false) : array Modules Return available modules |
public static | getNativeModuleList() : array/bool |
public static | getNonNativeModuleList() : array Modules Return non native module |
public | getPathUri() : string Get uri path for module |
public static | getPaymentModules() : array module informations Returns the list of the payment module associated to the current customer |
public static | DEPRECATED - 2.0.0 |
public | getPermission(array $variable, object $employee=null) : bool if module can be transplanted on hook Check employee permission for module |
public static | getPermissionStatic(int $idModule, array $variable, object $employee=null) : bool if module can be transplanted on hook Check employee permission for module (static method) |
public | getPosition(bool $id_hook) : int position Return module position for a given hook |
public | getPossibleHooksList() : array Hooks list. Return the hooks list where this module can be hooked. |
public | getTemplatePath(string $template) : string Get realpath of a template of current module (check if template is overriden too) |
public static | getUpgradeStatus(mixed $moduleName) : bool Return the status of the upgraded module |
public static | DEPRECATED - 2.0.0 |
public static | DEPRECATED - 2.0.0 |
public static | initUpgradeModule(mixed $module) : bool Init the upgrade module |
public | install() : void Insert module into datable |
public | installOverrides() : bool Install overrides files for the module |
public | isCached(mixed $template, null $cacheId=null, null $compileId=null) : bool |
public static | isEnabled(mixed $module_name) : bool/null |
public | isEnabledForShopContext() : bool |
public | isHookableOn(string $hook_name) : bool if module can be transplanted on hook Check if the module is transplantable on the hook in parameter |
public static | isInstalled(mixed $module_name) : bool/null |
public static | DEPRECATED - 1.0.0 |
public | isRegisteredInHook(mixed $hook) : bool/false/null/string |
public | l(string $string, bool/bool/string $specific=false) : string Translation Get translation for a given module text Note: $specific parameter is mandatory for library files. Otherwise, translation key will not match for Module library when module is loaded with eval() Module::getModulesOnDisk() |
public static | needUpgrade(mixed $module) : bool Check if a module need to be upgraded. This method modify the module_cache adding an upgrade list file |
public static | preCall(mixed $moduleName) : void |
public static | processDeferedClearCache() : void Clear the caches stored in $_defered_clearCache |
public static | processDeferedFuncCall() : void |
public | registerExceptions(int $idHook, array $excepts, array $shopList=null) : bool result Add exceptions for module->Hook |
public | registerHook(string $hookName, array $shopList=null) : bool result Connect module to a hook |
public | removeOverride(string $classname) : bool Remove all methods in a module override from the override class |
public | runUpgradeModule() : array Run the upgrade for a given module name and version |
public static | setBatchMode(bool $value) : void Set the flag to indicate we are doing an import |
public | uninstall() : bool result Delete module from datable |
public | uninstallOverrides() : bool Uninstall overrides files for the module |
public | unregisterExceptions(mixed $hookId, array $shopList=null) : void Unregister exceptions linked to module |
public | unregisterHook(mixed $hookId, array $shopList=null) : bool result Unregister module from hook |
public | updateModuleTranslations() : void |
public | updatePosition(bool $idHook, bool $way, int $position=null) : void Reposition module |
public static | updateTranslationsAfterInstall(bool $update=true) : void |
public static | upgradeModuleVersion(mixed $name, mixed $version) : bool Upgrade the registered version to a new one |
protected | _clearCache(string $template, mixed $cacheId=null, mixed $compileId=null) : int Number of template cleared Clear template cache |
protected | _generateConfigXml() : void |
protected | _getApplicableTemplateDir(mixed $template) : string |
protected | _isTemplateOverloaded(mixed $template) : bool/null/string |
protected static | _isTemplateOverloadedStatic(mixed $module_name, mixed $template) : bool/null/string |
protected | adminDisplayInformation(string $msg) : void add a info message to display at the top of the admin page |
protected static | coreLoadModule(mixed $moduleName) : bool/mixed/object |
protected | getCacheId(null $name=null) : string |
protected | getCurrentSubTemplate(string $template, string/null $cache_id=null, string/null $compile_id=null) : \Smarty_Internal_Template |
protected | installControllers() : bool Install module's controllers using public property $controllers |
protected static | loadUpgradeVersionList(mixed $moduleName, mixed $moduleVersion, mixed $registeredVersion) : bool to know directly if any files have been found Load the available list of upgrade of a specified module with an associated version |
protected | resetCurrentSubTemplate(mixed $template, mixed $cache_id, mixed $compile_id) : void |
protected | setUpgradeMessage(mixed $upgradeDetail) : void Set errors, warning or success message of a module upgrade |
protected static | useTooMuchMemory() : bool |
Class: ModuleGridCore (abstract)
Class ModuleGridCore
Visibility | Function |
---|---|
public | create(mixed $render, mixed $type, mixed $width, mixed $height, mixed $start, mixed $limit, mixed $sort, mixed $dir) : mixed |
public | engine(mixed $params) : mixed |
public | getDate() : string |
public | getLang() : mixed |
public | render() : void |
public | setEmployee(mixed $idEmployee) : void |
public | setLang(mixed $idLang) : void |
protected | _displayCsv() : void |
protected | csvExport(mixed $datas) : void |
protected | abstract getData() : mixed |
This class extends \Module
Class: CurrencyRateModuleCore (abstract)
Class CurrencyModuleCore
Visibility | Function |
---|---|
public static | getCurrencyRateInfo(bool $registeredOnly=false, bool $codesOnly=false) : array/false Array with currency iso code as key and module instance as value Retrieve all currencies that have exchange rate modules available |
public static | getCurrencyRateModules() : array Available modules Same as CurrencyRateModule::getInstalledCurrencyRateModules but also returns the list of supported currencies by every module |
public static | getInstalledCurrencyRateModules() : array Available modules List all installed and active currency rate modules |
public static | getServices(int $idCurrency, string $selected) : array/false Get providing modules |
public | abstract getSupportedCurrencies() : array Supported currencies An array with uppercase currency codes (ISO 4217) |
public | abstract hookCurrencyRates(string $baseCurrency) : false/array Associate array with all supported currency codes as key (uppercase) and the actual amounts as values (floats - be as accurate as you like), e.g.: php [ 'EUR' => 1.233434, 'USD' => 1.343, ] Returns false if there were problems with retrieving the exchange ratesOnly codes that have been added to the supportedCurrencies array will be called. The module will have to accept all currencies from that array as a base. |
public | abstract hookRate(string $fromCurrency, string $toCurrency) : false/float |
public | install() : bool Indicates whether the module was successfully installed Install this module and scan currencies |
public static | providesExchangeRate(string $to, null/string $from=null, bool $justOne=false) : array/string Get providing modules |
public static | scanMissingCurrencyRateModules(bool/bool/string $baseCurrency=false) : false/array Result |
public static | setModule(int $idCurrency, int $idModule) : void Set module |
protected static | getModuleForCurrency(mixed $idCurrency) : mixed |
This class extends \Module
Class: ModuleGraphEngineCore (abstract)
Class ModuleGraphEngineCore
Visibility | Function |
---|---|
public | __construct(null/string $type) : void ModuleGraphEngineCore constructor. |
public | abstract createValues(mixed $values) : mixed |
public | abstract draw() : mixed |
public static | getGraphEngines() : array |
public | install() : bool |
public | abstract setLegend(mixed $legend) : mixed |
public | abstract setSize(mixed $width, mixed $height) : mixed |
public | abstract setTitles(mixed $titles) : mixed |
This class extends \Module
Class: ModuleGridEngineCore (abstract)
Class ModuleGridEngineCore
Visibility | Function |
---|---|
public | __construct(null/string $type) : void ModuleGridEngineCore constructor. |
public static | getGridEngines() : array |
public | install() : bool |
public | abstract render() : mixed |
public | abstract setLimit(mixed $start, mixed $limit) : mixed |
public | abstract setSize(mixed $width, mixed $height) : mixed |
public | abstract setTitle(mixed $title) : mixed |
public | abstract setTotalCount(mixed $totalCount) : mixed |
public | abstract setValues(mixed $values) : mixed |
This class extends \Module
Class: CarrierModuleCore (abstract)
Class CarrierModuleCore
Visibility | Function |
---|---|
public | abstract getOrderShippingCost(mixed $params, mixed $shippingCost) : mixed |
public | abstract getOrderShippingCostExternal(mixed $params) : mixed |
This class extends \Module
Class: ImportModuleCore (abstract)
Class ImportModuleCore
Visibility | Function |
---|---|
public | Execute(mixed $query) : \resource |
public | ExecuteS(mixed $query) : array |
public | __destruct() : void |
public | abstract getDefaultIdLang() : mixed |
public static | getImportModulesOnDisk() : array |
public | getValue(mixed $query) : int/mixed |
protected | initDatabaseConnection() : null/\resource |
This class extends \Module
Class: PaymentModuleCore (abstract)
Class PaymentModuleCore
Visibility | Function |
---|---|
public | addCheckboxCarrierRestrictionsForModule(array $shops=array()) : bool Add checkbox carrier restrictions for a new module |
public | addCheckboxCountryRestrictionsForModule(array $shops=array()) : bool Add checkbox country restrictions for a new module |
public | addCheckboxCurrencyRestrictionsForModule(array $shops=array()) : bool Add checkbox currency restrictions for a new module |
public static | addCurrencyPermissions(int $idCurrency, array $idModuleList=array()) : bool Allows specified payment modules to be used by a specific currency |
public | addRadioCurrencyRestrictionsForModule(array $shops=array()) : bool Add radio currency restrictions for a new module |
public | DEPRECATED - 1.0.0 |
public | getCurrency(mixed $currentIdCurrency=null) : \Currency |
public static | getInstalledPaymentModules() : array module information List all installed and active payment modules |
public | install() : bool |
public static | preCall(string $moduleName) : bool |
public | uninstall() : bool |
public | validateOrder(int $idCart, int $idOrderState, float $amountPaid, string $paymentMethod='Unknown' , null $message=null, array $extraVars=array(), null $currencySpecial=null, bool $dontTouchAmount=false, bool $secureKey=false, \Shop $shop=null) : boolValidate an order in database Function called from a payment module |
protected | _getFormatedAddress(\Address $theAddress, mixed $lineSep, array $fieldsStyle=array()) : String the txt formated address block |
protected | _getTxtFormatedAddress(mixed $theAddress) : String the txt formated address block |
protected | getEmailTemplateContent(string $templateName, int $mailType, array $var) : string Fetch the content of $template_name inside the folder current_theme/mails/current_iso_lang/ if found, otherwise in mails/current_iso_lang |
This class extends \Module
Class: ModuleGraphCore (abstract)
Class ModuleGraphCore
Visibility | Function |
---|---|
public | create(mixed $render, mixed $type, mixed $width, mixed $height, mixed $layers) : mixed |
public | draw() : void |
public | engine(mixed $params) : array/mixed/string |
public | getDate() : string |
public static | getDateBetween(null $employee=null) : string |
public | getLang() : mixed |
public | setEmployee(mixed $idEmployee) : void |
public | setLang(mixed $id_lang) : void |
public | setOption(mixed $option, int $layers=1) : void |
protected | _displayCsv() : void |
protected | csvExport(mixed $datas) : void |
protected | abstract getData(mixed $layers) : mixed |
protected static | getEmployee(null $employee=null, \Context/null/\Context $context=null) : bool/\Employee/null |
protected | setDateGraph(mixed $layers, bool $legend=false) : void |
This class extends \Module
Class: ChartCore
Class ChartCore
Visibility | Function |
---|---|
public | __construct() : void ChartCore constructor. |
public | display() : void |
public | fetch() : string |
public | getCurve(mixed $i) : mixed |
public static | init() : bool |
public | setSize(int $width, int $height) : void |
public | setTimeMode(string $from, string $to, string $granularity) : void |
Class: CarrierCore
Class CarrierCore
Visibility | Function |
---|---|
public | __construct(null $id=null, null $idLang=null) : void CarrierCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | addDeliveryPrice(array $priceList, bool $delete=false) : bool Insertion result Add new delivery prices |
public | addZone(mixed $idZone) : void Add zone |
public static | assignGroupToAllCarriers(int/array $idGroupList, array $exception=null) : void Assign one (ore more) group to all carriers |
public static | checkCarrierZone(mixed $idCarrier, mixed $idZone) : null |
public static | checkDeliveryPriceByPrice(int $idCarrier, float $orderTotal, int $idZone, int/null $idCurrency=null) : float Delivery price Check delivery prices for a given order |
public static | checkDeliveryPriceByWeight(mixed $idCarrier, mixed $totalWeight, mixed $idZone) : mixed |
public static | cleanPositions() : bool $return Reorders carrier positions. Called after deleting a carrier. |
public | copyCarrierData(int $oldId) : void Copy old carrier informations when update carrier |
public | delete() : bool |
public | deleteDeliveryPrice(string $rangeTable) : bool Deletion result Clean delivery prices (weight/price) |
public | deleteTaxRulesGroup(array/null/array $shops=null) : bool |
public | deleteZone(mixed $idZone) : void Delete zone |
public static | getAvailableCarrierList(\Product $product, mixed $idWarehouse, int $idAddressDelivery=null, int $idShop=null, \Cart $cart=null, array $error=array()) : array For a given {product, warehouse}, gets the carrier available |
public static | getCarrierByReference(mixed $idReference) : mixed Get carrier using the reference id |
public static | getCarrierNameFromShopName() : string Carrier name Return the carrier name from the shop name (e.g. if the carrier name is '0'). The returned carrier name is the shop name without '#' and ';' because this is not the same validation. |
public static | getCarriers(int $idLang, bool $active=false, bool $delete=false, bool $idZone=false, mixed $idsGroup=null, mixed $modules_filters=1) : array Carriers Get all carriers in a given language PS_CARRIERS_ONLY CARRIERS_MODULE CARRIERS_MODULE_NEED_RANGE PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE ALL_CARRIERS |
public static | getCarriersForOrder(int $idZone, array $groups=null, mixed $cart=null, array $error=array()) : array |
public static | getDefaultCarrierSelection(array $carriers, array $defaultCarrier) : number the id of the default carrier Return the default carrier to use |
public static | getDeliveredCountries(int $idLang, bool $activeCountries=false, bool $activeCarriers=false, null $containStates=null) : array |
public | getDeliveryPriceByPrice(float $orderTotal, int $idZone, int/null $idCurrency=null) : float Delivery price Get delivery prices for a given order |
public static | getDeliveryPriceByRanges(string $rangeTable, int $idCarrier) : array Delivery prices Get delivery prices for a given shipping method (price/weight) |
public | getDeliveryPriceByWeight(float $totalWeight, int $idZone) : float Delivery price Get delivery prices for a given order |
public | getGroups() : array Group Gets a specific group |
public static | getHigherPosition() : int $position Gets the highest carrier position |
public | getIdTaxRulesGroup(\Context/null/\Context $context=null) : false/null/string |
public static | getIdTaxRulesGroupByIdCarrier(int $idCarrier, \Context/null/\Context $context=null) : false/null/string |
public static | getIdTaxRulesGroupMostUsed() : false/null/string |
public | getMaxDeliveryPriceByPrice(mixed $idZone) : null |
public | getMaxDeliveryPriceByWeight(mixed $idZone) : false/null/string |
public | getRangeObject(bool $shipping_method=false) : bool/\RangePrice/\RangeWeight |
public | getRangeSuffix(null $currency=null) : string |
public | getRangeTable() : bool/string |
public | getShippingMethod() : int |
public | getTaxCalculator(\Address $address, mixed $id_order=null, bool $use_average_tax_of_products=false) : mixed Returns the taxes calculator associated to the carrier |
public | getTaxesRate(\Address $address) : mixed Returns the taxes rate associated to the carrier |
public | getZone(mixed $idZone) : array Zone Get a specific zones |
public | getZones() : array Zones Get all zones |
public | isUsed() : int Order count for this carrier Check if carrier is used (at least one order placed) |
public | setConfiguration(int $id_old) : void Change carrier id in delivery prices when updating a carrier |
public | setGroups(mixed $groups, bool $delete=true) : bool |
public | setTaxRulesGroup(mixed $id_tax_rules_group, bool $all_shops=false) : bool |
public static | sqlDeliveryRangeShop(string $rangeTable, string $alias='d' ) : stringThis tricky method generates a sql clause to check if ranged data are overloaded by multishop |
public | updatePosition(bool $way, int $position) : bool Update result Moves a carrier |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ModuleAdminControllerCore (abstract)
Class ModuleAdminControllerCore
Visibility | Function |
---|---|
public | __construct() : void |
public | createTemplate(string $tplName) : \Smarty_Internal_Template Creates a template object |
public | getTemplatePath() : string Get path to back office templates for the module |
This class extends \AdminController
Class: ControllerCore (abstract)
Class ControllerCore
Visibility | Function |
---|---|
public | __construct() : void ControllerCore constructor. |
public | __get(string $property) : mixed thirty bees' new coding style dictates that camelCase should be used rather than snake_case These magic methods provide backwards compatibility for modules/themes/whatevers that still access properties via their snake_case names |
public | __set(string $property, mixed $value) : void thirty bees' new coding style dictates that camelCase should be used rather than snake_case These magic methods provide backwards compatibility for modules/themes/whatevers that still access properties via their snake_case names |
public | addCSS(string/array $cssUri, string $cssMediaType='all' , int/null $offset=null, bool $checkPath=true) : trueAdds a new stylesheet(s) to the page header. |
public | addJS(string/array $jsUri, bool $checkPath=true) : void Adds a new JavaScript file(s) to the page header. |
public | addJquery(string/null $version=null, string/null $folder=null, bool $minifier=true) : void Adds jQuery library file to queued JS file list |
public | addJqueryPlugin(string/array $name, mixed $folder=null, bool $css=true) : void Adds jQuery plugin(s) to queued JS file list |
public | addJqueryUI(string/array $component, string $theme='base' , bool $checkDependencies=true) : voidAdds jQuery UI component(s) to queued JS file list |
public | abstract checkAccess() : void Check if the controller is available for the current user/visitor |
public | abstract display() : void Displays page view |
public | displayFooter(bool $display=true) : void Sets page header display |
public | displayHeader(bool $display=true) : void Sets page header display |
public | displayHeaderJavaScript(bool $display=true) : void Sets page header javascript display |
public static | getController(string $className, bool $auth=false, bool $ssl=false) : \Controller returns a new instance of this controller |
public | init() : void Initialize the page |
public | abstract initContent() : void Assigns Smarty variables for the page main content |
public | abstract initCursedPage() : void Assigns Smarty variables when access is forbidden |
public | abstract initFooter() : void Assigns Smarty variables for the page footer |
public | abstract initHeader() : void Assigns Smarty variables for the page header |
public | isXmlHttpRequest() : bool Checks if the controller has been called from XmlHttpRequest (AJAX) |
public static | myErrorHandler(string $errno, string $errstr, string $errfile, int $errline) : bool Custom error handler |
public | abstract postProcess() : void Do the page treatment: process input, process AJAX, etc. |
public | removeCSS(string/array $cssUri, string $cssMediaType='all' , bool $checkPath=true) : voidRemoves CSS stylesheet(s) from the queued stylesheet list |
public | removeJS(string/array $jsUri, bool $checkPath=true) : void Removes JS file(s) from the queued JS file list |
public | run() : void Starts the controller process (this method should not be overridden!) |
public | abstract setMedia() : void Sets default media list for this controller |
public | setRedirectAfter(mixed $url) : void Set $this->redirect_after that will be used by redirect() after the process |
public | setTemplate(string $template) : void Sets template file for page content output |
public | abstract viewAccess() : void Check if the current user/visitor has valid view permissions |
protected | ajaxDie(string/null $value=null, string/null $controller=null, string/null $method=null) : void Dies and echoes output value |
protected | isCached(string $template, string/null $cacheId=null, string/null $compileId=null) : bool Checks if a template is cached |
protected | abstract redirect() : void Redirects to $this->redirect_after after the process if there is no error |
protected | smartyOutputContent(array/string $content) : void Renders controller templates and generates page content |
Class: AdminControllerCore
Class AdminControllerCore
Visibility | Function |
---|---|
public | __construct() : void AdminControllerCore constructor. |
public | addFiltersToBreadcrumbs() : string/void |
public | addMetaTitle(string $entry) : void Add an entry to the meta title. |
public | addRowAction(string $action) : void Declare an action to use for each row in the list |
public | addRowActionSkipList(string $action, array $list) : void Add an action to use for each row in the list |
public | ajaxProcessGetModuleQuickView() : void |
public | authorizationLevel() : \int(integer) Return the type of authorization on permissions page and option. |
public | beforeUpdateOptions() : void Can be overridden |
public | checkAccess() : bool Check if the token is valid, else display a warning page |
public | checkToken() : bool Check for security token |
public | createTemplate(string $tplName) : \Smarty_Internal_Template Create a template from the override file, else from the base file. |
public | display() : void |
public | displayAjax() : void |
public | displayModuleOptions(\Module $module, string $output_type='link' , string/null $back=null) : string/arrayDisplay modules list |
public | displayRequiredFields() : string/void Prepare the view to display the required fields form |
public | fillModuleData(\Module $module, string $outputType='link' , string/null $back=null) : void |
public | getFieldValue(\ObjectModel $obj, string $key, int/null $idLang=null) : string Return field value if possible (both classical and multilingual fields) Case 1 : Return value if present in $_POST / $_GET Case 2 : Return object value |
public | getFieldsValue(\ObjectModel $obj) : array Return the list of fields value |
public | getLanguages() : array |
public | getList(int $idLang, string/null $orderBy=null, string/null $orderWay=null, int $start, int/null $limit=null, bool/int/bool $idLangShop=false) : mixed Get the current objects' list form the database |
public | getModulesList(array/string $filterModulesList) : bool |
public | getTemplateFormVars() : array |
public | getTemplateListVars() : array |
public | getTemplateViewVars() : array |
public | init() : void Init context and dependencies, handles POST and GET |
public | initBreadcrumbs(int/null $tabId=null, array/null $tabs=null) : void Set breadcrumbs array for the controller page |
public | initContent() : void Assign smarty variables for all default views, list and form, then call other init functions |
public | initCursedPage() : void Initialize the invalid doom page of death |
public | initFooter() : void Assign smarty variables for the footer |
public | initHeader() : void Assign smarty variables for the header |
public | initModal() : void |
public | initPageHeaderToolbar() : void |
public | initProcess() : void Retrieve GET and POST value and translate them to actions |
public | initShopContext() : void |
public | initToolbar() : void assign default action in toolbar_btn smarty var, if they are not set. uses override to specifically add, modify or remove items |
public | initToolbarTitle() : void Set default toolbar_title to admin breadcrumb |
public | isFresh(string $file, int $timeout=604800) : bool |
public | jsonConfirmation(string $message) : void Shortcut to set up a json success payload |
public | jsonError(string $message) : void Shortcut to set up a json error payload |
public | postProcess() : bool |
public | processAdd() : \ObjectModel/false Object creation |
public | processDelete() : \ObjectModel/false Object Delete |
public | processDeleteImage() : \ObjectModel/false Object Delete images |
public | processExport(string $textDelimiter='"' ) : void |
public | processFilter() : void |
public | processPosition() : \ObjectModel/false Change object position |
public | processResetFilters(int/null $listId=null) : void Cancel all filters for this tab |
public | processSave() : bool Call the right method for creating or updating object |
public | processStatus() : \ObjectModel/false Change object status (active, inactive) |
public | processUpdate() : \ObjectModel/false Object update |
public | processUpdateFields() : \ObjectModel Change object required fields |
public | refresh(string $fileToRefresh, string $externalFile) : bool |
public | renderDetails() : string/false Override to render the view page |
public | renderForm() : string Function used to render the form for this controller |
public | renderKpis() : void |
public | renderList() : string/false Function used to render the list to display for this controller |
public | renderModal() : string |
public | renderModulesList() : string |
public | renderOptions() : string Function used to render the options for this controller |
public | renderView() : string Override to render the view page |
public | setDeprecatedMedia() : void |
public | setHelperDisplay(\Helper $helper) : void This function sets various display options for helper list |
public | setMedia() : void |
public | validateRules(bool/string/bool $className=false) : void Manage page display (form, list...) |
public | viewAccess(bool $disable=false) : bool Check rights to view the current tab |
public | viewDetails() : void Display object details |
protected | _childValidation() : void Overload this method for custom checking |
protected | addPageHeaderToolBarModulesListButton() : void |
protected | addToolBarModulesListButton() : void |
protected | afterAdd(\ObjectModel $object) : bool |
protected | afterDelete(\ObjectModel $object, int $oldId) : bool Called before deletion |
protected | afterImageUpload() : bool Check rights to view the current tab |
protected | afterUpdate(\ObjectModel $object) : bool |
protected | ajaxProcessOpenHelp() : void |
protected | beforeAdd(\ObjectModel $object) : bool Called before Add |
protected | beforeDelete(\ObjectModel $object) : bool Called before deletion |
protected | copyFromPost(mixed $object, string $table) : void Copy data values from $_POST to object |
protected | dispatchFieldsListingModifierEvent() : void |
protected | displayInformation(string $msg) : void Add a info message to display at the top of the page |
protected | displayWarning(string $msg) : void Add a warning message to display at the top of the page |
protected | ensureListIdDefinition() : void |
protected | filterTabModuleList() : void |
protected | filterToField(string $key, string $filter) : array/false |
protected | getCookieFilterPrefix() : mixed Set the filters used for the list display |
protected | getSelectedAssoShop(string $table) : array Returns an array with selected shops and type (group or boutique shop) |
protected | initTabModuleList() : void Init tab modules list and add button in toolbar |
protected | l(string $string, string/null $class=null, bool $addslashes=false, bool $htmlentities=true) : string The translation if available, or the english default text. Non-static method which uses AdminController::translate() |
protected | loadObject(bool $opt=false) : \ObjectModel/false Load class object using identifier in $_GET (if possible) otherwise return an empty object, or die |
protected | postImage(int $id) : bool Overload this method for custom checking |
protected | processBulkAffectZone() : bool |
protected | processBulkDelete() : bool true if success Delete multiple items |
protected | processBulkDisableSelection() : bool true if success Disable multiple items |
protected | processBulkEnableSelection() : bool true if success Enable multiple items |
protected | processBulkStatusSelection(bool $status) : bool true if success Toggle status of multiple items |
protected | processUpdateOptions() : void Update options and preferences |
protected | redirect() : void |
protected | updateAssoShop(int $idObject) : bool/void Update the associations of shops |
protected | uploadImage(int $id, string $name, string $dir, bool/string/bool $ext=false, int/null $width=null, int/null $height=null) : bool |
protected | validateField(mixed $value, array $field) : bool |
This class extends \Controller
Class: FrontControllerCore
Class FrontControllerCore.
Visibility | Function |
---|---|
public | __construct() : void Controller constructor. |
public | addCSS(array/string $cssUri, string $cssMediaType='all' , int/null $offset=null, bool $checkPath=true) : true/voidAdd one or several CSS for front, checking if css files are overridden in theme/css/modules/ directory. |
public | addColorsToProductList(array $products) : void Renders and adds color list HTML for each product in a list. |
public | addJS(array/string $jsUri, bool $checkPath=true) : true/void Add one or several JS files for front, checking if js files are overridden in theme/js/modules/ directory. |
public | addMedia(string/array $mediaUri, string/null $cssMediaType=null, int/null $offset=null, bool $remove=false, bool $checkPath=true) : true/void Adds a media file(s) (CSS, JS) to page header. |
public | checkAccess() : bool Check if the controller is available for the current user/visitor. |
public | checkLiveEditAccess() : bool Checks if the user can use Live Edit feature. |
public | display() : bool Compiles and outputs full page content. |
public | displayContent() : void Renders page content. Used for retrocompatibility with PS 1.4. |
public | DEPRECATED - 2.0.0 |
public | DEPRECATED - 2.0.0 |
public static | getCurrentCustomerGroups() : array Sets and returns customer groups that the current customer(visitor) belongs to. |
public | getHrefLang(string $entity, int $idItem, array $languages, int $idLangDefault) : string html of the hreflang tags creates hrefLang links for various entities. |
public | getLayout() : bool/string Returns the layout corresponding to the current page by using the override system Ex: On the url: http://localhost/index.php?id_product=1&controller=product, this method will check if the layout exists in the following files (in that order), and return the first found: - /themes/default/override/layout-product-1.tpl - /themes/default/override/layout-product.tpl - /themes/default/layout.tpl. |
public | getLiveEditFooter() : string HTML Renders Live Edit widget. |
public | getOverrideTemplate() : string/bool Returns an overridden template path (if any) for this controller. If not overridden, will return false. This method can be easily overriden in a specific controller. |
public | getRelPrevNext(string $entity, int $idItem) : string string containing the new tags Get rel prev/next tags for paginated pages. |
public | getSeoFields() : string html code for the new tags Generates html for additional seo tags. |
public | getTemplatePath(string $template) : string Returns template path. |
public | init() : void Initializes front controller: sets smarty variables, class properties, redirects depending on context, etc. |
public | initContent() : void Initializes common front page content: header, footer and side columns. |
public | initCursedPage() : void Renders and outputs maintenance page and ends controller process. |
public | initFooter() : void Initializes page footer variables. |
public | initHeader() : void Initializes page header variables. |
public | initLogoAndFavicon() : array Returns logo and favicon variables, depending on active theme type (regular or mobile). |
public | isTokenValid() : bool Checks if token is valid. |
public | pagination(int/null $totalProducts=null) : void Assigns product list page pagination variables. |
public | postProcess() : void Method that is executed after init() and checkAccess(). Used to process user input. |
public | process() : void Called before compiling common page sections (header, footer, columns). Good place to modify smarty variables. |
public | productSort() : void Assigns product list page sorting variables. |
public | removeCSS(array/string $cssUri, string $cssMediaType='all' , bool $checkPath=true) : voidRemoves CSS file(s) from page header. |
public | removeJS(array/string $jsUri, bool $checkPath=true) : void Removes JS file(s) from page header. |
public | removeMedia(string/array $mediaUri, string/null $cssMediaType=null, bool $checkPath=true) : void Removes media file(s) from page header. |
public | setMedia() : bool Sets controller CSS and JS files. |
public | setMobileMedia() : void Specific medias for mobile device. If autoload directory is present in the mobile theme, these files will not be loaded. |
public | setMobileTemplate(string $template) : void Checks if the template set is available for mobile themes, otherwise front template is chosen. |
public | setTemplate(string $defaultTemplate) : void Sets template file for page content output. |
public | viewAccess() : bool Check if the current user/visitor has valid view permissions. |
protected | canonicalRedirection(string $canonicalUrl='' ) : boolRedirects to canonical URL. |
protected | displayMaintenancePage() : void Displays maintenance page if shop is closed. |
protected | displayRestrictedCountryPage() : void Displays 'country restricted' page if user's country is not allowed. |
protected | geolocationManagement(\Country $defaultCountry) : \Country/false Geolocation management. |
protected | getColorsListCacheId(int $idProduct) : string Returns cache ID for product color list. |
protected | getOverrideThemeDir() : string Returns theme override directory (regular or mobile). |
protected | getThemeDir() : string Returns theme directory (regular or mobile). |
protected static | isInWhitelistForGeolocation() : bool Checks if user's location is whitelisted. |
protected | recoverCart() : int/false Recovers cart information. |
protected | redirect() : void Redirects to redirect_after link. |
protected | smartyOutputContent(array/string $content) : void Renders controller templates and generates page content. |
protected | sslRedirection() : void Redirects to correct protocol if settings and request methods don't match. |
protected | useMobileTheme() : bool Checks if mobile theme is active and in use. |
This class extends \Controller
Class: ModuleFrontControllerCore
Class ModuleFrontControllerCore
Visibility | Function |
---|---|
public | __construct() : void ModuleFrontControllerCore constructor. |
public | getTemplatePath(string $template) : string/false Finds and returns module front template that take the highest precedence |
public | initContent() : void |
public | setTemplate(string $template) : void Assigns module template for page content |
This class extends \FrontController
Class: DbPDOCore
Class DbPDOCore
Visibility | Function |
---|---|
public | Affected_Rows() : int Return the number of rows affected by the last SQL query. |
public | Insert_ID() : string/int Returns ID of the last inserted row. |
public | _escape(string $str) : string Escapes illegal characters in a string. |
public static | checkAutoIncrement(string $server, string $user, string $pwd) : bool Checks if auto increment value and offset is 1 |
public static | checkCreatePrivilege(string $server, string $user, string $pwd, string $db, string $prefix, string/null $engine=null) : bool/string True, false or error Tries to connect to the database and create a table (checking creation privileges) |
public | connect() : \PDO Tries to connect to the database |
public static | createDatabase(string $host, string $user, string $password, string $dbname, bool $dropit=false) : bool/int Tries to connect and create a new database |
public | disconnect() : void Destroys the database connection link |
public | getBestEngine() : string Selects best table engine. |
public | getMsgError(bool $query=false) : string Returns error message. |
public | getNumberError() : int Returns error code. |
public | getVersion() : string Returns database server version. |
public static | hasTableWithSamePrefix(string $server, string $user, string $pwd, string $db, string $prefix) : bool Try a connection to the database and check if at least one table with same prefix exists |
public | nextRow(bool $result=false) : array/false/null Returns the next row from the result set. |
public | set_db(string $dbName) : int Switches to a different database. |
public static | tryToConnect(string $server, string $user, string $pwd, string $db, bool $newDbLink=true, string/bool $engine=null, int $timeout=5) : int Error code or if connection was successful Try a connection to the database |
public static | tryUTF8(string $server, string $user, string $pwd) : bool Try a connection to the database and set names to UTF-8 |
protected static | _getPDO(string $host, string $user, string $password, string $dbname, int $timeout=5) : \PDO Returns a new PDO object (database link) |
protected | _numRows(\PDOStatement $result) : int Returns row count from the result set. |
protected | _query(string $sql) : \PDOStatement Executes an SQL statement, returning a result set as a PDOStatement object or true/false. |
protected | getAll(bool $result=false) : array/false/null Returns all rows from the result set. |
This class extends \Db
Class: DbQueryCore
SQL query builder
Visibility | Function |
---|---|
public | __toString() : string Converts object to string |
public | build() : string Generates query and return SQL string |
public | from(string $table, string/null $alias=null) : \DbQuery Sets table for FROM clause |
public | groupBy(string $fields) : \DbQuery Adds a GROUP BY restriction |
public | having(string $restriction) : \DbQuery Adds a restriction in HAVING clause (each restriction will be separated by AND statement) |
public | innerJoin(string $table, string/null $alias=null, string/null $on=null) : \DbQuery Adds an INNER JOIN clause E.g. $this->innerJoin('product p ON ...') |
public | join(string $join) : \DbQuery Adds JOIN clause E.g. $this->join('RIGHT JOIN '.DB_PREFIX.'product p ON ...'); |
public | leftJoin(string $table, string/null $alias=null, string/null $on=null) : \DbQuery Adds a LEFT JOIN clause |
public | leftOuterJoin(string $table, string/null $alias=null, string/null $on=null) : \DbQuery Adds a LEFT OUTER JOIN clause |
public | limit(int $limit, int $offset) : \DbQuery Sets query offset and limit |
public | naturalJoin(string $table, string/null $alias=null) : \DbQuery Adds a NATURAL JOIN clause |
public | orderBy(string $fields) : \DbQuery Adds an ORDER BY restriction |
public | rightJoin(string $table, string/null $alias=null, string/null $on=null) : \DbQuery Adds a RIGHT JOIN clause |
public | select(string $fields) : \DbQuery Adds fields to SELECT clause |
public | type(string $type) : \DbQuery Sets type of the query |
public | where(string $restriction) : \DbQuery Adds a restriction in WHERE clause (each restriction will be separated by AND statement) |
Class: DbCore (abstract)
Class DbCore
Visibility | Function |
---|---|
public | abstract Affected_Rows() : int Get number of affected rows in previous database operation |
public | abstract Insert_ID() : int/string Get the ID generated from the previous INSERT operation |
public | __construct(string $server, string $user, string $password, string $database, bool $connect=true) : void Instantiates a database connection |
public | __destruct() : void Closes connection to database |
public | abstract _escape(string $str) : string Protect string against SQL injections |
public | '' , int $limit, bool $useCache=true, bool $useNull=false) : boolDEPRECATED - 1.5.0.1 Use insert() or update() method instead. |
public | autoExecuteWithNullValues(string $table, array $values, string $type, string $where='' , int $limit) : boolFilter SQL query within a blacklist |
public static | checkAutoIncrement(string $server, string $user, string $pwd) : bool Checks if auto increment value and offset is 1 |
public static | checkConnection(string $server, string $user, string $pwd, string $db, bool $newDbLink=true, string/bool $engine=null, int $timeout=5) : int Error code or if connection was successful Try a connection to the database |
public static | checkCreatePrivilege(string $server, string $user, string $pwd, string $db, string $prefix, string/null $engine=null) : bool/string True, false or error Tries to connect to the database and create a table (checking creation privileges) |
public static | checkEncoding(string $server, string $user, string $pwd) : bool Try a connection to the database and set names to UTF-8 |
public | abstract connect() : \PDO/\mysqli/\resource Opens a database connection |
public | delete(string $table, string $where='' , int $limit, bool $useCache=true, bool $addPrefix=true) : boolExecutes a DELETE query |
public static | deleteTestingInstance() : void Unit testing purpose only |
public | disableCache() : void Disable the use of the cache |
public | abstract disconnect() : void Closes database connection |
public | displayError(bool/string/bool $sql=false) : void Displays last SQL error |
public static | DEPRECATED - 2.0.0 |
public | enableCache() : void Enable & flush the cache |
public | escape(string $string, bool $htmlOk=false, bool $bqSql=false) : string Sanitized data Sanitize data which will be injected into SQL query |
public | execute(string/\DbQuery $sql, bool $useCache=true) : bool Executes a query |
public | executeS(string/\DbQuery $sql, bool $array=true, bool $useCache=true) : array/false/null/\mysqli_result/\PDOStatement/\resource Executes return the result of $sql as array |
public | abstract getBestEngine() : string Selects best table engine. |
public static | getClass() : string Returns the best child layer database class. |
public static | getInstance(bool $master=true) : Db Singleton instance of Db object Returns database object instance. |
public | getLink() : \PDO/\mysqli/resource Resource Get used link instance |
public | abstract getMsgError() : string Returns the text of the error message from previous database operation |
public | abstract getNumberError() : int Returns the number of the error from previous database operation |
public | getRow(string/\DbQuery $sql, bool $useCache=true) : array/bool/object/null Returns an associative array containing the first row of the query This function automatically adds "LIMIT 1" to the query |
public | getValue(string/\DbQuery $sql, bool $useCache=true) : string/false/null Returns a value from the first row, first column of a SELECT query |
public | abstract getVersion() : string Get database version |
public static | hasTableWithSamePrefix(string $server, string $user, string $pwd, string $db, string $prefix) : bool Try a connection to the database and check if at least one table with same prefix exists |
public | insert(string $table, array $data, bool $nullValues=false, bool $useCache=true, int $type=1, bool $addPrefix=true) : bool Executes an INSERT query |
public | abstract nextRow(bool/\PDOStatement/\mysqli_result/\resource/bool $result=false) : array/object/false/null Get next row for a query which does not return an array |
public | numRows() : int Get number of rows for last result |
public static | DEPRECATED - 2.0.0 |
public | query(string/\DbQuery $sql) : bool/\mysqli_result/\PDOStatement/\resource Execute a query and get result resource |
public static | DEPRECATED - 2.0.0 |
public static | setInstanceForTesting(mixed $testDb) : void Unit testing purpose only |
public | abstract set_db(string $dbName) : void Sets the current active database on the server that's associated with the specified link identifier. Do not remove, useful for some modules. |
public | update(string $table, array $data, string $where='' , int $limit, bool $nullValues=false, bool $useCache=true, bool $addPrefix=true) : boolExecutes an UPDATE query |
protected | abstract _numRows(mixed $result) : int Get number of rows in a result |
protected | abstract _query(string $sql) : \PDOStatement/\mysqli_result/\resource/bool Execute a query and get result resource |
protected | abstract getAll(bool/\PDOStatement/\mysqli_result/\resource/bool/null $result=false) : array Get all rows for a query which return an array |
protected static | loadSlaveServers() : mixed Loads configuration settings for slave servers if needed. |
protected | q(string/\DbQuery $sql, bool $useCache=true) : bool/\mysqli_result/\PDOStatement/\resource Executes a query |
Class: CMSCore
Class CMSCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | cleanPositions(mixed $idCategory) : bool |
public | delete() : bool |
public static | getCMSContent(int $idCms, int/null $idLang=null, int/null $idShop=null) : array/bool/null/object |
public static | getCMSPages(null $idLang=null, null $idCmsCategory=null, bool $active=true, null $idShop=null) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getLastPosition(mixed $idCategory) : false/null/string |
public static | getLinks(int $idLang, array/null $selection=null, bool $active=true, \Link/null/\Link $link=null) : array |
public static | getRepositoryClassName() : string |
public static | getUrlRewriteInformations(mixed $idCms) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | listCms(null $idLang=null, bool $idBlock=false, bool $active=true) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | update(bool $nullValues=false) : bool |
public | updatePosition(mixed $way, mixed $position) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: GuestCore
Class GuestCore
Visibility | Function |
---|---|
public static | getFromCustomer(mixed $idCustomer) : bool |
public | mergeWithCustomer(mixed $idGuest, mixed $idCustomer) : void |
public static | setNewGuest(mixed $cookie) : void |
public | userAgent() : void |
protected | getBrowser(mixed $userAgent) : null |
protected | getLanguage(mixed $acceptLanguage) : mixed/string |
protected | getOs(mixed $userAgent) : null |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ValidateCore
Class ValidateCore
Visibility | Function |
---|---|
public static | isAbsoluteUrl(string $url) : bool Validity is ok or not Check if URL is absolute |
public static | isAddress(string $address) : bool Validity is ok or not Check for a postal address validity |
public static | isAnything() : bool |
public static | isApe(string $ape) : bool Return true if is valid Validate APE Code |
public static | isArrayWithIds(array $ids) : bool return true if the array contain only unsigned int value |
public static | isBirthDate(string $date) : bool Validity is ok or not Check for birthDate validity |
public static | isBool(bool $bool) : bool Validity is ok or not Check for boolean validity |
public static | isBoolId(string $ids) : bool Validity is ok or not Check for bool_id |
public static | DEPRECATED - 1.0.0 Use self::isBoolId() |
public static | isCarrierName(string $name) : bool Validity is ok or not Check for a carrier name validity |
public static | isCatalogName(string $name) : bool Validity is ok or not Check for product or category name validity |
public static | isCityName(string $city) : bool Validity is ok or not Check for city name validity |
public static | isCleanHtml(string $html, bool $allowIframe=false) : bool Validity is ok or not Check for HTML field validity (no XSS please !) |
public static | isColor(mixed $color) : bool Validity is ok or not Check object validity |
public static | isConfigName(string $configName) : bool Validity is ok or not Check for configuration key validity |
public static | isControllerName(mixed $name) : bool |
public static | isCookie(mixed $data) : bool Check if $data is a PrestaShop cookie object |
public static | isCoordinate(string $data) : bool Validity is ok or not Check for Latitude/Longitude |
public static | isCountryName(string $name) : bool Validity is ok or not Check for a country name validity |
public static | isDate(string $date) : bool Validity is ok or not Check for date validity |
public static | isDateFormat(string $date) : bool Validity is ok or not Check for date format |
public static | isDirName(string $dir) : bool Validity is ok or not Check for standard name directory validity |
public static | isDiscountName(string $voucher) : bool Validity is ok or not Check for voucher name validity |
public static | isDistanceUnit(mixed $unit) : int |
public static | isDniLite(string $dni) : bool |
public static | isEan13(string $ean13) : bool Validity is ok or not Check for barcode validity (EAN-13) |
public static | isEmail(string $email) : bool Validity is ok or not Check for e-mail validity |
public static | isFileName(string $name) : bool Validity is ok or not Check for standard name file validity |
public static | isFloat(float $float) : bool Validity is ok or not Check for a float number validity |
public static | isGenericName(string $name) : bool Validity is ok or not Check for standard name validity |
public static | isHookName(string $hook) : bool Validity is ok or not Check for hook name validity |
public static | isImageSize(string $size) : bool Validity is ok or not Check for an image size validity |
public static | isImageTypeName(string $type) : bool Validity is ok or not Check for image type name validity |
public static | isInt(int $value) : bool Validity is ok or not Check for an integer validity |
public static | isIp2Long(mixed $ip) : int |
public static | isLabel(string $label) : bool Validity is ok or not Customization fields' label validity |
public static | isLangIsoCode(string $isoCode) : bool Validity is ok or not Check for Language Iso Code |
public static | isLanguageCode(mixed $s) : int |
public static | isLanguageFileName(string $fileName) : bool Validity is ok or not Check for Language File Name |
public static | isLanguageIsoCode(string $isoCode) : bool Validity is ok or not Check for language code (ISO) validity |
public static | isLinkRewrite(string $link) : bool Validity is ok or not Check for a link (url-rewriting only) validity |
public static | isLoadedObject(mixed $object) : bool Validity is ok or not Check object validity |
public static | isLocalizationPackSelection(string $data) : bool Validity is ok or not Check the localization pack part selected |
public static | isMailName(string $mailName) : bool Validity is ok or not Check for sender name validity |
public static | isMailSubject(string $mailSubject) : bool Validity is ok or not Check for e-mail subject validity |
public static | isMd5(string $md5) : bool Validity is ok or not Check for MD5 string validity |
public static | isMessage(string $message) : bool Validity is ok or not Check for a message validity |
public static | isModuleName(string $moduleName) : bool Validity is ok or not Check for module name validity |
public static | isModuleUrl(string $url, array $errors) : bool Validity is ok or not Check for module URL validity |
public static | isMySQLEngine(mixed $engine) : bool |
public static | isName(string $name) : bool Validity is ok or not Check for name validity |
public static | isNegativePrice(string $price) : bool Validity is ok or not Check for price validity (including negative price) |
public static | isNullOrUnsignedId(mixed $id) : bool |
public static | isNumericIsoCode(string $isoCode) : int |
public static | isOptFloat(float $float) : bool Validity is ok or not Check for a float number validity |
public static | isOrderBy(string $order) : bool Validity is ok or not Check for table or identifier validity Mostly used in database for ordering : ORDER BY field |
public static | isOrderInvoiceNumber(mixed $id) : int |
public static | isOrderWay(string $way) : bool Validity is ok or not Check for table or identifier validity Mostly used in database for ordering : ASC / DESC |
public static | isPasswd(string $plainTextPassword, int $size=5) : bool Validity is ok or not Check for password validity |
public static | isPasswdAdmin(string $plainTextPassword) : bool |
public static | isPercentage(float $value) : bool Validity is ok or not Check for an percentage validity (between 0 and 100) |
public static | isPhoneNumber(string $number) : bool Validity is ok or not Check for phone number validity |
public static | isPhpDateFormat(string $dateFormat) : bool Validity is ok or not Check date formats like http://php.net/manual/en/function.date.php |
public static | isPostCode(string $postcode) : bool Validity is ok or not Check for postal code validity |
public static | isPrestaShopVersion(mixed $version) : bool |
public static | isPrice(string $price) : bool Validity is ok or not Check for price validity |
public static | isPriceDisplayMethod(int $data) : bool Validity is ok or not Price display method validity |
public static | isProductVisibility(string $s) : bool Validity is ok or not Check for product visibility |
public static | isReductionType(string $data) : bool Validity is ok or not Check if the data is a reduction type (amout or percentage) |
public static | isReference(string $reference) : bool Validity is ok or not Check for product reference validity |
public static | isRoutePattern(string $pattern) : bool Validity is ok or not Check for a route pattern validity |
public static | isSceneZones(array $zones) : bool return true if array contain all value required for an image map zone |
public static | isSerializedArray(string $data) : bool Validity is ok or not Check for PHP serialized data |
public static | isSha1(string $sha1) : bool Validity is ok or not Check for SHA1 string validity |
public static | isSiret(string $siret) : bool Return true if is valid Validate SIRET Code |
public static | isSortDirection(string $value) : bool Validity is ok or not Check if the value is a sort direction value (DESC/ASC) |
public static | isStateIsoCode(string $isoCode) : int |
public static | isStockManagement(array $stock_management) : bool return true if is a valide stock management |
public static | isString(string $data) : bool Validity is ok or not Price display method validity |
public static | isSubDomainName(mixed $domain) : int |
public static | isTabName(string $name) : bool Validity is ok or not Check for admin panel tab name validity |
public static | isTableOrIdentifier(string $table) : bool Validity is ok or not Check for table or identifier validity Mostly used in database for table names and id_table |
public static | isTablePrefix(mixed $data) : int |
public static | isTagsList(string $list) : bool Validity is ok or not Check for tags list validity |
public static | isTplName(string $tplName) : bool Validity is ok or not Check for template name validity |
public static | isTrackingNumber(string $trackingNumber) : bool Validity is ok or not Check tracking number validity (disallowed empty string) |
public static | isUnixName(mixed $data) : int |
public static | isUnsignedFloat(mixed $float) : bool |
public static | isUnsignedId(int $id) : bool Validity is ok or not Check for an integer validity (unsigned) Mostly used in database for auto-increment |
public static | isUnsignedInt(int $value) : bool Validity is ok or not Check for an integer validity (unsigned) |
public static | isUpc(string $upc) : bool Validity is ok or not Check for barcode validity (UPC) |
public static | isUrl(string $url) : bool Validity is ok or not Check url validity (disallowed empty string) |
public static | isUrlOrEmpty(string $url) : bool Validity is ok or not Check url validity (allowed empty string) |
public static | isValidSearch(string $search) : bool Validity is ok or not Check for search query validity |
public static | DEPRECATED - 1.0.0 You should not use list like this, please use an array when you build a SQL query |
public static | isVoucherDescription(mixed $text) : int |
public static | isWeightUnit(mixed $unit) : int |
public static | isZipCodeFormat(string $zipCode) : bool Validity is ok or not Check for zip code format validity |
Class: CountryCore
Class CountryCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | addModuleRestrictions(array $shops=array(), array $countries=array(), array $modules=array()) : bool |
public | affectZoneToSelection(array $idsCountries, int $idZone) : bool |
public | checkZipCode(string $zipCode) : bool Replace letters of zip code format And check this format on the zip code |
public static | containsStates(mixed $idCountry) : bool |
public | delete() : bool |
public static | getByIso(string $isoCode, bool $active=false) : int Country ID Get a country ID with its iso code |
public static | getCountries(int $idLang, bool $active=false, bool $containStates=false, bool $listStates=true) : array Countries and corresponding zones |
public static | getCountriesByIdShop(mixed $idShop, mixed $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getCountriesByZoneId(mixed $idZone, mixed $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | DEPRECATED - 1.0.0 use $context->country->id instead |
public static | getIdByName(int $idLang=null, string $country) : int Country ID Get a country id with its name |
public static | getIdZone(mixed $idCountry) : bool/int |
public static | getIsoById(int $idCountry) : string Country iso Get a country iso with its ID |
public static | getNameById(int $idLang, int $idCountry) : string Country name Get a country name with its ID |
public static | getNeedZipCode(mixed $idCountry) : bool |
public static | getZipCodeFormat(mixed $idCountry) : bool/false/null/string |
public | isNeedDni() : bool |
public static | isNeedDniByCountryId(mixed $id_country) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: LocalizationPackCore
Class LocalizationPackCore
Visibility | Function |
---|---|
public | getErrors() : array |
public | loadLocalisationPack(mixed $file, mixed $selection, bool $installMode=false, null $isoLocalizationPack=null) : bool |
protected | _installCurrencies(\SimpleXMLElement $xml, bool $installMode=false) : bool |
protected | _installGroups(\SimpleXMLElement $xml) : bool |
protected | _installLanguages(\SimpleXMLElement $xml, bool $installMode=false) : bool |
protected | _installStates(\SimpleXMLElement $xml) : bool |
protected | _installTaxes(\SimpleXMLElement $xml) : bool |
protected | _installUnits(\SimpleXMLElement $xml) : bool |
protected | installConfiguration(\SimpleXMLElement $xml) : bool Update a configuration variable from a localization file |
protected | installModules(\SimpleXMLElement $xml) : bool Install/Uninstall a module from a localization file |
protected | updateDefaultGroupDisplayMethod(\SimpleXMLElement $xml) : bool |
Class: RijndaelCore
Class RijndaelCore
Visibility | Function |
---|---|
public | __construct(string $key, string $iv) : void RijndaelCore constructor. |
public | decrypt(string $ciphertext) : string |
public | encrypt(string $plaintext) : bool/string Base64 is not required, but it is be more compact than urlencode |
Class: ImageCore
Class ImageCore
Visibility | Function |
---|---|
public | __construct(int/null $id=null, int/null $idLang=null) : void ImageCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | clearTmpDir() : void Clear all images in tmp dir |
public | createImgFolder() : bool success Create parent folders for the image in the new filesystem |
public | delete() : bool |
public static | deleteAllImages(string $path, string $format='jpg' ) : bool successRecursively deletes all product images in the given folder tree and removes empty folders. |
public static | deleteCover(int $idProduct) : bool result Delete product cover |
public | deleteImage(bool $forceDelete=false) : void Delete the product image from disk and remove the containing folder if empty Handles both legacy and new image filesystems |
public | deleteProductAttributeImage() : void Delete Image - Product attribute associations for this image |
public static | duplicateAttributeImageAssociations(mixed $combinationImages) : bool Duplicate product attribute image associations |
public static | duplicateProductImages(int $idProductOld, bool $idProductNew, mixed $combinationImages) : void Copy images from a product to another |
public static | getAllImages() : array Images Return Images |
public static | getBestImageAttribute(int $idShop, int $idLang, int $idProduct, int $idProductAttribute) : array Return first image (by position) associated with a product attribute |
public static | getCover(int $idProduct) : bool result *Get product cover |
public | getExistingImgPath() : mixed Returns image path in the old or in the new filesystem |
public static | getGlobalCover(int $idProduct) : bool result *Get global product cover |
public static | getHeight(mixed $params, mixed $smarty) : mixed |
public static | getHighestPosition(int $idProduct) : int highest position of images Return highest position of images for a product |
public static | getImages(int $idLang, int $idProduct, int $idProductAttribute=null) : array Images Return available images for a product |
public static | getImagesTotal(int $idProduct) : int number of images Return number of images for a product |
public | getImgFolder() : string path to folder Returns the path to the folder containing the image in the new filesystem |
public static | getImgFolderStatic(mixed $idImage) : string path to folder Returns the path to the folder containing the image in the new filesystem |
public | getImgPath() : string path Returns the path to the image without file extension |
public | getPathForCreation() : string path Returns the path where a product image should be created (without file format) |
public static | getSize(mixed $type) : mixed |
public static | getWidth(mixed $params, mixed $smarty) : mixed |
public static | hasImages(int $idLang, int $idProduct, int $idProductAttribute=null) : bool Check if a product has an image available |
public static | moveToNewFileSystem(int $maxExecutionTime) : mixed success or timeout Move all legacy product image files from the image folder root to their subfolder in the new filesystem. If max_execution_time is provided, stops before timeout and returns string "timeout". If any image cannot be moved, stops and returns "false" |
public | DEPRECATED - since version 1.0.0 use Image::updatePosition() instead |
public static | testFileSystem() : bool success Try to create and delete some folders to check if moving images to new file system will be possible |
public | update(bool $nullValues=false) : bool |
public | updatePosition(int $way, int $position) : int success Change an image position and update relative positions |
protected static | replaceAttributeImageAssociationId(mixed $combinationImages, mixed $savedId, mixed $idImage) : void |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ImageManagerCore
Class ImageManagerCore
Visibility | Function |
---|---|
public static | checkImageMemoryLimit(mixed $image) : bool Check if memory limit is too long or not |
public static | create(string $type, string $filename) : \resource Create an image with GD extension from a given type |
public static | createWhiteImage(int $width, int $height) : \resource Create an empty image with white background |
public static | cut(array $srcFile, string $dstFile, int $dstWidth=null, int $dstHeight=null, string $fileType='jpg' , int $dstX, int $dstY) : bool Operation resultCut image |
public static | getMimeTypeByExtension(string $fileName) : string Return the mime type by the file extension |
public static | imagecopyresampled(mixed $dstImage, mixed $srcImage, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $dstW, mixed $dstH, mixed $srcW, mixed $srcH, int $quality=3) : bool |
public static | isCorrectImageFileExt(string $filename, array/null $authorizedExtensions=null) : bool True if it's correct Check if image file extension is correct |
public static | isRealImage(string $filename, string $fileMimeType=null, array $mimeTypeList=null) : bool Check if file is a real image |
public static | resize(string $srcFile, string $dstFile, int $dstWidth=null, int $dstHeight=null, string $fileType='jpg' , bool $forceType=false, int $error, int $tgtWidth=null, int $tgtHeight=null, int $quality=5, int $srcWidth=null, int $srcHeight=null) : bool Operation resultResize, cut and optimize image |
public static | thumbnail(string $image, string $cacheImage, int $size, string $imageType='jpg' , bool $disableCache=true, bool $regenerate=false) : stringGenerate a cached thumbnail for object lists (eg. carrier, order statuses...etc) |
public static | validateIconUpload(array $file, int $maxFileSize) : bool/string Return false if no error encountered Validate icon upload |
public static | validateUpload(array $file, int $maxFileSize, mixed $types=null) : bool/string Return false if no error encountered Validate image upload (check image type and weight) |
public static | write(string $type, \resource $resource, string $filename) : bool Generate and write image |
Class: CustomerCore
Class CustomerCore
Visibility | Function |
---|---|
public | __construct(int/null $id=null) : void CustomerCore constructor. |
public | add(bool $autodate=true, bool $nullValues=true) : bool |
public | addGroups(mixed $groups) : void |
public static | checkPassword(mixed $idCustomer, string $plaintextOrHashedPassword) : bool result Check if customer password is the right one |
public | cleanGroups() : bool |
public static | customerExists(string $email, bool $returnId=false, bool $ignoreGuest=true) : int/bool if found, false otherwise Check if e-mail is already registered in database |
public static | customerHasAddress(int $idCustomer, int $idAddress) : bool result Check if an address is owned by a customer |
public | customerIdExists(int $idCustomer) : int/null |
public static | customerIdExistsStatic(int $idCustomer) : int/null |
public | delete() : bool |
public | getAddresses(int $idLang) : array Addresses Return customer addresses |
public static | getAddressesTotalById(int $idCustomer) : int Number of addresses Count the number of addresses for a customer |
public | getBoughtProducts() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getByEmail(string $email, string $plainTextPassword=null, bool $ignoreGuest=true) : \Customer/bool Return customer instance from its e-mail (optionnaly check password) |
public static | getCurrentCountry(int $idCustomer, \Cart/null/\Cart $cart=null) : string |
public static | getCustomers(null/bool $onlyActive=null) : array Customers Return customers list |
public static | getCustomersByEmail(string $email) : array Retrieve customers by email address |
public static | getDefaultGroupId(mixed $idCustomer) : mixed/null/string |
public | getGroups() : array/mixed |
public static | getGroupsStatic(mixed $idCustomer) : array/mixed |
public | getLastCart(bool $withOrder=true) : bool/int |
public | getLastConnections() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getLastEmails() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getOutstanding() : float |
public | getStats() : array Stats Return several useful statistics about customer |
public | getWebserviceObjectList(string $sqlJoin, string $sqlFilter, string $sqlSort, string $sqlLimit) : array/null |
public | getWsGroups() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | isBanned(mixed $idCustomer) : bool customer validity Check id the customer is active or not |
public | isGuest() : bool |
public | isLogged(bool $withGuest=false) : bool customer validity Check customer informations and return customer validity |
public | DEPRECATED - since 1.0.0 |
public | logout() : void Logout |
public | mylogout() : void Soft logout, delete everything links to the customer but leave there affiliate's informations |
public static | resetAddressCache(int $idCustomer, int $idAddress) : void |
public static | searchByIp(string $ip) : void Search for customers by ip address |
public static | searchByName(string $query, null/int $limit=null) : array/false/\mysqli_result/null/\PDOStatement/resource Corresponding customers Light back office search for customers |
public | setWsGroups(array $result) : bool |
public | setWsPasswd(mixed $passwd) : bool |
public | toggleStatus() : bool |
public | transformToCustomer(int $idLang, null $password=null) : bool |
public | update(bool $nullValues=false) : bool |
public | updateGroup(array $list) : void Update customer groups associated to the object |
protected static | checkPasswordInDatabase(mixed $idCustomer, mixed $hashedPassword) : bool Check password validity via DB |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ContextCore
Class ContextCore
Visibility | Function |
---|---|
public | cloneContext() : \Context Clone current context object |
public static | deleteTestingInstance() : void Unit testing purpose only |
public static | getContext() : \Context Get a singleton instance of Context object |
public | getDevice() : int Returns mobile device type |
public | getMobileDetect() : \Mobile_Detect Sets Mobile_Detect tool object |
public | getMobileDevice() : bool Sets mobile_device context variable |
public | isMobile() : bool Checks if visitor's device is a mobile device |
public | isTablet() : bool Checks if visitor's device is a tablet device |
public static | setInstanceForTesting(mixed $test_instance) : void Unit testing purpose only |
protected | checkMobileContext() : bool Checks if mobile context is possible |
Class: EncryptorCore
Class EncryptorCore
Visibility | Function |
---|---|
public | decrypt(string $content) : string plaintext Decrypt ciphertext |
public | encrypt(string $content) : bool/string ciphertext Encrypt plaintext |
public static | getInstance() : Encryptor instance Encryptor singleton |
protected | __construct() : void Get data if the cookie exists and else initialize an new one |
Class: TreeToolbarButtonCore (abstract)
Class TreeToolbarButtonCore
Visibility | Function |
---|---|
public | __construct(mixed $label, null $id=null, null $name=null, null $class=null) : void TreeToolbarButtonCore constructor. |
public | __toString() : string |
public | getAttribute(mixed $name) : null |
public | getAttributes() : array |
public | getClass() : mixed |
public | getContext() : \Context |
public | getId() : null |
public | getLabel() : null |
public | getName() : null |
public | getTemplate() : mixed |
public | getTemplateDirectory() : string |
public | getTemplateFile(mixed $template) : string |
public | hasAttribute(mixed $name) : bool |
public | render() : mixed |
public | setAttribute(mixed $name, mixed $value) : \$this |
public | setAttributes(mixed $value) : \$this |
public | setClass(mixed $value) : \TreeToolbarButtonCore |
public | setContext(mixed $value) : \$this |
public | setId(mixed $value) : \TreeToolbarButtonCore |
public | setLabel(mixed $value) : \TreeToolbarButtonCore |
public | setName(mixed $value) : \TreeToolbarButtonCore |
public | setTemplate(mixed $value) : \$this |
public | setTemplateDirectory(mixed $value) : \$this |
protected | DEPRECATED - 2.0.0 |
Class: TreeToolbarSearchCategoriesCore
2007-2016 PrestaShop thirty bees is an extension to the PrestaShop e-commerce software developed by PrestaShop SA Copyright (C) 2017 thirty bees NOTICE OF LICENSE This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately. DISCLAIMER Do not edit or add to this file if you wish to upgrade PrestaShop to newer versions in the future. If you wish to customize PrestaShop for your needs please refer to https://www.thirtybees.com for more information.
Visibility | Function |
---|---|
public | __construct(mixed $label, null $id, null $name=null, null $class=null) : void TreeToolbarSearchCategoriesCore constructor. |
public | render() : string |
protected | DEPRECATED - 2.0.0 |
This class extends \TreeToolbarButtonCore
This class implements \ITreeToolbarButtonCore
Class: TreeToolbarCore
2007-2016 PrestaShop thirty bees is an extension to the PrestaShop e-commerce software developed by PrestaShop SA Copyright (C) 2017 thirty bees NOTICE OF LICENSE This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately. DISCLAIMER Do not edit or add to this file if you wish to upgrade PrestaShop to newer versions in the future. If you wish to customize PrestaShop for your needs please refer to https://www.thirtybees.com for more information.
Visibility | Function |
---|---|
public | __toString() : string |
public | addAction(\ITreeToolbarButton $action) : \TreeToolbar |
public | getActions() : array |
public | getContext() : \Context |
public | getData() : mixed |
public | getTemplate() : mixed |
public | getTemplateDirectory() : string |
public | getTemplateFile(mixed $template) : string |
public | removeActions() : \$this |
public | render() : mixed |
public | setActions(mixed $actions) : void |
public | setContext(mixed $value) : \$this |
public | setData(mixed $value) : \$this |
public | setTemplate(mixed $value) : \$this |
public | setTemplateDirectory(mixed $value) : \$this |
protected | DEPRECATED - 2.0.0 |
This class implements \ITreeToolbarCore
Class: TreeToolbarLinkCore
Class TreeToolbarLinkCore
Visibility | Function |
---|---|
public | __construct(mixed $label, null $link, null $action=null, null $iconClass=null) : void TreeToolbarLinkCore constructor. |
public | getAction() : null |
public | getIconClass() : mixed |
public | getLink() : mixed |
public | setAction(mixed $value) : \$this |
public | setIconClass(mixed $value) : \$this |
public | setLink(mixed $value) : \$this |
This class extends \TreeToolbarButtonCore
This class implements \ITreeToolbarButtonCore
Class: TreeToolbarSearchCore
Class TreeToolbarSearchCore
Visibility | Function |
---|---|
public | __construct(mixed $label, null $id, null $name=null, null $class=null) : void TreeToolbarSearchCore constructor. |
public | render() : string |
protected | DEPRECATED - 2.0.0 |
This class extends \TreeToolbarButtonCore
This class implements \ITreeToolbarButtonCore
Interface: ITreeToolbarButtonCore
Interface ITreeToolbarButtonCore
Visibility | Function |
---|---|
public | __toString() : void |
public | getAttribute(mixed $name) : mixed |
public | getAttributes() : mixed |
public | getClass() : mixed |
public | getContext() : mixed |
public | getId() : mixed |
public | getLabel() : mixed |
public | getName() : mixed |
public | getTemplate() : mixed |
public | getTemplateDirectory() : mixed |
public | hasAttribute(mixed $name) : bool |
public | render() : void |
public | setAttribute(mixed $name, mixed $value) : void |
public | setAttributes(mixed $value) : void |
public | setClass(mixed $value) : void |
public | setContext(mixed $value) : void |
public | setId(mixed $value) : void |
public | setLabel(mixed $value) : void |
public | setName(mixed $value) : void |
public | setTemplate(mixed $value) : void |
public | setTemplateDirectory(mixed $value) : void |
Class: TreeCore
Class TreeCore
Visibility | Function |
---|---|
public | __construct(mixed $id, null $data=null) : void TreeCore constructor. |
public | __toString() : string |
public | addAction(mixed $action) : \$this |
public | getActions() : mixed |
public | getAttribute(mixed $name) : null |
public | getAttributes() : array |
public | getContext() : \Context |
public | getData() : array |
public | getDataSearch() : array |
public | getHeaderTemplate() : mixed |
public | getId() : mixed |
public | getIdTree() : mixed |
public | getNodeFolderTemplate() : mixed |
public | getNodeItemTemplate() : mixed |
public | getTemplate() : mixed |
public | getTemplateDirectory() : string |
public | getTemplateFile(mixed $template) : string |
public | getTitle() : mixed |
public | getToolbar() : \ITreeToolbar/\TreeToolbar |
public | removeActions() : \$this |
public | render(null $data=null) : string |
public | renderNodes(null $data=null) : string |
public | renderToolbar() : mixed |
public | setActions(mixed $value) : \$this |
public | setAttribute(mixed $name, mixed $value) : \$this |
public | setAttributes(mixed $value) : \$this |
public | setContext(mixed $value) : \$this |
public | setData(mixed $value) : \$this |
public | setDataSearch(mixed $value) : \$this |
public | setHeaderTemplate(mixed $value) : \$this |
public | setId(mixed $value) : \$this |
public | setIdTree(mixed $idTree) : \$this |
public | setNoJS(mixed $value) : \$this |
public | setNodeFolderTemplate(mixed $value) : \$this |
public | setNodeItemTemplate(mixed $value) : \$this |
public | setTemplate(mixed $value) : \$this |
public | setTemplateDirectory(mixed $value) : \Tree |
public | setTitle(mixed $value) : \$this |
public | setToolbar(mixed $value) : \$this |
public | useInput() : bool |
public | useToolbar() : bool |
protected | DEPRECATED - 2.0.0 |
Interface: ITreeToolbarCore
Interface ITreeToolbarCore
Visibility | Function |
---|---|
public | __toString() : void |
public | addAction(mixed $action) : void |
public | getActions() : mixed |
public | getContext() : mixed |
public | getData() : mixed |
public | getTemplate() : mixed |
public | getTemplateDirectory() : mixed |
public | removeActions() : void |
public | render() : void |
public | setActions(mixed $value) : void |
public | setContext(mixed $value) : void |
public | setData(mixed $value) : void |
public | setTemplate(mixed $value) : void |
public | setTemplateDirectory(mixed $value) : void |
Class: SmartyCustomCore
Class SmartyCustomCore
Visibility | Function |
---|---|
public | __construct() : void SmartyCustomCore constructor. |
public | check_compile_cache_invalidation() : void Check the compile cache needs to be invalidated (multi front + local cache compatible) |
public | check_template_invalidation(string $template, string $cacheId, string $compileId) : void Handle the lazy template cache invalidation |
public | clearAllCache(int $expTime=null, string $type=null) : int number of cache files which needs to be updated Mark all template files to be regenerated |
public | clearCache(string $templateName, string $cacheId=null, string $compileId=null, int $expTime=null, string $type=null) : int number of cache files which needs to be updated Mark file to be regenerated for a specific template |
public | clearCompiledTemplate(string $resourceName=null, string $compileId=null, int $expTime=null) : int number of template files deleted Delete compiled template file (lazy delete if resource_name is not specified) |
public | createTemplate(string $template, null $cacheId=null, null $compileId=null, null $parent=null, bool $doClone=true) : object |
public | delete_from_lazy_cache(string $template, string $cacheId, string $compileId) : bool Delete the current template from the lazy cache or the whole cache if no template name is given |
public | fetch(null $template=null, null $cacheId=null, null $compileId=null, null $parent=null, bool $display=false, bool $mergeTplVars=true, bool $noOutputFilter=false) : string |
public | insert_in_lazy_cache(string $template, string $cacheId, string $compileId) : bool Insert the current template in the lazy cache |
public | is_in_lazy_cache(string $template, string $cacheId, string $compileId) : bool Check if the current template is stored in the lazy cache Entry in the lazy cache = no need to regenerate the template |
public | update_filepath(string $filepath, string $template, string $cacheId, string $compileId) : void Store the cache file path |
This class extends \Smarty
Class: PageCore
Class PageCore
Visibility | Function |
---|---|
public static | getCurrentId() : int Current page ID |
public static | getPageTypeByName(string $name) : mixed Return page type ID from page name |
public static | setPageViewed(mixed $idPage) : void |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CartRuleCore
Class CartRuleCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : void |
public static | autoAddToCart(\Context/null/\Context $context=null) : mixed |
public static | autoRemoveFromCart(null $context=null) : array |
public static | cartRuleExists(mixed $name) : bool |
public | checkValidity(\Context $context, bool $alreadyInCart=false, bool $displayError=true, bool $checkCarrier=true) : bool/mixed/string Check if this cart rule can be applied |
public static | cleanCache() : void Make sure caches are empty Must be called before calling multiple time getContextualValue() |
public static | cleanProductRuleIntegrity(mixed $type, mixed $list) : bool |
public static | copyConditions(int $idCartRuleSource, int $idCartRuleDestination) : void Copy conditions from one cart rule to an other |
public | delete() : void |
public static | deleteByIdCustomer(mixed $idCustomer) : bool |
public | getAssociatedRestrictions(string $type, bool $activeOnly, bool $i18n, int $offset=null, int $limit=null, string $searchCartRuleName='' ) : array/bool |
public static | getCartsRuleByCode(mixed $name, mixed $idLang, bool $extended=false) : array |
public | getContextualValue(bool $useTax, \Context $context=null, mixed $filter=null, mixed $package=null, bool $useCache=true) : float/int/string The reduction value is POSITIVE |
public static | getCustomerCartRules(int $idLang, int $idCustomer, bool $active=false, bool $includeGeneric=true, bool $inStock=false, \Cart/null/\Cart $cart=null, bool $freeShippingOnly=false, bool $highlightOnly=false) : array |
public static | getIdByCode(string $code) : int/bool Retrieves the id associated to the given code |
public | getProductRuleGroups() : array |
public | getProductRules(int $idProductRuleGroup) : array ('type' => ? , 'values' => ?) |
public static | isFeatureActive() : bool |
public | update(bool $nullValues=false) : bool |
public | usedByCustomer(int $idCustomer) : bool |
protected static | array_uintersect(mixed $array1, mixed $array2) : array |
protected static | array_uintersect_compare(mixed $a, mixed $b) : int |
protected | checkProductRestrictions(\Context $context, bool $returnProducts=false, bool $displayError=true, bool $alreadyInCart=false) : array/bool/mixed/string |
protected | getCartRuleCombinations(int $offset=null, int $limit=null, string $search='' ) : array |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: AttributeCore
Class AttributeCore
Visibility | Function |
---|---|
public | __construct(null $id=null, null $idLang=null, null $idShop=null) : void AttributeCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | checkAttributeQty(int $idProductAttribute, int $qty, \Shop $shop=null) : bool Quantity is available or not Get quantity for a given attribute combination Check if quantity is enough to deserve customer |
public | cleanPositions(int $idAttributeGroup, bool $useLastAttribute=true) : bool $return Reorder attribute position in group $id_attribute_group. Call it after deleting an attribute from a group. |
public | delete() : bool |
public static | getAttributeMinimalQty(int $idProductAttribute) : mixed Minimal Quantity or false Get minimal quantity for product with attributes quantity |
public static | DEPRECATED - 1.0.0, use StockAvailable::getQuantityAvailableByProduct() |
public static | getAttributes(int $idLang, bool $notNull=false) : array Attributes Get all attributes for a given language |
public static | getHigherPosition(int $idAttributeGroup) : int $position getHigherPosition Get the higher attribute position from a group attribute |
public static | isAttribute(mixed $idAttributeGroup, mixed $name, mixed $idLang) : array/bool |
public | isColorAttribute() : bool Return true if attribute is color type |
public | update(bool $nullValues=false) : bool |
public | updatePosition(bool $way, int $position) : bool Update result Move an attribute inside its group |
public static | DEPRECATED - since 1.0.0 |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: SearchCore
Matches all CJK characters that are candidates for auto-splitting (Chinese, Japanese, Korean). Contains kana and BMP ideographs.
Visibility | Function |
---|---|
public static | find(mixed $idLang, mixed $expr, int $pageNumber=1, int $pageSize=1, string $orderBy='position' , string $orderWay='desc' , bool $ajax=false, bool $use_cookie=true, \Context/null/\Context $context=null) : array |
public static | getAttributes(\Db $db, int $idProduct, int $idLang) : string |
public static | getFeatures(\Db $db, int $idProduct, int $idLang) : string |
public static | getTags(\Db $db, int $idProduct, int $idLang) : string |
public static | indexation(bool $full=false, bool/int/bool $idProduct=false) : bool |
public static | removeProductsSearchIndex(mixed $products) : void |
public static | sanitize(string $string, int $idLang, bool $indexation=false, bool $isoCode=false) : bool/mixed/string |
public static | searchTag(int $idLang, mixed $tag, bool $count=false, int $pageNumber, int $pageSize=10, bool $orderBy=false, bool $orderWay=false, bool $useCookie=true, \Context/null/\Context $context=null) : array/bool/int |
protected static | fillProductArray(mixed $productArray, mixed $weightArray, mixed $key, mixed $value, mixed $idLang, mixed $isoCode) : void |
protected static | getAttributesFields(\Db $db, int $idProduct, string $sqlAttribute) : array/null |
protected static | getProductsToIndex(mixed $totalLanguages, bool $idProduct=false, int $limit=50, array $weightArray=array()) : array/false/\mysqli_result/null/\PDOStatement/\resource |
protected static | getSQLProductAttributeFields(mixed $weightArray) : string |
protected static | saveIndex(array $queryArray3) : void |
protected static | setProductsAsIndexed(mixed $products) : void |
Class: ZoneCore
Class ZoneCore
Visibility | Function |
---|---|
public | delete() : bool Deletion result Delete a zone |
public static | getIdByName(string $name) : int id_zone Get a zone ID from its default language name |
public static | getZones(bool $active=false) : array Zones Get all available geographical zones |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CartCore
Class CartCore
Visibility | Function |
---|---|
public | __construct(null $id=null, null $idLang=null) : void CartCore constructor. |
public | _addCustomization(int $idProduct, int $idProductAttribute, int $index, int $type, string $field, int $quantity) : bool success Add customization item to database |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | addCartRule(int $idCartRule) : bool |
public | DEPRECATED - 1.0.0, use Cart->addCartRule() |
public static | addExtraCarriers(array $array) : void Execute hook displayCarrierList (extraCarrier) and merge theme to the $array |
public | addPictureToProduct(mixed $idProduct, mixed $index, mixed $type, mixed $file) : bool Always true Add customer's pictures |
public | addTextFieldToProduct(mixed $idProduct, mixed $index, mixed $type, mixed $textValue) : bool Always true Add customer's text |
public | autosetProductAddress() : void Set an address to all products on the cart without address delivery |
public static | cacheSomeAttributesLists(mixed $ipaList, mixed $idLang) : void |
public | carrierIsSelected(int $idCarrier, int $idAddress) : bool |
public | DEPRECATED - 1.0.0 |
public | checkProductsAccess() : bool |
public | checkQuantities(bool $returnProduct=false) : bool/mixed |
public | containsProduct(int $idProduct, int $idProductAttribute, int $idCustomization, int $idAddressDelivery) : array/bool/null/object |
public | delete() : bool |
public | deleteAssociations() : bool |
public | deleteCustomizationToProduct(int $idProduct, int $index) : bool Remove a customer's customization |
public | DEPRECATED - 1.0.0, use Cart->removeCartRule() |
public | DEPRECATED - 1.0.0 |
public | deleteProduct(int $idProduct, int $idProductAttribute=null, int $idCustomization=null, mixed $idAddressDelivery, bool $autoAddCartRule=true) : bool result Delete a product from the cart |
public static | desintifier(mixed $int, string $delimiter=',' ) : stringTranslate a int option_delivery identifier (3240002000) in a string ('24,3,') |
public | duplicate() : array |
public | duplicateProduct(mixed $id_product, mixed $id_product_attribute, mixed $id_address_delivery, mixed $new_id_address_delivery, int $quantity=1, bool $keep_quantity=false) : bool |
public | getAddressCollection() : mixed Get all delivery addresses object for the current cart |
public | getAverageProductsTaxRate(null $cartAmountTaxExcluded=null, null $cartAmountTaxIncluded=null) : float/int The arguments are optional and only serve as return values in case caller needs the details. |
public | getCarrierCost(int $idCarrier, bool $useTax=true, \Country/null/\Country $defaultCountry=null, array/null $deliveryOption=null) : float Shipping total Return shipping total of a specific carriers for the cart |
public static | getCartByOrderId(int $idOrder) : \Cart/bool Build cart object from provided id_order |
public static | getCartIdByOrderId(mixed $idOrder) : bool |
public | getCartRules(int $filter=1) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getCustomerCarts(mixed $idCustomer, bool $withOrder=true) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getDeliveryAddressesWithoutCarriers(bool $returnCollection=false, array $error=array()) : array Array of address id or of address object Get all the ids of the delivery addresses without carriers |
public | getDeliveryOption(\Country/null $defaultCountry=null, bool $dontAutoSelectOptions=false, bool $useCache=true) : array/bool/mixed Delivery option Get the delivery option selected, or if no delivery option was selected, the cheapest option for each address |
public | getDeliveryOptionList(\Country $defaultCountry=null, bool $flush=false) : array array( 0 => array( // First address '12,' => array( // First delivery option available for this address carrier_list => array( 12 => array( // First carrier for this option 'instance' => Carrier Object, 'logo' => Get all deliveries options available for the current cart |
public | DEPRECATED - 1.0.0, use Cart->getCartRules() |
public | getDiscountsCustomer(int $idCartRule) : int/null |
public | getGiftWrappingPrice(bool $withTaxes=true, mixed $idAddress=null) : float wrapping price Get the gift wrapping price |
public | getLastProduct() : bool/mixed |
public | getNbOfPackages() : int number of packages Get the number of packages |
public static | getNbProducts(int $id) : mixed |
public | DEPRECATED - 1.0.0, use self::getPackageShippingCost |
public | getOrderTotal(bool $withTaxes=true, int $type=3, mixed $products=null, mixed $idCarrier=null, bool $useCache=true) : float Order total This function returns the total cart amount Possible values for $type: self::ONLY_PRODUCTS self::ONLY_DISCOUNTS self::BOTH self::BOTH_WITHOUT_SHIPPING self::ONLY_SHIPPING self::ONLY_WRAPPING self::ONLY_PRODUCTS_WITHOUT_SHIPPING self::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING |
public static | getOrderTotalUsingTaxCalculationMethod(int $idCart) : string |
public | getOrderedCartRulesIds(mixed $filter=1) : array Return the cart rules Ids on the cart. |
public | getPackageIdWarehouse(array $package, int/null $idCarrier=null) : int |
public | getPackageList(bool $flush=false) : array array( 0 => array( // First address 0 => array( // First package 'product_list' => array(...), 'carrier_list' => array(...), 'id_warehouse' => array(...), ), ), ); Get products grouped by package and by addresses to be sent individualy (one package = one shipping cost). |
public | getPackageShippingCost(int $idCarrier=null, bool $useTax=true, \Country/null/\Country $defaultCountry=null, array/null $productList=null, int/null $idZone=null) : bool/float Shipping total false if shipping is not possibleReturn package shipping cost If null, all the product of the cart are used to calculate the shipping cost |
public | getProductCustomization(int $idProduct, int $type=null, bool $notInCart=false) : array result rows Return custom pictures in this cart for a specified product |
public | getProducts(bool $refresh=false, bool $idProduct=false, null $idCountry=null) : array/null Return cart products |
public | getSummaryDetails(mixed $idLang=null, bool $refresh=false) : array Cart details Return useful informations for cart |
public static | getTaxesAverageUsed(mixed $idCart) : mixed |
public static | getTotalCart(int $idCart, bool $useTaxDisplay=false, int $type=3) : string |
public | getTotalShippingCost(array/null $deliveryOption=null, bool $useTax=true, \Country/null/\Country $defaultCountry=null) : float Shipping total Return shipping total for the cart |
public | getTotalWeight(mixed $products=null) : float Cart weight Return cart weight |
public | getWsCartRows() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | intifier(string $string, string $delimiter=',' ) : intTranslate a string option_delivery identifier ('24,3,') in a int (3240002000) The option_delivery identifier is a list of integers separated by a ','. This method replace the delimiter by a sequence of '0'. The size of this sequence is fixed by the first digit of the return |
public | isAllProductsInStock(bool $ignoreVirtual=false, bool $exclusive=false) : bool false is some products from the cart are out of stock |
public | isCarrierInRange(mixed $idCarrier, mixed $idZone) : bool isCarrierInRange Check if the specified carrier is in range |
public static | isGuestCartByCartId(int $idCart) : bool true if cart has been made by a guest customer isGuestCartByCartId |
public | isMultiAddressDelivery() : bool Does the cart use multiple address |
public | isVirtualCart(bool $strict=false) : bool true if is a virtual cart or false Check if cart contains only virtual products |
public static | lastNoneOrderedCart(int $idCustomer) : bool/int |
public | nbProducts() : int Return cart products quantity |
public | orderExists() : bool result Check if order has already been placed |
public | removeCartRule(mixed $idCartRule) : bool |
public static | replaceZeroByShopName(mixed $echo, mixed $tr) : string |
public | setDeliveryOption(mixed $deliveryOption=null) : void Set the delivery option and id_carrier, if there is only one carrier |
public | setNoMultishipping() : void Update products cart address delivery with the address delivery of the cart |
public | setProductAddressDelivery(mixed $id_product, mixed $id_product_attribute, mixed $old_id_address_delivery, mixed $new_id_address_delivery) : bool |
public | setTaxCalculationMethod() : void |
public | setWsCartRows(mixed $values) : bool |
public | simulateCarrierSelectedOutput(bool $useCache=true) : int |
public | simulateCarriersOutput(\Country $defaultCountry=null, bool $flush=false) : array Get all deliveries options available for the current cart formated like Carriers::getCarriersForOrder This method was wrote for retrocompatibility with 1.4 theme New theme need to use self::getDeliveryOptionList() to generate carriers option in the checkout process |
public static | sortDeliveryOptionList(array $option1, array $option2) : int -1 if $option 1 must be placed before and 1 if the $option1 must be placed after the $option2 Sort list of option delivery by parameters define in the BO |
public | update(bool $nullValues=false) : bool |
public | updateAddressId(int $idAddress, int $idAddressNew) : void Update the address id of the cart |
public | updateQty(int $quantity, int $idProduct, int $idProductAttribute=null, bool/int/bool $idCustomization=false, string $operator='up' , int $idAddressDelivery, \Shop $shop=null, bool $autoAddCartRule=true) : boolUpdate product quantity |
protected | DEPRECATED - 2.0.0 |
protected | 'up' ) : boolDEPRECATED - 2.0.0 |
protected | getIdCarrierFromDeliveryOption(mixed $deliveryOption) : int/mixed |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: DateRangeCore
Class DateRangeCore
Visibility | Function |
---|---|
public static | getCurrentRange() : mixed |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: SpecificPriceCore
Class SpecificPriceCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | delete() : bool |
public static | deleteByIdCart(int/ $idCart, bool/int/bool $idProduct=false, bool/int/bool $idProductAttribute=false) : bool |
public static | deleteByProductId(int $idProduct) : bool |
public static | deletePriorities() : bool |
public | duplicate(bool $idProduct=false) : bool |
public static | exists(int $idProduct, int $idProductAttribute, int $idShop, int $idGroup, int $idCountry, int $idCurrency, int $idCustomer, int $fromQuantity, string $from, string $to, bool $rule=false) : int |
public static | getByProductId(int/ $idProduct, bool/int/bool $idProductAttribute=false, bool/int/bool $idCart=false) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getIdsByProductId(int/ $idProduct, bool/int/bool $idProductAttribute=false, int/int $idCart) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getPriority(mixed $idProduct) : array |
public static | getProductIdByDate(int $idShop, int $idCurrency, int $idCountry, int $idGroup, string $beginning, string $ending, int $idCustomer, bool $withCombinationId=false) : array |
public static | getQuantityDiscount(int $idProduct, int $idShop, int $idCurrency, int $idCountry, int $idGroup, int $quantity, null $idProductAttribute=null, int $idCustomer) : array/bool/null/object |
public static | getQuantityDiscounts(int $idProduct, int $idShop, int $idCurrency, int $idCountry, int $idGroup, null $idProductAttribute=null, bool $allCombinations=false, int $idCustomer) : array |
public static | getSpecificPrice(mixed $idProduct, mixed $idShop, mixed $idCurrency, mixed $idCountry, mixed $idGroup, mixed $quantity, null $idProductAttribute=null, int $idCustomer, int $idCart, int $realQuantity) : array |
public static | isFeatureActive() : bool This method is allow to know if a feature is used or active |
public static | setPriorities(mixed $priorities) : bool |
public static | setSpecificPriority(mixed $idProduct, mixed $priorities) : bool |
public | update(bool $nullValues=false) : bool |
protected static | _getScoreQuery(mixed $idProduct, mixed $idShop, mixed $idCurrency, mixed $idCountry, mixed $idGroup, mixed $idCustomer) : void score generation for quantity discount |
protected static | computeExtraConditions(int/null $idProduct, int/null $idProductAttribute, mixed $idCustomer, int/null $idCart, string/null $beginning=null, string/null $ending=null) : string Remove or add useless fields value depending on the values in the database (cache friendly) |
protected static | filterOutField(string $fieldName, int $fieldValue, int $threshold=1000) : string Remove or add a field value to a query if values are present in the database (cache friendly) |
protected | flushCache() : void Flush local cache |
protected static | formatIntInQuery(mixed $firstValue, mixed $secondValue) : string |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: StateCore
Class StateCore
Visibility | Function |
---|---|
public | affectZoneToSelection(int $idsStates, int $idZone) : bool |
public | countUsed() : int count for this state Returns the number of utilisation of a state |
public | delete() : bool Delete a state only if is not in use |
public static | getIdByIso(string $isoCode, mixed $idCountry=null) : int state id Get a state id with its iso code |
public static | getIdByName(mixed $state) : int state id Get a state id with its name |
public static | getIdZone(int $idState) : false/null/string |
public static | getNameById(int $idState) : string State name Get a state name with its ID |
public static | getStates(bool $idLang=false, bool $active=false) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getStatesByIdCountry(int $idCountry) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | hasCounties(int $idState) : int |
public | isUsed() : bool Check if a state is used |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CustomerMessageCore
Class CustomerMessageCore
Visibility | Function |
---|---|
public | delete() : bool |
public static | getMessagesByOrderId(int $idOrder, bool $private=true) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getTotalCustomerMessages(string/null $where=null) : int |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: PrestaShopAutoload
Class PrestaShopAutoload
Visibility | Function |
---|---|
public | generateIndex() : void Generate classes index |
public | getClassPath(string $className) : null |
public static | getInstance() : \PrestaShopAutoload Get instance of autoload (singleton) |
public | load(string $className) : mixed Retrieve informations about a class in classes index and load it |
protected | __construct() : void PrestaShopAutoload constructor. |
protected | getClassesFromDir(string $path, bool $hostMode=false) : array Retrieve recursively all classes in a directory and its subdirectories |
protected | normalizeDirectory(mixed $directory) : string |
Class: CacheCore (abstract)
DEPRECATED 1.1.0 Will be converted into a caching module following the PSR-6 standard: http://www.php-fig.org/psr/psr-6/
Visibility | Function |
---|---|
public static | clean(string $key) : void |
public | delete(string $key) : array List of deleted keys Delete one or several data from cache (* joker can be used) E.g.: delete(''); delete('my_prefix_'); delete('my_key_name'); |
public | deleteQuery(string $query) : void Delete a query from cache |
public static | deleteTestingInstance() : void Unit testing purpose only |
public | exists(string $key) : bool Check if a data is cached |
public | abstract flush() : bool Clean all cached data |
public | get(string $key) : mixed Retrieve a data from cache |
public static | getInstance() : \Cache |
public static | isStored(string $key) : bool |
public static | retrieve(string $key) : null |
public static | retrieveAll() : array |
public | set(string $key, mixed $value, int $ttl) : bool Store a data in cache |
public static | setInstanceForTesting(mixed $testInstance) : void Unit testing purpose only |
public | setQuery(string $query, array $result) : bool Store a query in cache |
public static | store(string $key, mixed $value) : void |
protected | abstract _delete(string $key) : bool Delete a data from the cache by key |
protected | abstract _exists(string $key) : bool Check if a data is cached by key |
protected | abstract _get(string $key) : mixed Retrieve a cached data by key |
protected | abstract _set(string $key, mixed $value, int $ttl) : bool Cache a data |
protected | abstract _writeKeys() : void Write keys index |
protected | adjustTableCacheSize(mixed $table) : void Autoadjust the table cache size to avoid storing too big elements in the cache |
protected | getTables(mixed $string) : mixed |
protected | isBlacklist(string $query) : bool Check if a query contain blacklisted tables |
Class: CacheMemcachedCore
DEPRECATED 1.1.0 Will be converted into a caching module following the PSR-6 standard: http://www.php-fig.org/psr/psr-6/
Visibility | Function |
---|---|
public | __construct() : void CacheMemcachedCore constructor. |
public | __destruct() : void CacheMemcachedCore destructor. |
public static | addServer(string $ip, int $port, int $weight) : bool Add a memcached server |
public | connect() : void Connect to memcached server |
public | delete(string $key) : bool Delete one or several data from cache (* joker can be used, but avoid it !) E.g.: delete(''); delete('my_prefix_'); delete('my_key_name'); |
public static | deleteServer(int $id_server) : bool Delete a memcached server |
public | exists(string $key) : bool Check if a data is cached |
public | flush() : void |
public | get(string $key) : mixed Retrieve a data from cache |
public static | getMemcachedServers() : array Get list of memcached servers |
public | set(string $key, mixed $value, int $ttl) : bool Store a data in cache |
protected | _delete(mixed $key) : void |
protected | _exists(mixed $key) : void |
protected | _get(mixed $key) : void |
protected | _set(mixed $key, mixed $value, mixed $ttl) : void |
protected | _writeKeys() : void |
protected | close() : bool Close connection to memcache server |
This class extends \Cache
Class: CacheMemcacheCore
DEPRECATED 1.1.0 Will be converted into a caching module following the PSR-6 standard: http://www.php-fig.org/psr/psr-6/
Visibility | Function |
---|---|
public | __construct() : void CacheMemcacheCore constructor. |
public | __destruct() : void CacheMemcacheCore destructor. |
public static | addServer(string $ip, int $port, int $weight) : bool Add a memcache server |
public | connect() : void Connect to memcache server |
public | delete(string $key) : bool Delete one or several data from cache (* joker can be used, but avoid it !) E.g.: delete(''); delete('my_prefix_'); delete('my_key_name'); |
public static | deleteServer(int $idServer) : bool Delete a memcache server |
public | exists(string $key) : bool Check if a data is cached |
public | flush() : void |
public | get(string $key) : mixed Retrieve a data from cache |
public static | getMemcachedServers() : array Get list of memcached servers |
public | set(string $key, mixed $value, int $ttl) : bool Store a data in cache |
protected | _delete(mixed $key) : void |
protected | _exists(mixed $key) : void |
protected | _get(mixed $key) : void |
protected | _set(mixed $key, mixed $value, mixed $ttl) : void |
protected | _writeKeys() : void |
protected | close() : bool Close connection to memcache server |
This class extends \Cache
Class: CacheFsCore
DEPRECATED 1.1.0 Will be converted into a caching module following the PSR-6 standard: http://www.php-fig.org/psr/psr-6/
Visibility | Function |
---|---|
public static | createCacheDirectories(int $levelDepth, bool/string $directory=false) : mixed Create cache directory |
public static | deleteCacheDirectory() : void Delete cache directory |
public | flush() : void |
protected | __construct() : void |
protected | _delete(mixed $key) : void |
protected | _exists(mixed $key) : void |
protected | _get(mixed $key) : void |
protected | _set(mixed $key, mixed $value, mixed $ttl) : void |
protected | _writeKeys() : void |
protected | getFilename(string $key) : string Transform a key into its absolute path |
This class extends \Cache
Class: CacheRedisCore
DEPRECATED 1.1.0 Will be converted into a caching module following the PSR-6 standard: http://www.php-fig.org/psr/psr-6/
Visibility | Function |
---|---|
public | __construct() : void CacheRedisCore constructor. |
public | __destruct() : void |
public static | addServer(string $ip, int $port, string $auth, int $db) : bool Whether the server was successfully added *Add a redis server |
public | connect() : void Connect to redis server |
public static | deleteServer(int $idServer) : bool Whether the server was successfully deleted Delete a redis server |
public | flush() : bool |
public static | getRedisServer() : array Get list of redis server information |
public static | getRedisServers() : array Get list of redis server information |
protected | _delete(mixed $key) : bool |
protected | _exists(mixed $key) : bool |
protected | _get(mixed $key) : bool |
protected | _set(mixed $key, mixed $value, mixed $ttl) : bool |
protected | _writeKeys() : bool |
protected | close() : bool Close connection to redis server |
This class extends \CacheCore
Class: CacheApcuCore
DEPRECATED 1.1.0 Will be converted into a caching module following the PSR-6 standard: http://www.php-fig.org/psr/psr-6/
Visibility | Function |
---|---|
public | __construct() : void CacheApcCore constructor. |
public | delete(string $key) : bool Whether the key was deleted Delete one or several data from cache (* joker can be used, but avoid it !) E.g.: delete(''); delete('my_prefix_'); delete('my_key_name'); |
public | exists(string $key) : bool Whether the data has been cached Check if data has been cached |
public | flush() : void |
public | get(string $key) : mixed Data Retrieve data from the cache |
public | set(string $key, mixed $value, int $ttl) : bool Whether the data was successfully stored. Store data in the cache 0 = unlimited |
protected | _delete(mixed $key) : void |
protected | _exists(mixed $key) : void |
protected | _get(mixed $key) : void |
protected | _set(mixed $key, mixed $value, mixed $ttl) : void |
protected | _writeKeys() : void |
This class extends \CacheCore
Class: ProfileCore
Class ProfileCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | delete() : bool |
public static | getProfile(mixed $idProfile, mixed $idLang=null) : string Profile Get the current profile name |
public static | getProfileAccess(mixed $idProfile, mixed $idTab) : bool |
public static | getProfileAccesses(mixed $idProfile, string $type='id_tab' ) : bool |
public static | getProfiles(mixed $idLang) : array Profiles Get all available profiles |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: DispatcherCore
Class DispatcherCore
Visibility | Function |
---|---|
public | addRoute(string $routeId, string $rule, string $controller, int $idLang=null, array $keywords=array(), array $params=array(), int $idShop=null) : void |
public | createUrl(string $routeId, int $idLang=null, array $params=array(), bool $forceRoutes=false, string $anchor='' , null $idShop=null) : stringCreate an url from |
public | dispatch() : void Find the controller and instantiate it |
public | getController(null $idShop=null) : string Retrieve the controller from url or request uri if routes are activated |
public static | getControllers(mixed $dirs) : array Get list of all available FO controllers |
public static | getControllersInDirectory(string $dir) : array Get list of available controllers from the specified dir |
public static | getInstance() : \Dispatcher Get current instance of dispatcher (singleton) |
public static | getModuleControllers(string $type='all' , null $module=null) : arrayGet list of all available Module Front controllers |
public | hasKeyword(string $routeId, int $idLang, string $keyword, int $idShop=null) : bool Check if a keyword is written in a route rule |
public | hasRoute(string $routeId, int $idLang=null, int $idShop=null) : bool Check if a route exists |
public | useDefaultController() : false/null/string |
public | validateRoute(string $routeId, string $rule, array $errors=array()) : bool Check if a route rule contain all required keywords of default route definition |
protected | __construct() : void Needs to be instantiated from getInstance() method |
protected | createRegExp(string $rule, array $keywords) : string |
protected | loadRoutes(int/null $idShop=null) : mixed Load default routes group by languages |
protected | setRequestUri() : void Set request uri and iso lang |
Class: AttributeGroupCore
Class AttributeGroupCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | cleanDeadCombinations() : bool |
public static | cleanPositions() : bool $return Reorder group attribute position Call it after deleting a group attribute. |
public | delete() : bool |
public | deleteSelection(mixed $selection) : void Delete several objects from database return boolean Deletion result |
public static | getAttributes(int $idLang, bool $idAttributeGroup) : array Attributes Get all attributes for a given language / group |
public static | getAttributesGroups(int $idLang) : array Attributes groups Get all attributes groups for a given language |
public static | getHigherPosition() : int $position getHigherPosition Get the higher group attribute position |
public | getWsProductOptionValues() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | setWsProductOptionValues(mixed $values) : bool |
public | update(bool $nullValues=false) : bool |
public | updatePosition(bool $way, int $position) : bool Update result Move a group attribute |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ThemeCore
Class ThemeCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool Insertion result add only theme if the directory exists |
public static | getAllThemes(bool $excludedIds=false) : \PrestaShopCollection |
public static | getAvailable(bool $installedOnly=true) : array string (directory) return an array of all available theme (installed or not) |
public static | getByDirectory(string $directory) : bool/\Theme Checks if theme exists (by folder) and returns Theme object. |
public static | getInstalledThemeDirectories() : array |
public | getMetas() : array/bool |
public static | getNonInstalledTheme() : array |
public static | getThemeInfo(int $idTheme) : array |
public static | getThemes() : \PrestaShopCollection |
public | hasColumns(mixed $page) : array/bool/null/object |
public | hasColumnsSettings(mixed $page) : bool |
public | hasLeftColumn(null $page=null) : bool |
public | hasRightColumn(null $page=null) : bool |
public | isUsed() : bool check if a theme is used by a shop |
public | removeMetas() : bool |
public | toggleDefaultLeftColumn() : bool |
public | toggleDefaultRightColumn() : bool |
public | toggleResponsive() : bool |
public | updateMetas(array $metas, bool $fullUpdate=false) : void update the table PREFIX_theme_meta for the current theme |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: PrestaShopLoggerCore
Class PrestaShopLoggerCore
Visibility | Function |
---|---|
public static | addLog(string $message, int $severity=1, int $errorCode=null, string $objectType=null, int $objectId=null, bool $allowDuplicate=false, mixed $idEmployee=null) : bool true if succeed add a log item to the database and send a mail if configured for this $severity |
public static | eraseAllLogs() : bool |
public | getHash() : string hash this function md5($this->message.$this->severity.$this->error_code.$this->object_type.$this->object_id) |
public static | sendByMail(\Logger $log) : void Send e-mail to the shop owner only if the minimal severity level has been reached |
protected | _isPresent() : true if exists check if this log message already exists in database. |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ImageTypeCore
Class ImageTypeCore
Visibility | Function |
---|---|
public static | getByNameNType(string $name, string $type=null, mixed $order) : mixed Finds image type definition by name and type |
public static | getFormatedName(string $name) : string |
public static | getImagesTypes(mixed $type=null, bool $orderBySize=false) : array Image type definitions Returns image type definitions |
public static | typeAlreadyExists(string $typeName) : int Number of results found Check if type already is already registered in database |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: WebserviceSpecificManagementSearchCore
Class WebserviceSpecificManagementSearchCore
Visibility | Function |
---|---|
public | getContent() : string This must be return a string with specific values as WebserviceRequest expects. |
public | getObjectOutput() : \WebserviceOutputBuilder |
public | getUrlSegment() : mixed |
public | getWsObject() : \WebserviceRequest |
public | manage() : void Management of search |
public | setObjectOutput(\WebserviceOutputBuilderCore $obj) : \WebserviceSpecificManagementInterface |
public | setUrlSegment(mixed $segments) : \$this |
public | setWsObject(\WebserviceRequestCore $obj) : \$this |
This class implements \WebserviceSpecificManagementInterface
Class: WebserviceSpecificManagementImagesCore
Class WebserviceSpecificManagementImagesCore
Visibility | Function |
---|---|
public | getContent() : string |
public | getObjectOutput() : \WebserviceOutputBuilder |
public | getWsObject() : \WebserviceRequest |
public | manage() : bool |
public | setObjectOutput(\WebserviceOutputBuilderCore $obj) : \WebserviceSpecificManagementInterface |
public | setWsObject(\WebserviceRequestCore $obj) : \$this |
protected | deleteImageOnDisk(string $filePath, array $imageTypes=null, string $parentPath=null) : bool Delete the image on disk |
protected | getCustomizations() : array |
protected | manageCustomizationImages() : bool |
protected | manageDeclinatedImages(string $directory) : bool Management of normal images (as categories, suppliers, manufacturers and stores) |
protected | manageDeclinatedImagesCRUD(bool $filenameExists, string $filename, array $imageSizes, string $directory) : bool Management of normal images CRUD |
protected | manageDefaultDeclinatedImages(mixed $directory, mixed $normalImageSizes) : bool |
protected | manageEntityDeclinatedImages(mixed $directory, mixed $normalImageSizes) : bool |
protected | manageGeneralImages() : bool Management of general images |
protected | manageImages() : bool Management of images URL segment |
protected | manageListDeclinatedImages(mixed $directory, mixed $normalImageSizes) : bool |
protected | manageProductImages() : void |
protected | writeImageOnDisk(string $basePath, string $newPath, int $destWidth=null, int $destHeight=null, array $imageTypes=null, string $parentPath=null) : string Write the image on disk |
protected | writePostedImageOnDisk(string $receptionPath, int $destWidth=null, int $destHeight=null, array $imageTypes=null, string $parentPath=null) : bool Write the posted image on disk |
This class implements \WebserviceSpecificManagementInterface
Class: WebserviceOutputXMLCore
Class WebserviceOutputXMLCore
Visibility | Function |
---|---|
public | __construct(array $languages=array()) : void WebserviceOutputXMLCore constructor. |
public | getContentType() : string |
public | getNodeName(mixed $params) : string |
public | getSchemaToDisplay() : mixed |
public | getWsUrl() : mixed |
public | overrideContent(mixed $content) : string |
public | renderAssociationFooter(mixed $obj, mixed $params, mixed $assocName) : string |
public | renderAssociationHeader(mixed $obj, mixed $params, mixed $assocName, bool $closedTags=false) : string |
public | renderAssociationWrapperFooter() : string |
public | renderAssociationWrapperHeader() : string |
public | renderErrors(mixed $message, null $code=null) : string |
public | renderErrorsFooter() : string |
public | renderErrorsHeader() : string |
public | renderField(mixed $field) : string |
public | renderNodeFooter(mixed $nodeName, mixed $params) : string |
public | renderNodeHeader(mixed $nodeName, mixed $params, null $moreAttr=null, bool $hasChild=true) : string |
public | setLanguages(mixed $languages) : \$this |
public | setSchemaToDisplay(mixed $schema) : \$this |
public | setWsUrl(mixed $url) : \$this |
This class implements \WebserviceOutputInterface
Interface: WebserviceSpecificManagementInterface
Interface WebserviceSpecificManagementInterface
Visibility | Function |
---|---|
public | getContent() : array This must be return an array with specific values as WebserviceRequest expects. |
public | getObjectOutput() : mixed |
public | getWsObject() : mixed |
public | manage() : void |
public | setObjectOutput(\WebserviceOutputBuilderCore $obj) : void |
public | setWsObject(\WebserviceRequestCore $obj) : void |
Interface: WebserviceOutputInterface
Interface WebserviceOutputInterface
Visibility | Function |
---|---|
public | __construct(array $languages=array()) : void |
public | getContentType() : mixed |
public | getSchemaToDisplay() : mixed |
public | getWsUrl() : mixed |
public | overrideContent(mixed $content) : void |
public | renderAssociationFooter(mixed $obj, mixed $params, mixed $assocName) : void |
public | renderAssociationHeader(mixed $obj, mixed $params, mixed $assocName) : void |
public | renderErrors(mixed $message, mixed $code=null) : void |
public | renderErrorsFooter() : void |
public | renderErrorsHeader() : void |
public | renderField(mixed $field) : void |
public | renderNodeFooter(mixed $obj, mixed $params) : void |
public | renderNodeHeader(mixed $obj, mixed $params, mixed $moreAttr=null) : void |
public | setSchemaToDisplay(mixed $schema) : void |
public | setWsUrl(mixed $url) : void |
Class: WebserviceOutputBuilderCore
Class WebserviceOutputBuilderCore
Visibility | Function |
---|---|
public | __construct(mixed $wsUrl) : void WebserviceOutputBuilderCore constructor. |
public | addVirtualFields(mixed $entityName, mixed $entityObject) : array |
public | buildHeader() : array This method return an array with each http header params for a content. This check each required params. If this method is overrided don't forget to check required specific params (for xml etc...) |
public | getContent(array $objects, null/string $schemaToDisplay=null, string/string/array $fieldsToDisplay='minimum' , int $depth, int $typeOfView=1, bool $override=true) : string in the output format specified by WebserviceOutputBuilder::objectRenderMethod is used for each content type Different content types are : - list of entities, - tree diagram of entity details (full or minimum), - schema (synopsis & blank), |
public | getErrors(array $errors) : string output in the format specified by WebserviceOutputBuilder::objectRender Build errors output using an error array |
public | getHeaderParams(null/string $key=null) : array/string |
public | getObjectRender() : \WebserviceOutputInterface getter |
public | getResourcesList(mixed $keyPermissions) : string Build the resource list in the output format specified by WebserviceOutputBuilder::objectRender |
public | getSpecificField() : array |
public | getStatus() : string the normalized status for http request |
public | getStatusInt() : int |
public | getSynopsisDetails(mixed $field) : string |
public | getVirtualFields() : array |
public | registerOverrideWSParameters(mixed $wsrObject, mixed $method) : void |
public | renderEntity(\ObjectModel $object, int $depth) : string Build the entity detail. |
public | renderEntityMinimum(\ObjectModel $object, int $depth) : string Create the tree diagram with no details |
public | resetHeaderParams() : \WebserviceOutputBuilder Delete all Header parameters previously set. |
public | setFieldsToDisplay(mixed $fields) : void |
public | setHeaderParams(string $key, string $value) : \WebserviceOutputBuilder |
public | setIndent(mixed $depth) : string |
public | setObjectRender(\WebserviceOutputInterface $objRender) : \WebserviceOutputBuilder Set the render object for set the output format. Set the Content-type for the http header. |
public | setSpecificField(string/object $object, string $method, mixed $fieldName, mixed $entityName) : \WebserviceOutputBuilder |
public | setStatus(int $num) : void Set the return header status |
public | setVirtualField(mixed $object, mixed $method, mixed $entityName, mixed $parameters) : void |
public | setWsResources(array $resources) : \WebserviceOutputBuilder Need to have the resource list to get the class name for an entity, To build |
protected | overrideSpecificField(mixed $entityName, mixed $fieldName, mixed $field, mixed $entityObject, mixed $wsParams) : mixed |
protected | renderAssociations(mixed $object, mixed $depth, mixed $associations, mixed $wsParams) : string |
protected | renderField(\ObjectModel $object, array $wsParams, string $fieldName, array $field, int $depth) : string Build a field and use recursivity depend on the depth parameter. |
protected | renderFlatAssociation(mixed $object, mixed $depth, mixed $assocName, mixed $resourceName, mixed $fieldsAssoc, mixed $objectAssoc, mixed $parentDetails) : string |
protected | renderSchema(\ObjectModel $object, array $wsParams) : string Build a schema blank or synopsis |
protected | validateObjectAndMethod(mixed $object, mixed $method) : void |
Class: WebserviceRequestCore
Class WebserviceRequestCore
Visibility | Function |
---|---|
public | executeEntityGetAndHead() : bool Execute GET and HEAD requests Build filter Build fields display Build sort Build limit |
public | fetch(string $key, string $method, string $url, string $params, mixed $badClassName, string $inputXml=null) : array Returns an array of results (headers, content, type of resource...) Start Webservice request Check webservice activation Check autentication Check resource Check HTTP Method Execute the action Display the result |
public | filterLanguage() : array/bool |
public | getFilteredObjectDetails() : array/bool |
public | getFilteredObjectList() : array |
public static | getInstance() : object WebserviceRequest instance Get WebserviceRequest object instance (Singleton) |
public | getOutputEnabled() : bool |
public | getPriceForProduct(mixed $field, mixed $entityObject, mixed $wsParams) : array field parameters. This method is used for calculate the price for products on the output details |
public static | getResources() : mixed |
public static | getallheaders() : array |
public | setError(int $status, string $label, int $code) : void Set a webservice error |
public | setErrorDidYouMean(int $num, string $label, array $value, mixed $availableValues, int $code) : void Set a webservice error and propose a new value near from the available values |
public | setFieldsToDisplay() : bool |
public | setOutputEnabled(mixed $bool) : \$this |
public | specificPriceCalculation(mixed $parameters) : array |
public | specificPriceForCombination(mixed $entityObject, array $parameters) : array This method is used for calculate the price for products on a virtual fields |
public | specificPriceForProduct(mixed $entityObject, array $parameters) : array This method is used for calculate the price for products on a virtual fields |
public | webserviceErrorHandler(string $errno, array $errstr, array $errfile, array $errline) : bool Always return true to avoid the default PHP error handler Used to replace the default PHP error handler, in order to display PHP errors in a XML format |
protected | authenticate() : bool Check request authentication |
protected | checkHTTPMethod() : bool Check HTTP method |
protected | checkResource() : bool Check resource validity |
protected | executeEntityDelete() : bool Execute DELETE method on a PrestaShop entity |
protected | executeEntityPost() : bool Execute POST method on a PrestaShop entity |
protected | executeEntityPut() : bool Execute PUT method on a PrestaShop entity |
protected | getClosest(string $input, array $words) : string Return the nearest value picked in the values list |
protected | getOutputObject(mixed $type) : \WebserviceOutputJSON/\WebserviceOutputXML |
protected | getSQLRetrieveFilter(string $sqlId, string $filterValue, string $tableAlias='main.' ) : stringget SQL retrieve Filter |
protected | groupShopExists(mixed $params) : bool |
protected | hasErrors() : bool Check if there is one or more error |
protected | isActivated() : bool Check webservice activation |
protected | manageFilters() : bool |
protected | parseDisplayFields(mixed $str) : void |
protected | returnOutput() : array with displaying informations (used in the dispatcher). Thanks to the (WebserviceOutputBuilder) WebserviceKey::objOutput Method build the output depend on the WebserviceRequest::outputFormat and set HTTP header parameters. |
protected | saveEntityFromXml(int $successReturnCode) : bool save Entity Object from XML |
protected | setObjects() : void |
protected | shopExists(mixed $params) : bool |
protected | shopHasRight(mixed $key) : bool |
protected | webserviceChecks() : bool |
Class: WebserviceOutputJSONCore
Class WebserviceOutputJSON
Visibility | Function |
---|---|
public | __construct(array $languages=array()) : void WebserviceOutputJSON constructor. |
public | getContentType() : string |
public | getNodeName(mixed $params) : string |
public | getSchemaToDisplay() : mixed |
public | getWsUrl() : mixed |
public | overrideContent(mixed $content) : mixed/string |
public | renderAssociationField(mixed $field) : string |
public | renderAssociationFooter(mixed $obj, mixed $params, mixed $assocName) : void |
public | renderAssociationHeader(mixed $obj, mixed $params, mixed $assocName, bool $closedTags=false) : string |
public | renderAssociationWrapperFooter() : string |
public | renderAssociationWrapperHeader() : string |
public | renderErrors(mixed $message, null $code=null) : string |
public | renderErrorsFooter() : string |
public | renderErrorsHeader() : string |
public | renderField(mixed $field) : string |
public | renderNodeFooter(mixed $nodeName, mixed $params) : void |
public | renderNodeHeader(mixed $nodeName, mixed $params, null $moreAttr=null, bool $hasChild=true) : string |
public | renderi18nField(mixed $field) : string |
public | setLanguages(mixed $languages) : \$this |
public | setSchemaToDisplay(mixed $schema) : \$this |
public | setWsUrl(mixed $url) : \$this |
This class implements \WebserviceOutputInterface
Class: WebserviceExceptionCore
Class WebserviceExceptionCore
Visibility | Function |
---|---|
public | __construct(string $message, int $code) : void WebserviceExceptionCore constructor. |
public | getAvailableValues() : mixed |
public | getStatus() : mixed |
public | getType() : int |
public | getWrongValue() : mixed |
public | setDidYouMean(mixed $wrongValue, mixed $availableValues) : \$this |
public | setStatus(mixed $status) : \$this |
public | setType(mixed $type) : \$this |
This class extends \Exception
This class implements \Throwable
Class: WebserviceKeyCore
Class WebserviceKeyCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | delete() : bool |
public | deleteAssociations() : bool |
public static | getClassFromKey(mixed $authKey) : false/null/string |
public static | getPermissionForAccount(mixed $authKey) : array |
public static | isKeyActive(mixed $authKey) : false/null/string |
public static | keyExists(mixed $key) : false/null/string |
public static | setPermissionForAccount(mixed $idAccount, mixed $permissionsToSet) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: PaymentCCCore
DEPRECATED 1.5.0.1
Visibility | Function |
---|---|
public | DEPRECATED - 1.5.0.2 |
public static | DEPRECATED - 1.5.0.1 |
This class extends \OrderPayment
This class implements \Core_Foundation_Database_EntityInterface
Class: MessageCore
Class MessageCore
Visibility | Function |
---|---|
public static | getMessageByCartId(int $idCart) : array Message Return the last message from cart |
public static | getMessagesByCartId(mixed $idCart, bool $private=false, \Context $context=null) : array Messages Return messages from Cart ID |
public static | getMessagesByOrderId(int $idOrder, bool $private=false, \Context $context=null) : array Messages Return messages from Order ID |
public static | markAsReaded(int $idMessage, mixed $idEmployee) : void Registered a message 'readed' |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CustomerThreadCore
Class CustomerThreadCore
Visibility | Function |
---|---|
public | delete() : bool |
public static | getContacts() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getCustomerMessages(mixed $idCustomer, null $read=null, null $idOrder=null) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getIdCustomerThreadByEmailAndIdOrder(string $email, int $idOrder) : false/null/string |
public static | getMessageCustomerThreads(int $idCustomerThread) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getNextThread(int $idCustomerThread) : false/null/string |
public static | getTotalCustomerThreads(string/null $where=null) : int |
public | getWsCustomerMessages() : array/false/\mysqli_result/null/\PDOStatement/\resource |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: PackCore
2007-2016 PrestaShop thirty bees is an extension to the PrestaShop e-commerce software developed by PrestaShop SA Copyright (C) 2017 thirty bees NOTICE OF LICENSE This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately. DISCLAIMER Do not edit or add to this file if you wish to upgrade PrestaShop to newer versions in the future. If you wish to customize PrestaShop for your needs please refer to https://www.thirtybees.com for more information.
Visibility | Function |
---|---|
public static | addItem(int $id_product, int $id_item, int $qty, int $id_attribute_item) : bool true if everything was fine Add an item to the pack |
public static | allUsesAdvancedStockManagement(int $id_product) : bool For a given pack, tells if all products using the advanced stock management |
public static | deleteItems(mixed $id_product) : void |
public static | duplicate(mixed $id_product_old, mixed $id_product_new) : void |
public static | getItemTable(mixed $id_product, mixed $id_lang, bool $full=false) : mixed |
public static | getItems(mixed $id_product, mixed $id_lang) : mixed |
public static | getPacksContainingItem(integer $id_item, integer $id_attribute_item, integer $id_lang) : array[Product] Packs that contains the given product Returns Packs that conatins the given product in the right declinaison. |
public static | getPacksTable(mixed $id_product, mixed $id_lang, bool $full=false, mixed $limit=null) : mixed |
public static | isCurrentlyUsed(mixed $table=null, bool/mixed $hasActiveColumn=false) : bool This method is allow to know if a Pack entity is currently used |
public static | isFeatureActive() : bool This method is allow to know if a feature is used or active |
public static | isInStock(mixed $id_product) : bool |
public static | isPack(mixed $id_product) : bool Is product a pack? |
public static | isPacked(mixed $id_product, bool/mixed $id_product_attribute=false) : bool Is product in a pack? If $id_product_attribute specified, then will restrict search on the given combination, else this method will match a product if at least one of all its combination is in a pack. |
public static | noPackPrice(mixed $id_product) : void |
public static | noPackWholesalePrice(mixed $id_product) : void |
public static | usesAdvancedStockManagement(int $idProduct) : void For a given pack, tells if it has at least one product using the advanced stock management |
This class extends \Product
This class implements \Core_Foundation_Database_EntityInterface
Class: ProductSaleCore
Class ProductSaleCore
Visibility | Function |
---|---|
public static | addProductSale(int $idProduct, int $qty=1) : bool |
public static | fillProductSales() : bool True on success Fill the product_sale SQL table with data from order_detail |
public static | getBestSales(int $idLang, int $pageNumber, int $nbProducts=10, mixed $orderBy=null, mixed $orderWay=null) : array from Product::getProductProperties Get required informations on best sales products |
public static | getBestSalesLight(int $idLang, int $pageNumber, int $nbProducts=10, \Context $context=null) : array keys : id_product, link_rewrite, name, id_image, legend, sales, ean13, upc, link Get required informations on best sales products |
public static | getNbSales() : int number of actives products listed in product_sales Get number of actives products sold |
public static | getNbrSales(int $idProduct) : int |
public static | removeProductSale(int $idProduct, int $qty=1) : bool |
Class: MediaCore
Class MediaCore
Visibility | Function |
---|---|
public static | addJsDef(mixed $jsDef) : void Add a new javascript definition at bottom of page |
public static | addJsDefL(mixed $params, string $content, \Smarty $smarty=null, bool $repeat=false) : void Add a new javascript definition from a capture at bottom of page |
public static | cccCss(array $cssFiles, array $cachePath=null) : array processed css_files Combine Compress and Cache CSS (ccc) calls |
public static | cccJS(array $jsFiles) : array processed js_files Combine Compress and Cache (ccc) JS calls |
public static | clearCache() : void Clear theme cache |
public static | deferInlineScripts(mixed $output) : mixed |
public static | deferScript(array $matches) : bool/string Empty string or original script lines Get all JS scripts and place it to bottom To be used in callback with deferInlineScripts |
public static | getBackTrackLimit() : int/null/string |
public static | getCSSPath(mixed $cssUri, string $cssMediaType='all' , bool $needRtl=true) : stringaddCSS return stylesheet path. |
public static | getInlineScript() : array inline script Get JS inline script |
public static | getJSPath(mixed $jsUri) : string addJS return javascript path |
public static | getJqueryPath(mixed $version=null, mixed $folder=null, bool $minifier=true) : string return jquery path. |
public static | getJqueryPluginCSSPath(mixed $name, mixed $folder=null) : string/boolean return jquery plugin css path if exist. |
public static | getJqueryPluginPath(mixed $name, mixed $folder=null) : string/boolean return jquery plugin path. |
public static | getJqueryUIPath(mixed $component, mixed $theme, mixed $checkDependencies) : string return jqueryUI component path. |
public static | getJsDef() : array JS definitions Get JS definitions |
public static | getMediaPath(mixed $mediaUri, null $cssMediaType=null) : array/bool/mixed/string |
public static | ieCssSplitter(array $compiledCss, string $cachePath, bool $refresh=false) : array processed css_files Splits stylesheets that go beyond the IE limit of 4096 selectors |
public static | minifyCSS(mixed $cssContent, bool $fileuri=false, array $importUrl=array()) : bool/string |
public static | minifyHTML(mixed $htmlContent) : bool/mixed |
public static | minifyHTMLpregCallback(mixed $pregMatches) : string |
public static | packJS(mixed $jsContent) : string |
public static | packJSinHTML(mixed $htmlContent) : bool/mixed |
public static | packJSinHTMLpregCallback(mixed $pregMatches) : string |
public static | replaceByAbsoluteURL(mixed $matches) : bool/string |
Class: ConnectionsSourceCore
Class ConnectionsSourceCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | getOrderSources(mixed $idOrder) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | logHttpReferer(\Cookie/null/\Cookie $cookie=null) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: MetaCore
Class MetaCore
Visibility | Function |
---|---|
public | add(bool $autoDate=true, bool $nullValues=false) : bool Indicates whether adding succeeded |
public static | completeMetaTags(mixed $metaTags, mixed $defaultValue, \Context $context=null) : void |
public | delete() : bool |
public | deleteSelection(array $selection) : bool |
public static | getCategoryMetas(int $idCategory, int $idLang, string $pageName, string $title='' ) : arrayGet category meta tags |
public static | getCmsCategoryMetas(int $idCmsCategory, int $idLang, string $pageName) : array Get CMS category meta tags |
public static | getCmsMetas(int $idCms, int $idLang, string $pageName) : array Get CMS meta tags |
public static | getEquivalentUrlRewrite(int $newIdLang, int $idLang, string $urlRewrite) : false/null/string |
public static | getHomeMetas(int $idLang, string $pageName) : array Meta tags Get meta tags for a given page |
public static | getManufacturerMetas(int $idManufacturer, int $idLang, string $pageName) : array Get manufacturer meta tags |
public static | getMetaByPage(mixed $page, mixed $idLang) : array/bool/null/object |
public static | getMetaTags(mixed $idLang, mixed $pageName, string $title='' ) : array |
public static | getMetas() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getMetasByIdLang(mixed $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getPages(bool $excludeFilled=false, bool $addPage=false) : array |
public static | getProductMetas(int $idProduct, int $idLang, string $pageName) : array Get product meta tags |
public static | getSupplierMetas(int $idSupplier, int $idLang, string $pageName) : array Get supplier meta tags |
public | update(bool $nullValues=false) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: SearchEngineCore
Class SearchEngineCore
Visibility | Function |
---|---|
public static | getKeywords(mixed $url) : bool/string |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ConnectionCore
Class ConnectionCore
Visibility | Function |
---|---|
public static | cleanConnectionsPages() : void |
public | getFields() : array |
public static | setNewConnection(mixed $cookie) : int |
public static | setPageConnection(\Cookie $cookie, bool $full=true) : array |
public static | setPageTime(mixed $idConnections, mixed $idPage, mixed $timeStart, mixed $time) : void |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CustomizationFieldCore
Class CustomizationFieldCore
Visibility | Function |
---|
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: AbstractLoggerCore (abstract)
Class AbstractLoggerCore
Visibility | Function |
---|---|
public | __construct(int $level=1) : void AbstractLoggerCore constructor. |
public | log(mixed $message, mixed $level) : void Check the level and log the message if needed |
public | logDebug(mixed $message) : void Log a debug message |
public | logError(mixed $message) : void Log an error message |
public | logInfo(mixed $message) : void Log an info message |
public | logWarning(mixed $message) : void Log a warning message |
protected | abstract logMessage(mixed $message, mixed $level) : void Log the message |
Class: FileLoggerCore
Class FileLoggerCore
Visibility | Function |
---|---|
public | getFilename() : mixed Log the message |
public | setFilename(string $filename) : void Check if the specified filename is writable and set the filename |
protected | logMessage(mixed $message, mixed $level) : void Write the message in the log file |
This class extends \AbstractLogger
Class: CMSCategoryCore
Class CMSCategoryCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | calcLevelDepth() : int Level depth Get the number of parent categories |
public static | checkBeforeMove(mixed $idCmsCategory, int $idParent) : bool Parent validity Check if CMSCategory can be moved in another one |
public static | cleanPositions(int $idCategoryParent) : bool |
public | delete() : bool |
public | deleteSelection(mixed $categories) : void Delete several categories from database return boolean Deletion result |
public static | getCategories(int $idLang, bool $active=true, bool $order=true) : array Categories Return available categories |
public static | getChildren(mixed $idParent, mixed $idLang, bool $active=true) : array |
public static | getHomeCategories(int $idLang, bool $active=true) : array categories Return main categories |
public static | getLastPosition(mixed $idCategoryParent) : false/null/string |
public | getLink(\Link/null/\Link $link=null) : string |
public static | getLinkRewrite(mixed $idCmsCategory, mixed $idLang) : bool/mixed |
public | getName(null $idLang=null) : string |
public | getParentsCategories(int $idLang=null) : array Corresponding categories Get Each parent CMSCategory of this CMSCategory until the root CMSCategory |
public static | getRecurseCategory(null $idLang=null, int $current=1, int $active=1, int $links, \Link/null/\Link $link=null) : array/bool/null/object |
public static | getSimpleCategories(mixed $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getSubCategories(int $idLang, bool $active=true) : array Categories Return current CMSCategory childs |
public static | getUrlRewriteInformations(mixed $idCategory) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | hideCMSCategoryPosition(string $name) : string Name without position Hide CMSCategory prefix used for position |
public static | recurseCMSCategory(mixed $categories, mixed $current, int $idCmsCategory=1, int $idSelected=1, bool $isHtml=false) : string |
public | recurseLiteCategTree(int $maxDepth=3, int $currentDepth, int $idLang=null, array $excludedIdsArray=null, \Link $link=null) : array Subcategories lite tree Recursive scan of subcategories |
public static | searchByName(int $idLang, string $query, bool $unrestricted=false) : array Corresponding categories Light back office search for categories |
public static | DEPRECATED - 1.0.0 |
public | update(bool $nullValues=false) : bool |
public | updatePosition(mixed $way, mixed $position) : bool |
protected | recursiveDelete(mixed $toDelete, array/int $idCmsCategory) : void Recursively add specified CMSCategory childs to $toDelete array |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: TranslateCore
Class TranslateCore
Visibility | Function |
---|---|
public static | checkAndReplaceArgs(string $string, array $args) : string Check if string use a specif syntax for sprintf and replace arguments if use it |
public static | getAdminTranslation(string $string, string $class='AdminTab' , bool $addslashes=false, bool $htmlentities=true, mixed $sprintf=null) : stringGet a translation for an admin controller |
public static | getGenericAdminTranslation(string $string, string/null $key=null, array $langArray) : string translation Return the translation for a string if it exists for the base AdminController or for helpers |
public static | getModuleTranslation(string/\Module $module, string $string, string $source, mixed $sprintf=null, bool $js=false) : string Get a translation for a module |
public static | getPdfTranslation(string $string, null $sprintf=null) : string Get a translation for a PDF |
public static | postProcessTranslation(string $string, array $params) : mixed Perform operations on translations after everything is escaped and before displaying it |
public static | ppTags(string $string, array $tags) : mixed Helper function to make calls to postProcessTranslation more readable. |
public static | DEPRECATED - 1.0.0 renamed this to postProcessTranslation, since it is not only used in relation to smarty. |
Class: CryptBlowfishCore
Visibility | Function |
---|---|
public | __construct(mixed $key, mixed $iv) : void |
public | _decipher(mixed $Xl, mixed $Xr) : void |
public | _encipher(mixed $Xl, mixed $Xr) : void |
public | decrypt(mixed $cipherText) : void |
public | encrypt(mixed $plainText) : void |
public | myUnpackN(mixed $str) : void |
public | myUnpackN2(mixed $str) : void |
Class: SpecificPriceRuleCore
Class SpecificPriceRuleCore
Visibility | Function |
---|---|
public | addConditions(array $conditions) : bool/void |
public | apply(bool $products=false) : void |
public static | applyAllRules(bool/array/bool $products=false) : void |
public static | applyRuleToProduct(mixed $idRule, mixed $idProduct, null $idProductAttribute=null) : bool |
public | delete() : bool |
public | deleteConditions() : void |
public static | disableAnyApplication() : void |
public static | enableAnyApplication() : void |
public | getAffectedProducts(bool/bool/array $products=false) : array Affected products list IDs. Return the product list affected by this specific rule. |
public | getConditions() : array |
public | resetApplication(bool $products=false) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ToolsCore
Class ToolsCore
Visibility | Function |
---|---|
public static | ZipExtract(mixed $fromFile, mixed $toDir) : bool success |
public static | ZipTest(mixed $fromFile) : bool success |
public static | 'all' ) : voidDEPRECATED - 1.0.0 use FrontController->addCSS() |
public static | DEPRECATED - 1.0.0 use FrontController->addJS() |
public static | DEPRECATED - 1.0.0 |
public static | alignVersionNumber(mixed $v1, mixed $v2) : void Align 2 version with the same number of sub version version_compare will work better for its comparison :) (Means: '1.8' to '1.9.3' will change '1.8' to '1.8.0') |
public static | apacheModExists(string $name) : bool true if exists apacheModExists return true if the apache module $name is loaded |
public static | argvToGET(mixed $argc, mixed $argv) : void |
public static | arrayReplaceRecursive(array $base, array $replacements) : void Replaces elements from passed arrays into the first array recursively |
public static | DEPRECATED - Use array_unique instead |
public static | DEPRECATED - 1.0.0 Use array_replace instead |
public static | DEPRECATED - Use a cast instead |
public static | DEPRECATED - 1.0.0 use Media::cccCss() |
public static | DEPRECATED - 1.0.0 use Media::cccJS() |
public static | ceilf(float $value, int $precision) : float returns the rounded value up of $value to specified precision |
public static | changeFileMTime(mixed $file_name) : void |
public static | checkPhpVersion() : string |
public static | chmodr(mixed $path, mixed $filemode) : bool |
public static | cleanNonUnicodeSupport(string $pattern) : string pattern Delete unicode class from regular expression patterns |
public static | clearCache(\Smarty $smarty=null, bool $tpl=false, mixed $cacheId=null, mixed $compileId=null) : void Clear cache for Smarty |
public static | clearColorListCache(bool $id_product=false) : void |
public static | clearCompile(mixed $smarty=null) : void Clear compile for Smarty |
public static | clearSmartyCache() : void Clear Smarty cache and compile folders |
public static | clearXMLCache() : void Clear XML cache folder |
public static | DEPRECATED - 1.0.0 |
public static | convertBytes(string $value) : int Convert a shorthand byte value from a PHP configuration directive to an integer value |
public static | convertPrice(float $price, object/array $currency=null, bool $toCurrency=true, \Context $context=null) : float Price Return price converted |
public static | convertPriceFull(float $amount, \Currency $currencyFrom=null, \Currency $currencyTo=null, bool $round=true) : void Convert amount from a currency to an other currency automatically |
public static | copy(mixed $source, mixed $destination, null $streamContext=null) : bool/int |
public static | d(object $object, bool $kill=true) : void ALIAS OF dieObject() - Display an error with detailed object |
public static | dateDays() : array |
public static | dateFormat(array $params, object $smarty) : string Date Display date regarding to language preferences |
public static | dateFrom(mixed $date) : string |
public static | dateMonths() : array |
public static | dateTo(mixed $date) : string |
public static | dateYears() : array $tab html data with 3 cells :['days'], ['months'], ['years'] Generate date form |
public static | debug_backtrace(int $start, null $limit=null) : void |
public static | deleteDirectory(string $dirname, bool $deleteSelf=true) : bool Delete directory and subdirectories |
public static | deleteFile(string $file, array $excludeFiles=array()) : void Delete file |
public static | dieObject(mixed $object, bool $kill=true) : $object if $kill = false; Display an error with detailed object |
public static | dieOrLog(string $msg, bool $die=true) : bool success of logging Display error and dies or silently log the error. |
public static | DEPRECATED - 1.0.0 use Controller::getController('PageNotFoundController')->run(); |
public static | displayAsDeprecated(mixed $message=null) : void Display a warning message indicating that the method is deprecated |
public static | displayDate(string $date, int $idLang=null, bool $full=false, string $separator=null) : string Date Display date regarding to language preferences |
public static | displayError(string $string='Fatal error' , bool $htmlentities=true, \Context $context=null) : array/mixed/stringDisplay an error according to an error code |
public static | displayFileAsDeprecated() : void |
public static | displayNumber(mixed $number, mixed $currency) : string |
public static | displayParameterAsDeprecated(mixed $parameter) : void Display a warning message indicating that the parameter is deprecated |
public static | displayPrice(float $price, object/array $currency=null, bool $noUtf8=false, \Context $context=null) : string Price correctly formated (sign, decimal separator...) if you modify this function, don't forget to modify the Javascript function formatCurrency (in tools.js) Return price with currency sign for a given product |
public static | displayPriceSmarty(mixed $params, mixed $smarty) : string |
public static | enableCache(int $level=1, \Context/null/\Context $context=null) : void |
public static | encrypt(string $passwd) : void Encrypt password |
public static | encryptIV(string $data) : void Encrypt data string |
public static | error_log(mixed $object, int/null $messageType=null, string/null $destination=null, string/null $extraHeaders=null) : bool Prints object information into error log |
public static | fd(object $object, string $type='log' ) : voidDisplay a var dump in firebug console |
public static | fileAttachment(string $input='fileUpload' , bool $return_content=true) : array/nullReturns an array containing information about HTTP file upload variable ($_FILES) |
public static | DEPRECATED - 1.0.0 Please do not use this function. PHP already caches this function. |
public static | file_exists_no_cache(string $filename) : bool Cached result of file_exists($filename) file_exists() wrapper with a call to clearstatcache prior |
public static | DEPRECATED - 1.0.0 Use Guzzle for remote URLs and file_get_contents for local files instead |
public static | floorf(float $value, int $precision) : float returns the rounded value down of $value to specified precision |
public static | formatBytes(mixed $size, int $precision=2) : string Format a number into a human readable format e.g. 24962496 => 23.81M |
public static | generateHtaccess(null $path=null, null $rewrite_settings=null, null $cache_control=null, string $specific='' , null $disable_multiviews=null, bool $medias=false, null $disable_modsec=null) : bool |
public static | generateIndex() : void |
public static | getAdminImageUrl(string $image=null, bool $entities=false) : mixed Get a valid image URL to use from BackOffice |
public static | getAdminToken(string $string) : mixed Tokenize a string |
public static | getAdminTokenLite(mixed $tab, \Context $context=null) : mixed |
public static | getAdminTokenLiteSmarty(mixed $params, mixed $smarty) : bool/string |
public static | getAdminUrl(string $url=null, bool $entities=false) : mixed Get a valid URL to use from BackOffice |
public static | getAllValues() : mixed Get all values from $_POST/$_GET |
public static | getBrightness(mixed $hex) : float/int/string |
public static | getBytes(int $length) : bool/string Random bytes Random bytes generator Thanks to Zend for entropy |
public static | getCountry(null $address=null) : int |
public static | getCurrentUrlProtocolPrefix() : string protocol Get the current url prefix protocol (https/http) |
public static | getDefaultIndexContent() : string |
public static | getDescriptionClean(mixed $description) : string Allows to display the category description without HTML tags and slashes |
public static | getFullPath(mixed $idCategory, mixed $end, string $typeCat='products' , \Context $context=null) : mixed |
public static | DEPRECATED - 1.0.0 |
public static | getHttpHost(bool $http=false, bool $entities=false, bool $ignore_port=false) : string host getHttpHost return the current host used, with the protocol (http or https) if $http is true This function should not be used to choose http or https domain name. Use Tools::getShopDomain() or Tools::getShopDomainSsl instead |
public static | getIsset(string $key) : bool |
public static | getMaxUploadSize(int $max_size) : int max file size in bytes Get max file upload size considering server settings and optional max value |
public static | getMediaServer(mixed $filename) : mixed/string |
public static | getMemoryLimit() : int the memory limit value in octet getMemoryLimit allow to get the memory limit in octet |
public static | '' ) : mixedDEPRECATED - 1.0.0 |
public static | getOctets(mixed $option) : int the value of a configuration option in octet getOctet allow to gets the value of a configuration option in octet |
public static | getPath(int $idCategory, string $path='' , bool $linkOnTheItem=false, string $categoryType='products' , \Context $context=null) : mixedGet the user's journey |
public static | getProductsOrder(string $type, string $value=null, bool/bool/\bool(false)/string $prefix=false) : string Order by sql clause Get products order field name for queries. |
public static | getProtocol(bool $useSsl=null) : String (http/\https) getProtocol return the set protocol according to configuration (http[s]) |
public static | getRemoteAddr() : string $remote_addr ip of client Get the server variable REMOTE_ADDR, or the first ip of HTTP_X_FORWARDED_FOR (when using proxy) |
public static | getSafeModeStatus() : bool |
public static | getServerName() : string server name Get the server variable SERVER_NAME |
public static | getShopDomain(bool $http=false, bool $entities=false) : string domain getShopDomain returns domain name according to configuration and ignoring ssl |
public static | getShopDomainSsl(bool $http=false, bool $entities=false) : string domain getShopDomainSsl returns domain name according to configuration and depending on ssl activation |
public static | getShopProtocol() : String getShopProtocol return the available protocol for the current shop in use SSL if Configuration is set on and available for the server |
public static | getToken(bool $page=true, \Context $context=null) : mixed Get token to prevent CSRF |
public static | getUserBrowser() : string |
public static | getUserPlatform() : string |
public static | getValue(string $key, bool/mixed $defaultValue=false) : mixed Value Get a value from $_POST / $_GET if unavailable, take a default value |
public static | hash(string $password) : bool/string Hash password with native password_hash |
public static | hourGenerate(mixed $hours, mixed $minutes, mixed $seconds) : string |
public static | htmlentitiesDecodeUTF8(string $string) : string |
public static | htmlentitiesUTF8(mixed $string, int $type=3) : array/string |
public static | iconv(mixed $from, mixed $to, mixed $string) : string |
public static | isCallable(mixed $function) : bool |
public static | isEmpty(mixed $field) : bool |
public static | isPHPCLI() : bool true if php-cli is used |
public static | isSubmit(string $submit) : bool Check if submit has been posted |
public static | isX86_64arch() : bool true if the server use 64bit arch |
public static | DEPRECATED - 1.0.0 Use json_decode instead |
public static | DEPRECATED - 1.0.0 Use json_encode instead |
public static | link_rewrite(string $str, bool $utf8Decode=null) : string Return the friendly url from the provided string |
public static | math_round(mixed $value, mixed $places, int $mode=2) : float/int |
public static | DEPRECATED - 1.0.0 use Media::minifyCSS() |
public static | DEPRECATED - as of 1.0.0 use Media::minifyHTML() |
public static | DEPRECATED - as of 1.0.0 use Media::minifyHTMLpregCallback() |
public static | modRewriteActive() : bool |
public static | nl2br(mixed $str) : string New string Convert \n and \r\n and \r to |
public static | normalizeDirectory(mixed $directory) : string |
public static | orderbyPrice(mixed $array, mixed $order_way) : void |
public static | p(object $object) : void ALIAS OF dieObject() - Display an error with detailed object but don't stop the execution |
public static | pRegexp(mixed $s, mixed $delim) : mixed |
public static | DEPRECATED - as of 1.0.0 use Media::packJS() |
public static | DEPRECATED - as of 1.0.0 use Media::packJSinHTML() |
public static | DEPRECATED - as of 1.0.0 use Media::packJSinHTMLpregCallback() |
public static | parserSQL(mixed $sql) : bool |
public static | passwdGen(int $length=8, string $flag='ALPHANUMERIC' ) : bool/string PasswordRandom password generator |
public static | DEPRECATED - since 1.5.0 (PHP 5.1 required, so property_exists() is now natively supported) |
public static | ps_round(float $value, int $precision, mixed $roundMode=null) : float returns the rounded value of $value to specified precision, according to your configuration; |
public static | purifyHTML(mixed $html, null $uri_unescape=null, bool $allow_style=false) : string |
public static | recurseCopy(mixed $src, mixed $dst, bool $del=false) : void Copy the folder $src into $dst, $dst is created if it do not exist |
public static | redirect(string $url, string $baseUri='/' , \Link $link=null, string/array $headers=null) : voidRedirect user to another page |
public static | redirectAdmin(string $url) : void Redirect user to another admin page |
public static | redirectLink(string $url) : void Redirect URLs already containing PS_BASE_URI |
public static | replaceAccentedChars(string $str) : string Replace all accented chars by their equivalent non accented chars. |
public static | replaceByAbsoluteURL(mixed $matches) : void |
public static | restoreCacheSettings(\Context/null/\Context $context=null) : void |
public static | round_helper(mixed $value, mixed $mode) : float |
public static | rtrimString(string $str, string $str_search) : string Delete a substring from another one starting from the right |
public static | safeDefine(string $constant, mixed $value) : void Check if a constant was already defined |
public static | safeOutput(string $string, bool $html=false) : string Sanitized string Sanitize a string |
public static | safePostVars() : void |
public static | scandir(mixed $path, string $ext='php' , string $dir='' , bool $recursive=false) : array List of file found |
public static | secureReferrer(string $referrer) : string secured referrer Secure an URL referrer |
public static | setCookieLanguage(\Cookie/null/\Cookie $cookie=null) : string ISO code Change language in cookie while clicking on a flag |
public static | setCurrency(mixed $cookie) : Currency object Set cookie currency from POST or default currency |
public static | simplexml_load_file(mixed $url, null $class_name=null) : null/\SimpleXMLElement |
public static | smartyImplode(array $params, \Smarty_Internal_Template $template) : string/null if the assign parameter is passed, Smarty assigns the result to a template variable Smarty {implode} plugin Type: function Name: implode Purpose: implode Array Use: {implode value="" separator=""} |
public static | spreadAmount(mixed $amount, mixed $precision, mixed $rows, mixed $column) : void Spread an amount on lines, adjusting the $column field, with the biggest adjustments going to the rows having the highest $sort_column. E.g.: $rows = [['a' => 5.1], ['a' => 8.2]]; spreadAmount(0.3, 1, $rows, 'a'); => $rows is [['a' => 8.4], ['a' => 5.2]] e.g. if $amount is 1, $precision is 0 and $rows = [['a' => 2], ['a' => 1]] then the resulting $rows will be [['a' => 3], ['a' => 1]] But if $precision were 1, then the resulting $rows would be [['a' => 2.5], ['a' => 1.5]] |
public static | str2url(string $str) : string Return a friendly url made from the provided string If the mbstring library is available, the output is the same as the js function of the same name |
public static | strReplaceFirst(string $search, string $replace, string $subject, int $cur) : mixed |
public static | str_replace_once(mixed $needle, mixed $replace, mixed $haystack) : mixed |
public static | stripslashes(mixed $string) : string |
public static | strlen(mixed $str, string $encoding='UTF-8' ) : bool/int |
public static | strpos(mixed $str, mixed $find, int $offset, string $encoding='UTF-8' ) : bool/int |
public static | strrpos(mixed $str, mixed $find, int $offset, string $encoding='utf-8' ) : bool/int |
public static | strtolower(string $str) : bool/string |
public static | strtoupper(mixed $str) : bool/string |
public static | substr(mixed $str, mixed $start, bool $length=false, string $encoding='utf-8' ) : bool/string |
public static | switchLanguage(\Context $context=null) : void Set cookie id_lang |
public static | toCamelCase(mixed $str, bool $catapitaliseFirstChar=false) : void Translates a string with underscores into camel case (e.g. first_name -> firstName) |
public static | toUnderscoreCase(string $string) : string Transform a CamelCase string to underscore_case string |
public static | truncate(string $str, int $maxLength, string $suffix='...' ) : string |
public static | truncateString(mixed $text, int $length=120, array $options=array()) : bool/string |
public static | DEPRECATED - 1.0.0 use ucfirst instead |
public static | ucwords(mixed $str) : string |
public static | DEPRECATED - Use unserialize instead |
public static | url(string $begin, string $end) : string Concat $begin and $end, add ? or & between strings |
public static | usingSecureMode() : bool uses SSL Check if the current page use SSL connection on not |
public static | version_compare(mixed $v1, mixed $v2, string $operator='<' ) : mixedAlign version sent and use internal function |
public static | waitUntilFileIsModified(mixed $file_name, int $timeout=180) : void |
protected static | throwDeprecated(mixed $error, mixed $message, mixed $class) : void |
Class: UploaderCore
Class UploaderCore
Visibility | Function |
---|---|
public | __construct(null $name=null) : void UploaderCore constructor. |
public | checkFileSize() : bool |
public | getAcceptTypes() : mixed |
public | getFilePath(null $fileName=null) : string |
public | getFiles() : array |
public | getMaxSize() : mixed |
public | getName() : mixed |
public | getPostMaxSizeBytes() : int/null/string |
public | getSavePath() : string |
public | getUniqueFileName(string $prefix='PS' ) : string |
public | process(null $dest=null) : array |
public | setAcceptTypes(mixed $value) : \$this |
public | setCheckFileSize(mixed $value) : \$this |
public | setMaxSize(mixed $value) : \$this |
public | setName(mixed $value) : \$this |
public | setSavePath(mixed $value) : \$this |
public | upload(mixed $file, null $dest=null) : mixed |
protected | _getFileSize(mixed $filePath, bool $clearStatCache=false) : int |
protected | _getServerVars(mixed $var) : string |
protected | _normalizeDirectory(mixed $directory) : string |
protected | checkUploadError(mixed $errorCode) : array/int/mixed/string |
protected | validate(mixed $file) : bool |
Class: PageCacheCore
Class PageCache
Visibility | Function |
---|---|
public static | cacheKey(string $key, int $idCurrency, int $idLanguage, int $idCountry, int $idShop, string $entityType, int $idEntity) : void Register cache key and set its metadata |
public static | flush() : void Flush all data |
public static | invalidateEntity(string $entityType, int/null $idEntity=null) : void Invalidate an entity from the cache |
protected static | getKeysToInvalidate(string $entityType, int/null $idEntity=null) : array Get keys to invalidate |
Class: RiskCore
Class RiskCore
Visibility | Function |
---|---|
public | getFields() : mixed |
public static | getRisks(int/null $idLang=null) : \PrestaShopCollection |
public | getTranslationsFieldsChild() : array Multilingual fields Check then return multilingual fields for database interaction |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: TaxManagerFactoryCore
Class TaxManagerFactoryCore
Visibility | Function |
---|---|
public static | execHookTaxManagerFactory(\Address $address, string $type) : \TaxManagerInterface/false Check for a tax manager able to handle this type of address in the module list |
public static | getManager(\Address $address, string $type) : \TaxManagerInterface Returns a tax manager able to handle this address |
protected static | getCacheKey(\Address $address) : mixed Create a unique identifier for the address |
Interface: TaxManagerInterface
A TaxManager define a way to retrieve tax.
Visibility | Function |
---|---|
public | getTaxCalculator() : \TaxCalculator Return the tax calculator associated to this address |
public static | isAvailableForThisAddress(\Address $address) : bool This method determine if the tax manager is available for the specified address. |
Class: TaxCalculatorCore
Class TaxCalculatorCore
Visibility | Function |
---|---|
public | __construct(array $taxes=array(), int $computationMethod=1) : void |
public | addTaxes(float $priceTaxExcluded) : float price with taxes Compute and add the taxes to the specified price |
public | getTaxesAmount(float $priceTaxExcluded) : array $taxes_amount Return the tax amount associated to each taxes of the TaxCalculator |
public | getTaxesName() : string |
public | getTaxesTotalAmount(float $priceTaxExcluded) : float $amount Return the total taxes amount |
public | getTotalRate() : float total taxes rate |
public | removeTaxes(float $priceTaxIncluded) : float price without taxes Compute and remove the taxes to the specified price |
Class: TaxCore
Class TaxCore
Visibility | Function |
---|---|
public | delete() : bool |
public static | excludeTaxeOption() : bool |
public static | getCarrierTaxRate(mixed $idCarrier, mixed $idAddress=null) : float $tax_rate Returns the carrier tax rate |
public static | getProductEcotaxRate(int $idAddress=null) : float $tax_rate Returns the ecotax tax rate |
public static | getProductTaxRate(int $idProduct, mixed $idAddress=null, \Context $context=null) : \Tax Returns the product tax |
public static | DEPRECATED - 1.0.0 |
public static | getTaxIdByName(string $taxName, bool $active=1) : bool/int Return the tax id associated to the specified name |
public static | getTaxes(bool $idLang=false, bool $activeOnly=true) : array Taxes Get all available taxes |
public | historize() : bool Save the object with the field deleted to true |
public | isUsed() : bool Returns true if the tax is used in an order details |
public | toggleStatus() : bool |
public | update(bool $nullValues=false) : bool |
protected | DEPRECATED - 2.0.0 |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: AverageTaxOfProductsTaxCalculator
Class AverageTaxOfProductsTaxCalculator
Visibility | Function |
---|---|
public | __construct(\Core_Foundation_Database_DatabaseInterface $db, \Core_Business_ConfigurationInterface $configuration) : void AverageTaxOfProductsTaxCalculator constructor. |
public | getTaxesAmount(mixed $priceBeforeTax, null $priceAfterTax=null, int $roundPrecision=2, null $roundMode=null) : array |
public | setIdOrder(mixed $idOrder) : \$this |
protected | getProductTaxes() : mixed |
Class: TaxRulesTaxManagerCore
Class TaxRulesTaxManagerCore
Visibility | Function |
---|---|
public | __construct(\Address $address, mixed $type, \Core_Business_ConfigurationInterface $configurationManager=null) : void |
public | getTaxCalculator() : \TaxCalculator Return the tax calculator associated to this address |
public static | isAvailableForThisAddress(\Address $address) : bool Returns true if this tax manager is available for this address |
This class implements \TaxManagerInterface
Class: TaxRulesGroupCore
Class TaxRulesGroupCore
Visibility | Function |
---|---|
public | delete() : void |
public static | getAssociatedTaxRatesByIdCountry(mixed $idCountry) : array |
public static | getIdByName(string $name) : int id of the tax rules Returns the tax rules group id corresponding to the name |
public | getIdTaxRuleGroupFromHistorizedId(mixed $idTaxRule) : false/null/string |
public static | getTaxRulesGroups(bool $onlyActive=true) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getTaxRulesGroupsForOptions() : array an array of tax rules group formatted as $id => $name |
public | hasUniqueTaxRuleForCountry(mixed $idCountry, mixed $idState, bool $idTaxRule=false) : bool |
public | historize(\TaxRulesGroup $taxRulesGroup) : bool Save the object with the field deleted to true |
public | isUsed() : false/null/string |
public | update(bool $nullValues=false) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: TaxManagerModuleCore (abstract)
Class TaxManagerModuleCore
Visibility | Function |
---|---|
public | hookTaxManager(mixed $args) : bool |
public | install() : bool |
This class extends \Module
Class: TaxRuleCore
2007-2016 PrestaShop thirty bees is an extension to the PrestaShop e-commerce software developed by PrestaShop SA Copyright (C) 2017 thirty bees NOTICE OF LICENSE This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately. DISCLAIMER Do not edit or add to this file if you wish to upgrade PrestaShop to newer versions in the future. If you wish to customize PrestaShop for your needs please refer to https://www.thirtybees.com for more information.
Visibility | Function |
---|---|
public | breakDownZipCode(mixed $zipCodes) : array an array containing two zipcode ordered by zipcode |
public static | deleteByGroupId(mixed $idGroup) : bool |
public static | DEPRECATED - 1.0.0 |
public static | deleteTaxRuleByIdTax(mixed $idTax) : bool |
public static | getTaxRulesByGroupId(mixed $idLang, mixed $idGroup) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | isTaxInUse(int $idTax) : bool |
public static | retrieveById(mixed $idTaxRule) : array/bool/null/object |
public static | swapTaxId(int $oldId, int $newId) : void Replace a tax_rule id by an other one in the tax_rule table |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: EmployeeCore
Class EmployeeCore
Visibility | Function |
---|---|
public | __construct(int/null $id=null, int/null $idLang=null, int/null $idShop=null) : void EmployeeCore constructor. |
public | add(bool $autodate=true, bool $nullValues=true) : bool |
public static | checkPassword(int $idEmployee, string $hashedPassword) : bool result Check if employee password is the right one |
public static | countProfile(mixed $idProfile, bool $activeOnly=false) : false/null/string |
public static | employeeExists(mixed $email) : bool |
public | favoriteModulesList() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getByEmail(string $email, string $plainTextPassword=null, bool $activeOnly=true) : \Employee/bool Employee instance Return employee instance from its e-mail (optionnaly check password) |
public | getDefaultShopID() : int Get default id_shop with auth for current employee |
public static | getEmployees(bool $activeOnly=true) : array/false Employees or false Return list of employees |
public static | getEmployeesByProfile(mixed $idProfile, bool $activeOnly=false) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getFields() : array |
public | getImage() : string |
public | getLastElementsForNotify(string $element) : int |
public | hasAuthOnShop(int $idShop) : bool Check if the employee is associated to a specific shop |
public | hasAuthOnShopGroup(int $idShopGroup) : bool Check if the employee is associated to a specific shop group |
public | isLastAdmin() : bool |
public | isLoggedBack() : bool employee validity Check employee informations saved into cookie and return employee validity |
public | isSuperAdmin() : bool Check if current employee is super administrator |
public | logout() : void Logout |
public static | setLastConnectionDate(int $idEmployee) : bool |
public | setWsPasswd(string $plainTextPassword) : bool |
public | update(bool $nullValues=false) : bool |
protected | saveOptin() : void |
protected | updateTextDirection() : void |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ObjectModelCore (abstract)
Class ObjectModelCore
Visibility | Function |
---|---|
public | __construct(int/null $id=null, int/null $idLang=null, int/null $idShop=null) : void Builds the object |
public | __get(string $property) : mixed thirty bees' new coding style dictates that camelCase should be used rather than snake_case These magic methods provide backwards compatibility for modules/themes/whatevers that still access properties via their snake_case names |
public | __set(string $property, mixed $value) : void thirty bees' new coding style dictates that camelCase should be used rather than snake_case These magic methods provide backwards compatibility for modules/themes/whatevers that still access properties via their snake_case names |
public | add(bool $autoDate=true, bool $nullValues=false) : bool Insertion result Adds current object to the database |
public | addFieldsRequiredDatabase(array $fields) : bool Sets required field for this class in the database. |
public | associateTo(int/array $idShops) : bool This function associate an item to its context |
public | cacheFieldsRequiredDatabase(bool $all=true) : void Caches data about required objects fields in memory |
public | clearCache(bool $all=false) : void Clears cache entries that have this object's ID. |
public static | createColumn(string $name, string $columnDefinition, string/null $className=null) : bool Indicates whether the column was successfully created Add a column in the table relative to the ObjectModel. This method uses the $definition property of the ObjectModel, with some extra properties. Example: 'table' => 'tablename', 'primary' => 'id', 'fields' => array( 'id' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), 'number' => array( 'type' => self::TYPE_STRING, 'db_type' => 'varchar(20)', 'required' => true, 'default' => '25' ), ), The primary column is created automatically as INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT. The other columns require an extra parameter, with the type of the column in the database. |
public static | createDatabase(string/null $className=null) : bool Indicates whether the database was successfully added Create the database table with its columns. Similar to the createColumn() method. |
public static | createMissingColumns(string/null $className=null) : bool Indicates whether the missing columns were successfully created Create in the database every column detailed in the $definition property that are missing in the database. |
public | delete() : bool True if delete was successful Deletes current object from database |
public | deleteImage(bool $forceDelete=false) : bool Delete images associated with the object |
public | deleteSelection(array $ids) : bool Deletes multiple objects from the database at once |
public static | disableCache() : void Disables object caching |
public static | displayFieldName(string $field, string $class='ObjectModelCore' , bool $htmlentities=true, \Context/null/\Context $context=null) : stringReturns field name translation |
public static | dropDatabase(string/null $className=null) : bool Indicates whether the database was successfully dropped Drop the database for this ObjectModel |
public | duplicateObject() : \ObjectModel/false Takes current object ID, gets its values from database, saves them in a new row and loads newly saved values as a new object. |
public | duplicateShops(int $id) : bool/void Copies shop association data from object with specified ID. |
public static | enableCache() : void Enables object caching |
public static | existsInDatabase(int $idEntity, string $table) : bool Checks if an object exists in database. |
public static | formatValue(mixed $value, int $type, bool $withQuotes=false, bool $purify=true, bool $allowNull=false) : mixed Formats a value |
public | getAssociatedShops() : array Gets the list of associated shop IDs |
public static | getDatabaseColumns(string/null $className=null) : array/false/\mysqli_result/null/\PDOStatement/\resource Get columns in database |
public static | getDefinition(string $class, string/null $field=null) : array Returns object definition |
public | getFieldByLang(string $fieldName, int/null $idLang=null) : mixed Return the field value for the specified language if the field is multilang, else the field value. |
public | getFields() : array All object fields Prepare fields for ObjectModel class (add, update) All fields are verified (pSQL, intval, ...) |
public | getFieldsLang() : array Prepare multilang fields |
public | getFieldsRequiredDatabase(bool $all=false) : array/null Returns an array of required fields |
public | getFieldsShop() : array All object fields Prepare fields for multishop Fields are not validated here, we consider they are already validated in getFields() method, this is not the best solution but this is the only one possible for retro compatibility. |
public static | getRepositoryClassName() : null |
public static | getValidationRules(string $class='ObjectModelCore' ) : array Validation rules (fields validity)Returns object validation rules (fields validity) |
public | getWebserviceObjectList(string $sqlJoin, string $sqlFilter, string $sqlSort, string $sqlLimit) : array/null Returns webservice object list. |
public | getWebserviceParameters(string/null $wsParamsAttributeName=null) : array Returns webservice parameters of this object. |
public | hasMultishopEntries() : bool Checks if there is more than one entry in associated shop table for current object. |
public | hydrate(array $data, int/null $idLang=null) : void Fill an object with given data. Data must be an array with this syntax: array(objProperty => value, objProperty2 => value, etc.) |
public static | hydrateCollection(string $class, array $datas, int/null $idLang=null) : array Fill (hydrate) a list of objects in order to get a collection of these objects |
public | isAssociatedToShop(int/null $idShop=null) : bool Checks if current object is associated to a shop. |
public static | isCurrentlyUsed(string/null $table=null, bool $hasActiveColumn=false) : bool Checks if an object type exists in the database. |
public | isLangMultishop() : bool Checks if the object is both multi-language and multi-shop. |
public | isMultiShopField(string $field) : bool Checks if a field is a multi-shop field. |
public | isMultishop() : bool Checks if object is multi-shop object. |
public | save(bool $nullValues=false, bool $autoDate=true) : bool Insertion result Saves current object to database (add or update) |
public | setFieldsToUpdate(array $fields) : void Set a list of specific fields to update array(field1 => true, field2 => false, langfield1 => array(1 => true, 2 => false)) |
public | toggleStatus() : bool Update result Toggles object status in database |
public | update(bool $nullValues=false) : bool Updates the current object in the database |
public static | updateMultishopTable(string $className, array $data, string $where='' , string $specificWhere='' ) : boolUpdates a table and splits the common datas and the shop datas. |
public | DEPRECATED - 1.0.0 Use validateController() instead |
public | validateController(bool $htmlentities=true) : array Validates submitted values and returns an array of errors, if any. |
public | validateField(string $field, mixed $value, int/null $idLang=null, array $skip=array(), bool $humanErrors=false) : true/string True or error message string. Validate a single field |
public | validateFields(bool $die=true, bool $errorReturn=false) : bool/string True, false or error message. Checks if object field values are valid before database interaction |
public | validateFieldsLang(bool $die=true, bool $errorReturn=false) : bool/string True, false or error message. Checks if multilingual object field values are valid before database interaction. |
public | validateFieldsRequiredDatabase(bool $htmlentities=true) : array Validate required fields. |
protected | formatFields(int $type, int $idLang=null) : array Formats values of each fields. |
protected | DEPRECATED - 1.0.0 (use getFieldsLang()) |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 2.0.0 |
This class implements \Core_Foundation_Database_EntityInterface
Class: UpgraderCore
2007-2016 PrestaShop thirty bees is an extension to the PrestaShop e-commerce software developed by PrestaShop SA Copyright (C) 2017 thirty bees NOTICE OF LICENSE This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately. DISCLAIMER Do not edit or add to this file if you wish to upgrade PrestaShop to newer versions in the future. If you wish to customize PrestaShop for your needs please refer to https://www.thirtybees.com for more information.
Visibility | Function |
---|---|
public | __construct(bool $autoload=false) : void UpgraderCore constructor. |
public | __get(mixed $var) : bool |
public | checkPSVersion(bool $force=false) : mixed checkPSVersion ask to prestashop.com if there is a new version. return an array if yes, false otherwise |
public | downloadLast(string $dest, string $filename='thirtybees.zip' ) : booldownloadLast download the last version of PrestaShop and save it in $dest/$filename |
public | getChangedFilesList() : array return an array of files that the md5file does not match to the original md5file (provided by $rss_md5file_link_dir ) |
public | isAuthenticPrestashopVersion() : bool |
public | isLastVersion() : bool |
public | loadFromConfig() : \Upgrader load the last version information stocked in base |
protected | addChangedFile(string $path) : void populate $this->changed_files with $path in sub arrays mail, translation and core items |
protected | addMissingFile(string $path) : void populate $this->missing_files with $path |
protected | browseXmlAndCompare(mixed $node, array $currentPath=array(), int $level=1) : void |
protected | compareChecksum(mixed $path, mixed $originalSum) : bool |
Class: DeliveryCore
Class DeliveryCore
Visibility | Function |
---|---|
public | getFields() : array |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: LinkCore
Class LinkCore
Visibility | Function |
---|---|
public | __construct(null $protocolLink=null, null $protocolContent=null) : void Constructor (initialization only) |
public | __get(mixed $property) : mixed |
public | addSortDetails(string $url, string $orderby, string $orderway) : string |
public | getAdminLink(string $controller, bool $withToken=true) : string url Use controller name to create a link |
public | getBaseLink(int/null $idShop=null, bool/null $ssl=null, bool $relativeProtocol=false) : string |
public | getCMSCategoryLink(int/\CMSCategory $cmsCategory, string/null $alias=null, int/null $idLang=null, int/null $idShop=null, bool $relativeProtocol=false) : string |
public | getCMSLink(int/\CMS $cms, string/null $alias=null, null $ssl=null, null $idLang=null, null $idShop=null, bool $relativeProtocol=false) : string |
public | getCatImageLink(string $name, int $idCategory, string/null $type=null) : string |
public | getCategoryLink(int/\Category $category, string/null $alias=null, int/null $idLang=null, string/null $selectedFilters=null, int/null $idShop=null, bool $relativeProtocol=false) : string |
public | getImageLink(string $name, string $ids, string $type=null) : string Returns a link to a product image for display Note: the new image filesystem stores product images in subdirectories of img/p/ |
public | getLangLink(int/null $idLang=null, \Context/null/\Context $context=null, int/null $idShop=null) : string |
public | getLanguageLink(int $idLang, \Context $context=null) : string link Create link after language change, for the change language block |
public | getManufacturerLink(mixed $manufacturer, string $alias=null, int $idLang=null, int/null $idShop=null, bool $relativeProtocol=false) : string Create a link to a manufacturer |
public | getMediaLink(string $filepath) : string |
public | getModuleLink(string $module, string $controller='default' , array $params=array(), null $ssl=null, int $idLang=null, int/null $idShop=null, bool $relativeProtocol=false) : stringCreate a link to a module |
public | getPageLink(string $controller, bool $ssl=null, int $idLang=null, string/array $request=null, bool $requestUrlEncode=false, int/null $idShop=null, bool $relativeProtocol=false) : string Page link Create a simple link |
public | getPaginationLink(string $type, object/int $idObject, bool $nb=false, bool $sort=false, bool $pagination=false, bool $array=false) : array/string Get pagination link |
public | getProductDeletePictureLink(mixed $product, int $idPicture) : string Create a link to delete a product |
public | getProductLink(int/\Product $product, string/null $alias=null, string/null $category=null, string/null $ean13=null, int/null $idLang=null, int/null $idShop=null, int $ipa, bool $forceRoutes=false, bool $relativeProtocol=false, bool $addAnchor=false, array $extraParams=array()) : string |
public static | getQuickLink(string $url) : string |
public | getSupplierLink(mixed $supplier, string $alias=null, int $idLang=null, int/null $idShop=null, bool $relativeProtocol=false) : string Create a link to a supplier |
public | goPage(string $url, int $p) : string |
public | matchQuickLink(string $url) : bool |
protected | findCMSCategoryParent(int $idCmsCategory) : int |
protected | findCMSCategorySubcategories(int $idCmsCategory, int $idLang) : string |
protected | findCMSSubcategories(int $idCms, int $idLang) : string |
Class: FeatureValueCore
Class FeatureValueCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | addFeatureValueImport(mixed $idFeature, mixed $value, null $idProduct=null, null $idLang=null, bool $custom=false) : int |
public | delete() : bool |
public static | getFeatureValueLang(bool $idFeatureValue) : array Array with value's languages Get all language for a given value |
public static | getFeatureValues(bool $idFeature) : array Array with feature's values Get all values for a given feature |
public static | getFeatureValuesWithLang(int $idLang, bool $idFeature, bool $custom=false) : array Array with feature's values Get all values for a given feature and language |
public static | selectLang(array $lang, int $idLang) : string String value name selected Select the good lang in tab |
public | update(bool $nullValues=false) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: AddressCore
Class AddressCore
Visibility | Function |
---|---|
public | __construct(int $idAddress=null, mixed $idLang=null) : void Build an address |
public | add(bool $autodate=true, bool $nullValues=false) : void |
public static | addressExists(int $idAddress) : bool Specify if an address is already in base |
public static | aliasExist(mixed $alias, mixed $idAddress, mixed $idCustomer) : false/null/string |
public | delete() : void |
public static | getAddressIdBySupplierId(int $idSupplier) : int $id_address Returns id_address for a given id_supplier |
public static | getCountryAndState(mixed $idAddress) : array/bool/mixed/null/object |
public | getFieldsRequiredDB() : array |
public static | getFieldsValidate() : array hash values. Returns fields required for an address in an array hash |
public static | getFirstCustomerAddressId(mixed $idCustomer, bool $active=true) : bool/int/null |
public static | getZoneById(int $idAddress) : int Zone id Get zone id for a given address |
public static | initialize(int $idAddress=null, bool $withGeoLocation=false) : Address address Initiliaze an address corresponding to the specified id address or if empty to the default shop configuration |
public static | isCountryActiveById(int $idAddress) : int Country status Check if country is active for a given address |
public | isUsed() : int Order count for this address Check if address is used (at least one order placed) |
public | update(bool $nullValues=false) : bool |
public | validateController(bool $htmlentities=true) : void |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: BlowfishCore
Class BlowfishCore
Visibility | Function |
---|---|
public | decrypt(mixed $ciphertext) : string |
public | encrypt(mixed $plaintext) : bool/string |
public | maxi_pad(mixed $plaintext) : string |
This class extends \CryptBlowfish
Class: AdminTabCore (abstract)
DEPRECATED 1.0.0
Visibility | Function |
---|---|
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | displayErrors() : void Display errors |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | displayOptionTypeDisabled(mixed $key, mixed $field, mixed $value) : void Type = disabled |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | displayOptionTypePrice(mixed $key, mixed $field, mixed $value) : void Type = price |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | displayOptionTypeSelectLang(mixed $key, mixed $field, mixed $value) : void Type = selectLang |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | displayOptionTypeTextareaLang(mixed $key, mixed $field, mixed $value) : void Type = TextareaLang |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | displayTop() : void |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | getFieldValue(object $obj, string $key, int $id_lang=null, null $idShop=null) : string Return field value if possible (both classical and multilingual fields) Case 1 : Return value if present in $_POST / $_GET Case 2 : Return object value |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | validateRules(bool/string $className=false) : void Manage page display (form, list...) |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | displayAddButton() : void |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected static | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | 'AdminTab' , bool $addslashes=false, bool $htmlentities=true) : string The translation if available, or the english default text.DEPRECATED - 1.0.0 |
protected | loadObject(bool $opt=false) : object Load class object using identifier in $_GET (if possible) otherwise return an empty object, or die |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
protected | uploadImage(mixed $id, mixed $name, mixed $dir, bool $ext=false, mixed $width=null, mixed $height=null) : void |
protected | DEPRECATED - 1.0.0 |
protected | DEPRECATED - 1.0.0 |
Class: HelperCalendarCore
Class HelperCalendarCore
Visibility | Function |
---|---|
public | __construct() : void HelperCalendarCore constructor. |
public | addAction(mixed $action) : \$this |
public | addCompareAction(mixed $action) : \$this |
public | generate() : string |
public | getActions() : array |
public | getCompareActions() : array |
public | getCompareDateFrom() : mixed |
public | getCompareDateTo() : mixed |
public | getCompareOption() : int |
public | getDateFormat() : string |
public | getDateFrom() : false/string |
public | getDateTo() : false/string |
public | isRTL() : bool |
public | setActions(mixed $value) : \$this |
public | setCompareActions(mixed $value) : \$this |
public | setCompareDateFrom(mixed $value) : \$this |
public | setCompareDateTo(mixed $value) : \$this |
public | setCompareOption(mixed $value) : \$this |
public | setDateFormat(mixed $value) : \$this |
public | setDateFrom(mixed $value) : \$this |
public | setDateTo(mixed $value) : \$this |
public | setRTL(mixed $value) : \$this |
This class extends \Helper
Class: HelperOptionsCore
Use this helper to generate preferences forms, with values stored in the configuration table
Visibility | Function |
---|---|
public | __construct() : void HelperOptionsCore constructor. |
public | displayOptionTypeDisabled(mixed $key, mixed $field, mixed $value) : void Type = disabled |
public | displayOptionTypeImage(mixed $key, mixed $field, mixed $value) : void Type = image |
public | displayOptionTypePrice(mixed $key, mixed $field, mixed $value) : void Type = price |
public | generateOptions(array $optionList) : string html Generate a form for options |
public | getOptionValue(mixed $key, mixed $field) : string |
This class extends \Helper
Class: HelperCore
Class HelperCore
Visibility | Function |
---|---|
public | __construct() : void HelperCore constructor. |
public | createTemplate(string $tplName) : \Smarty_Internal_Template Create a template from the override file, else from the base file. |
public | generate() : string default behaviour for helper is to return a tpl fetched |
public static | 'categoryBox' , bool $useRadio=false, bool $useSearch=false, array $disabledCategories=array(), bool $useInPopup=false) : voidDEPRECATED - 2.0.0 |
public | renderCategoryTree(array $root=null, array $selectedCat=array(), string $inputName='categoryBox' , bool $useRadio=false, bool $useSearch=false, array $disabledCategories=array()) : string |
public | renderModulesList(mixed $modulesList) : mixed |
public | renderRequiredFields(string $className, string $identifier, array $tableFields) : string Render a form with potentials required fields |
public static | DEPRECATED - deprecated since 1.0.0 use HelperShop->getRenderedShopList |
public | setTpl(mixed $tpl) : void |
protected | l(mixed $string, string $class='AdminTab' , bool $addslashes=false, bool $htmlentities=true) : string the translation if available, or the english default text.use translations files to replace english expression. |
Class: HelperShopCore
Class HelperShopCore
Visibility | Function |
---|---|
public | getRenderedShopList() : string Render shop list |
This class extends \Helper
Class: HelperKpiRowCore
Class HelperKpiRowCore
Visibility | Function |
---|---|
public | generate() : mixed |
This class extends \Helper
Class: HelperViewCore
2007-2016 PrestaShop thirty bees is an extension to the PrestaShop e-commerce software developed by PrestaShop SA Copyright (C) 2017 thirty bees NOTICE OF LICENSE This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately. DISCLAIMER Do not edit or add to this file if you wish to upgrade PrestaShop to newer versions in the future. If you wish to customize PrestaShop for your needs please refer to https://www.thirtybees.com for more information.
Visibility | Function |
---|---|
public | __construct() : void HelperViewCore constructor. |
public | generateView() : string |
This class extends \Helper
Class: HelperImageUploaderCore
Class HelperImageUploaderCore
Visibility | Function |
---|---|
public | getFilePath(null $fileName=null) : string |
public | getMaxSize() : int |
public | getSavePath() : string |
protected | validate(mixed $file) : bool |
This class extends \HelperUploader
Class: HelperFormCore
Class HelperFormCore
Visibility | Function |
---|---|
public | __construct() : void HelperFormCore constructor. |
public | generate() : string |
public | generateForm(mixed $fieldsForm) : string |
public | getFieldsRequired() : mixed Return true if there are required fields |
public | renderAssoShop(bool $disableShared=false, mixed $templateDirectory=null) : string Render an area to determinate shop association |
This class extends \Helper
Class: HelperTreeShopsCore
Class HelperTreeShopsCore
Visibility | Function |
---|---|
public | __construct(int $id, null $title=null, null $lang=null) : void HelperTreeShopsCore constructor. |
public | getData() : mixed |
public | getLang() : mixed |
public | getNodeFolderTemplate() : mixed |
public | getNodeItemTemplate() : mixed |
public | getSelectedShops() : array |
public | getTemplate() : mixed |
public | render(null $data=null, bool $useDefaultActions=true, bool $useSelectedShop=true) : string |
public | renderNodes(null $data=null) : string |
public | setLang(mixed $value) : \$this |
public | setSelectedShops(mixed $value) : \$this |
This class extends \TreeCore
Class: HelperKpiCore
Class HelperKpiCore
Visibility | Function |
---|---|
public | generate() : mixed |
This class extends \Helper
Class: HelperUploaderCore
Class HelperUploaderCore
Visibility | Function |
---|---|
public | getContext() : \Context |
public | getDropZone() : mixed |
public | getFiles() : array |
public | getId() : mixed |
public | getMaxFiles() : mixed |
public | getName() : mixed |
public | getPostMaxSize() : mixed |
public | getTemplate() : mixed |
public | getTemplateDirectory() : string |
public | getTemplateFile(mixed $template) : string |
public | getTitle() : mixed |
public | getUrl() : mixed |
public | isMultiple() : bool |
public | render() : mixed |
public | setContext(mixed $value) : \$this |
public | setDropZone(mixed $value) : \$this |
public | setFiles(mixed $value) : \$this |
public | setId(mixed $value) : \$this |
public | setMaxFiles(mixed $value) : \$this |
public | setMultiple(mixed $value) : \$this |
public | setName(mixed $value) : \$this |
public | setPostMaxSize(mixed $value) : \$this |
public | setTemplate(mixed $value) : \$this |
public | setTemplateDirectory(mixed $value) : \$this |
public | setTitle(mixed $value) : \$this |
public | setUrl(mixed $value) : \$this |
public | setUseAjax(mixed $value) : \$this |
public | useAjax() : bool |
This class extends \Uploader
Class: HelperListCore
Class HelperListCore
Visibility | Function |
---|---|
public | __construct() : void HelperListCore constructor. |
public | displayDefaultLink(mixed $token=null, mixed $id, mixed $name=null) : void Display default action link |
public | displayDeleteLink(mixed $token=null, mixed $id, mixed $name=null) : void Display delete action link |
public | displayDetailsLink(mixed $token=null, mixed $id, mixed $name=null) : void Display action show details of a table row This action need an ajax request with a return like this: { use_parent_structure: true // If false, data need to be an html data: [ {field_name: 'value'} ], fields_display: // attribute $fields_list of the admin controller } or somethins like this: { use_parent_structure: false // If false, data need to be an html data: ' My html content ', fields_display: // attribute $fields_list of the admin controller } |
public | displayDuplicateLink(mixed $token=null, mixed $id, mixed $name=null) : void Display duplicate action link |
public | displayEditLink(mixed $token=null, mixed $id, mixed $name=null) : void Display edit action link |
public | displayEnableLink(string $token, string $id, int $value, string $active, int $idCategory=null, int $idProduct=null, bool $ajax=false) : string Fetch the template for action enable |
public | displayListContent() : mixed |
public | displayListFooter() : void Close list table and submit button |
public | displayListHeader() : void Display list header (filtering, pagination and column names) |
public | displayViewLink(mixed $token=null, mixed $id, mixed $name=null) : void Display view action link |
public | generateList(array $list, array $fieldsDisplay) : string html Return an html list given the data to fill it up |
public | hasBulkActions(bool $hasValue=false) : bool |
This class extends \Helper
Class: HelperTreeCategoriesCore
Class HelperTreeCategoriesCore
Visibility | Function |
---|---|
public | __construct(mixed $id, null $title=null, null $rootCategory=null, null $lang=null, bool $useShopRestriction=true) : void HelperTreeCategoriesCore constructor. |
public | getData() : mixed |
public | getDisabledCategories() : mixed |
public | getFullTree() : bool |
public | getInputName() : mixed |
public | getLang() : mixed |
public | getNodeFolderTemplate() : mixed |
public | getNodeItemTemplate() : mixed |
public | getRootCategory() : mixed |
public | getSelectedCategories() : array |
public | getShop() : mixed |
public | getTemplate() : mixed |
public | render(null $data=null) : string |
public | renderNodes(null $data=null) : string |
public | setChildrenOnly(mixed $value) : \$this |
public | setDisabledCategories(mixed $value) : \$this |
public | setFullTree(mixed $value) : \$this |
public | setInputName(mixed $value) : \$this |
public | setLang(mixed $value) : \$this |
public | setRootCategory(mixed $value) : \$this |
public | setSelectedCategories(mixed $value) : \$this |
public | setShop(mixed $value) : \$this |
public | setUseCheckBox(mixed $value) : \$this |
public | setUseSearch(mixed $value) : \$this |
public | setUseShopRestriction(mixed $value) : \$this |
public | useCheckBox() : bool |
public | useSearch() : bool |
public | useShopRestriction() : bool |
protected | _disableCategories(mixed $categories, null $disabledCategories=null) : void |
protected | _getSelectedChildNumbers(mixed $categories, mixed $selected, null $parent=null) : int |
protected | fillTree(mixed $categories, mixed $idCategory) : array |
This class extends \TreeCore
Class: SceneCore
Class SceneCore
Visibility | Function |
---|---|
public | __construct(null $id=null, null $idLang=null, bool $liteResult=true, bool $hideScenePosition=false) : void SceneCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | addCategories(mixed $categories) : bool |
public | addZoneProducts(mixed $zones) : bool |
public | delete() : bool |
public | deleteCategories() : bool |
public | deleteImage(bool $forceDelete=false) : bool |
public | deleteZoneProducts() : bool |
public static | getIndexedCategories(int $idScene) : array Categories where scene is indexed Get categories where scene is indexed |
public | getProducts(bool $onlyActive=true, mixed $idLang=null, bool $liteResult=true, \Context $context=null) : array Products Get all products of this scene |
public static | getScenes(mixed $idCategory, mixed $idLang=null, bool $onlyActive=true, bool $liteResult=true, bool $hideScenePosition=true, \Context $context=null) : array Products Get all scenes of a category |
public static | hideScenePosition(string $name) : string Name without position Hide scene prefix used for position |
public static | isFeatureActive() : bool This method is allow to know if a feature is used or active |
public | update(bool $nullValues=false) : bool |
public | updateCategories() : bool |
public | updateZoneProducts() : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: PhpEncryptionCore
Class PhpEncryptionCore
Visibility | Function |
---|---|
public | __construct(string $asciiKey) : void PhpEncryptionCore constructor. |
public | decrypt(string $ciphertext) : string/null Plaintext |
public | encrypt(string $plaintext) : string Ciphertext |
Class: UrlRewriteCore
Class UrlRewrite
Visibility | Function |
---|---|
public static | createBaseUrl(string $route, array $params) : string |
public static | deleteUrlRewrite(int $entityType, int $idEntity, int/null $idLang=null, int/null $idShop=null) : void |
public static | deleteUrlRewrites(int $entityType, int $idLang, int $idShop, int/null $idEntity=null) : void Delete URL rewrites |
public static | lookup(string $rewrite, int $idLang, int $idShop, int/null $redirect=null, int/null $entityType=null) : array/bool/false/null/\PDOStatement/\resource |
public static | regenerateUrlRewrite(int $entityType, int/null $idEntity=null, int/null $idLang=null, int/null $idShop=null) : void |
public static | regenerateUrlRewrites(null $idLang=null, int/null $idShop=null, array $entities=array()) : void |
public static | reverseLookup(int $idEntity, int $entityType, int $idLang, int $idShop, int/null $redirect=null) : bool/false/null/string |
protected static | generateCategoryUrlRewrites(int $idLang, int $idShop, array $categories, array $newRoutes, int/null $idEntity=null) : void |
protected static | generateCmsCategoryUrlRewrites(int $idLang, int $idShop, array $categories, array $newRoutes, mixed $idEntity=null) : void |
protected static | generateCmsUrlRewrites(int $idLang, int $idShop, array $categories, array $newRoutes, mixed $idEntity=null) : void |
protected static | generateManufacturerUrlRewrites(int $idLang, int $idShop, array $newRoutes, mixed $idEntity=null) : void |
protected static | generatePageUrlRewrites(mixed $idLang, mixed $idShop) : void |
protected static | generateProductUrlRewrites(int $idLang, int $idShop, array $categories, array $newRoutes, int/null $idEntity=null) : void |
protected static | generateSupplierUrlRewrites(int $idLang, int $idShop, array $newRoutes, mixed $idEntity=null) : void |
protected static | getCategoryInfo(int $idLang, int $idShop) : array |
protected static | getCmsCategoryInfo(int $idLang, int $idShop) : array |
protected static | getRoutes(int $idLang, int $idShop, array $routes) : mixed Fills the routes array with the current available routes |
protected static | hasKeyword(mixed $rule, string $keyword) : bool Check if a keyword is written in a route rule |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: HookCore
Class HookCore
Visibility | Function |
---|---|
public static | DEPRECATED - 1.0.0 |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | coreCallHook(mixed $module, mixed $method, mixed $params) : mixed |
public static | DEPRECATED - 1.0.0 |
public static | exec(string $hookName, array $hookArgs=array(), int $idModule=null, bool $arrayReturn=false, bool $checkExceptions=true, bool $usePush=false, int $idShop=null) : string/array modules output Execute modules for specified hook |
public static | execWithoutCache(string $hookName, array $hookArgs=array(), int $idModule=null, bool $arrayReturn=false, bool $checkExceptions=true, bool $usePush=false, int $idShop=null) : string/array modules output Execute modules for specified hook |
public static | DEPRECATED - 1.0.0 use Hook::getIdByName() instead |
public static | getHookAliasList() : array Get list of hook alias |
public static | getHookModuleExecList(string $hookName=null) : array Get list of modules we can execute per hook |
public static | getHookModuleList() : array Get list of all registered hooks with modules |
public static | getHooks(bool $position=false) : array Hooks List Return Hooks List |
public static | getIdByName(string $hookName) : int Hook ID Return hook ID from name |
public static | getLiveEditById(mixed $hookId) : mixed Return hook live edit bool from ID |
public static | getModulesFromHook(int $idHook, int $idModule=null) : array Modules List Return Hooks List |
public static | getNameById(mixed $hookId) : mixed Return hook ID from name |
public static | getRetroHookName(string $hookName) : int Hook ID Return backward compatibility hook name |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 use Hook::getHookModuleList() instead |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | wrapLiveEdit(mixed $display, mixed $moduleInstance, mixed $idHook) : string |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: TabCore
Class TabCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : int id_tab additionnal treatments for Tab when creating new one : - generate a new position - add access for admin profile |
public static | checkTabRights(mixed $idTab) : bool |
public | cleanPositions(mixed $idParent) : bool |
public | delete() : bool |
public static | disablingForModule(mixed $module) : bool Status Disabling tabs for module |
public static | enablingForModule(mixed $module) : bool Status Enabling tabs for module |
public static | getClassNameById(int $idTab) : false/null/string |
public static | getCollectionFromModule(mixed $module, null $idLang=null) : array/PrestaShopCollection Collection of tabs (or empty array) Get collection from module name |
public static | getCurrentParentId() : int tab parent id Get tab parent id |
public static | getCurrentTabId() : int tab id Get tab id |
public static | getIdFromClassName(string $className) : int id_tab Get tab id from name |
public static | getInstanceFromClassName(mixed $className, mixed $idLang=null) : Tab Tab object (empty if bad id or class name) Get Instance from tab class name |
public static | getModuleTabList() : array Return the list of tab used by a module |
public static | getNbTabs(null $idParent=null) : int |
public static | getNewLastPosition(mixed $idParent) : int return an available position in subtab for parent $id_parent |
public static | getTab(mixed $idLang, mixed $idTab) : array tab Get tab |
public static | getTabByIdProfile(int $idParent, int $idProfile) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getTabModulesList(int $idTab) : array |
public static | getTabs(int/ $idLang, int/null $idParent=null) : array |
public static | initAccess(int $idTab, \Context $context=null) : bool true if succeed When creating a new tab $id_tab, this add default rights to the table access |
public | move(mixed $direction) : bool |
public static | recursiveTab(int $idTab, array $tabs) : array |
public | save(bool $nullValues=false, bool $autodate=true) : bool |
public | update(bool $nullValues=false) : bool Overrides update to set position to last when changing parent tab |
public | updatePosition(mixed $way, mixed $position) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: PrestaShopBackupCore
Class PrestaShopBackupCore
Visibility | Function |
---|---|
public | __construct(string $filename=null) : void Creates a new backup object |
public | add() : bool true on successful backup Creates a new backup file |
public static | backupExist(string $filename) : bool true if backup file exist Check if a backup file exist |
public | delete() : bool Deletion result, true on success Delete the current backup file |
public | deleteSelection(mixed $list) : bool True on success Deletes a range of backup files |
public static | getBackupPath(string $filename='' ) : string The full path of the backup file, or false if the backup file does not existsGet the full path of the backup file |
public | getBackupURL() : string The url used to request the backup file Get the URL used to retrieve this backup file |
public | getRealBackupPath(string $filename=null) : string full path get the path to use for backup (customBackupDir if specified, or default) |
public | setCustomBackupPath(string $dir) : bool bo you can set a different path with that function |
Class: AliasCore
Class AliasCore
Visibility | Function |
---|---|
public | __construct(null $id=null, null $alias=null, null $search=null, null $idLang=null) : void AliasCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | aliasExists(mixed $idAlias) : bool This method is allow to know if a alias exist for AdminImportController |
public | delete() : bool |
public | getAliases() : mixed |
public static | isFeatureActive() : bool This method is allow to know if a feature is used or active |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: GroupCore
Class GroupCore
Visibility | Function |
---|---|
public | __construct(int/null $id=null, int/null $idLang=null, int/null $idShop=null) : void GroupCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | addModulesRestrictions(int $idGroup, array $modules, array $shops=array()) : bool Adding restrictions modules to the group with id $id_group |
public static | addRestrictionsForModule(int $idModule, array $shops=array()) : bool Add restrictions for a new module. We authorize every groups to the new module |
public | delete() : bool |
public static | getCurrent() : Group Group object Return current group object Use context |
public | getCustomers(bool $count=false, int $start, int $limit, bool $shopFiltering=false) : array/false/\mysqli_result/null/\PDOStatement/\resource/string |
public static | getDefaultPriceDisplayMethod() : mixed |
public static | getGroups(int $idLang, bool/int/bool $idShop=false) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getPriceDisplayMethod(mixed $idGroup) : mixed |
public static | getReduction(null $idCustomer=null) : mixed |
public static | getReductionByIdGroup(int $idGroup) : mixed |
public static | isCurrentlyUsed(string $table=null, bool $hasActiveColumn=false) : bool This method is allow to know if there are other groups than the default ones |
public static | isFeatureActive() : bool This method is allow to know if a feature is used or active |
public static | searchByName(string $query) : array Corresponding groups Light back office search for Group |
public static | truncateModulesRestrictions(int $idGroup) : bool Truncate all modules restrictions for the group |
public static | truncateRestrictionsByModule(int $idModule) : bool Truncate all restrictions by module |
public | update(bool $autodate=true, bool $nullValues=false) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: PrestaShopModuleExceptionCore
Class PrestaShopModuleExceptionCore
Visibility | Function |
---|
This class extends \PrestaShopException
This class implements \Throwable
Class: PrestaShopPaymentExceptionCore
Class PrestaShopPaymentExceptionCore
Visibility | Function |
---|
This class extends \PrestaShopException
This class implements \Throwable
Class: PrestaShopDatabaseExceptionCore
Class PrestaShopDatabaseExceptionCore
Visibility | Function |
---|---|
public | __toString() : mixed |
This class extends \PrestaShopException
This class implements \Throwable
Class: PrestaShopExceptionCore
Class PrestaShopExceptionCore
Visibility | Function |
---|---|
public | displayMessage() : void This method acts like an error handler, if dev mode is on, display the error else use a better silent way |
protected | displayArgsDebug(array $args, string $id, bool $markdown=false) : string Display arguments list of traced function Markdown is returned instead of being printed (HTML is printed because old backwards stuff blabla) |
protected | displayFileDebug(string $file, int $line, string $id=null, bool $markdown=false) : string Display lines around current line Markdown is returned instead of being printed (HTML is printed because old backwards stuff blabla) |
protected | DEPRECATED - 2.0.0 |
protected | getExtendedMessage(bool $html=true) : string content of the exception. Return the content of the Exception |
protected | getExtendedMessageMarkdown() : string content of the exception. Return the content of the Exception |
protected | logError() : void Log the error on the disk |
This class extends \Exception
This class implements \Throwable
Class: TranslatedConfigurationCore
Class TranslatedConfigurationCore
Visibility | Function |
---|---|
public | __construct(int/null $id=null, int/null $idLang=null) : void TranslatedConfigurationCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | getWebserviceObjectList(string $sqlJoin, string $sqlFilter, string $sqlSort, string $sqlLimit) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | update(bool $nullValues=false) : void |
This class extends \Configuration
This class implements \Core_Foundation_Database_EntityInterface
Class: PrestaShopCollectionCore
Class PrestaShopCollectionCore
Visibility | Function |
---|---|
public | __construct(string $classname, int $idLang=null) : void |
public | count() : int Get total of results |
public | current() : \ObjectModel Get current result |
public | getAll(bool $displayQuery=false) : \PrestaShopCollection Launch sql query to create collection of objects |
public | getFirst() : \ObjectModel Retrieve the first result |
public | getResults() : array Get results array |
public | groupBy(string $field) : \PrestaShopCollection Add GROUP BY restriction on query |
public | having(string $field, string $operator, mixed $value) : \PrestaShopCollection Add HAVING restriction on query |
public | join(string $association, string $on='' , int $type=null) : \PrestaShopCollectionJoin current entity to an associated entity |
public | key() : int Get current result index |
public | next() : void Go to next result |
public | offsetExists(mixed $offset) : bool Check if a result exist |
public | offsetGet(mixed $offset) : \ObjectModel Get a result by offset |
public | offsetSet(mixed $offset, mixed $value) : void Add an element in the collection |
public | offsetUnset(mixed $offset) : void Delete an element from the collection |
public | orderBy(string $field, string $order='asc' ) : \PrestaShopCollectionAdd ORDER BY restriction on query |
public | rewind() : void This method is called when a foreach begin |
public | setPageNumber(int $pageNumber) : \PrestaShopCollection Set the page number |
public | setPageSize(int $page_size) : \PrestaShopCollection Set the nuber of item per page |
public | sqlGroupBy(string $sql) : \PrestaShopCollection Add GROUP BY restriction on query using real SQL syntax |
public | sqlHaving(string $sql) : \PrestaShopCollection Add HAVING restriction on query using real SQL syntax |
public | sqlOrderBy(string $sql) : \PrestaShopCollection Add ORDER BY restriction on query using real SQL syntax |
public | sqlWhere(string $sql) : \PrestaShopCollection Add WHERE restriction on query using real SQL syntax |
public | valid() : bool Check if there is a current result |
public | where(string $field, string $operator, mixed $value, string $method='where' ) : \PrestaShopCollectionAdd WHERE restriction on query |
protected | formatValue(mixed $value, string $field) : mixed Format a value with the type of the given field |
protected | generateAlias(string $association='' ) : stringGenerate uniq alias from association name |
protected | getDefinition(string $association) : array Get definition of an association |
protected | getFieldInfo(string $field) : array Obtain some information on a field (alias, name, type, etc.) |
protected | parseField(string $field) : string Replace a field with its SQL version (E.g. manufacturer.name with a2.name) |
protected | parseFields(string $str) : string Parse all fields with {field} syntax in a string |
This class implements \Iterator, \Traversable, \ArrayAccess, \Countable
Class: FileUploaderCore
Class FileUploaderCore
Visibility | Function |
---|---|
public | __construct(array $allowedExtensions=array(), int $sizeLimit=10485760) : void FileUploaderCore constructor. |
public | handleUpload() : void Returns array('success'=>true) or array('error'=>'error message') |
protected | toBytes(mixed $str) : int/string |
Class: StockManagerCore
Class StockManagerCore
Visibility | Function |
---|---|
public | addProduct(int $idProduct, int $idProductAttribute, \Warehouse $warehouse, int $quantity, int $idStockMvtReason, float $priceTe, bool $isUsable=true, int/null $idSupplyOrder=null, \Employee/null $employee=null) : bool |
public | getPhysicalProductQuantities(mixed $productStockCriteria) : int |
public | getProductCoverage(mixed $idProduct, mixed $idProductAttribute, mixed $coverage, mixed $idWarehouse=null) : int number of days left (-1 if infinite) |
public | getProductPhysicalQuantities(int $idProduct, int $idProductAttribute, null $idsWarehouse=null, bool $usable=false) : int |
public | getProductRealQuantities(mixed $idProduct, mixed $idProductAttribute, mixed $idsWarehouse=null, bool $usable=false) : mixed |
public static | getStockByCarrier(int $idProduct, int $idProductAttribute, array $deliveryOption=null) : int quantity For a given product, retrieves the stock in function of the delivery option |
public | getUsableProductQuantities(mixed $productStockCriteria) : int |
public static | isAvailable() : bool |
public | normalizeWarehouseIds(mixed $idsWarehouse) : array |
public | removeProduct(int $idProduct, int/null $idProductAttribute=null, \Warehouse $warehouse, int $quantity, int $idStockMvtReason, bool $isUsable=true, int/null $idOrder=null, int $ignorePack, \Employee/null $employee=null, \Stock/null/\Stock $stock=null) : array |
public | removeProductQuantityApplyingCump(mixed $quantity, mixed $idStockMvtReason, mixed $isUsable, mixed $idOrder, mixed $employee, mixed $stock) : void |
public | transferBetweenWarehouses(mixed $idProduct, mixed $idProductAttribute, mixed $quantity, mixed $idWarehouseFrom, mixed $idWarehouseTo, bool $usableFrom=true, bool $usableTo=true) : void |
protected | calculateWA(\Stock/\PrestaShopCollection/\Stock $stock, int $quantity, float $priceTe) : int WA For a given stock, calculates its new WA(Weighted Average) price based on the new quantities and price Formula : (physicalStocklastCump + quantityToAddunitPrice) / (physicalStock + quantityToAdd) |
protected | computeProductQuantityInStock(\Warehouse $warehouse, mixed $productId, mixed $productAttributeId, mixed $shouldHandleUsableQuantity, \Stock $stock=null) : int |
protected | ensureProductQuantityRequestedForRemovalIsValid(mixed $quantity, mixed $quantityInStock) : bool |
protected | ensureStockMovementReasonIsValid(mixed $stockMovementReasonId) : mixed |
protected | getAttributesOfEmployeeRequestingStockMovement(mixed $employee) : array |
protected | getProductStockLinesInWarehouse(mixed $idProduct, mixed $idProductAttribute, \Warehouse $warehouse, \Stock $stock=null) : \PrestaShopCollection |
protected | getStockCollection(int $idProduct, int $idProductAttribute, int $idWarehouse=null, int $priceTaxExcluded=null, \Stock $stock=null) : PrestaShopCollection Collection of Stock For a given product, retrieves the stock collection |
protected | hookCoverageOnProductRemoval(\Warehouse $warehouse, mixed $productId, mixed $productAttributeId, mixed $isUsable) : void |
protected | shouldHandleStockOperationForProductsPack(mixed $productId, mixed $shouldIgnorePack) : bool |
protected | shouldPreventStockOperation(\Warehouse $warehouse, mixed $productId, mixed $quantity) : bool Prevent stock operation whenever product, quantity or warehouse are invalid |
protected | validateProductStockCriteria(array $criteria) : array |
This class implements \StockManagerInterface
Class: StockMvtReasonCore
Class StockMvtReasonCore
Visibility | Function |
---|---|
public static | exists(int $idStockMvtReason) : bool For a given id_stock_mvt_reason, tells if it exists |
public static | getStockMvtReasons(int $idLang, int $sign=null) : array Gets Stock Mvt Reasons |
public static | getStockMvtReasonsWithFilter(int $idLang, array $idsIgnore, int $sign=null) : mixed Same as StockMvtReason::getStockMvtReasons(), ignoring a specific lists of ids |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: WarehouseCore
Class WarehouseCore
Visibility | Function |
---|---|
public static | exists(int $idWarehouse) : bool Exists/Does not exist Checks if the given warehouse exists |
public | getCarriers(bool $returnReference=false) : array Ids of the associated carriers Gets the carriers associated to the current warehouse |
public | getNumberOfProducts() : int Number of different id_stock Gets the number of products in the current warehouse |
public static | getPackWarehouses(int $idProduct, mixed $idShop=null) : array/bool id_warehouse or false For a given pack, returns the warehouse it can be shipped from |
public static | getProductLocation(int $idProduct, int $idProductAttribute, int $idWarehouse) : string Location of the product For a given {product, product attribute} gets its location in the given warehouse |
public static | getProductWarehouseList(int $idProduct, int $idProductAttribute, int $idShop=null) : array Warehouses (ID, reference/name concatenated) For a given {product, product attribute} gets warehouse list |
public | getQuantitiesOfProducts() : int Total Quantity Gets the number of quantities - for all products - in the current warehouse |
public | getShops() : array Shops (id, name) Gets the shops associated to the current warehouse |
public | getStockValue() : int Value of the stock Gets the value of the stock in the current warehouse |
public static | getWarehouseNameById(int $idWarehouse) : string Name For a given $id_warehouse, returns its name |
public static | getWarehouses(bool $ignoreShop=false, int $idShop=null) : array Warehouses (ID, reference/name concatenated) Gets available warehouses It is possible via ignore_shop and id_shop to filter the list with shop id |
public static | getWarehousesByEmployee(int $idEmployee) : array ids_warehouse Ids of the warehouses For a given employee, gets the warehouse(s) he/she manages |
public static | getWarehousesByProductId(int $idProduct, int $idProductAttribute) : array Warehouses Ids and names For a given product, returns the warehouses it is stored in |
public static | getWarehousesGroupedByShops() : array (of array) Warehouses ID are grouped by shops ID Gets warehouses grouped by shops |
public | getWsCarriers() : array Webservice : gets the ids carriers associated to this warehouse |
public | getWsShops() : array Webservice : gets the ids shops associated to this warehouse |
public | getWsStockValue() : int Webservice : gets the value of the warehouse |
public | getWsStocks() : array Webservice : gets the ids stock associated to this warehouse |
public | isEmpty() : bool Checks if a warehouse is empty - i.e. has no stock |
public static | removeCarrier(int $idCarrier, int $idWarehouse=null) : void For a given carrier, removes it from the warehouse/carrier association If $id_warehouse is set, it only removes the carrier for this warehouse |
public | resetProductsLocations() : void Resets all product locations for this warehouse |
public | resetStockAvailable() : void |
public | setCarriers(array $idsCarriers) : void Sets the carriers associated to the current warehouse |
public static | setProductLocation(int $idProduct, int $idProductAttribute, int $idWarehouse, string $location) : bool Success/Failure For a given {product, product attribute} sets its location in the given warehouse First, for the given parameters, it cleans the database before updating |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: SupplyOrderStateCore
Class SupplyOrderStateCore
Visibility | Function |
---|---|
public static | getStates(array $ids=null, int $idLang=null) : array Gets the list of supply order statuses |
public static | getSupplyOrderStates(int $idStateReferrer=null, int $idLang=null) : array States Gets the list of supply order statuses |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: WarehouseProductLocationCore
Class WarehouseProductLocationCore
Visibility | Function |
---|---|
public static | getCollection(int $idProduct) : PrestaShopCollection The type of the collection is WarehouseProductLocation For a given product, gets its warehouses |
public static | getIdByProductAndWarehouse(int $idProduct, int $idProductAttribute, mixed $idWarehouse) : int $id_warehouse_product_location ID of the WarehouseProductLocation For a given product and warehouse, gets the WarehouseProductLocation corresponding ID |
public static | getProductLocation(int $idProduct, int $idProductAttribute, int $idWarehouse) : string $location Location of the product For a given product and warehouse, gets the location |
public static | getProducts(mixed $idWarehouse) : array/false/\mysqli_result/null/\PDOStatement/\resource |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: SupplyOrderCore
Class SupplyOrderCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : void |
public static | exists(int/string $match) : int SupplyOrder Id For a given id or reference, tells if the supply order exists |
public | getAllExpectedQuantity() : false/null/string |
public | getAllPendingQuantity() : false/null/string |
public | getAllReceivedQuantity() : false/null/string |
public | getEntries(int $idLang=null) : array Retrieves the product entries for the current order |
public | getEntriesCollection() : PrestaShopCollection Collection of SupplyOrderDetail Retrieves the details entries (i.e. products) collection for the current order |
public static | getReferenceById(int $idSupplyOrder) : bool/string Gets the reference of a given order |
public static | getSupplyOrderByReference(string $reference) : bool/\SupplyOrder For a given reference, returns the corresponding supply order |
public | getWsSupplyOrderDetails() : array Webservice : gets the ids supply_order_detail associated to this order |
public | hasEntries() : bool Has/Has not Check if the order has entries |
public | hydrate(array $data, mixed $idLang=null) : void |
public | isDeliveryNoteAvailable() : bool Checks if the current state allows to generate a delivery note for this order |
public | isEditable() : bool Check if the current state allows to edit the current order |
public | isInReceiptState() : bool Checks if the current state allows to add products in stock |
public | resetProducts() : void Removes all products from the order |
public static | supplierHasPendingOrders(int $idSupplier) : bool For a given $id_supplier, tells if it has pending supply orders |
public | update(bool $nullValues=false) : void |
public static | warehouseHasPendingOrders(int $idWarehouse) : bool For a given $id_warehouse, tells if it has pending supply orders |
protected | addHistory() : void Historizes the order : its id, its state, and the employee responsible for the current action |
protected | calculatePrices() : void Checks all products in this order and calculate prices Applies the global discount if necessary |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: SupplyOrderDetailCore
Class SupplyOrderDetailCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : void |
public | applyGlobalDiscount(float/int $discountRate) : void Applies a global order discount rate, for the current product (i.e detail) Calls ObjectModel::update() |
public | hydrate(array $data, mixed $idLang=null) : void |
public | update(bool $nullValues=false) : void |
public | validateController(bool $htmlentities=true) : array Errors, if any.. |
protected | calculatePrices() : void Calculates all prices for this product based on its quantity and unit price Applies discount if necessary Calculates tax value, function of tax rate |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: StockManagerFactoryCore
Class StockManagerFactoryCore
Visibility | Function |
---|---|
public static | execHookStockManagerFactory() : \StockManagerInterface Looks for a StockManager in the modules list. |
public static | getManager() : \StockManagerInterface Returns a StockManager |
Class: SupplyOrderHistoryCore
Class SupplyOrderHistoryCore
Visibility | Function |
---|
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: StockMvtCore
Class StockMvtCore
Visibility | Function |
---|---|
public static | DEPRECATED - 1.0.0 This method no longer exists. There is no equivalent or replacement, considering that this should be handled by inventories. |
public static | getLastPositiveStockMvt(int $idProduct, int $idProductAttribute) : bool/array For a given product, gets the last positive stock mvt |
public static | getNegativeStockMvts(int $idOrder, int $idProduct, int $idProductAttribute, int $quantity, int $idWarehouse=null) : array mvts Gets the negative (decrements the stock) stock mvts that correspond to the given order, for : the given product, in the given quantity. |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: StockCore
Represents the products kept in warehouses
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : void |
public static | deleteStockByIds(null $idProduct=null, null $idProductAttribute=null) : bool |
public | getWsRealQuantity() : mixed Webservice : used to get the real quantity of a product |
public static | productIsPresentInStock(int $idProduct, int $idProductAttribute, int $idWarehouse) : bool |
public | update(bool $nullValues=false) : void |
protected | getProductInformations() : mixed Gets reference, ean13 and upc of the current product Stores it in stock for stock_mvt integrity and history purposes |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: StockMvtWSCore
Class StockMvtWSCore
Visibility | Function |
---|---|
public | __construct(int/null $id=null, int/null $idLang=null, int/null $idShop=null) : void |
public | getWSProductName() : mixed Webservice : getter for the product name |
public | getWebserviceObjectList(string $join, string $filter, string $sort, string $limit, bool $full=false) : array/false/\mysqli_result/null/\PDOStatement/\resource |
This class extends \ObjectModelCore
This class implements \Core_Foundation_Database_EntityInterface
Class: StockManagerModuleCore (abstract)
Class StockManagerModuleCore
Visibility | Function |
---|---|
public | hookStockManager() : bool |
public | install() : bool |
This class extends \Module
Class: StockAvailableCore
Represents quantities available It is either synchronized with Stock or manualy set by the seller
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : void Upgrades total_quantity_available after having saved |
public static | addSqlShopParams(array $params, int $idShop=null) : void Add sql params for shops fields - specific to StockAvailable |
public static | addSqlShopRestriction(\DbQuery/string/null $sql=null, \Shop/int/null $shop=null, string/null $alias=null) : string/DbQuery DbQuery object or the sql restriction string Add an sql restriction for shops fields - specific to StockAvailable |
public static | copyStockAvailableFromShopToShop(int $srcShopId, int $dstShopId) : bool Copies stock available content table |
public static | dependsOnStock(int $idProduct, int $idShop=null) : bool : depends on stock @see $depends_on_stock For a given product, tells if it depends on the physical (usable) stock |
public static | getQuantityAvailableByProduct(int $idProduct=null, int $idProductAttribute=null, int $idShop=null) : int Quantity For a given id_product and id_product_attribute, gets its stock available |
public static | getStockAvailableIdByProductId(mixed $idProduct, null $idProductAttribute=null, null $idShop=null) : bool/int |
public static | outOfStock(int $idProduct, int $idShop=null) : bool : depends on stock @see $depends_on_stock For a given product, get its "out of stock" flag |
public | postSave() : void Upgrades total_quantity_available after having saved |
public static | removeProductFromStockAvailable(int $idProduct, int/null $idProductAttribute=null, \Shop/null $shop=null) : bool Removes a given product from the stock available |
public static | resetProductFromStockAvailableByShopGroup(\ShopGroup $shopGroup) : void Removes all product quantities from all a group of shops If stocks are shared, remoe all old available quantities for all shops of the group Else remove all available quantities for the current group |
public static | setProductDependsOnStock(int $idProduct, bool/int/bool $dependsOnStock=true, int/null $idShop=null, mixed $idProductAttribute) : bool For a given id_product, sets if stock available depends on stock |
public static | setProductOutOfStock(int $idProduct, bool/int $outOfStock=false, int $idShop=null, mixed $idProductAttribute) : bool For a given id_product, sets if product is available out of stocks |
public static | setQuantity(int $idProduct, int $idProductAttribute, mixed $quantity, int $idShop=null) : void For a given id_product and id_product_attribute sets the quantity available |
public static | synchronize(int $idProduct, mixed $orderIdShop=null) : void For a given id_product, synchronizes StockAvailable::quantity with Stock::usable_quantity |
public | update(bool $nullValues=false) : void Upgrades total_quantity_available after having update |
public static | updateQuantity(int $idProduct, int $idProductAttribute, int $deltaQuantity, int $idShop=null) : void For a given id_product and id_product_attribute updates the quantity available If $avoid_parent_pack_update is true, then packs containing the given product won't be updated |
public | updateWs() : void |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: SupplyOrderReceiptHistoryCore
Class SupplyOrderReceiptHistoryCore
Visibility | Function |
---|
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Interface: StockManagerInterface
StockManagerInterface : defines a way to manage stock
Visibility | Function |
---|---|
public | addProduct(int $idProduct, int $idProductAttribute, \Warehouse $warehouse, int $quantity, int $idStockMovementReason, float $priceTe, bool $isUsable=true, int $idSupplyOrder=null) : bool For a given product, adds a given quantity |
public | getProductCoverage(int $idProduct, int $idProductAttribute, int $coverage, int $idWarehouse=null) : int time For a given product, returns the time left before being out of stock. By default, for the given product, it will use sum(quantities removed in all warehouses) |
public | getProductPhysicalQuantities(int $idProduct, int $idProductAttribute, array/int $idsWarehouse=null, bool $usable=false) : int For a given product, returns its physical quantity If the given product has combinations and $id_product_attribute is null, returns the sum for all combinations |
public | getProductRealQuantities(int $idProduct, int $idProductAttribute, array/int $idsWarehouse=null, bool $usable=false) : int For a given product, returns its real quantity If the given product has combinations and $id_product_attribute is null, returns the sum for all combinations Real quantity : (physical_qty + supply_orders_qty - client_orders_qty) If $usable is defined, real quantity: usable_qty + supply_orders_qty - client_orders_qty |
public static | isAvailable() : \StockManagerInterface Checks if the StockManager is available |
public | removeProduct(int $idProduct, int/null $idProductAttribute, \Warehouse $warehouse, int $quantity, mixed $idStockMovementReason, bool $isUsable=true, int/null $idOrder=null, int $ignorePack, \Employee/null $employee=null, \Stock/null/\Stock $stock=null) : array - empty if an error occurred / details of removed products quantities with corresponding prices otherwise For a given product, removes a given quantity |
public | transferBetweenWarehouses(int $idProduct, int $idProductAttribute, int $quantity, int $warehouseFrom, int $warehouseTo, bool $usableFrom=true, bool $usableTo=true) : bool For a given product, transfers quantities between two warehouses By default, it manages usable quantities It is also possible to transfer a usable quantity from warehouse 1 in an unusable quantity to warehouse 2 It is also possible to transfer a usable quantity from warehouse 1 in an unusable quantity to warehouse 1 |
Class: QuickAccessCore
Class QuickAccessCore
Visibility | Function |
---|---|
public static | getQuickAccesses(mixed $idLang) : array QuickAccesses Get all available quick_accesses |
public | toggleNewWindow() : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ProductSupplierCore
Class ProductSupplierCore
Visibility | Function |
---|---|
public | delete() : bool |
public static | getIdByProductAndSupplier(int $idProduct, int $idProductAttribute, int $idSupplier) : array For a given product and supplier, gets corresponding ProductSupplier ID |
public static | getProductPrice(int $idSupplier, int $idProduct, int $idProductAttribute, bool $convertedPrice=false) : array keys: price_te, id_currency For a given Supplier, Product, returns the purchased price |
public static | getProductSupplierPrice(int $idProduct, int $idProductAttribute, int $idSupplier, bool $withCurrency=false) : array For a given product and supplier, gets the product supplier unit price |
public static | getProductSupplierReference(int $idProduct, int $idProductAttribute, int $idSupplier) : string For a given product and supplier, gets the product supplier reference |
public static | getSupplierCollection(int $idProduct, bool/int $groupBySupplier=true) : PrestaShopCollection Collection of ProductSupplier For a given product, retrieves its suppliers |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ManufacturerCore
Class ManufacturerCore
Visibility | Function |
---|---|
public | __construct(null $id=null, null $idLang=null) : void ManufacturerCore constructor. |
public | add(bool $autoDate=true, bool $nullValues=false) : bool Indicates whether saving succeeded |
public | delete() : bool |
public | deleteSelection(mixed $selection) : void Delete several objects from database return boolean Deletion result |
public | getAddresses(mixed $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getIdByName(mixed $name) : bool/int |
public | getLink() : string |
public static | getManufacturers(bool $getNbProducts=false, int $idLang, bool $active=true, bool/int $p=false, bool/int $n=false, bool $allGroup=false, bool $groupBy=false) : array Manufacturers Return manufacturers |
public static | getNameById(mixed $idManufacturer) : mixed |
public static | getProducts(mixed $idManufacturer, mixed $idLang, mixed $p, mixed $n, null $orderBy=null, null $orderWay=null, bool $getTotal=false, bool $active=true, bool $activeCategory=true, \Context/null/\Context $context=null) : array/bool |
public | getProductsLite(mixed $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getWsAddresses() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | manufacturerExists(int $idManufacturer) : bool Specify if a manufacturer already in base |
public | setWsAddresses(mixed $idAddresses) : bool |
public | update(null $nullValues=null) : bool Indicates whether updating succeeded |
protected | getManufacturerAddress() : bool/false/null/string |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ConfigurationTestCore
Class ConfigurationTestCore
Visibility | Function |
---|---|
public static | check(array $tests) : array results of tests run all test defined in $tests |
public static | getDefaultTests() : array getDefaultTests return an array of tests to executes. key are method name, value are parameters (false for no parameter) all path are PS_ROOT_DIR related |
public static | getDefaultTestsOp() : array getDefaultTestsOp return an array of tests to executes. key are method name, value are parameters (false for no parameter) |
public static | run(string $ptr, int $arg) : string |
public static | testAdminDir(string $dir) : bool |
public static | testBcmath() : bool |
public static | testCacheDir(string $dir) : bool |
public static | testCacheV2Dir(string $dir) : bool |
public static | testConfigDir(string $dir) : bool |
public static | testCustomizableProductsDir(string $dir) : bool |
public static | testDir(string $dir, bool $recursive=false, null $fullReport=null, bool $absolute=false) : bool |
public static | testDom() : bool |
public static | testDownloadDir(string $dir) : bool |
public static | testFile(string $fileRelative) : bool |
public static | testFiles(bool $full=false) : array/bool |
public static | testFopen() : string |
public static | testGd() : bool |
public static | testGz() : bool |
public static | testImgDir(string $dir) : bool |
public static | testJson() : bool |
public static | testLogDir(string $dir) : bool |
public static | testMagicQuotes() : bool |
public static | testMailsDir(string $dir) : bool |
public static | testMaxExecutionTime() : bool |
public static | testMbstring() : bool |
public static | DEPRECATED - since PHP 7.1 |
public static | testModuleDir(string $dir) : bool |
public static | testMysqlSupport() : bool |
public static | testNewPhpVersion() : mixed |
public static | testPdoMysql() : bool |
public static | testPhpVersion() : mixed |
public static | testRegisterGlobals() : bool |
public static | testRootDir(string $dir) : bool |
public static | testSessions() : bool |
public static | testSitemap(string $dir) : bool |
public static | testSystem(array $funcs) : bool |
public static | testThemeCacheDir(string $dir) : bool |
public static | testThemeLangDir(string $dir) : bool |
public static | testThemePdfLangDir(string $dir) : bool |
public static | testTlsv12() : bool |
public static | testToolsV2Dir(string $dir) : bool |
public static | testTranslationsDir(string $dir) : bool |
public static | testUpload() : string |
public static | testVirtualProductsDir(mixed $dir) : bool |
public static | testXml() : bool |
public static | testZip() : bool |
Class: CombinationCore
Class CombinationCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | delete() : bool |
public | deleteAssociations() : bool |
public | deleteFromSupplier(mixed $idProduct) : bool |
public | getAttributesName(mixed $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getColorsAttributes() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getIdByReference(int $idProduct, string $reference) : int id For a given product_attribute reference, returns the corresponding id |
public static | getPrice(int $idProductAttribute) : float mixed Retrive the price of combination |
public | getWsImages() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getWsProductOptionValues() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | isCurrentlyUsed(mixed $table=null, bool/mixed $hasActiveColumn=false) : bool This method is allow to know if a Combination entity is currently used |
public static | isFeatureActive() : bool This method is allow to know if a feature is active |
public | setAttributes(mixed $idsAttribute) : bool |
public | setImages(mixed $idsImage) : bool |
public | setWsImages(mixed $values) : bool |
public | setWsProductOptionValues(mixed $values) : bool |
public | update(bool $nullValues=false) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CMSRoleCore
Class CMSRoleCore
Visibility | Function |
---|---|
public static | getRepositoryClassName() : string |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CSVCore
Simple class to output CSV data Uses CollectionCore
Visibility | Function |
---|---|
public | __construct(array/\Iterator $collection, string $filename, string $delimiter=';' ) : voidLoads objects, filename and optionnaly a delimiter. |
public | export() : void Main function Adds headers Outputs |
public | headers() : void Adds headers |
public | output(mixed $data) : void Wraps data and echoes Uses defined delimiter |
public static | wrap(string $data) : string $data Escapes data |
Class: SupplierCore
Class SupplierCore
Visibility | Function |
---|---|
public | __construct(null $id=null, null $idLang=null) : void SupplierCore constructor. |
public | add(bool $autoDate=true, bool $nullValues=false) : bool Indicates whether adding succeeded |
public | delete() : void |
public static | getIdByName(mixed $name) : bool/int |
public | getLink() : string |
public static | getNameById(int $idSupplier) : mixed |
public static | getProductInformationsBySupplier(int $idSupplier, int $idProduct, int $idProductAttribute) : array Gets product informations |
public static | getProducts(mixed $idSupplier, mixed $idLang, mixed $p, mixed $n, null $orderBy=null, null $orderWay=null, bool $getTotal=false, bool $active=true, bool $activeCategory=true) : array/bool |
public | getProductsLite(int $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getSuppliers(bool $getNbProducts=false, int $idLang, bool $active=true, bool $p=false, bool $n=false, bool $allGroups=false) : array Suppliers Return suppliers |
public static | supplierExists(int $idSupplier) : bool |
public | update(null $nullValues=null) : bool Indicates whether updating succeeded |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: MailCore
Class MailCore
Visibility | Function |
---|---|
public static | Send(int $idLang, string $template, string $subject, string $templateVars, string $to, string $toName=null, string $from=null, string $fromName=null, array $fileAttachment=null, mixed $modeSmtp=null, string $templatePath='/home/michael/PhpstormProjects/tb/mails/' , bool $die=false, int $idShop=null, string $bcc=null, string $replyTo=null) : bool/int Whether sending was successful. If not at all, false, otherwise amount of recipients succeeded.Send Email |
public static | eraseAllLogs() : bool |
public static | eraseLog(int $idMail) : bool Whether removal succeeded |
public static | isMultibyte(string $data) : bool Whether the string uses a multibyte character set Check if a multibyte character set is used for the data |
public static | l(string $string, mixed $idLang=null, \Context $context=null) : mixed This method is used to get the translation for email Object. For an object is forbidden to use htmlentities, we have to return a sentence with accents. |
public static | mimeEncode(string $string, string $charset='UTF-8' , string $newline=`' |
'`) : mixed/string MIME encoded string MIME encode the string |
|
public static | sendMailTest(bool $smtpChecked, string $smtpServer, string $content, string $subject, bool $type, string $to, string $from, string $smtpLogin, string $smtpPassword, int $smtpPort=25, bool/string $smtpEncryption) : bool/string True if succeeded, otherwise the error message Send a test email |
protected static | generateId(null $idstring=null) : string |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CustomizationCore
Class CustomizationCore
Visibility | Function |
---|---|
public static | countCustomizationQuantityByProduct(mixed $customizations) : array |
public static | countQuantityByCart(int $idCart) : array |
public static | getLabel(mixed $id_customization, mixed $idLang, null $idShop=null) : bool/false/null/string |
public static | getOrderedCustomizations(int $idCart) : array/bool |
public static | getReturnedCustomizations(int $idOrder) : array/bool |
public | getWsCustomizedDataImages() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getWsCustomizedDataTextFields() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | isCurrentlyUsed(mixed $table=null, bool/mixed $hasActiveColumn=false) : bool This method is allow to know if a Customization entity is currently used |
public static | isFeatureActive() : bool This method is allow to know if a feature is used or active |
public static | retrieveQuantitiesFromIds(array $idsCustomizations) : array |
public | setWsCustomizedDataTextFields(mixed $values) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ContactCore
Class ContactCore
Visibility | Function |
---|---|
public static | getCategoriesContacts() : array Contacts Return available categories contacts |
public static | getContacts(int $idLang) : array Contacts Return available contacts |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: AttachmentCore
Class AttachmentCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | attachProduct(int $idProduct) : bool true if succed associate $id_product to the current object. |
public static | attachToProduct(mixed $idProduct, mixed $array) : bool Associate an array of id_attachment $array to the product $id_product and remove eventual previous association |
public | delete() : bool |
public static | deleteProductAttachments(mixed $idProduct) : bool Unassociate $id_product from the current object |
public | deleteSelection(array $attachments) : bool/int |
public static | getAttachments(mixed $idLang, mixed $idProduct, bool $include=true) : mixed |
public static | getProductAttached(mixed $idLang, mixed $list) : array/bool |
public | update(bool $nullValues=false) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CompareProductCore
Class CompareProductCore
Visibility | Function |
---|---|
public static | addCompareProduct(mixed $idCompare, mixed $idProduct) : bool Add a compare product for the customer |
public static | cleanCompareProducts(string $period=null) : void Clean entries which are older than the period |
public static | getCompareProducts(mixed $idCompare) : array Get all compare products of the customer |
public static | getIdCompareByIdCustomer(int $idCustomer) : int $id_compare Get the id_compare by id_customer |
public static | getNumberProducts(int $idCompare) : int Get the number of compare products of the customer |
public static | removeCompareProduct(int $idCompare, int $idProduct) : bool Remove a compare product for the customer |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: LanguageCore
Class LanguageCore
Visibility | Function |
---|---|
public | __construct(int/null $id=null, int/null $idLang=null) : void LanguageCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false, bool $onlyAdd=false) : bool |
public static | checkAndAddLanguage(string $isoCode, bool $langPack=false, bool $onlyAdd=false, null $paramsLang=null) : bool |
public | checkFiles() : bool |
public static | checkFilesWithIsoCode(mixed $isoCode) : bool true if all files exists This functions checks if every files exists for the language $iso_code. Concerned files are those located in translations/$iso_code/ and translations/mails/$iso_code . |
public static | copyLanguageData(string $from, string $to) : bool |
public static | countActiveLanguages(null $idShop=null) : mixed |
public | delete() : bool |
public | deleteSelection(array $selection) : bool |
public static | downloadAndInstallLanguagePack(mixed $iso, null $version=null, null $params=null, bool $install=true) : array/bool |
public | getFields() : array |
public static | getFilesList(mixed $isoFrom, mixed $themeFrom, bool $isoTo=false, bool $themeTo=false, bool $select=false, bool $check=false, bool $modules=false) : array |
public static | getIDs(bool $active=true, bool/int/bool $idShop=false) : array Returns an array of language IDs |
public static | getIdByIso(string $isoCode, bool $noCache=false) : false/null/string Return id from iso code |
public static | getIsoById(int $idLang) : string Iso code Return iso code from id |
public static | getIsoIds(bool $active=true) : array Language (id_lang, iso_code) Return array (id_lang, iso_code) |
public static | getLanguage(mixed $idLang) : bool |
public static | getLanguageByIETFCode(string $code) : bool/\Language |
public static | getLanguageCodeByIso(string $isoCode) : false/null/string |
public static | getLanguagePackListContent(mixed $iso, mixed $tar) : mixed |
public static | getLanguages(bool $active=true, bool/int/bool $idShop=false, bool $idsOnly=false) : array Languages Returns available languages |
public static | isInstalled(mixed $iso_code) : bool/mixed |
public static | isMultiLanguageActivated(mixed $idShop=null) : bool Check if more on than one language is activated |
public static | loadLanguages() : mixed Load all languages in memory for caching |
public | loadUpdateSQL() : bool true if succeed loadUpdateSQL will create default lang values when you create a new lang, based on default id lang |
public | moveToIso(mixed $newIso) : void Move translations files after editing language iso code |
public static | recurseDeleteDir(mixed $dir) : bool |
public static | updateModulesTranslations(array $modulesList) : void |
protected static | _copyNoneFlag(mixed $id) : bool |
protected | _generateFiles(mixed $newIso=null) : void Generate translations files |
protected | DEPRECATED - 1.0.0 |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: NotificationCore
Class NotificationCore
Visibility | Function |
---|---|
public | __construct() : void NotificationCore constructor. |
public | getLastElements() : array containing the notifications getLastElements return all the notifications (new order, new customer registration, and new customer message) Get all the notifications |
public static | getLastElementsIdsByType(string $type, int $idLastElement) : array containing the notifications getLastElementsIdsByType return all the element ids to show (order, customer registration, and customer message) Get all the element ids |
public | updateEmployeeLastElement(string $type) : bool if type exists or not updateEmployeeLastElement return 0 if the field doesn't exists in Employee table. Updates the last seen element by the employee |
Class: ProductDownloadCore
Class ProductDownloadCore
Visibility | Function |
---|---|
public | __construct(int $idProductDownload=null) : void Build a virtual product |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | checkFile() : bool Check if file exists |
public static | checkWritableDir() : bool Check if download repository is writable |
public | delete(bool $deleteFile=false) : bool |
public | deleteFile(int $idProductDownload=null) : bool Delete the file |
public | getDeadline() : string Datetime in SQL format Return a deadline |
public | getFields() : array |
public static | getFilenameFromFilename(string $filename) : string Filename the display filename for this virtual product Return the display filename from a physical filename |
public static | getFilenameFromIdProduct(int $idProduct) : string Filename the filename for this virtual product Return the filename from an id_product |
public | getHash() : string Hash ready to insert in database Return a hash for control download access |
public | getHtmlLink(bool/string $class=false, bool $admin=true, bool $hash=false) : string Html all the code for print a link to the file Return html link |
public static | getIdFromFilename(string $filename) : int Product the id for this virtual product Return the display filename from a physical filename |
public static | getIdFromIdProduct(int $idProduct, bool $active=true) : int Product the id for this virtual product Return the id_product_download from an id_product |
public static | getNewFilename() : string Sha1 unique filename Return a sha1 filename |
public | getTextLink(bool $admin=true, bool/string $hash=false) : string Html all the code for print a link to the file Return html link |
public static | isFeatureActive() : bool This method is allow to know if a feature is used or active |
public | update(bool $nullValues=false) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: FeatureCore
Class FeatureCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | addFeatureImport(mixed $name, bool $position=false) : void Create a feature from import |
public static | cleanPositions() : bool $return Reorder feature position Call it after deleting a feature. |
public | delete() : bool |
public | deleteSelection(array $selection) : bool Deletion result Delete several objects from database |
public static | getFeature(int $idLang, int $idFeature) : array Array with feature's data Get a feature data for a given id_feature and id_lang |
public static | getFeatures(int $idLang, bool $withShop=true) : array Multiple arrays with feature's data Get all features for a given language |
public static | getFeaturesForComparison(mixed $listIdsProduct, mixed $idLang) : array/bool/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getHigherPosition() : int $position getHigherPosition Get the higher feature position |
public static | isFeatureActive() : bool This metohd is allow to know if a feature is used or active= |
public static | nbFeatures(int $idLang) : int Number of feature Count number of features for a given language |
public | update(bool $nullValues=false) : bool/int |
public | updatePosition(bool $way, int $position, mixed $idFeature=null) : bool Update result Move a feature |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderHistoryCore
2007-2016 PrestaShop thirty bees is an extension to the PrestaShop e-commerce software developed by PrestaShop SA Copyright (C) 2017 thirty bees NOTICE OF LICENSE This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately. DISCLAIMER Do not edit or add to this file if you wish to upgrade PrestaShop to newer versions in the future. If you wish to customize PrestaShop for your needs please refer to https://www.thirtybees.com for more information.
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | addWithemail(bool $autodate=true, bool/array $templateVars=false, \Context $context=null) : void |
public | addWs() : bool Add method for webservice create resource Order History If sendemail=1 GET parameter is present sends email to customer otherwise does not |
public | changeIdOrderState(mixed $newOrderState, mixed $idOrder, bool $useExistingPayment=false) : void Sets the new state of the given order |
public static | DEPRECATED - 2.0.0 |
public | isValidated() : false/null/string |
public | sendEmail(mixed $order, bool $templateVars=false) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderMessageCore
Class OrderMessageCore
Visibility | Function |
---|---|
public static | getOrderMessages(mixed $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderStateCore
Class OrderStateCore
Visibility | Function |
---|---|
public static | getOrderStates(int $idLang) : array Order statuses Get all available order statuses |
public static | invoiceAvailable(int $idOrderState) : bool availability Check if we can make a invoice when order is in this state |
public | isRemovable() : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderCore
Class OrderCore
Visibility | Function |
---|---|
public | __construct(null $id=null, null $idLang=null) : void OrderCore constructor. |
public | add(bool $autodate=true, bool $nullValues=true) : bool |
public | addCartRule(int $idCartRule, string $name, array $values, int $idOrderInvoice, mixed $freeShipping=null) : bool |
public | DEPRECATED - 2.0.0 |
public | addOrderPayment(float $amountPaid, string $paymentMethod=null, string $paymentTransactionId=null, \Currency $currency=null, string $date=null, \OrderInvoice $orderInvoice=null) : bool This method allows to add a payment to the current order |
public | addWs(bool $autodate=true, bool $nullValues=false) : bool |
public | deleteAssociations() : bool |
public | deleteCustomization(mixed $idCustomization, mixed $quantity, mixed $orderDetail) : bool |
public | deleteProduct(mixed/\Order $order, \OrderDetail $orderDetail, int $quantity) : bool Does NOT delete a product but "cancel" it (which means return/refund/delete it depending of the case) |
public static | generateReference() : String Gennerate a unique reference for orders generated with the same cart id This references, is usefull for check payment |
public | getBrother() : mixed Get all other orders with the same reference |
public static | getByDelivery(mixed $idDelivery) : \Order |
public static | getByReference(string $reference) : PrestaShopCollection Collection of Order Get a collection of orders using reference |
public static | getCartIdStatic(int $idOrder, int $idCustomer) : int |
public | getCartProducts() : array This function return products of the orders It's similar to Order::getProducts but with similar outputs of Cart::getProducts |
public | getCartRules() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getCurrentOrderState() : OrderState or null if Order haven't a state |
public | getCurrentState() : int Order status id Get current order status (eg. Awaiting payment, Delivered...) |
public | getCurrentStateFull(mixed $idLang) : array Order status details Get current order status name (eg. Awaiting payment, Delivered...) |
public | getCustomer() : Customer $customer Get order customer |
public static | getCustomerNbOrders(int $idCustomer) : int Customer orders number Get customer orders number |
public static | getCustomerOrders(int $idCustomer, bool $showHiddenStatus=false, \Context $context=null) : array Customer orders Get customer orders |
public | getDeliveryNumber(mixed $orderInvoiceId) : bool/false/null/string |
public | getDeliverySlipsCollection() : PrestaShopCollection Collection of OrderInvoice Get all delivery slips for the current order |
public | DEPRECATED - 2.0.0 |
public static | getDiscountsCustomer(int $idCustomer, int $idCartRule) : int/null |
public | getDocuments() : array Returns the correct product taxes breakdown. Get all documents linked to the current order |
public | getEcoTaxTaxesBreakdown() : array Returns the ecotax taxes breakdown |
public | getFields() : array |
public | getFirstMessage() : false/null/string |
public | getHistory(int $idLang, bool/int $idOrderState=false, bool/int $noHidden=false, int $filters) : array History entries ordered by date DESC Get order history |
public | getIdOrderCarrier() : mixed Return id of carrier Get id of the carrier used in order |
public static | getIdOrderProduct(mixed $idCustomer, mixed $idProduct) : int |
public static | getInvoice(int $idInvoice) : array/bool/null/object |
public | getInvoiceNumber(mixed $order_invoice_id) : mixed |
public | getInvoicesCollection() : PrestaShopCollection Collection of OrderInvoice Get all invoices for the current order |
public static | getLastInvoiceNumber() : false/null/string |
public | getNextOrderId() : int This method return the ID of the next order |
public | getNotPaidInvoicesCollection() : PrestaShopCollection Collection of Order invoice not paid Get all not paid invoices for the current order |
public | getNumberOfDays() : bool |
public static | getOrderByCartId(int $idCart) : array Order details Get an order by its cart id |
public | getOrderDetailList() : array Get the an order detail list of the current order |
public | getOrderDetailTaxes() : mixed |
public static | DEPRECATED - 2.0.0 |
public | getOrderInvoiceIdIfHasDelivery() : int Get order invoice id if has delivery return id_order_invoice if this order has already a delivery slip |
public | getOrderPaymentCollection() : PrestaShopCollection Collection of OrderPayment This method allows to get all Order Payment for the current order |
public | getOrderPayments() : mixed Get a collection of order payments |
public | getOrderSlipsCollection() : PrestaShopCollection Collection of OrderSlip Get all order_slips for the current order |
public static | getOrdersIdByDate(string $dateFrom, string $dateTo, null $idCustomer=null, null $type=null) : array |
public static | DEPRECATED - 2.0.0 |
public | getOrdersTotalPaid() : float Get the sum of total_paid_tax_incl of the orders with similar reference |
public static | getOrdersWithInformations(null $limit=null, \Context/null/\Context $context=null) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getPreviousOrderId() : int This method return the ID of the previous order |
public | getProductTaxesBreakdown() : array Returns the correct product taxes breakdown. |
public | getProductTaxesDetails(bool/mixed $limitToOrderDetails=false) : array A list of tax rows applied to the given OrderDetails (or all OrderDetails linked to the current Order). By default this function was made for invoice, to compute tax amounts and balance delta (because of computation made on round values). If you provide $limitToOrderDetails, only these item will be taken into account. This option is usefull for order slip for example, where only sublist of the order is refunded. |
public | getProducts(bool $products=false, bool $selectedProducts=false, bool $selectedQty=false) : array Products with price, quantity (with taxe and without) Get order products |
public | getProductsDetail() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getReturn() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getShipping() : array return all shipping method for the current order state_name sql var is now deprecated - use order_state_name for the state name and carrier_name for the carrier_name |
public | getShippingTaxesBreakdown() : array Returns the shipping taxes breakdown |
public | getTaxCalculationMethod() : int |
public | getTaxesAverageUsed() : float/int |
public | getTotalPaid(\Currency $currency=null) : float amount in the $currency Get total paid |
public | getTotalProductsWithTaxes(bool $products=false) : Product total with taxes Get product total with taxes |
public | getTotalProductsWithoutTaxes(bool $products=false) : Product total without taxes Get product total without taxes |
public | getTotalWeight() : mixed |
public | getUniqReference() : mixed Return a unique reference like : GWJTHMZUN#2 With multishipping, order reference are the same for all orders made with the same cart in this case this method suffix the order reference by a # and the order number |
public static | getUniqReferenceOf(mixed $id_order) : mixed Return a unique reference like : GWJTHMZUN#2 With multishipping, order reference are the same for all orders made with the same cart in this case this method suffix the order reference by a # and the order number |
public | getVirtualProducts() : int number of virtual products Count virtual products in order |
public | getWarehouseList() : mixed Get warehouse associated to the order return array List of warehouse |
public | getWebserviceObjectList(mixed $sqlJoin, mixed $sqlFilter, mixed $sqlSort, mixed $sqlLimit) : mixed |
public | getWrappingTaxesBreakdown() : array Returns the wrapping taxes breakdown |
public | DEPRECATED - 2.0.0 |
public | getWsOrderRows() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getWsShippingNumber() : int/string |
public | hasBeenDelivered() : int |
public | hasBeenPaid() : int |
public | hasBeenShipped() : int |
public | hasDelivery() : bool Has Delivery return true if this order has already a delivery slip |
public | hasInvoice() : bool Has invoice return true if this order has already an invoice |
public | hasProductReturned() : bool Has products returned by the merchant or by the customer? |
public | isAssociatedAtGuest(string $email) : bool |
public | isInPreparation() : int |
public | isPaidAndShipped() : bool Checks if the current order status is paid and shipped |
public | isReturnable() : bool Can this order be returned by the client? |
public | isVirtual(bool $strict=true) : bool true if is a virtual order or false Check if order contains (only) virtual products |
public | orderContainProduct(mixed $id_product) : void |
public | setCurrentState(int $idOrderState, int $idEmployee) : void Set current order status |
public | setDelivery() : void |
public | setDeliveryNumber(mixed $orderInvoiceId, mixed $idShop) : bool |
public | setDeliverySlip() : void This method allows to generate first delivery slip of the current order |
public | setInvoice(bool $useExistingPayment=false) : void This method allows to generate first invoice of the current order |
public static | setLastInvoiceNumber(mixed $orderInvoiceId, mixed $idShop) : void |
public | DEPRECATED - 2.0.0 |
public | setWsCurrentState(mixed $state) : bool |
public | setWsShippingNumber(mixed $shippingNumber) : bool |
public static | sortDocuments(mixed $a, mixed $b) : void |
public | updateOrderDetailTax() : void The primary purpose of this method is to be called at the end of the generation of each order in PaymentModule::validateOrder, to fill in the order_detail_tax table with taxes that will add up in such a way that the sum of the tax amounts in the product tax breakdown is equal to the difference between products with tax and products without tax. |
public | updateShippingCost(float $amount) : bool This method allows to change the shipping cost of the current order |
public | useOneAfterAnotherTaxComputationMethod() : bool This method returns true if at least one order details uses the One After Another tax computation method. |
protected | _deleteProduct(\OrderDetail $orderDetail, int $quantity) : bool DOES delete the product |
protected | setInvoiceDetails(mixed $orderInvoice) : void This method allows to fulfill the object order_invoice with sales figures |
protected | setProductCurrentStock(mixed $product) : void This method allow to add stock information on a product detail If advanced stock management is active, get physical stock of this product in the warehouse associated to the ptoduct for the current order Else get the available quantity of the product in fucntion of the shop associated to the order |
protected | setProductCustomizedDatas(mixed $product, mixed $customizedDatas) : void |
protected | setProductImageInformations(mixed $product) : void This method allow to add image information on a product detail |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderCartRuleCore
Class OrderCartRuleCore
Visibility | Function |
---|
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderReturnCore
Class OrderReturnCore
Visibility | Function |
---|---|
public | addReturnDetail(mixed $orderDetailList, mixed $productQtyList, mixed $customizationIds, mixed $customizationQtyInput) : void |
public static | addReturnedQuantity(array $products, int $idOrder) : void Add returned quantity to products list |
public | checkEnoughProduct(mixed $orderDetailList, mixed $productQtyList, mixed $customizationIds, mixed $customizationQtyInput) : bool |
public | countProduct() : bool/int |
public static | deleteOrderReturnDetail(mixed $idOrderReturn, mixed $idOrderDetail, int $idCustomization) : bool |
public static | getOrdersReturn(mixed $customerId, bool $orderId=false, bool $noDenied=false, \Context/null/\Context $context=null) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getOrdersReturnDetail(mixed $id_order_return) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getOrdersReturnProducts(int $orderReturnId, \Order $order) : array |
public static | getProductReturnDetail(mixed $idOrderDetail) : mixed Get return details for one product line |
public static | getReturnedCustomizedProducts(mixed $idOrder) : array/bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderSlipCore
Class OrderSlipCore
Visibility | Function |
---|---|
public | addPartialSlipDetail(mixed $orderDetailList) : void |
public | addSlipDetail(mixed $orderDetailList, mixed $productQtyList) : void |
public static | create(\Order $order, mixed $productList, bool $shippingCost=false, int $amount, bool $amountChoosen=false, bool $addTax=true) : bool |
public static | DEPRECATED - 1.0.0 use OrderSlip::create() instead |
public static | createPartialOrderSlip(mixed $order, mixed $amount, mixed $shippingCostAmount, mixed $orderDetailList) : bool |
public | getEcoTaxTaxesBreakdown() : array |
public static | getOrdersSlip(mixed $customerId, bool $orderId=false) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getOrdersSlipDetail(bool $idOrderSlip=false, bool $idOrderDetail=false) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getOrdersSlipProducts(int $orderSlipId, \Order $order) : array |
public static | getProductSlipDetail(mixed $idOrderDetail) : mixed Get refund details for one product line |
public static | getProductSlipResume(mixed $idOrderDetail) : mixed Get resume of all refund for one product line |
public | getProducts() : array |
public static | getSlipsIdByDate(mixed $dateFrom, mixed $dateTo) : array |
public | getWsOrderSlipDetails() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | setWsOrderSlipDetails(mixed $values) : bool |
protected | addProductOrderSlip(mixed $product) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderPaymentCore
Class OrderPaymentCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public static | getByInvoiceId(int $idInvoice) : PrestaShopCollection Collection of OrderPayment Get Order Payments By Invoice ID |
public static | DEPRECATED - 2.0.0 |
public static | getByOrderReference(int $orderReference) : array Get the detailed payment of an order |
public | getOrderInvoice(int $idOrder) : mixed Return order invoice object linked to the payment |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderDetailCore
Class OrderDetailCore
Visibility | Function |
---|---|
public | __construct(null $id=null, null $idLang=null, null $context=null) : void OrderDetailCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | createList(object/\Order $order, object/\Cart $cart, mixed $idOrderState, mixed $productList, int $idOrderInvoice, bool $useTaxes=true, mixed $idWarehouse) : mixed Create a list of order detail for a specified id_order using cart |
public | delete() : bool |
public static | getCrossSells(mixed $id_product, mixed $id_lang, int $limit=12) : array/void |
public static | getDownloadFromHash(mixed $hash) : array/bool/null/object |
public static | getList(int $idOrder) : array Get a detailed order list of an id_order |
public | getStockState() : array Get the state of the current stock product |
public | getTaxCalculator() : \TaxCalculator Returns the tax calculator associated to this order detail. |
public static | getTaxCalculatorStatic(int $idOrderDetail) : \TaxCalculator Return the tax calculator associated to this order_detail |
public | getTaxList() : mixed |
public static | getTaxListStatic(mixed $idOrderDetail) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getWholeSalePrice() : float |
public | getWsTaxes() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | incrementDownload(mixed $idOrderDetail, int $increment=1) : bool |
public | DEPRECATED - 2.0.0 |
public | setShippingCost(\Order $order, mixed $product) : void Set the additional shipping information |
public | updateTaxAmount(\Order $order) : bool |
protected | checkProductStock(array $product, int $idOrderState) : void Check the order status |
protected | create(object/\Order $order, object/\Cart $cart, array $product, mixed $idOrderState, int $idOrderInvoice, bool $useTaxes=true, mixed $idWarehouse) : mixed Create an order detail liable to an id_order |
protected | setContext(mixed $id_shop) : void |
protected | setDetailProductPrice(object/\Order $order, object/\Cart $cart, array $product) : void Set detailed product price to the order detail |
protected | setProductTax(object/\Order $order, array $product) : void Apply tax to the product |
protected | setSpecificPrice(object/\Order $order, mixed $product=null) : void Set specific price of the product |
protected | setVirtualProductInformation(mixed $product) : void |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderReturnStateCore
Class OrderReturnStateCore
Visibility | Function |
---|---|
public static | getOrderReturnStates(int $idLang) : array Order statuses Get all available order statuses |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderCarrierCore
Class OrderCarrierCore
Visibility | Function |
---|
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: OrderInvoiceCore
Class OrderInvoiceCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | displayTaxBasesInProductTaxesBreakdown() : bool |
public static | fixAllShopAddresses() : void This method is used to fix shop addresses that cannot be fixed during upgrade process (because uses the whole environnement of PS classes that is not available during upgrade). This method should execute once on an upgraded PrestaShop to fix all OrderInvoices in one shot. This method is triggered once during a (non bulk) creation of a PDF from an OrderInvoice that is not fixed yet. |
public static | getByDateInterval(mixed $dateFrom, mixed $dateTo) : array collection of OrderInvoice Returns all the order invoice that match the date interval |
public static | getByDeliveryDateInterval(mixed $dateFrom, mixed $dateTo) : array collection of invoice |
public static | getByStatus(mixed $idOrderState) : array collection of OrderInvoice |
public static | getCarrier(mixed $idOrderInvoice) : mixed |
public static | getCarrierId(mixed $idOrderInvoice) : mixed |
public static | getCurrentFormattedShopAddress(null $idShop=null) : string |
public | getEcoTaxTaxesBreakdown() : array Returns the ecotax taxes breakdown |
public | getGlobalRestPaid() : mixed Get global rest to paid This method will return something different of the method getRestPaid if there is an other invoice linked to the payments of the current invoice |
public static | getInvoiceByNumber(mixed $id_invoice) : bool/\OrderInvoice |
public | getInvoiceNumberFormatted(int $idLang, mixed $idShop=null) : string Get the formatted number of invoice |
public | getOrder() : \Order |
public | getOrderPaymentCollection() : PrestaShopCollection Collection of Order payment |
public | getProductTaxesBreakdown(null $order=null) : array |
public | getProducts(bool $products=false, bool $selectedProducts=false, bool $selectedQty=false) : array Products with price, quantity (with taxe and without) Get order products |
public | getProductsDetail() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getRestPaid() : float Rest Paid Rest Paid |
public | getShippingTaxesBreakdown(\Order $order) : array Returns the shipping taxes breakdown |
public | getSibling() : \PrestaShopCollection/array Collection of OrderInvoice or empty array Return collection of order invoice object linked to the payments of the current order invoice object |
public | getSiblingTotal(int $mod=1) : mixed Return total to paid of sibling invoices |
public | getTotalPaid() : float Total paid Amounts of payments |
public | getWrappingTaxesBreakdown() : array Returns the wrapping taxes breakdown |
public | isPaid() : bool Is paid ? |
public static | retrieveOneById(int $id) : \OrderInvoice |
public | saveCarrierTaxCalculator(array $taxesAmount) : bool |
public | saveWrappingTaxCalculator(array $taxesAmount) : bool |
public | useOneAfterAnotherTaxComputationMethod() : bool This method returns true if at least one order details uses the One After Another tax computation method. |
protected | setProductCurrentStock(mixed $product) : void This method allow to add stock information on a product detail |
protected | setProductCustomizedDatas(mixed $product, mixed $customized_datas) : void |
protected | setProductImageInformations(mixed $product) : void This method allow to add image information on a product detail |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ProductCore
Class ProductCore
Visibility | Function |
---|---|
public | __construct(null $idProduct=null, bool $full=false, null $idLang=null, null $idShop=null, \Context/null/\Context $context=null) : void ProductCore constructor. |
public static | _getAttributeImageAssociations(int $idProductAttribute) : array Get product attribute image associations |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | addAttribute(float $price, float $weight, float $unitImpact, float $ecotax, int $idImages, string $reference, string $ean13, bool $default, string $location=null, null $upc=null, int $minimalQuantity=1, array $idShopList=array(), null $availableDate=null) : mixed $id_product_attribute or false Add a product attribute |
public | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | addCombinationEntity(mixed $wholesalePrice, mixed $price, mixed $weight, mixed $unitImpact, mixed $ecotax, int $quantity, mixed $idImages, mixed $reference, mixed $idSupplier, mixed $ean13, mixed $default, null $location=null, null $upc=null, int $minimalQuantity=1, array $idShopList=array(), null $availableDate=null) : bool/mixed |
public static | addCustomizationPrice(array $products, array $customizedDatas) : void |
public static | addFeatureProductImport(int $idProduct, int $idFeature, int $idFeatureValue) : bool |
public | addFeaturesCustomToDB(int $idValue, int $idLang, string $cust) : bool Add new feature to product |
public | addFeaturesToDB(int $idFeature, int $idValue, int $cust) : int/string |
public | DEPRECATED - since 1.5.0 |
public | addProductAttributeMultiple(array $attributes, bool $setDefault=true) : array |
public | DEPRECATED - since 1.5.0 |
public | addSupplierReference(int $idSupplier, int $idProductAttribute, string $supplierReference=null, float $price=null, int $idCurrency=null) : void Sets or updates Supplier Reference |
public | addToCategories(array/mixed $categories=array()) : bool true if succeed addToCategories add this product to the category/ies if not exists. |
public | addWs(bool $autodate=true, bool $nullValues=false) : bool |
public static | cacheFrontFeatures(array $productIds, int $idLang) : void |
public static | cacheProductsFeatures(array $productIds) : void |
public | changeAccessories(array $accessoriesId) : void Link accessories with product |
public | checkAccess(mixed $idCustomer) : mixed |
public static | checkAccessStatic(mixed $idProduct, mixed $idCustomer) : bool/null |
public | checkDefaultAttributes() : bool Check if there is no default attribute and create it if not |
public | checkQty(int $qty) : bool True if product is available with this quantity Check product availability |
public static | cleanPositions(int $idCategory, int $position) : bool Reorder product position in category $id_category. Call it after deleting a product from a category. |
public static | convertAndFormatPrice(float $price, bool $currency=false, \Context/null/\Context $context=null) : string |
public static | convertPrice(array $params, \Smarty $smarty) : string Price with right format and currency Display price with right format and currency |
public static | convertPriceWithCurrency(array $params, \Smarty $smarty) : string Convert price with currency |
public | createLabels(int $uploadableFiles, int $textFields) : bool |
public static | defineProductImage(array $row, int $idLang) : string |
public | delete() : bool |
public | deleteAccessories() : mixed Deletion result Delete product accessories |
public | deleteAttachments(bool $updateAttachmentCache=true) : array Deletion result Delete product attachments |
public | DEPRECATED - 1.0.0 |
public | deleteAttributeCombination(int $idProductAttribute) : array Deletion result Delete a product attributes combination |
public | deleteAttributesImpacts() : bool Delete product attributes impacts |
public | deleteCartProducts() : array Deletion result Delete product from cart |
public | deleteCategories(bool $cleanPositions=false) : array Deletion result Delete all association to category where product is indexed |
public | deleteCategory(mixed $idCategory, bool/mixed $cleanPositions=true) : bool deleteCategory delete this product from the category $id_category |
public | deleteCustomization() : array Deletion result Delete product customizations |
public | deleteDefaultAttributes() : bool Del all default attributes for product |
public | deleteDownload() : bool Remove all downloadable files for product and its attributes |
public | deleteFeatures() : void Delete features |
public | deleteFromAccessories() : mixed Deletion result Delete product from other products accessories |
public | deleteFromCartRules() : bool |
public | deleteFromSupplier() : bool |
public | deleteImages() : bool success Delete product images from database |
public | deletePack() : array Deletion result Delete product pack details |
public | deleteProductAttributes() : array Deletion result Delete product attributes |
public | deleteProductFeatures() : array Deletion result Delete product features |
public | deleteProductSale() : array Deletion result Delete product sales |
public | deleteSceneProducts() : array Deletion result Delete product in its scenes |
public | deleteSearchIndexes() : array Deletion result Delete product indexed words |
public | deleteSelection(array $products) : bool/int |
public | deleteTags() : array Deletion result Delete products tags entries |
public | deleteWsTags() : array Deletion result Delete products tags entries without delete tags for webservice usage |
public static | displayWtPrice(array $params, \Smarty $smarty) : string |
public static | displayWtPriceWithCurrency(array $params, \Smarty $smarty) : string Display WT price with currency |
public static | duplicateAccessories(int $idProductOld, int $idProductNew) : bool |
public static | duplicateAttachments(int $idProductOld, int $idProductNew) : bool |
public static | duplicateAttributes(int $idProductOld, int $idProductNew) : array/bool Duplicate attributes when duplicating a product |
public static | duplicateCustomizationFields(int $oldProductId, int $productId) : bool |
public static | duplicateDownload(int $idProductOld, int $idProductNew) : bool |
public static | duplicateFeatures(int $idProductOld, int $idProductNew) : bool Duplicate features when duplicating a product |
public static | duplicateSpecificPrices(int $oldProductId, int $productId) : bool |
public static | duplicateSuppliers(int $idProductOld, int $idProductNew) : bool Adds suppliers from old product onto a newly duplicated product |
public static | duplicateTags(int $idProductOld, int $idProductNew) : bool |
public | existsRefInDatabase(string $reference) : bool Checks if reference exists |
public static | flushPriceCache() : void This method allows to flush price cache |
public | generateMultipleCombinations(mixed $combinations, mixed $attributes) : bool |
public | getAccessories(int $idLang, bool $active=true) : array Product accessories Get product accessories |
public static | getAccessoriesLight(int $idLang, int $idProduct) : array Product accessories Get product accessories (only names) |
public static | getAccessoryById(int $idProduct) : array/bool/null/object |
public static | getAllCustomizedDatas(int/ $idCart, int/null $idLang=null, bool/int/bool $onlyInCart=true, int/null $idShop=null) : array/bool |
public | getAnchor(int $idProductAttribute, bool $withId=false) : string Get the combination url anchor of the product |
public | getAttachments(int $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getAttachmentsStatic(int $idLang, int $idProduct) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | DEPRECATED - 1.0.0 |
public | getAttributeCombinations(int $idLang) : array Product attributes combinations Get all available product attributes combinations |
public | getAttributeCombinationsById(int $idProductAttribute, int $idLang) : array Product attribute combination by id_product_attribute Get product attribute combination by id_product_attribute |
public static | getAttributesColorList(array $products, bool $haveStock=true) : array/bool |
public | getAttributesGroups(int $idLang) : array Attribute groups Get all available attribute groups |
public static | getAttributesImpacts(int $idProduct) : array |
public static | getAttributesInformationsByProduct(int $idProduct) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getAttributesParams(int $idProduct, int $idProductAttribute) : array Get label by lang and value by lang too |
public | getAttributesResume(int $idLang, string $attributeValueSeparator=' - ' , string $attributeSeparator=', ' ) : array Product attributes combinationsGet all available product attributes resume |
public static | getAvailableDate(int $idProduct, int $idProductAttribute=null) : \string/null For a given id_product and id_product_attribute, return available date |
public | getCarriers() : mixed Gets carriers assigned to the product |
public | getCategories() : array of categories getCategories return an array of categories which this product belongs to |
public static | getColorsListCacheId(int $idProduct, bool $full=true) : string |
public static | getCombinationImageById(mixed $idProductAttribute, mixed $idLang) : bool |
public | getCombinationImages(int $idLang) : array/bool |
public static | getCover(int $idProduct, \Context $context=null) : array Product cover image Get product cover image |
public | getCoverWs() : int Webservice getter : get virtual field id_default_image in category |
public | getCustomizationFieldIds() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getCustomizationFields(bool $idLang=false, null $idShop=null) : array/bool/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getDefaultAttribute(int $idProduct, int $minimumQuantity, bool $reset=false) : int Attributes list Get the default attribute for a product |
public | getDefaultCategory() : mixed get the default category according to the shop |
public | getDefaultIdProductAttribute() : int |
public | getFeatures() : array Array with feature product's data Select all features for the object |
public static | getFeaturesStatic(int $idProduct) : array |
public | getFieldsShop() : array |
public | getFrontFeatures(int $idLang) : array/mixed |
public static | getFrontFeaturesStatic(int $idLang, int $idProduct) : array/mixed |
public static | getIdByEan13(string $ean13) : int id For a given ean13 reference, returns the corresponding id |
public | getIdProductAttributeMostExpensive() : int |
public | getIdTaxRulesGroup() : int |
public static | getIdTaxRulesGroupByIdProduct(int $idProduct, \Context/null/\Context $context=null) : int/null |
public static | getIdTaxRulesGroupMostUsed() : false/null/string |
public | getImages(int $idLang, \Context $context=null) : array Product images and legends Get product images and legends |
public | getLink(\Context $context=null) : string Get the link of the product page of this product |
public static | getNewProducts(int $idLang, int $pageNumber, int $nbProducts=10, bool $count=false, null $orderBy=null, null $orderWay=null, \Context $context=null) : array New products Get new products |
public | getNoPackPrice() : int |
public | getParentCategories(int $idLang=null) : array Get list of parent categories |
public | getPrice(bool $tax=true, int $idProductAttribute=null, int $decimals=6, int $divisor=null, bool $onlyReduc=false, bool $usereduc=true, mixed $quantity=1) : float Product price in euros Get product price Same as static function getPriceStatic, no need to specify product id |
public static | getPriceStatic(int $idProduct, bool $usetax=true, int/null $idProductAttribute=null, int $decimals=6, int/null $divisor=null, bool $onlyReduc=false, bool $usereduc=true, int $quantity=1, bool $forceAssociatedTax=false, int/null $idCustomer=null, int/null $idCart=null, int/null $idAddress=null, null $specificPriceOutput=null, bool $withEcotax=true, bool $useGroupReduction=true, \Context $context=null, bool $useCustomerPrice=true) : float Product price Returns product price If set to false, do not apply the combination price impact. NULL does apply the default combination price impact. Only works when the parameter $usetax is true (e.g., inside a payment module, a cron task...) calculation regarding the guest localization this variable is filled with the corresponding SpecificPrice object |
public | getPriceWithoutReduct(bool $notax=false, bool $idProductAttribute=false, int $decimals=6) : float |
public static | getPricesDrop(int $idLang, int $pageNumber, int $nbProducts=10, bool $count=false, null $orderBy=null, null $orderWay=null, bool $beginning=false, bool $ending=false, \Context $context=null) : array Prices drop Get prices drop |
public static | DEPRECATED - 1.0.0 Use Combination::getPrice |
public static | getProductAttributesIds(int $idProduct, bool $shopOnly=false) : array product attribute id list Get all product attributes ids |
public static | getProductCategories(string $idProduct='' ) : array of categoriesgetProductCategories return an array of categories which this product belongs to |
public static | getProductCategoriesFull(string $idProduct='' , int/null $idLang=null) : array |
public static | getProductName(int $idProduct, int $idProductAttribute=null, int $idLang=null) : string Gets the name of a given product, in the given lang |
public static | getProductProperties(int $idLang, array $row, \Context/null/\Context $context=null) : mixed |
public static | getProducts(int $idLang, int $start, int $limit, string $orderBy, string $orderWay, bool $idCategory=false, bool $onlyActive=false, \Context $context=null) : array Products details Get all available products |
public static | getProductsProperties(int $idLang, array $queryResult) : array |
public | getPublicPrice(bool $tax=true, null $idProductAttribute=null, int $decimals=6, null $divisor=null, bool $onlyReduc=false, bool $usereduc=true, int $quantity=1) : float |
public static | getQuantity(int $idProduct, int $idProductAttribute=null, null $cacheIsPack=null) : int Available quantities Get available product quantities |
public static | getRandomSpecial(int $idLang, bool $beginning=false, bool $ending=false, \Context $context=null) : array/bool Special Get a random special |
public static | getRealQuantity(int $idProduct, int $idProductAttribute, int $idWarehouse, int $idShop=null) : int real_quantity For a given product, returns its real quantity |
public | getRequiredCustomizableFields() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getRequiredCustomizableFieldsStatic(int $id) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getShopsByProduct(mixed $idProduct) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getSimpleProducts(int $idLang, \Context/null/\Context $context=null) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | DEPRECATED - 1.0.0 |
public | getTags(int $idLang) : string |
public static | getTaxCalculationMethod(null $idCustomer=null) : int |
public static | getTaxesInformations(mixed $row, \Context/null/\Context $context=null) : mixed |
public | getTaxesRate(\Address/null/\Address $address=null) : float The total taxes rate applied to the product Returns tax rate. |
public | getType() : int Get the product type (simple, virtual, pack) |
public static | getUrlRewriteInformations(mixed $idProduct) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getWsAccessories() : array Webservice getter : get product accessories ids of current product for association |
public | getWsCategories() : array Webservice getter : get category ids of current product for association |
public | getWsCombinations() : array Webservice getter : get combination ids of current product for association |
public | getWsDefaultCombination() : int Webservice getter : get virtual field default combination |
public | getWsImages() : array Webservice getter : get image ids of current product for association |
public | getWsManufacturerName() : mixed |
public | getWsPositionInCategory() : int Webservice getter : get virtual field position in category |
public | getWsProductBundle() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getWsProductFeatures() : array Webservice getter : get product features association |
public | getWsProductOptionValues() : array Webservice getter : get product option ids of current product for association |
public | getWsStockAvailables() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getWsTags() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getWsType() : mixed |
public | hasAllRequiredCustomizableFields(\Context/null/\Context $context=null) : bool |
public | hasAttributes() : int Attributes combinations number Check if product has attributes combinations |
public | hasAttributesInOtherShops() : bool |
public static | idIsOnCategoryId(int $idProduct, array $categories) : bool is the product in at least one category Checks if the product is in at least one of the submited categories |
public static | initPricesComputation(null $idCustomer=null) : void |
public static | isAvailableWhenOutOfStock(int $outOfStock) : bool/int |
public | isColorUnavailable(int $idAttribute, int $idShop) : false/null/string |
public static | isDiscounted(int $idProduct, int $quantity=1, \Context/null/\Context $context=null) : bool |
public | isNew() : bool |
public | loadStockData() : mixed Fill the variables used for stock management |
public | modifierWsLinkRewrite() : bool |
public static | priceCalculation(int $idShop, int $idProduct, int $idProductAttribute, int $idCountry, int $idState, string $zipcode, int $idCurrency, int $idGroup, int $quantity, bool $useTax, int $decimals, bool $onlyReduc, bool $useReduc, bool $withEcotax, null $specificPrice, bool $useGroupReduction, int $idCustomer, bool $useCustomerPrice=true, int $idCart, int $realQuantity) : float Product price Price calculation / Get product price this variable is filled with the corresponding SpecificPrice object |
public | productAttributeExists(array $attributesList, bool $currentProductAttribute=false, \Context/null/\Context $context=null, bool $allShops=false, bool $returnId=false) : bool/int/string |
public static | DEPRECATED - 1.0.0 |
public static | resetEcoTax() : bool |
public static | searchByName(int $idLang, string $query, \Context $context=null) : array Matching products Admin panel product search |
public | setAdvancedStockManagement(int $value) : void |
public | setAvailableDate(string $availableDate='0000-00-00' ) : bool |
public | setCarriers(array $carrierList) : void Sets carriers assigned to the product |
public | setCoverWs(mixed $idImage) : bool Webservice setter : set virtual field id_default_image in category |
public | setDefaultAttribute(int $idProductAttribute) : bool |
public | setGroupReduction() : void Set Group reduction if needed |
public static | setPackStockType(int $idProduct, int $packStockType) : bool |
public | setWsAccessories(array $accessories) : bool Webservice setter : set product accessories ids of current product for association |
public | setWsCategories(array $categoryIds) : bool Webservice setter : set category ids of current product for association |
public | setWsCombinations(array $combinations) : bool Webservice setter : set combination ids of current product for association |
public | setWsDefaultCombination(int $idCombination) : bool Webservice setter : set virtual field default combination |
public | setWsPositionInCategory(int $position) : bool Webservice setter : set virtual field position in category |
public | setWsProductBundle(array $items) : bool |
public | setWsProductFeatures(array $productFeatures) : bool Webservice setter : set product features association |
public | setWsTags(array $tagIds) : bool Webservice setter : set tag ids of current product for association |
public | setWsType(mixed $typeStr) : bool |
public static | sqlStock(string $productAlias, string/int $productAttribute=null, bool $innerJoin=false, \Shop $shop=null) : string Create JOIN query with 'stock_available' table |
public | toggleStatus() : bool |
public | update(bool $nullValues=false) : bool |
public | updateAttribute(int $idProductAttribute, float $wholesalePrice, float $price, float $weight, float $unit, float $ecotax, array $idImages, string $reference, string $ean13, int $default, null $location=null, string $upc=null, string $minimalQuantity=null, null $availableDate=null, bool $updateAllFields=true, array $idShopList=array()) : array Update result Update a product attribute |
public static | updateCacheAttachment(int $idProduct) : bool |
public | updateCategories(array $categories, bool $keepingCurrentPos=false) : array Update/insertion result Update categories to index product into |
public static | updateDefaultAttribute(mixed $idProduct) : bool/int |
public static | updateIsVirtual(mixed $idProduct, bool $isVirtual=true) : void |
public | updateLabels() : bool |
public | updatePosition(bool $way, int $position) : bool Update result Move a product inside its category |
public | DEPRECATED - since 1.5 |
public static | DEPRECATED - 1.0.0 |
public | DEPRECATED - 1.0.0 |
public | updateWs(bool $nullValues=false) : bool |
public | useAdvancedStockManagement() : false/null/string |
public static | usesAdvancedStockManagement(int $idProduct) : bool For a given product, tells if it uses the advanced stock management |
public | validateField(string $field, mixed $value, null $idLang=null, array $skip=array(), bool $humanErrors=false) : string/true |
protected | _checkLabelField(mixed $field, mixed $value) : array/bool |
protected | _createLabel(array $languages, int $type) : bool |
protected | _deleteOldLabels() : bool |
protected static | _getCustomizationFieldsNLabels(int $productId, int/null $idShop=null) : array/bool |
protected static | _getProductIdByDate(mixed $beginning, mixed $ending, \Context/null/\Context $context=null, bool $withCombination=false) : array |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: CategoryCore
Class CategoryCore
Visibility | Function |
---|---|
public | __construct(null $idCategory=null, null $idLang=null, null $idShop=null) : void CategoryCore constructor. |
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | addGroups(mixed $groups) : void |
public | addGroupsIfNoExist(mixed $idGroup) : bool/void |
public | addPosition(mixed $position, null $idShop=null) : bool |
public | addShop(int $idShop) : bool Add association between shop and categories |
public static | addToShop(array $categories, mixed $idShop) : bool Add some categories to a shop |
public | calcLevelDepth() : int Depth level Get the depth level for the category |
public static | categoryExists(int $idCategory) : bool Specify if a category already in base |
public | checkAccess(mixed $idCustomer) : bool true if access allowed for customer $id_customer checkAccess return true if id_customer is in a group allowed to see this category. |
public static | checkBeforeMove(int $idCategory, int $idParent) : bool Parent validity Check if category can be moved in another one. The category cannot be moved in a child category. |
public | cleanAssoProducts() : bool |
public | cleanGroups() : bool |
public static | cleanPositions(mixed $idCategoryParent=null) : bool true if succeed cleanPositions keep order of category in $id_category_parent, but remove duplicate position. Should not be used if positions are clean at the beginning ! |
public | delete() : bool |
public static | deleteCategoriesFromShop(mixed $idShop) : bool Delete every categories |
public | deleteFromShop(int $idShop) : bool Delete category from shop $id_shop |
public | deleteLite() : bool |
public | deleteSelection(mixed $categories) : void Delete several categories from database return boolean Deletion result |
public static | duplicateProductCategories(int $idOld, bool $idNew) : bool Duplication result Copy products from a category to another |
public | existsInShop(mixed $id_shop) : bool |
public static | getAllCategoriesName(null $rootCategory=null, bool $idLang=false, bool $active=true, null $groups=null, bool $useShopRestriction=true, string $sqlFilter='' , string $sqlSort='' , string $sqlLimit='' ) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getAllChildren(int $idLang=null) : PrestaShopCollection Collection of Category Return an array of all children of the current category |
public | getAllParents(int $idLang=null) : PrestaShopCollection Collection of Category Return an array of all parents of the current category |
public | getAllSubcategories() : array list of ids of the subcategories Get all ids of all subcategories of the current category |
public static | getCategories(bool/int $idLang=false, bool $active=true, bool $order=true, string $sqlFilter='' , string $sqlSort='' , string $sqlLimit='' ) : array CategoriesReturn available categories |
public static | getCategoriesWithoutParent() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getCategoryInformations(array $idsCategory, int $idLang=null) : array |
public static | getChildren(int $idParent, int $idLang, bool $active=true, bool $idShop=false) : array |
public static | getChildrenWithNbSelectedSubCat(int $idParent, array $selectedCat, int $idLang, \Shop $shop=null, bool $useShopContext=true) : array This method allow to return children categories with the number of sub children selected for a product |
public | getChildrenWs() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getDescriptionClean(mixed $description) : string |
public | getDuplicatePosition() : array first category found Search for another category with the same parent and the same position |
public | getGroups() : array/null |
public static | getHomeCategories(int $idLang, bool $active=true, bool $idShop=false) : array categories Return main categories |
public static | getInterval(int $id) : array Return nleft and nright fields for a given category |
public static | getLastPosition(int $idCategoryParent, int $idShop) : int this function return the number of category + 1 having $id_category_parent as parent. |
public | getLink(\Link/null/\Link $link=null, null $idLang=null) : string |
public static | getLinkRewrite(mixed $idCategory, mixed $idLang) : bool/mixed |
public | getName(null $idLang=null) : string |
public static | getNestedCategories(null $rootCategory=null, bool $idLang=false, bool $active=true, null $groups=null, bool $useShopRestriction=true, string $sqlFilter='' , string $sqlSort='' , string $sqlLimit='' ) : array/null |
public | getParentsCategories(int $idLang=null) : array Corresponding categories Get Each parent category of this category until the root category |
public | getProducts(int $idLang, int $p, int $n, string/null $orderBy=null, string/null $orderWay=null, bool $getTotal=false, bool $active=true, bool $random=false, int $randomNumberProducts=1, bool $checkAccess=true, \Context/null/\Context $context=null) : array/int/false Products, number of products or false (no access) Returns category products can see products from this category |
public | getProductsWs() : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getRootCategories(null $idLang=null, bool $active=true) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getRootCategory(null $idLang=null, \Shop/null/\Shop $shop=null) : \Category |
public | getShopID() : int |
public static | getShopsByCategory(mixed $idCategory) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getSimpleCategories(mixed $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getSubCategories(int $idLang, bool $active=true) : array Categories Return current category childs |
public static | getTopCategory(null $idLang=null) : \Category |
public static | getUrlRewriteInformations(mixed $idCategory) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public | getWsNbProductsRecursive() : false/int/null/string |
public static | hasChildren(int $idParent, int $idLang, bool $active=true, bool $idShop=false) : array |
public | inShop(\Shop $shop=null) : bool Check if current category is a child of shop root category |
public static | inShopStatic(mixed $idCategory, \Shop/null/\Shop $shop=null) : bool |
public | isParentCategoryAvailable(int $idShop) : bool |
public | isRootCategoryForAShop() : bool |
public | recalculateLevelDepth(int $idCategory) : void Updates level_depth for all children of the given id_category |
public static | recurseCategory(mixed $categories, mixed $current, null $idCategory=null, int $idSelected=1) : void |
public | recurseLiteCategTree(int $maxDepth=3, int $currentDepth, int $idLang=null, array $excludedIdsArray=null) : array Subcategories lite tree Recursive scan of subcategories |
public static | regenerateEntireNtree() : void Re-calculate the values of all branches of the nested tree |
public static | searchByName(int $idLang, string $query, bool $unrestricted=false, bool $skipCache=false) : array Corresponding categories Light back office search for categories |
public static | searchByNameAndParentCategoryId(int $idLang, string $categoryName, int $idParentCategory) : array Corresponding category Retrieve category by name and parent category id |
public static | searchByPath(int $idLang, string $path, bool $objectToCreate=false, bool $methodToCreate=false) : array Corresponding categories Search with Pathes for categories |
public static | setNewGroupForHome(mixed $idGroup) : bool |
public | toggleStatus() : void |
public | update(bool/mixed $nullValues=false) : bool update category positions in parent |
public static | updateFromShop(array $categories, int $idShop) : array Update/insertion result Update categories for a shop |
public | updateGroup(array $list) : void Update customer groups associated to the object |
public | updatePosition(mixed $way, mixed $position) : bool |
protected static | DEPRECATED - 1.0.0 |
protected | recursiveDelete(mixed $toDelete, int $idCategory) : void Recursively add specified category childs to $to_delete array |
protected static | subTree(mixed $categories, mixed $idCategory, mixed $n) : void |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ShopGroupCore
Class ShopGroupCore
Visibility | Function |
---|---|
public | getFields() : array |
public static | getIdByName(string $name) : int Return a group shop ID from group shop name |
public static | getShopGroups(bool $active=true) : \PrestaShopCollection |
public static | getShopsFromGroup(mixed $idGroup) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getTotalShopGroup(bool $active=true) : int Total of shop groups |
public | getTotalShops() : int |
public static | hasDependency(int $idShopGroup, string $check='all' ) : boolDetect dependency with customer or orders |
public | haveShops() : bool |
public | shopNameExists(mixed $name, bool $idShop=false) : false/null/string |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ShopCore
Class ShopCore
Visibility | Function |
---|---|
public | __construct(int $id=null, int $idLang=null, int $idShop=null) : void On shop instance, get its theme and URL data too |
public | add(bool $autodate=true, bool $nullValues=false) : bool Add a shop, and clear the cache |
public static | addSqlAssociation(string $table, string $alias, bool $innerJoin=true, string $on=null, bool $forceNotDefault=false) : string Add an SQL JOIN in query between a table and its associated table in multishop |
public static | addSqlRestriction(bool/int $share=false, string $alias=null) : void Add an sql restriction for shops fields |
public static | addSqlRestrictionOnLang(string $alias=null, mixed $idShop=null) : string Add a restriction on id_shop for multishop lang table |
public static | addTableAssociation(string $table_name, array $table_details) : bool Add table associated to shop |
public | associateSuperAdmins() : void |
public static | cacheShops(bool $refresh=false) : void Load list of groups and shops, and cache it |
public static | checkIdShopDefault(mixed $table) : bool check if the table has an id_shop_default |
public | copyShopData(mixed $oldId, bool $tablesImport=false, bool $deleted=false) : void |
public | delete() : bool Remove a shop only if it has no dependencies, and remove its associations |
public | getAddress() : Address the current shop address |
public static | getAssoTable(mixed $table) : array Get the associated table if available |
public static | getAssoTables() : array Get list of associated tables to shop |
public | getBaseURI() : string Get shop URI |
public | getBaseURL(bool/string $autoSecureMode=false, bool/string $addBaseUri=true) : string complete base url of current shop Get shop URL |
public static | getCategories(int $id, bool $onlyId=true) : array |
public | getCategory() : int Get root category of current shop |
public static | getCompleteListOfShopsID() : array/null |
public static | getContext() : int Get current context of shop |
public static | getContextListShopID(bool/string $share=false) : array Get a list of ID concerned by the shop context (E.g. if context is shop group, get list of children shop ID) |
public static | getContextShopGroup() : mixed |
public static | getContextShopGroupID(bool $nullValueWithoutMultishop=false) : int Get current ID of shop group if context is CONTEXT_SHOP or CONTEXT_GROUP |
public static | getContextShopID(bool $nullValueWithoutMultishop=false) : int Get current ID of shop if context is CONTEXT_SHOP |
public static | DEPRECATED - 2.0.0 Use shop->id |
public static | getEntityIds(string $entity, int $idShop, bool $active=false, bool $delete=false) : array/bool |
public | getGroup() : \ShopGroup Get group of current shop |
public static | getGroupFromShop(int $shopId, bool $asId=true) : int Group ID Retrieve group ID of a shop |
public static | getIdByName(string $name) : int Return a shop ID from shop name |
public static | getSharedShops(int $shopId, int $type) : array If the shop group has the option $type activated, get all shops ID of this group, else get current shop ID |
public static | getShop(int $shopId) : array Return some informations cached for one shop |
public static | getShopById(int $id, string $identifier, string $table) : array Return the list of shop by id |
public static | getShops(bool $active=true, int $idShopGroup=null, bool $getAsListId=false) : array Get shops list |
public static | getShopsCollection(bool $active=true, int $idShopGroup=null) : PrestaShopCollection Collection of Shop Get a collection of shops |
public | getTheme() : string Get shop theme name |
public static | getTotalShops(bool $active=true, int $idShopGroup=null) : int Total of shops |
public static | getTree() : array Get all groups and associated shops as subarrays |
public | getUrls() : array Get list of shop's urls |
public | getUrlsSharedCart() : array/bool |
public static | hasDependency(int $idShop) : bool Detect dependency with customer or orders |
public static | initialize() : \Shop Find the shop from current domain / uri and get an instance of this shop if INSTALL_VERSION is defined, will return an empty shop object |
public | isDefaultShop() : bool Check if current shop ID is the same as default shop in configuration |
public static | isFeatureActive() : bool Return true if multishop feature is active and at last 2 shops have been created |
public static | isTableAssociated(string $table) : bool Check if given table is associated to shop |
public static | setContext(int $type, int $id=null) : void Change the current shop context |
public | setUrl() : bool |
protected static | init() : void Initialize an array with all the multistore associations in the database |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ShopUrlCore
Class ShopUrlCore
Visibility | Function |
---|---|
public static | cacheMainDomainForShop(mixed $idShop) : void |
public | canAddThisUrl(mixed $domain, mixed $domainSsl, mixed $physicalUri, mixed $virtualUri) : false/null/string |
public | getBaseURI() : string |
public | getFields() : array |
public static | getMainShopDomain(null $idShop=null) : mixed |
public static | getMainShopDomainSSL(null $idShop=null) : mixed |
public static | getShopUrls(bool $idShop=false) : PrestaShopCollection Collection of ShopUrl Get list of shop urls |
public | getURL(bool $ssl=false) : string/null |
public static | resetMainDomainCache() : void |
public | setMain() : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: StoreCore
Class StoreCore
Visibility | Function |
---|---|
public | __construct(null $idStore=null, null $idLang=null) : void StoreCore constructor. |
public | getWsHours() : string |
public | setWsHours(string $hours) : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: ControllerFactoryCore
DEPRECATED 1.0.0
Visibility | Function |
---|---|
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - since 1.0.0 |
Class: ConfigurationCore
Class ConfigurationCore
Visibility | Function |
---|---|
public static | clearConfigurationCacheForTesting() : void WARNING: For testing only. Do NOT rely on this method, it may be removed at any time. |
public static | configurationIsLoaded() : bool/null |
public static | deleteByName(string $key) : bool Deletion result Delete a configuration key in database (with or without language management) |
public static | deleteFromContext(string $key) : void Delete configuration key from current context. |
public static | get(string $key, int $idLang=null, mixed $idShopGroup=null, mixed $idShop=null) : string Value Get a single configuration value (in one language only) |
public | getFieldsLang() : bool/array Multilingual fields |
public static | getGlobalValue(mixed $key, null $idLang=null) : string |
public static | getIdByName(string $key, int $idShopGroup=null, int $idShop=null) : int Configuration key ID Return ID a configuration key |
public static | getInt(string $key, int $idShopGroup=null, int $idShop=null) : array Values in multiple languages Get a single configuration value (in multiple languages) |
public static | getMultiShopValues(string $key, int $idLang=null) : array Values for all shops Get a single configuration value for all shops |
public static | getMultiple(array $keys, int $idLang=null, int $idShopGroup=null, int $idShop=null) : array Values Get several configuration values (in one language only) |
public | getWebserviceObjectList(mixed $sqlJoin, mixed $sqlFilter, mixed $sqlSort, mixed $sqlLimit) : array This method is override to allow TranslatedConfiguration entity |
public static | hasContext(string $key, int $idLang, int $context) : bool Check if configuration var is defined in given context |
public static | hasKey(string $key, int $idLang=null, int $idShopGroup=null, int $idShop=null) : bool Check if key exists in configuration |
public static | isLangKey(string $key) : bool Check if a key was loaded as multi lang |
public static | isOverridenByCurrentContext(mixed $key) : bool |
public static | loadConfiguration() : mixed Load all configuration data |
public static | set(string $key, mixed $values, int $idShopGroup=null, int $idShop=null) : void Set TEMPORARY a single configuration value (in one language only) |
public static | updateGlobalValue(string $key, mixed $values, bool $html=false) : bool Update configuration key for global context only |
public static | updateValue(string $key, mixed $values, bool $html=false, int $idShopGroup=null, int $idShop=null) : bool Update result Update configuration key and value into database (automatically insert if key does not exist) Values are inserted/updated directly using SQL, because using (Configuration) ObjectModel may not insert values correctly (for example, HTML is escaped, when it should not be). |
protected static | sqlRestriction(int $idShopGroup, int $idShop) : string Add SQL restriction on shops for configuration table |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: GroupReductionCore
Class GroupReductionCore
Visibility | Function |
---|---|
public | add(bool $autodate=true, bool $nullValues=false) : bool |
public | delete() : bool |
public static | deleteCategory(int $idCategory) : bool |
public static | deleteProductReduction(int $idProduct) : bool |
public static | doesExist(int $idGroup, int $idCategory) : bool |
public static | duplicateReduction(int $idProductOld, int $idProduct) : bool |
public static | DEPRECATED - 1.0.0 |
public static | DEPRECATED - 1.0.0 |
public static | getGroupReductions(int $idGroup, int $idLang) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getGroupsByCategoryId(int $idCategory) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getGroupsReductionByCategoryId(int $idCategory) : array/false/\mysqli_result/null/\PDOStatement/\resource |
public static | getValueForProduct(int $idProduct, int $idGroup) : int/mixed |
public static | setProductReduction(int $idProduct, mixed $idGroup=null, mixed $idCategory=null, int/null $reduction=null) : bool |
public | update(bool $nullValues=false) : bool |
protected | _clearCache() : bool |
protected | _setCache() : bool |
protected | _updateCache() : bool |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface
Class: AddressFormatCore
Class AddressFormatCore
Visibility | Function |
---|---|
public | checkFormatFields() : void |
public static | cleanOrderedAddress(mixed $orderedAddressField) : void |
public static | generateAddress(\Address $address, array $patternRules=array(), string $newLine=`' |
'</strong>, <em>string</em> <strong>$separator= ' '`, array $style=array()) : stringGenerates the full address text |
|
public static | generateAddressSmarty(mixed $params, mixed $smarty) : string |
public static | getAddressCountryFormat(int $idCountry) : String field address format Returns address format by country if not defined using default country |
public | getErrorList() : array |
public static | getFieldsRequired() : array |
public | getFormat(int $idCountry) : String field address format Returns address format by country |
public static | getFormattedAddressFieldsValues(mixed $address, mixed $addressFormat, mixed $idLang=null) : double Array Returns the formatted fields with associated values |
public static | getFormattedLayoutData(mixed $address) : array |
public static | getLiableClass(mixed $className) : array |
public static | getOrderedAddressFields(int $idCountry, bool $splitAll=false, bool $cleaned=false) : array String field address format Returns address format fields in array by country |
public static | getValidateFields(mixed $className) : array String values Returns selected fields required for an address in an array according to a selection hash |
protected | DEPRECATED - 2.0.0 |
protected | _checkValidateClassField(string $className, string $fieldName, bool $isIdField) : void Check if the the association of the field name and a class name is valide |
protected | _getFormatDB(mixed $idCountry) : false/null/string |
protected static | _setOriginalDisplayFormat(mixed $formattedValueList, mixed $currentLine, mixed $currentKeyList) : void Set the layout key with the liable value example : (firstname) => 'Presta' will result (Presta) : (firstname-lastname) => 'Presta' and 'Shop' result '(Presta-Shop)' |
This class extends \ObjectModel
This class implements \Core_Foundation_Database_EntityInterface