The most common. For me. Mostly from comments in source code.
Updated with 1.7 code.
Attribute->cleanPositions(int $id_attribute_group, bool $useLastAttribute = true) : bool
Reorder attribute position in group $id_attribute_group. Call it after deleting an attribute from a group.Attribute::getHigherPosition(int $id_attribute_group) : int
Get the higher attribute position from a group attributeAttributeGroup::cleanPositions(int $idAttributeGroup, bool $useLastAttribute = true) : bool
Reorder group attribute position. Call it after deleting a group attribute.
Configuration::deleteByName(string $key) : bool
Delete a configuration key in databaseConfiguration::get(string $key, ?int $idLang = null, ?int $idShopGroup = null, ?int $idShop = null, bool $default = false) : string
Get a single configuration valueConfiguration::set(string $key, mixed $values, ?int $idShopGroup = null, ?int $idShop = null) : void
Set TEMPORARY a single configuration valueConfiguration::updateValue(string $key, mixed $values, bool $html = false, ?int $idShopGroup = null, ?int $idShop = null) : bool
Update configuration key and value into database (automatically insert if key does not exist)
Combination::getIdByReference(int $id_product, string $reference) : int
For a given product_attribute reference, returns the corresponding idCombination::isFeatureActive() : bool
Check if combination is feature active in Prestashop
Retrieve logged user : $this->context->cookie->id_customer
, $this->context->cookie->email
Db::getInstance()->delete(string $table, string $where = '', int $limit = 0, bool $use_cache = true, bool $add_prefix = true) : bool
Delete in $table (without prefix) with $where conditionDb::getInstance()->execute(string $sql, bool $use_cache = true) : bool
Execute the $query (INSERT, UPDATE, DELETE)Db::getInstance()->executeS(string $sql, bool $array = true, bool $use_cache = true) : array
Execute the $query (SELECT) and return the result as arrayDb::getInstance()->getRow(string $sql, bool $use_cache = true) : array
Returns an associative array containing the first row of the $queryDb::getInstance()->getValue(string $sql, bool $use_cache = true) : string
Returns a value from the first row, first column of a SELECT $queryDb::getInstance()->insert(string $table, array $data, bool $null_values = false, bool $use_cache = true, int $type = Db::INSERT, bool $add_prefix = true) : bool
Insert $data in $table (without prefix)Db::getInstance()->Insert_ID() : int
Get the ID generated from the previous INSERT operationDb::getInstance()->numRows() : int
Get number of rows for last resultDb::getInstance()->update(string $table, array $data, string $where = '', int $limit = 0, bool $null_values = false, bool $use_cache = true, bool $add_prefix = true) : bool
Update $data in $table (without prefix) with $where condition
Image::getHighestPosition(int $id_product) : int
Return highest position of images for a productImage::getImages(int $id_lang, int $id_product, ?int $id_product_attribute) : array
Return available images for a productImage::getImagesTotal(int $id_product) : int
Return number of images for a productImage::hasImages(int $id_lang, int $id_product, ?int $id_product_attribute = null) : bool
Check if a product has an image available
Language::getLanguages(bool $active = true) : array
Returns available languages
Retrieve global from PHP : $this->context->link
and from Smarty : {$link}
.
Link->getAdminLink(string $controller, bool $with_token = true) : string
Use controller name to create a linkLink->getCategoryLink(Category $category, ?string $alias = null, ?int $id_lang = null, ?string $selected_filters = null) : string
Create a link to a categoryLink->getCMSCategoryLink(CMSCategory $cms_category, ?string $alias = null) : string
Create a link to a CMS categoryLink->getCMSLink(CMS $cms, ?string $alias = null) : string
Create a link to a CMS pageLink->getImageLink(string $name, string $ids, ?string $type = null) : string
Returns a link to a product image for displayLink->getManufacturerLink(Manufacturer $manufacturer, ?string $alias = null) : string
Create a link to a manufacturerLink->getModuleLink(string $module, string $controller = 'default', array $params = []) : string
Create a link to a moduleLink->getPageLink(string $controller) : string
Create a simple linkLink->getProductLink(Product $product, ?string $alias = null) : string
Create a link to a productLink->getSupplierLink(Supplier $supplier ?string $alias = null) : string
Create a link to a supplier
Module::getInstanceByName(string $module_name) : Module
Return an instance of the specified moduleModule->registerHook(string $hook_name) : bool
Connect module to a hookModule->unregisterHook(string|int $hook_id) : bool
Unregister module from hook (by name or id)
All Prestashop classes inherits of ObjectModel class so then can call these methods (Product, Combination, Shop... all classes in /classes)
ObjectModel->add() : bool
Adds current object to the databaseObjectModel->associateTo(int|array $id_shops) : bool
This function associate an item to its contextObjectModel->delete() : bool
Deletes current object from databaseObjectModel->duplicateObject() : ObjectModel
Takes current object ID, gets its values from database, saves them in a new row and loads newly saved values as a new objectObjectModel->save() : bool
Saves current object to database (add or update)ObjectModel->update() : bool
Updates the current object in the databaseObjectModel->validateFields(bool $die = true, bool $error_return = false) : bool
Checks if object field values are valid before database interactionObjectModel->validateFieldsLang(bool $die = true, bool $error_return = false) : bool
Checks if multilingual object field values are valid before database interaction
OrderHistory->changeIdOrderState(int $new_order_state, int|object $id_order, bool $use_existing_payment = false) : void
Sets the new state of the given order
Product::__construct(?int $id_product = null, bool $full = false, ?int $id_lang = null, ?int $id_shop = null)
Product->addCombinationEntity(float $wholesale_price, float $price, float $weight, float $unit_impact, float $ecotax, float $quantity, array $id_images, string $reference, int $id_supplier, string $ean13, int $default, ?string $location = null, ?string $upc = null, int $minimal_quantity = 1, array $id_shop_list = [], ?string $available_date = null) : bool
Add a product attributeProduct->checkDefaultAttributes() : bool
Check if there is no default attribute and create it if notProduct->deleteDefaultAttributes() : bool
Delete all default attributes for productProduct->deleteImages() : bool
Delete product images from databaseProduct->getAttributeCombinations(int $id_lang) : array
Get all available product attributes combinationsProduct::getDefaultAttribute(int $id_product) : int
Get the default attribute for a product (id_product_attribute)Product::getPriceStatic(int $id_product, bool $usetax = true, ?int $id_product_attribute = null, int $decimals = 6, ?int $divisor = null, bool $only_reduc = false, bool $usereduc = true, int $quantity = 1, bool $force_associated_tax = false, ?int $id_customer = null, ?int $id_cart = null, ?int $id_address = null) : float
Returns product priceProduct::getProducts(int $id_lang, int $start, int $limit, string $order_by, string $order_way, int $id_category = false, bool $only_active = false, Context $context = null) : array
Get all available productsProduct->updateAttribute(int $id_product_attribute, float $wholesale_price, float $price, float $weight, float $unit, float $ecotax, array $id_images, string $reference, string $ean13, int $default, ?string $location = null, ?string $upc = null, int $minimal_quantity = 1, ?string $available_date = null, ?bool $update_all_fields = null, array $id_shop_list = []) : array
Update a product attributeProduct::updateDefaultAttribute(int id_product) : int
Shop::getContextListShopID() : array
Get a list of ID concerned by the shop context (E.g. if context is shop group, get list of children shop ID)ShopGroup::getIdByName(string $name) : int
Return a group shop ID from group shop name
StockAvailable::setQuantity(int $id_product, int $id_product_attribute, int $quantity, ?int $id_shop = null) : void
For a given id_product and id_product_attribute sets the quantity available
Tools::getIsset(string $key) : bool
Tools::getRemoteAddr() : string
Get the server variable REMOTE_ADDR, or the first ip of HTTP_X_FORWARDED_FOR (when using proxy)Tools::getServerName() : string
Get the server variable SERVER_NAMETools::getAllValues() : mixed
Get all values from POST / GETTools::getValue(string $key, mixed $default_value = false) : mixed
Get a value from POST / GET. If unavailable, take a default valueTools::isSubmit(string $submit) : bool
Check if submit has been postedTools::str2url(string $str) : string
Return a friendly url made from the provided string