ProductCombinationLevel
class ProductCombinationLevel (View source)
Class ProductCombinationLevel Used to represent a product combination Level
Properties
| DoliDB | $db | Database handler |
|
| string | $table_element | ||
| int | $id | Rowid of combination |
|
| int | $fk_product_attribute_combination | Rowid of parent product combination |
|
| int | $fk_price_level | Combination price level |
|
| float | $variation_price | Price variation |
|
| bool | $variation_price_percentage | Is the price variation a relative variation? |
|
| string | $error | ||
| string[] | $errors |
Methods
Retrieves a combination level by its rowid
Retrieves combination price levels
Assign vars form an stdclass like sql obj
Save a price impact of a product combination for a price level
delete
delete all for a combination
Clean not needed price levels for a combination
Create new Product Combination Price level from Parent
Details
__construct(DoliDB $db)
Constructor
int
fetch(int $rowid)
Retrieves a combination level by its rowid
mixed
fetchAll(int $fk_product_attribute_combination, int $fk_price_level = 0)
Retrieves combination price levels
int
fetchFormObj(object $obj)
Assign vars form an stdclass like sql obj
int
save()
Save a price impact of a product combination for a price level
int
delete()
delete
int
deleteAllForCombination(int $fk_product_attribute_combination)
delete all for a combination
int
clean(int $fk_product_attribute_combination)
Clean not needed price levels for a combination
static ProductCombinationLevel
createFromParent(DoliDB $db, ProductCombination $productCombination, int $fkPriceLevel)
Create new Product Combination Price level from Parent