$id
$id :
recurseLiteCategTree(integer $max_depth = 3, integer $current_depth, integer $id_lang = null, array $excluded_ids_array = null) : array
Recursive scan of subcategories
integer | $max_depth | Maximum depth of the tree (i.e. 2 => 3 levels depth) |
integer | $current_depth | specify the current depth in the tree (don't use it, only for rucursivity!) |
integer | $id_lang | Specify the id of the language used |
array | $excluded_ids_array | specify a list of ids to exclude of results |
Subcategories lite tree
getCategories(integer $id_lang = false, boolean $active = true, $order = true, $sql_filter = '', $sql_sort = '', $sql_limit = '') : array
Return available categories
integer | $id_lang | Language ID |
boolean | $active | return only active categories |
$order | ||
$sql_filter | ||
$sql_sort | ||
$sql_limit |
Categories
getNestedCategories( $root_category = null, $id_lang = false, $active = true, $groups = null, $use_shop_restriction = true, $sql_filter = '', $sql_sort = '', $sql_limit = '')
$root_category | ||
$id_lang | ||
$active | ||
$groups | ||
$use_shop_restriction | ||
$sql_filter | ||
$sql_sort | ||
$sql_limit |
getProducts(integer $id_lang, integer $p, integer $n, $order_by = null, $order_way = null, boolean $get_total = false, boolean $active = true, boolean $random = false, integer $random_number_products = 1, boolean $check_access = true, \Context $context = null) : mixed
Return current category products
integer | $id_lang | Language ID |
integer | $p | Page number |
integer | $n | Number of products per page |
$order_by | ||
$order_way | ||
boolean | $get_total | return the number of results instead of the results themself |
boolean | $active | return only active products |
boolean | $random | active a random filter for returned products |
integer | $random_number_products | number of products to return if random is activated |
boolean | $check_access | set to false to return all products (even if customer hasn't access) |
\Context | $context |
Products or number of products
getChildrenWithNbSelectedSubCat(integer $id_parent, $selected_cat, integer $id_lang, \Shop $shop = null, $use_shop_context = true) : array
This method allow to return children categories with the number of sub children selected for a product
integer | $id_parent | |
$selected_cat | ||
integer | $id_lang | |
\Shop | $shop | |
$use_shop_context |
checkBeforeMove(integer $id_category, integer $id_parent) : boolean
Check if category can be moved in another one.
The category cannot be moved in a child category.
integer | $id_category | current category |
integer | $id_parent | Parent candidate |
Parent validity
searchByName(integer $id_lang, string $query, boolean $unrestricted = false) : array
Light back office search for categories
integer | $id_lang | Language ID |
string | $query | Searched string |
boolean | $unrestricted | allows search without lang and includes first category and exact match |
Corresponding categories
searchByNameAndParentCategoryId(integer $id_lang, string $category_name, integer $id_parent_category) : array
Retrieve category by name and parent category id
integer | $id_lang | Language ID |
string | $category_name | Searched category name |
integer | $id_parent_category | parent category ID |
Corresponding category
searchByPath(integer $id_lang, string $path, boolean $object_to_create = false, $method_to_create = false) : array
Search with Pathes for categories
integer | $id_lang | Language ID |
string | $path | of category |
boolean | $object_to_create | a category
|
$method_to_create |
Corresponding categories
cleanPositions(mixed $id_category_parent = null) : boolean
cleanPositions keep order of category in $id_category_parent, but remove duplicate position. Should not be used if positions are clean at the beginning !
mixed | $id_category_parent |
true if succeed