iikoFront Api V7Preview7 Code Reference
iikoFront Api V7Preview7 Code Reference
Resto.Front.Api.Extensions
OperationServiceExtensions Class
OperationServiceExtensions Methods
AddOrderModifierItem Method
AddOrderModifierItem Method (IOperationService, Int32, IProduct, IProductGroup, IOrder, IOrderCompoundItem, ICredentials, Nullable(Int32), Nullable(Decimal))
AddOrderModifierItem Method (IOperationService, Int32, IProduct, IProductGroup, IOrder, IOrderCompoundItemComponent, ICredentials, Nullable(Int32), Nullable(Decimal))
AddOrderModifierItem Method (IOperationService, Int32, IProduct, IProductGroup, IOrder, IOrderProductItem, ICredentials, Nullable(Int32), Nullable(Decimal))
AddOrderModifierItem Method (IOperationService, Guid, Int32, IProduct, IProductGroup, IOrder, IOrderCompoundItem, ICredentials, Nullable(Int32), Nullable(Decimal))
AddOrderModifierItem Method (IOperationService, Guid, Int32, IProduct, IProductGroup, IOrder, IOrderCompoundItemComponent, ICredentials, Nullable(Int32), Nullable(Decimal))
AddOrderModifierItem Method (IOperationService, Guid, Int32, IProduct, IProductGroup, IOrder, IOrderProductItem, ICredentials, Nullable(Int32), Nullable(Decimal))

# OperationServiceExtensions AddOrderModifierItem Method (IOperationService, Int32, IProduct, IProductGroup, IOrder, IOrderCompoundItem, ICredentials, Nullable Int32 , Nullable Decimal )

Adds order item modifier to the compound item in existing order. User must have rights to edit orders.

Namespace: Resto.Front.Api.Extensions
Assembly: Resto.Front.Api.V7Preview7 (in Resto.Front.Api.V7Preview7.dll) Version: 1ca4876affdd3bc5359a98b321fc115a647d2251
Syntax
C#
Copy

    public static IOrderModifierItem AddOrderModifierItem(
    	this IOperationService operationService,
    	int amount,
    	IProduct modifier,
    	IProductGroup parentGroup,
    	IOrder order,
    	IOrderCompoundItem compoundItem,
    	ICredentials credentials,
    	int? payableAmount = null,
    	decimal? predefinedPrice = null
    )

#### Parameters

operationService
  Type: Resto.Front.Api
  IOperationService
  Operation service.
amount
  Type: System
  Int32
  Amount of the modifier. Can be from 1 to 999.
modifier
  Type: Resto.Front.Api.Data.Assortment
  IProduct
  Assortment position for modifier. Must be accessible through IOrderProductItem.AvailableSimpleModifiers collection or one of the IOrderProductItem.AvailableGroupModifiers child collections.
parentGroup
  Type: Resto.Front.Api.Data.Assortment
  IProductGroup
  Assortment position group for modifier. Must be specified if new modifier will be part of the group modifier. Otherwise null. Group modifier must be chosen from IOrderProductItem.AvailableGroupModifiers
order
  Type: Resto.Front.Api.Data.Orders
  IOrder
  Order to which modifier will be added
compoundItem
  Type: Resto.Front.Api.Data.Orders
  IOrderCompoundItem
  Order item to which modifier will be added.
credentials
  Type: Resto.Front.Api.Data.Security
  ICredentials
  Credentials of the user. Required to pass permission and some other checks, as well as execute personalized operations.
payableAmount (Optional)
  Type: System
  Nullable
  Int32
  Custom payable amount. Leave it null to use default logic or set custom value to override default logic. Payable part of the amount must be between zero (which means that whole modifier is free of charge) and amount (which means that whole modifier is payable).
predefinedPrice (Optional)
  Type: System
  Nullable
  Decimal
  Predefined fixed price of the modifier, allows to use external quotation instead of default price list. null means default price.

#### Return Value

Type: IOrderModifierItem

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IOperationService. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
Compound item should have at least one component, so [!:AddPrimaryComponent(Resto.Front.Api.Data.Assortment.IProduct,Resto.Front.Api.Editors.Stubs.IOrderStub,Resto.Front.Api.Editors.Stubs.IOrderCompoundItemStub,System.Nullable<decimal>)] should be called before adding modifiers.
See Also

#### Reference

OperationServiceExtensions Class
AddOrderModifierItem Overload
Resto.Front.Api.Extensions Namespace