Package DE_EPAGES::Product::API::Object::LineItemProduct
object interface for LineItemProduct.
Base |
DE_EPAGES::Order::API::Object::LineItem |
Functions
- addQuantityToStock
- grepAvailableShippingMethods
- isQuantityCorrectOnInsertOrder
- recalculate
- set
- substractQuantityFromStock
addQuantityToStock
Calls DE_EPAGES::Product::API::Object::Product::addToStock with quantity of lineitem. If the line item contains no product, the stock cant be changed.
Syntax |
$LineItemProduct->addQuantityToStock; |
grepAvailableShippingMethods
Reduce available shipping methods, if shipping methods selected for product.
Syntax |
$aShippingMethods = $LineItem->grepAvailableShippingMethods($aShippingMethods); |
Input |
|
Return |
|
isQuantityCorrectOnInsertOrder
Calls DE_EPAGES::Product::API::Object::Product::lineItem to get the possible quantity of lineitem. If the line item contains no product the quantity is considered to be available. Returns true if the desired quantity is available and is valid according to the products minimum order amount and order amount interval.
Syntax |
$LineItemProduct->isQuantityCorrectOnInsertOrder; |
Return |
|
recalculate
Calls DE_EPAGES::Product::API::Object::Product::recalculateLineItem to calculate the line item price based on product price and quantity. Updates the LineItemPrice attribute of the line item.
Syntax |
$LineItemProduct->recalculate($Container, $hValues); |
Input |
|
set
Sets the given attribute values on the object. This function triggers hooks 'OBJ_BeforeUpdateObject' and 'OBJ_AfterUpdateObject' and any specialized OBJ_BeforeUpdate* and OBJ_AfterUpdate* hooks.
Syntax |
$Object->set($hValues, $LanguageID); |
Example |
$Object->set({ 'LocaleID' => 'de_DE' }); $Object->set({ 'Name' => 'Fußball' }, GetPKeyLanguageByCode('de')); $Object->set({ 'Name' => 'Soccer' }, GetPKeyLanguageByCode('en')); |
Input |
|
Hook |
|
substractQuantityFromStock
Calls DE_EPAGES::Product::API::Object::Product::substractFromStock with quantity of lineitem. If the line item contains no product, the stock cant be changed.
Syntax |
$LineItemProduct->substractQuantityFromStock; |