Package DE_EPAGES::Catalog::API::Catalog
Functions to assign or remove products to categories.
@EXPORT |
Functions
- AssignProductToCategory
- IsProductAssignedToCategory
- IsProductAssignedToCategoryWithParent
- RemoveProductFromCategory
- RenumberCategoryProducts
- SortProductList
AssignProductToCategory
Assign a product to a catalog. The products will not be renumbered. If the product is alreday assigned to the category, nothing happens. If the super product of a subproduct is already assigned, nothing happens.
Syntax |
$ret = AssignProductToCategory($Product, $Category); $ret = AssignProductToCategory($Product, $Category, 25); |
Input |
|
Return |
|
IsProductAssignedToCategory
Indicates whether or not a product is assigned to a category. For subproducts true will be returned only if the subproduct itself is assigned to the category.
Syntax |
if (IsProductAssignedToCategory($Product, $Category)) {... |
Input |
|
Return |
|
IsProductAssignedToCategoryWithParent
Indicates whether or not a product is assigned to a category. For subproducts true will be returned if the superproduct or the subproduct (or both) are assigned to the category.
Syntax |
if (IsProductAssignedToCategoryWithParent($Product, $Category)) {... |
Input |
|
Return |
|
RemoveProductFromCategory
Remove a product from a category. The products will not be renumbered. If the product is not yet assigned no changes apply, even if its superproduct is assigned to the category.
Syntax |
$ret = RemoveProductFromCategory($Product, $Category); |
Input |
|
Return |
|
RenumberCategoryProducts
Renumber the products assigned to a category.
Syntax |
RenumberCategoryProducts($Category); |
Input |
|
SortProductList
Changes the sort order of products in category list accordning to the given sort criteria.
Syntax |
SortProductList($Category, 'byStockLevel'); |
Input |
|