Plentymarkets interface documentation
Code
Contracts
CouponCampaignCodeRepositoryContract
This interface allows you to get and create coupon codes.
Namespace
Plenty\Modules\Order\Coupon\Campaign\Code\Contracts
Methods
public getByCode($code, $with = []):Plenty\Modules\Order\Coupon\Campaign\Code\Models\CouponCampaignCode
Return type: CouponCampaignCode
Gets a coupon code. The code string must be specified.
Name |
Type |
Description |
|
||
|
public deleteCode($code, $withoutUsed = false):bool
Delete a coupon code.
Name |
Type |
Description |
|
||
|
public create($data):Plenty\Modules\Order\Coupon\Campaign\Code\Models\CouponCampaignCode
Return type: CouponCampaignCode
Creates a coupon code.
Name |
Type |
Description |
|
public setDisabledByCode($code, $disabled):int
Disable or enable coupon
Name |
Type |
Description |
|
||
|
Models
CouponCampaignCode
The CouponCampaignCode model contains information about coupon codes. Each code belongs to one campaign only.
Namespace
Plenty\Modules\Order\Coupon\Campaign\Code\Models
Name | Type | Description |
---|---|---|
code |
The coupon code |
|
campaignId |
The ID of the campaign that the code belongs to |
|
disable |
Flag that indicates if a code is active or deactivated. <ul><li>True = the code is deactivated</li> <li>False = the code is active</li></ul> |
|
consumed |
Flag that indicates if a code was redeemed or not. <ul><li>True = the code was redeemed</li> <li>False = the code is not redeemed</li></ul> |
|
usedCount |
How many times a code has been redeemed |
|
usedAmount |
The amount that is already redeemed. The total amount that can be redeemed is defined in the campaign as coupon value, because the value applies to all codes of a campaign. |
|
generatedAt |
The date and time that the code was generated |
|
lastUsedAt |
The date and time that the code was redeemed last. This date will be set if the coupon amount has not been fully used. |
|
consumedAt |
The date and time that the coupon amount of this code was fully consumed |
|
expiresAt |
The date and time that the code will expire or has expired |
|
value |
The value of the coupon if it differs from the campaign value. The value is null if the campaign value is used. |
|
campaign |
The coupon campaign and all information about the campaign that this code belongs to |
Methods
public toArray()
Returns this model as an array.
Order
Models
GiftCardCode
Model that holds gift card codes.
Namespace
Plenty\Modules\Order\Coupon\Campaign\Code\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the gift card code |
|
orderItemId |
The order item ID |
|
campaignId |
The campaign ID |
|
code |
The coupon code |
|
sender |
The name of the sender |
|
receiver |
The name of the receiver |
|
message |
The message |
Methods
public toArray()
Returns this model as an array.
CouponCodeOrder
The CouponCodeOrder model.
Namespace
Plenty\Modules\Order\Coupon\Code\Order\Models
Name | Type | Description |
---|---|---|
corderItemId |
The ID of the order item that the coupon was redeemed for |
|
campaignId |
The ID of the campaign that the coupon belongs to |
|
code |
The coupon code |
|
type |
The display type of the redeemed coupon The following display types are available:<ul> <li>disposable</li> <li>fixed_vat</li> <li>fixed</li> <li>percental</li> <li>undefined</li> </ul> |
|
amount |
The redeemed amount of the coupon |
|
vatRate |
The redeemed vat rate of the coupon |
Methods
public toArray()
Returns this model as an array.
Order
The model of the order.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order |
|
typeId |
The ID of the order type It is possible to define individual order types. However, the following types are available by default:
|
|
methodOfPaymentId |
The ID of the order’s payment method (read only) |
|
shippingProfileId |
The ID of the order’s shipping profile (read only) |
|
paymentStatus |
The payment status of the order (read only) |
|
statusId |
The ID of the order status |
|
statusName |
The name for the status ID (read only) |
|
ownerId |
The user ID of the order’s owner |
|
referrerId |
The referrer ID of the order |
|
createdAt |
The date that the order was created |
|
updatedAt |
The date that the order was updated last |
|
plentyId |
The plenty ID of the client that the order belongs to |
|
locationId |
The ID of the location that the order belongs to |
|
roundTotalsOnly |
True means only the order’s total amounts are rounded, false the order item price is rounded too. (read-only) |
|
numberOfDecimals |
The number of decimals this order was rounded with. (read-only) |
|
lockStatus |
The lock status of the order. The following statuses are available:
|
|
isLocked |
True, if the order has the lock status "unlocked". False otherwise. |
|
hasTaxRelevantDocuments |
||
billingAddress |
The invoice address of the order |
|
deliveryAddress |
The delivery address of the order |
|
owner |
The owner of the order |
|
hasDeliveryOrders |
Has the order delivery orders? |
|
legacyOrderType |
The legacy order type as string |
|
client |
The client data |
|
addresses |
The address objects that are associated with the order. |
|
addressRelations |
The address relations for this order. |
|
orderItems |
The order items that are associated with the order. |
|
sortedOrderItems |
The order items that are associated with the order sorted by relations. |
|
properties |
The order properties that are associated with the order. |
|
relations |
The order relation reference instances that are associated with the order. |
|
amounts |
The order amounts that are associated with the order. |
|
comments |
The order comments. |
|
location |
The accounting location of the order. |
|
payments |
The payments that are associated with the order. |
|
orderReferences |
The order references. |
|
reverseOrderReferences |
The sub order references showing on the current order . |
|
originOrderReferences |
The references of other orders, e.g. returns or credit notes, associated with the order. |
|
shippingPallets |
The shipping pallets that are associated with the order. |
|
shippingPackages |
The shipping packages that are associated with the order. |
|
documents |
The documents that are associated with the order. |
|
returnLabels |
The order returns documents that are associated with the order. |
|
dates |
The dates of the order. Can contain many different dates with their types like:
|
|
originOrder |
The origin order of this order. If this order is the origin, this attribute is null. (deprecated) |
|
parentOrder |
The parent order of this order. If this order has no parent, this attribute is null. (deprecated) |
|
originOrders |
The origin orders of this order. |
|
parentOrders |
The parent orders of this order. |
|
childOrders |
All orders referencing the current order as parent. |
|
systemAmount |
The order amount in the system currency. |
|
amount |
The order amount in foreign currency if exists. Otherwise the amount in system currency. |
|
contactSenderId |
||
contactSender |
The associated contact for the contact-sender relation. |
|
contactReceiverId |
||
contactReceiver |
The associated contact for the contact-receiver relation. |
|
warehouseSenderId |
||
warehouseSender |
The associated warehouse for the warehouse-sender relation. |
|
warehouseReceiverId |
||
warehouseReceiver |
The associated warehouse for the warehouse-receiver relation. |
|
transactionSums |
The sums of all order item transactions. |
|
orderItemSummary |
The order item summary |
|
paymentTerms |
The payment terms of this order. |
|
shippingInformation |
The shipping information for this order. |
|
tags |
The order tags. |
Methods
public toArray()
Returns this model as an array.
OrderAmount
The order amount model.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order amount. |
|
orderId |
The ID of the order that the amount belongs to. |
|
isSystemCurrency |
Flag that states if the current currency is the same as system currency or not. |
|
isNet |
Flag that states if the invoice is net or not. If the invoice is not net, it is gross. |
|
currency |
The currency of the amounts. |
|
exchangeRate |
The exchange rate for converting the current currency into the system currency. |
|
netTotal |
The total net amount of the order. |
|
grossTotal |
The total gross amount of the order. |
|
vatTotal |
The total vat amount of the order. |
|
invoiceTotal |
The total invoice amount. |
|
paidAmount |
The order amount that is already paid. |
|
prepaidAmount |
This is deprecated and will be removed in the next version. Please use <code>$giftCardAmount</code> instead. |
|
giftCardAmount |
The amount that comes from gift cards that were redeemed when placing the order The gift cards amount does not reduce the invoice total, but reduces the amount that still needs to be paid. The amount that still needs to paid is not an own parameter because the amount can be calculated by subtracting the gift cards amount from the invoice total. |
|
shippingCostsGross |
The gross shipping costs. |
|
shippingCostsNet |
The net shipping costs. |
|
taxlessAmount |
The taxless amount of the order. Portion of the total invoice amount without taxes. |
|
createdAt |
The date that the amount was created. |
|
updatedAt |
The date that the amount was updated last. |
|
order |
The order that this amount belongs to. |
|
vats |
The vat amounts |
Methods
public toArray()
Returns this model as an array.
OrderAmountVat
The order amount vat model.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the VAT information of an order amount |
|
orderAmountId |
The ID of the order amount that the VAT information belong to |
|
countryVatId |
The ID of the VAT configuration |
|
vatField |
The ID of the VAT rate’s field [0,1,2,3,4,5]. |
|
vatRate |
The actual VAT rate that was used, e.g. 19%. |
|
value |
The VAT amount of money given in the same currency as the order amount. |
|
netTotal |
The net amount for the current vat rate. |
|
grossTotal |
The gross amount for the current vat rate. |
|
createdAt |
The date that the VAT was created. |
|
updatedAt |
The date that the VAT was updated last. |
|
orderAmount |
The OrderAmount model that the OrderAmountVat belongs to. |
|
countryVat |
The country vat instance. |
Methods
public toArray()
Returns this model as an array.
OrderItem
The order item model. Items, shipping costs, coupons, surcharges etc. are all displayed as order items.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order item |
|
orderId |
The ID of the order that the order item belongs to |
|
typeId |
The ID of the order item type
|
|
referrerId |
The ID of order item referrer |
|
itemVariationId |
The ID of the item variation |
|
quantity |
The quantity. |
|
orderItemName |
The name of the order item |
|
attributeValues |
The attribute value names |
|
shippingProfileId |
The ID of the order item’s shipping profile |
|
countryVatId |
The ID of the country vat |
|
vatField |
The vat id (0-5). |
|
vatRate |
The vat amount, e.g. 19.0 for 19% VAT. |
|
position |
The order items position in the order. |
|
warehouseId |
The ID of the warehouse. |
|
createdAt |
The date at which the order item was created. |
|
updatedAt |
The date that the order item was last updated. |
|
systemAmount |
The order item’s amount in the system currency. |
|
amount |
The order item’s amount in the order currency. If the order currency is the same as the system currency this amount is the same. |
|
order |
The order that the property belongs to. |
|
type |
The order item type |
|
countryVat |
The country vat instance. |
|
variation |
The item variation in the position. |
|
amounts |
The order item amounts that belong to the order item. |
|
properties |
The order item properties that belong to the order item. |
|
orderProperties |
The order item order properties that belong to the order item. |
|
orderDates |
The dates of the associated order. |
|
dates |
The dates of the order item. Can contain many different dates with their types. The following types are currently available:
|
|
orderPropertyItems |
A collection with order items referencing the current order item with type 'order_property'. |
|
referencedOrderPropertyItem |
The referenced order item with type 'order_property'. |
|
references |
The order item references. |
|
referencedBy |
The order item references which reference this order item. |
|
giftCardCodes |
The gift card codes that belong to the order item. |
|
transactions |
The transactions that belong to the order item |
|
serialNumbers |
The serial numbers that belong to the order item |
|
variationBarcodes |
The barcodes that belong to the variation of the order item |
|
comments |
The order item comments. |
|
warehouselocations |
<b>DEPRECATED</b> The order items warehouse locations. |
|
transactionSums |
The sums of all order item transactions. |
|
couponReferences |
The coupon references. |
Methods
public toArray()
Returns this model as an array.
OrderItemAmount
The order item amount model. Order item amount refers to amounts of money.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order item amount. |
|
orderItemId |
The ID of the order item that the amount belongs to. |
|
isSystemCurrency |
Flag that indicates if the current currency is the same as the system currency or not. |
|
currency |
The currency of the amounts. |
|
exchangeRate |
The exchange rate for converting the current currency into the system currency. |
|
purchasePrice |
The purchase price of the variation. |
|
priceOriginalGross |
The original gross price without any surcharges or discounts. |
|
priceOriginalNet |
The original net price without any surcharges or discounts. |
|
priceGross |
The total gross price including surcharges and discounts [READONLY]. |
|
priceNet |
The total net price including surcharges and discounts [READONLY]. |
|
surcharge |
The surcharge as gross amount. |
|
discount |
The discount can be a percentage or a fixed value. |
|
isPercentage |
Flag that indicates if a discount is given as a percentage or as a fixed value. |
|
createdAt |
The date that the amount was created. |
|
updatedAt |
The date that the amount was last updated. |
|
orderItem |
The order item that the amount belongs to. |
Methods
public toArray()
Returns this model as an array.
OrderItemOrderProperty
This model contains the order properties that are assigned to order items.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
propertyId |
The ID of the order property |
|
orderItemId |
The ID of the order item of the current order item order property |
|
value |
The value for the order property |
|
fileUrl |
The URL of the order property |
|
name |
The name of the order property |
|
type |
The type of the order property |
Methods
public toArray()
Returns this model as an array.
OrderItemReference
The order item reference model. Each OrderItemReference has a referenced OrderItem and a referenced type ('parent','bundle','campaign','reorder','set','order_property').
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the reference |
|
orderItemId |
The ID of the order item that the reference belongs to |
|
referenceOrderItemId |
The ID of the order item that is referred to |
|
referenceType |
The type of the reference |
|
createdAt |
The date that the reference was created |
|
updatedAt |
The date that the reference was updated last |
|
orderItem |
The order item the reference belongs to |
|
referencedOrderItem |
The referenced order item |
Methods
public toArray()
Returns this model as an array.
OrderItemSummary
The order item summary model.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
orderId |
The ID of the order |
|
quantity |
The summed up quantity of all order items visible in the UI |
|
count |
The count of all order items visible in the UI. |
|
weight |
The summed up weight (property type ID 11) of all order items |
|
warehouses |
A list of all order items warehouses |
|
profitMarginSystemCurrency |
The summed up profit margin of all order items in system currency |
|
profitMarginOrderCurrency |
The summed up profit margin of all order items in order currency |
|
orderCommentCount |
The number of order comments |
Methods
public toArray()
Returns this model as an array.
OrderItemTransactionSums
The order item transaction sums model.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
orderItemId |
The ID of the order item |
|
quantityTransactionsInRegular |
The summed up quantity of all transactions with direction 'in' and status 'regular' |
|
quantityTransactionsOutRegular |
The summed up quantity of all transactions with direction 'out' and status 'regular' |
|
quantityTransactionsInCancelled |
The summed up quantity of all transactions with direction 'in' and status 'cancelled' |
|
quantityTransactionsOutCancelled |
The summed up quantity of all transactions with direction 'out' and status 'cancelled' |
|
priceTotalTransactionsInRegular |
The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular' |
|
priceTotalTransactionsOutRegular |
The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular' |
|
priceTotalTransactionsInCancelled |
The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled' |
|
priceTotalTransactionsOutCancelled |
The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled' |
|
areTransactionsInComplete |
Flag that indicates if the item has transactions with direction 'in' of the full item quantity |
|
areTransactionsOutComplete |
Flag that indicates if the item has transactions with direction 'out' of the full item quantity |
Methods
public toArray()
Returns this model as an array.
OrderItemType
The order item type model.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order item type. The following types are currently available: <br />
|
|
isErasable |
Flag that indicates if this type can be deleted or not |
|
position |
The position for sorting |
|
names |
The names of the order item types |
Methods
public toArray()
Returns this model as an array.
OrderItemTypeName
The order item type name model.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the type name |
|
typeId |
The related type id. |
|
name |
The type name. |
|
lang |
The ISO 639-1 language code for the name, e.g. "en" for English |
|
type |
The order item type instance. |
Methods
public toArray()
Returns this model as an array.
OrderItemWarehouseLocation
<b>DEPRECATED</b> The order item warehouse location model. Order item warehouse locations * refer to the location of an order item, in a specific warehouse.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
orderItemId |
The Id of the order item, that the warehouse location is associated with. |
|
warehouseLocationId |
The Id of the warehouse location, this order item is associated with. |
|
quantity |
The quantity stored at the warehouse location |
|
bestBeforeDate |
The best before date |
|
batch |
The batch |
|
warehouseLocation |
The warehouse location of the item |
Methods
public toArray()
Returns this model as an array.
OrderPaymentTerms
The order payment terms model.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the early payment discount. |
|
orderId |
The ID of the order. |
|
earlyPaymentDiscount |
The early payment discount in percent. |
|
earlyPaymentDiscountDays |
The allowed number of days for the discount. |
|
valutaDays |
The valuta given in days. |
|
paymentAllowedDays |
The allowed number of days for the payment. |
|
createdAt |
The date the model was created. |
|
updatedAt |
The date the model was last updated. |
|
order |
The order of this early payment discount. |
Methods
public toArray()
Returns this model as an array.
OrderReference
The order reference model. Each OrderReference has an origin order (the most top order) and a referenced order.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The id of the order reference entry. |
|
orderId |
The order id. |
|
originOrderId |
The id of the origin order. |
|
referenceOrderId |
The id of the referenced order. |
|
referenceType |
The reference type ("parent", "reorder", "grouped", "split", "multi_order") of the referenced order. |
|
order |
||
originOrder |
The origin order of the order. |
|
referenceOrder |
The referenced order of the order. |
Methods
public toArray()
Returns this model as an array.
OrderTransactionSums
The order transaction sums model.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
orderId |
The ID of the order |
|
quantityAllItems |
The summed up quantity of all items |
|
quantityTransactionsInRegular |
The summed up quantity of all transactions with direction 'in' and status 'regular' |
|
quantityTransactionsOutRegular |
The summed up quantity of all transactions with direction 'out' and status 'regular' |
|
quantityTransactionsInCancelled |
The summed up quantity of all transactions with direction 'in' and status 'cancelled' |
|
quantityTransactionsOutCancelled |
The summed up quantity of all transactions with direction 'out' and status 'cancelled' |
|
quantityTransactionsInBooked |
The summed up quantity of all transactions with direction 'in' and status 'regular' and is booked |
|
quantityTransactionsOutBooked |
The summed up quantity of all transactions with direction 'out' and status 'regular' and is booked |
|
priceTotalTransactionsInRegular |
The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular' |
|
priceTotalTransactionsOutRegular |
The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular' |
|
priceTotalTransactionsInCancelled |
The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled' |
|
priceTotalTransactionsOutCancelled |
The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled' |
|
areTransactionsInComplete |
Flag that indicates if all items have transactions with direction 'in' of the full item quantity |
|
areTransactionsOutComplete |
Flag that indicates if all items have transactions with direction 'out' of the full item quantity |
Methods
public toArray()
Returns this model as an array.
OrderType
The order type model.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order type |
|
isErasable |
Flag that states if this type can be deleted or not. |
|
position |
The position for sorting |
|
names |
The names of the order item types. |
Methods
public toArray()
Returns this model as an array.
OrderTypeName
The order type name model.
Namespace
Plenty\Modules\Order\Models
Name | Type | Description |
---|---|---|
id |
The ID of the type name |
|
typeId |
The ID of the type |
|
name |
The type name. |
|
lang |
The ISO 639-1 language code for the name, e.g. "en" for English |
|
type |
The order type instance. |
Methods
public toArray()
Returns this model as an array.
Template
OrderFilterBuilderFactory
This factory provides methods to retrieve all available catalog order filter builders.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template
Methods
public orderWarehouseFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderWarehouseFilterBuilder
Return type: OrderWarehouseFilterBuilder
public orderStatusFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderStatusFilterBuilder
Return type: OrderStatusFilterBuilder
public orderTypeFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderTypeFilterBuilder
Return type: OrderTypeFilterBuilder
public orderReferrerFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderReferrerFilterBuilder
Return type: OrderReferrerFilterBuilder
public orderPaymentMethodFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderPaymentMethodFilterBuilder
Return type: OrderPaymentMethodFilterBuilder
public orderOwnerFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderOwnerFilterBuilder
Return type: OrderOwnerFilterBuilder
public orderItemVariationIdFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderOwnerFilterBuilder
Return type: OrderOwnerFilterBuilder
public orderClientFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderClientFilterBuilder
Return type: OrderClientFilterBuilder
public orderItemTypeFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderItemTypeFilterBuilder
Return type: OrderItemTypeFilterBuilder
public orderIdFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderIdFilterBuilder
Return type: OrderIdFilterBuilder
public orderCreatedAtFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderCreatedAtFilterBuilder
Return type: OrderCreatedAtFilterBuilder
public orderUpdatedAtFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderUpdatedAtFilterBuilder
Return type: OrderUpdatedAtFilterBuilder
public orderPaidAtFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderPaidAtFilterBuilder
Return type: OrderPaidAtFilterBuilder
public orderCompletedAtFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderCompletedAtFilterBuilder
Return type: OrderCompletedAtFilterBuilder
public orderReceivedDateFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderReceivedDateFilterBuilder
Return type: OrderReceivedDateFilterBuilder
public orderShippingProfileFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderShippingProfileFilterBuilder
Return type: OrderShippingProfileFilterBuilder
public orderExcludeMainOrdersFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderShippingProfileFilterBuilder
Return type: OrderShippingProfileFilterBuilder
Contracts
OrderAmountRepositoryContract
This interface allows you to get and list order amounts and their vats.
Namespace
Plenty\Modules\Order\Contracts
Methods
public getByOrderId($orderId, $currency = null):Plenty\Modules\Order\Models\OrderAmount
Return type: OrderAmount
Get an order amount for an order in a currency. The ID of the order must be specified. The currency is optional. If no currency is specified, the order amount entry will be returned in the default system currency.
Name |
Type |
Description |
|
The ID of the order |
|
|
The currency of the order amount |
public getById($id):Plenty\Modules\Order\Models\OrderAmount
Return type: OrderAmount
Get an order amount. The ID of the order amount must be specified.
Name |
Type |
Description |
|
The ID of the order amount |
public listByOrderId($orderId):array
List all order amounts of an order. The ID of the order must be specified.
Name |
Type |
Description |
|
The ID of the order |
OrderItemRepositoryContract
The OrderItemRepositoryContract is the interface for the order item repository. This interface allows you to find, create and update order items. An order item can be e.g. items, surcharges and coupons. Each order item is given a unique id, which links it to a specific order.
Namespace
Plenty\Modules\Order\Contracts
Methods
public getOrderItem($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\OrderItem
Return type: OrderItem
Get an order item
Name |
Type |
Description |
|
The ID of the order item |
|
|
The relations to load |
|
|
Load order item instance without default relations |
public deleteOrderItem($orderId, $orderItemId):bool
Delete an order item
Name |
Type |
Description |
|
The ID of the order that the item belongs to. |
|
|
The ID of the order item to be deleted. |
public search($orderId, $page = 1, $itemsPerPage = 50, $with = [], $sortBy = "id", $sortOrder = "asc"):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Search order items
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
OrderRepositoryContract
The OrderRepositoryContract is the interface for the order repository. This interface allows you to find, create and update orders. There are many different order types and the data returned depends on the order type.
Namespace
Plenty\Modules\Order\Contracts
Methods
public findOrderById($orderId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-04)
Please use OrderRepositoryContract::findById instead |
Return type: Order
Get an order
Name |
Type |
Description |
|
The ID of the order |
|
|
The relations to load in the order instance, one of "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". |
|
|
Load order instance without default relations |
public findById($orderId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Get an order
Name |
Type |
Description |
|
The ID of the order |
|
|
The relations to load in the order instance |
|
|
Load order instance without default relations |
public getByIds($orderIds, $with = [], $lazyLoaded = false):Illuminate\Support\Collection
Return type: Collection
Get orders
Name |
Type |
Description |
|
||
|
||
|
public findOrderByExternalOrderId($externalOrderId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-04)
Please use OrderRepositoryContract::getByExternalOrderId instead |
Return type: Order
Get an order by external order ID
Name |
Type |
Description |
|
||
|
||
|
Load order instance without default relations |
public getByExternalOrderId($externalOrderId, $with = [], $lazyLoaded = false):Illuminate\Support\Collection
Return type: Collection
List orders by external order ID
Name |
Type |
Description |
|
||
|
||
|
Load order instance without default relations |
public createOrder($data, $coupon = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-04)
Please use OrderRepositoryContract::create instead |
Return type: Order
Create an order
Name |
Type |
Description |
|
The order data. The properties that are required to create an order can be found in the order model. |
|
|
A coupon code or a list of coupon codes to be redeemed in the order. |
|
|
||
|
public create($data, $coupons = [], $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create an order
Name |
Type |
Description |
|
The order data |
|
|
Coupon codes to be redeemed in the order |
|
|
||
|
public updateOrder($data, $orderId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-04)
Please use OrderRepositoryContract::update instead |
Return type: Order
Update an order
Name |
Type |
Description |
|
The order data. The properties that are required to update an order can be found in the order model. |
|
|
The ID of the order |
|
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update an order
Name |
Type |
Description |
|
The ID of the order |
|
|
The order data |
|
|
||
|
public deleteOrder($orderId):bool
Deprecated! (since 2021-04)
Please use OrderRepositoryContract::delete instead |
Delete an order
Name |
Type |
Description |
|
The ID of the order |
public delete($orderId):void
Delete an order
Name |
Type |
Description |
|
The ID of the order |
public undeleteOrder($orderId, $status):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-03)
Method won't be supported in the future |
Return type: Order
Restore an order
Name |
Type |
Description |
|
The ID of the order |
|
|
The status of the order |
public isDeleted($orderId):bool
Checks whether an order has been deleted or not.
Name |
Type |
Description |
|
The ID of the order |
public findSchedulerById($schedulerId):Plenty\Modules\Order\Scheduler\Models\OrderScheduler
Deprecated! (since 2021-03)
Method won't be supported in the future |
Return type: OrderScheduler
Get a scheduler order
Name |
Type |
Description |
|
The ID of the scheduler order |
public allOrdersByContact($contactId, $page = 1, $itemsPerPage = 50, $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List orders of a contact
Name |
Type |
Description |
|
The ID of the contact |
|
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of orders to be displayed per page. The default number of orders per page is 50. |
|
|
The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". |
public allOrdersBySupplier($contactId, $page = 1, $itemsPerPage = 50, $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List orders that include one or more variations from a supplier
Name |
Type |
Description |
|
The ID of the contact (supplier id) |
|
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of orders to be displayed per page. The default number of orders per page is 50. |
|
|
The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". |
public allOrdersByContactSender($contactId, $page = 1, $itemsPerPage = 50, $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List orders sent by a contact
Name |
Type |
Description |
|
The ID of the contact |
|
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of orders to be displayed per page. The default number of orders per page is 50. |
|
|
The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". |
public getLatestOrderByContactId($contactId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Get latest order of a contact
Name |
Type |
Description |
|
The ID of the contact |
|
|
The relations to load in the Order instance. The relations available are: "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". If you want to load relations, you need to include at least one, but you can also include several or all. |
|
|
public searchOrders($page = 1, $itemsPerPage = 50, $with = [], $lazyLoaded = false):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Lists orders
Name |
Type |
Description |
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of orders to be displayed per page. The default number of orders per page is 50. |
|
|
The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". |
|
|
Load order instance without default relations |
public getPackageNumbers($orderId):array
List package numbers of an order
Name |
Type |
Description |
|
The ID of the order |
public cancelOrder($orderId, $data):void
Deprecated! (since 2021-04)
Please use OrderRepositoryContract::cancel instead |
Cancel an order
Name |
Type |
Description |
|
The ID of the order |
|
|
The request data |
public cancel($orderId, $data = []):void
Cancel an order
Name |
Type |
Description |
|
The ID of the order |
|
|
The request data |
public findOrderByAccessKey($orderId, $accessKey):Plenty\Modules\Order\Models\Order
Return type: Order
Find the order for the given order ID and access key.
Name |
Type |
Description |
|
The ID of the order to be checked. |
|
|
The access key, that belongs to the order. |
public generateAccessKey($orderId, $regenerate = false):string
Generate an access key for the given order ID.
Name |
Type |
Description |
|
||
|
public completeOrder($orderId, $data = []):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-04)
Please use OrderRepositoryContract::complete instead |
Return type: Order
Complete an incomplete order.
Name |
Type |
Description |
|
The ID of the order |
|
|
Additional data. Currently only the statusId can be specified. |
public complete($orderId, $data = []):Plenty\Modules\Order\Models\Order
Return type: Order
Complete an incomplete order.
Name |
Type |
Description |
|
The ID of the order |
|
|
Additional data. Currently only the statusId can be specified. |
public createMultiOrderByContact($contactId):Plenty\Modules\Order\Models\Order
Return type: Order
Creates a multi order for a specific contact
Name |
Type |
Description |
|
public setOrderStatus45($orderId):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-03)
Method won't be supported in the future |
Return type: Order
Set order status to 4 or 5
Name |
Type |
Description |
|
public getMyAccountUrl($orderId):string
Get My Account url of the order
Name |
Type |
Description |
|
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Events
OrderCreated
An event class fired after a new order is created. The order type is not relevant. * At the same time also type depended events will be fired, like ReturnsCreated or CreditNoteCreated.
Namespace
Plenty\Modules\Order\Events
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
OrderEvent
A base event class for all order events. Each order event expects an order instance.
Namespace
Plenty\Modules\Order\Events
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
OrderFullyPaid
An Event class fired after a payment assignment when the order is fully paid.
Namespace
Plenty\Modules\Order\Events
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
OrderOverpaid
An event class will be fired after a payment is assigned and if the order is overpaid.
Namespace
Plenty\Modules\Order\Events
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
OrderPaidEvent
A base Event class for all order paid events.
Namespace
Plenty\Modules\Order\Events
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
OrderPartlyPaid
An Event class fired after a payment is assigned and if the order is only partly paid.
Namespace
Plenty\Modules\Order\Events
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
OrderPaymentAssigned
An Event class fired after a payment was assigned to an order. * After this event one of the following events will be fired, depending the payment status of the order: * OrderPrepaid, OrderPartlyPaid, OrderFullyPaid, OrderOverpaid.
Namespace
Plenty\Modules\Order\Events
Methods
public __construct($order, $payment):void
OrderPaymentAssigned constructor.
Name |
Type |
Description |
|
||
|
public getPayment():Plenty\Modules\Payment\Models\Payment
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
OrderPrepaid
An Event class fired after a payment is assigned and if the order is paid in advance.
Namespace
Plenty\Modules\Order\Events
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
SubscriptionChildOrderCreated
An event class fired after a new order for a subscription is created. The order type is not relevant. * At the same time also type depended events will be fired, like ReturnsCreated or CreditNoteCreated.
Namespace
Plenty\Modules\Order\Events
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
Services
OrderCreatedTypeService
This class is used as an event listener as well as a service for registering events. The class allows to register event classes to extend the OrderCreated event for custom order types.
Namespace
Plenty\Modules\Order\Services
Methods
public handle($created):void
Reacts upon the OrderCreated event
Name |
Type |
Description |
|
The event instance. |
public static addEventForType($typeId, $className):void
Create event class for a custom order type
Name |
Type |
Description |
|
The ID of the custom order type. |
|
|
The name of the event class. |
public static removeEventForType($typeId, $className):void
Delete event class from a custom order type
Name |
Type |
Description |
|
The ID of the custom order type. |
|
|
The name of the event class. |
Campaign
Contracts
CouponCampaignRepositoryContract
This is the contract for the coupon campaign repository. It allows you to get coupon campaigns.
Namespace
Plenty\Modules\Order\Coupon\Campaign\Contracts
Methods
public findById($id):Plenty\Modules\Order\Coupon\Campaign\Models\CouponCampaign
Return type: CouponCampaign
Get a coupon campaign
Name |
Type |
Description |
|
The ID of the coupon campaign |
public findByEmailPlaceholder($placeholder):Plenty\Modules\Order\Coupon\Campaign\Models\CouponCampaign
Return type: CouponCampaign
Get the CouponCampaign model from the database by emailPlaceholder.
Name |
Type |
Description |
|
The email placeholder to search the database by |
public findByCouponCode($couponCode):Plenty\Modules\Order\Coupon\Campaign\Models\CouponCampaign
Return type: CouponCampaign
Get the coupon campaign of a coupon code
Name |
Type |
Description |
|
The coupon code to search the database by |
public getCouponDisplayType($couponCodeValidation):string
Get the display type of a coupon
Name |
Type |
Description |
|
public create($data):Plenty\Modules\Order\Coupon\Campaign\Models\CouponCampaign
Return type: CouponCampaign
Create a coupon campaign
Name |
Type |
Description |
|
public modifyCampaignUsage($couponCampaignId, $operator, $field):void
Modifies the two counter 'used' and 'unused'
Name |
Type |
Description |
|
ID of the Coupon Campaign |
|
|
How should the usage been modified ( '+' or '-' ) |
|
|
Usage type to modify ( 'used' or 'unused' ) |
public delete($couponCampaignId):bool
Delete a coupon campaign
Name |
Type |
Description |
|
The ID of the coupon campaign |
public update($data):Plenty\Modules\Order\Coupon\Campaign\Models\CouponCampaign
Models
CouponCampaign
The CouponCampaign model contains all information of a campaign.
Namespace
Plenty\Modules\Order\Coupon\Campaign\Models
Name | Type | Description |
---|---|---|
id |
The ID of a coupon campaign |
|
externalId |
DEPRECATED! The external ID of a coupon campaign |
|
name |
The name of the coupon campaign |
|
variable |
The variable to display coupon codes in emails. There are only 10 variables available. A variable may only be used for one campaign. The variable names follow this pattern: CouponCode + Number e.g. CouponCode1. |
|
isPermittedForExternalReferrers |
Flag that indicates whether or not coupons can be redeemed if a customer enters the online store from an external referrer. <ul><li>TRUE = The coupon can be redeemed if the customer enters the online store from an external referrer </li> <li>FALSE = The coupon can not be redeemed</li></ul> |
|
includeShipping |
The discount also applies to shipping costs. The property will be only be set if the discount type fixed is set. |
|
unusedCodesCount |
The number of codes that have been redeemed |
|
usedCodesCount |
The number of codes that have not been redeemed |
|
endsAt |
The date that the campaign ends |
|
startsAt |
The date that the campaign starts |
|
minOrderValue |
The minimum order value that needs to be reached for the coupon to be redeemed. If the value is not reached the coupon will not be redeemed. |
|
codeDurationWeeks |
The number of weeks that codes of this campaign can be redeemed after they have been generated. |
|
codeAssignment |
The code assignment is only relevant for vouchers. Codes can either be generated every time a voucher is bought or a code from a previously created list of codes can be used. The three options available are generate, use_existing and only_use_existing. <ul><li>generate = a new code is generated on demand</li> <li>use_existing = the code already exists and is taken from a previously entered list of codes, in case of vouchers a new code will be generated for each item purchased that has associated a campaign ID</li> <li>only_use_existing = the code already exists and is taken from a previously entered list of codes, for vouchers no additional code will be generated for items purchased, only existing codes will be used</li></ul> |
|
codeLength |
There are 3 different length available. The code can be 6, 16, 24 or 32 characters long. |
|
usage |
The usage defines what the coupon codes from this campaign can be used for. There are three options available: <ul><li>single_and_subscription = The codes can be used for single orders and subscription orders</li> <li>single_order = The codes can be used for single orders only</li> <li>subscription = The codes can be used for subscriptions only</li></ul> |
|
concept |
The campaign concept defines how many codes belong to a campaign. The concept interacts with the redeem type that is explained next. There are two concept options available: <ul><li>single_code = The campaign has only one code</li> <li>multi_code = The campaign has several codes</li></ul> |
|
redeemType |
The redeem type defines how many times a code of a campaign can be redeemed. There are 4 redeem types available: <ul><li>multi_redeem_per_user = Each customer is allowed to redeem the same code several times</li> <li>single_redeem_per_user = Each customer can only redeem the same code once</li> <li>redeem_until_value_reached = A code can be entered several times by the same customer or by different customers, but only until the coupon value is depleted</li> <li>unique_redeem = The code can be redeemed once. If several customers get the same code, only the first customer to enter the code can use it.</li></ul> The redeem type interacts with the concept. Pay attention to the combination these two options form. |
|
discountType |
There are 4 discount types available: <ul><li>fixed = The coupon value is a fixed amount of money. This discount type is the only one that makes sense for coupons that are sold in the online store. The actual amount of money needs to be set with the value property.</li> <li>percent = The discount is given as percentage and the actual value depends on the purchase. The actual number of percent need to be set with the value property.</li> <li>item = The discount applies to entire items. A typical example would be - Buy 1 get 1 free - or in other words - Get 2 for the price of 1. The number of items the customer gets and the number of items the customer has to pay for need to be set with itemDiscountToPay and itemDiscountToBuy.</li> <li>shipping = The shipping does not cost anything. The cost will be set to zero no matter what the actual shipping costs are.</li></ul> |
|
itemDiscountToPay |
The number of items that the customer has to pay for. This number needs to be compared to the number of items the customer receives, itemDiscountToBuy |
|
itemDiscountToBuy |
The number of items that the customer receives, but he or she only has to pay for the number of items set with itemDiscountToPay. |
|
campaignType |
The two campaign types available are coupon or voucher. |
|
couponType |
The coupon type is only for campaigns that have the campaign type coupon. The two coupon types available are promotion and sales. |
|
description |
The description of the campaign |
|
value |
The actual discount value of a coupon. The value needs to be set for the two discount types fixed and percent. |
|
codes |
The codes and information about the codes that belong to this CouponCampaign |
|
references |
These references are available <ul> <li>category =</li> <li>item =</li> <li>webstore =</li> <li>customer_group =</li> <li>customer_type =</li> </ul> |
Methods
public toArray()
Returns this model as an array.
Reference
Contracts
CouponCampaignReferenceRepositoryContract
This is the contract for the coupon campaign reference repository. It allows you to get and create coupon campaigns references.
Namespace
Plenty\Modules\Order\Coupon\Campaign\Reference\Contracts
Methods
public findByCouponCampaignId($couponCampaignId):Illuminate\Support\Collection
Return type: Collection
Get a coupon campaign
Name |
Type |
Description |
|
The ID of the coupon campaign |
public create($data):Illuminate\Support\Collection
Models
CouponCampaignReference
The CouponCampaignReference model contains all information of a campaign reference.
Namespace
Plenty\Modules\Order\Coupon\Campaign\Reference\Models
Name | Type | Description |
---|---|---|
campaignId |
The ID of a coupon campaign |
|
referenceType |
The reference type defines the type of the reference. There are five reference types available: <ul> <li>category =</li> <li>item =</li> <li>webstore =</li> <li>customer_group =</li> <li>customer_type =</li> </ul> |
|
value |
The name of the coupon campaign |
Methods
public toArray()
Returns this model as an array.
Contact
Contracts
CouponCodeContactRepositoryContract
This is the contract for the coupon codes by contacts repository. It allows you to list coupon codes redeemed by a contact as well as to create, update and delete redeemed coupon codes.
Namespace
Plenty\Modules\Order\Coupon\Code\Contact\Contracts
Methods
public create($data):Plenty\Modules\Order\Coupon\Code\Contact\Models\CouponCodeContact
Return type: CouponCodeContact
Create redeemed coupons for a contact.
Name |
Type |
Description |
|
The redeemed coupon data. The properties that are required to create an entry can be found in the CouponCodeContact model. |
public update($contactId, $campaignId, $coupon, $data):Plenty\Modules\Order\Coupon\Code\Contact\Models\CouponCodeContact
Return type: CouponCodeContact
Update a redeemed coupon of a contact.
Name |
Type |
Description |
|
The ID of the contact that redeemed the coupon code |
|
|
The ID of the coupon campaign |
|
|
The coupon code |
|
|
The redeemed coupon data. The properties that are required to update an entry can be found in the CouponCodeContact model |
public find($contactId, $campaignId, $coupon):Plenty\Modules\Order\Coupon\Code\Contact\Models\CouponCodeContact
Return type: CouponCodeContact
Get a redeemed coupon for a contact
Name |
Type |
Description |
|
The ID of the contact which redeemed the coupon code |
|
|
The ID of the coupon campaign |
|
|
The coupon code |
public findByContact($contactId, $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List redeemed coupons for a contact
Name |
Type |
Description |
|
The contact ID as filter for redeemed coupons. |
|
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of coupons to be displayed per page. The default number of coupons per page is 50. |
public findByCampaign($campaignId, $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List redeemed coupons of a campaign.
Name |
Type |
Description |
|
The campaign ID as filter for redeemed coupons. |
|
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of coupons to be displayed per page. The default number of coupons per page is 50. |
public findByCoupon($coupon, $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List redeemed coupons of a coupon code
Name |
Type |
Description |
|
The coupon code |
|
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of coupons to be displayed per page. The default number of coupons per page is 50. |
Models
CouponCodeContact
The CouponCodeContact model.
Namespace
Plenty\Modules\Order\Coupon\Code\Contact\Models
Name | Type | Description |
---|---|---|
code |
The coupon code |
|
contactId |
The ID of the contact that redeemed the coupon |
|
openAmount |
The coupon amount that can still be redeemed |
|
redeemCount |
How many times a coupon code has already been redeemed |
|
updatedAt |
The date that the coupon code was updated last. |
|
campaignId |
The ID of the campaign that the coupon belongs to |
|
externalTransactionId |
The ID that is assigned to a coupon by the external coupon service provider, when the coupon is redeemed. |
Methods
public toArray()
Returns this model as an array.
Validation
Contracts
CouponCodeValidatorContract
CouponCodeValidatorContract is the interface for the coupon code validation repository. This interface provides the functionality to validate coupon data.
Namespace
Plenty\Modules\Order\Coupon\Code\Validation\Contracts
Methods
public validate($validationData):Plenty\Modules\Order\Coupon\Code\Validation\Models\CouponCodeValidation
Return type: CouponCodeValidation
Validate a coupon code
Name |
Type |
Description |
|
The data to validate a coupon |
Models
CouponCodeValidation
The CouponCodeValidation data model contains all data necessary for validating a coupon.
Namespace
Plenty\Modules\Order\Coupon\Code\Validation\Models
Name | Type | Description |
---|---|---|
campaignId |
The ID of the campaign |
|
validationType |
The type of the campaign. Currently the only type available is plentymarkets. |
|
items |
The list of items or variations to be validated |
|
contactId |
The ID of the contact that wants to redeem the coupon |
|
couponCode |
The coupon code |
|
currency |
The currency of the purchase |
|
exchangeRate |
The exchange rate of the purchase (optional, is loaded from settings if not given) |
|
referrer |
The order referrer |
|
salesDiscount |
The total discount from a coupon applied to an order. The discount is given as gross amount. |
|
salesDiscountNet |
The net discount from a coupon applied to an order. The net discount is the total discount minus the vat amount. |
|
itemDiscount |
The discount amount applied to items. |
|
itemDiscountNet |
The net discount applied to items. |
|
shippingDiscount |
The discount applied to shipping costs. |
|
shippingDiscountNet |
The net discount applied to shipping costs. |
|
usedVatFields |
The vat fields used for the validation |
|
restCouponAmount |
The remaining coupon amount |
|
checkedItems |
The list of variations that passed the validation |
|
validateParams |
Validation parameters |
|
couponCampaignType |
The campaign type |
Methods
public toArray()
Returns this model as an array.
CouponCodeValidationItem
The CouponCodeValidationItem model contains all item data needed for validating whether the coupon can be redeemed for these items or not.
Namespace
Plenty\Modules\Order\Coupon\Code\Validation\Models
Name | Type | Description |
---|---|---|
amount |
The price of a variation multiplied by the quantity |
|
noCoupon |
Flag that indicates whether a variation can be bought with a coupon, can exclusively be bought with a coupon or can not be bought with a coupon. |
|
quantity |
The quantity of the variation |
|
singlePrice |
The price of a single variation |
|
itemId |
The ID of the item |
|
vatField |
The field of the VAT rate |
|
itemHash |
The hash for items with new order properties |
|
hashReference |
The reference to itemHash in new order property items |
|
itemVariationId |
The ID of the variation |
Methods
public toArray()
Returns this model as an array.
Currency
Contracts
CurrencyConversionSettingsRepositoryContract
Provides methods for currency conversion data.
Namespace
Plenty\Modules\Order\Currency\Contracts
Methods
public getCurrencyConversionList():array
Gets the currency conversion setting.
CurrencyRepositoryContract
Provides methods for currency data.
Namespace
Plenty\Modules\Order\Currency\Contracts
Methods
public getCurrency($currencyIso, $columns = [], $with = []):Plenty\Modules\Order\Currency\Models\Currency
Return type: Currency
Get a currency
Name |
Type |
Description |
|
The currency ISO 4217 code, e.g. "EUR". |
|
|
The attributes to be loaded in the currency instance. |
|
|
The relations to be loaded in the currency instance. Valid relations are "names" or "countries"). |
public getCurrencyList($columns = [], $with = []):void
Get all currencies supported in the system.
Name |
Type |
Description |
|
The attributes to be loaded in the currency instances. |
|
|
The relations to be loaded in the currency instance. Valid relations are "names" or "countries". |
public getCurrencyCountries($currencyIso, $columns = []):void
List countries for a currency
Name |
Type |
Description |
|
The currency ISO 4217 code, e.g. "EUR". |
|
|
The attributes to be loaded in the country instances. |
public getCountryCurrency($countryId, $columns = [], $with = []):Plenty\Modules\Order\Currency\Models\Currency
Return type: Currency
Get a currency for a country
Name |
Type |
Description |
|
The country id. |
|
|
The attributes to be loaded in the currency instance. |
|
|
The relations to be loaded in the currency instance ("names" or "countries"). |
public getExchangeRate($currencyIso):Plenty\Modules\Order\Currency\Models\CurrencyExchangeRate
Return type: CurrencyExchangeRate
Get the exchange rate for a currency
Name |
Type |
Description |
|
public getExchangeRatesFrom($currencyIso):array
List exchange rates from a currency
Name |
Type |
Description |
|
The currency ISO 4217 code, e.g. "EUR". |
public getExchangeRatesTo($currencyIso):array
List exchange rates to a currency
Name |
Type |
Description |
|
The currency ISO 4217 code, e.g. "EUR". |
Models
Currency
The currency model. The model includes information like the ISO 4217 code and the related currency symbols as well as the countries that a currency is used in.
Namespace
Plenty\Modules\Order\Currency\Models
Name | Type | Description |
---|---|---|
currency |
The ISO 4217 code and id of the currency. |
|
htmlCode |
The html code (entity) for the currency. |
|
unicodeSign |
The unicode symbol for the currency. If no unicode symbol exists, the html code will be used. |
|
isActive |
Flag that indicates if the currency is active in the system or not. Currencies are activated per sales price. |
|
isErasable |
Flag that indicates if this currency can be deleted or not. <ul><li>False = Currency cannot be deleted</li><li>True = Currency can be deleted</li></ul> |
|
exchangeRate |
The current exchange rate for this currency. |
|
countries |
A list of countries that use the currency. |
|
names |
A list of names in different languages for the currency. |
Methods
public toArray()
Returns this model as an array.
CurrencyCountryRelation
The CurrencyCountryRelation model indicates which currency is related to which country.
Namespace
Plenty\Modules\Order\Currency\Models
Name | Type | Description |
---|---|---|
id |
The ID of the relation |
|
currency |
The currency |
|
countryId |
The ID of the country |
|
country |
The related country information |
|
currencyInstance |
The related currency information |
Methods
public toArray()
Returns this model as an array.
CurrencyExchangeRate
The currency exchange rate model.
Namespace
Plenty\Modules\Order\Currency\Models
Name | Type | Description |
---|---|---|
exchangeRate |
The exchange rate |
Methods
public toArray()
Returns this model as an array.
CurrencyName
The currency name model.
Namespace
Plenty\Modules\Order\Currency\Models
Name | Type | Description |
---|---|---|
id |
The ID of the currency name |
|
currency |
The currency |
|
lang |
The language of the currency name |
|
name |
The name in the language |
|
currencyInstance |
The currency instance. |
Methods
public toArray()
Returns this model as an array.
Idea
Models
Export
The export model for IDEA exports.
Namespace
Plenty\Modules\Order\Export\Pos\Idea\Models
Name | Type | Description |
---|---|---|
id |
The id of the export entry. |
|
token |
The token generated for the export entry. |
|
progress |
The progress of the export process. |
|
currentModule |
The currently exporting module of the export process. |
|
state |
The current state of the export process. |
|
filename |
The filename of the export content. |
|
createdAt |
Specifies the creation date of the export entry. |
|
updatedAt |
Specifies the last update date of the export entry. |
|
modules |
The modules to be used by the export process. |
|
options |
The options for the export process. Currently only "year" is supported as option key. |
Methods
public toArray()
Returns this model as an array.
Method
Contracts
PaymentMethodRepositoryContract
Repository Contract for PaymentMethod
Namespace
Plenty\Modules\Order\Payment\Method\Contracts
Methods
public getPaymentMethods($countryId, $plentyId = null, $lang = "de"):array
Gets a list of payment methods
Name |
Type |
Description |
|
||
|
||
|
public activatePaymentMethod($id):Plenty\Modules\Order\Payment\Method\Models\PaymentMethod
Models
PaymentMethod
The payment method model
Namespace
Plenty\Modules\Order\Payment\Method\Models
Name | Type | Description |
---|---|---|
id |
||
name |
||
minimumGross |
||
priority |
||
active |
||
showBankDetails |
||
infoPageType |
||
infoPageExternalUrl |
||
feeDomesticFlatRateWebstore |
||
feeDomesticFlatRateInternal |
||
feeDomesticPercentageWebstore |
||
feeDomesticPercentageInternal |
||
feeForeignFlatRateWebstore |
||
feeForeignFlatRateInternal |
||
feeForeignPercentageWebstore |
||
feeForeignPercentageInternal |
||
informations |
||
webstores |
||
coutries |
||
information |
Methods
public toArray()
Returns this model as an array.
Events
OrderPdfGenerationEvent
The OrderPdfGenerationEvent triggered before a pdf is generated for an order.
Namespace
Plenty\Modules\Order\Pdf\Events
Methods
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the
public getDocType():string
Get the
public addOrderPdfGeneration($orderPdfGeneration):Plenty\Modules\Order\Pdf\Events\OrderPdfGenerationEvent
Return type: OrderPdfGenerationEvent
Name |
Type |
Description |
|
Referrer
Contracts
OrderReferrerRepositoryContract
Provides methods for processing order referrers. An order referrer indicates where a purchase was made originally.
Namespace
Plenty\Modules\Order\Referrer\Contracts
Methods
public getList($columns = [], $filterable = false):void
List order referrers
Name |
Type |
Description |
|
The columns (attributes) to load in the instances. |
|
|
public search($page = 1, $itemsPerPage = 20, $sortBy = "id", $sortOrder = "asc"):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Search for referrers
Name |
Type |
Description |
|
||
|
||
|
||
|
public create($data, $parentReferrerId = null):Plenty\Modules\Order\Referrer\Models\OrderReferrer
Return type: OrderReferrer
Create an order referrer
Name |
Type |
Description |
|
The order referrer data. The properties that are required to create an order referrer can be found in the order referrer model. |
|
|
If a parent referrer ID is specified, the new referrer will be created as a sub referrer to this one and will be assigned a sub referrer ID. Sub referrer IDs are build of an integer part and a fractional part. The integer part is the parent ID followed by a 2 character long fractional part. This way the relation between a sub referrer and the parent referrer can be seen easily. |
public update($data, $referrerId):Plenty\Modules\Order\Referrer\Models\OrderReferrer
Return type: OrderReferrer
Update an order referrer
Name |
Type |
Description |
|
The order referrer data. The properties that are required to update an order referrer can be found in the order referrer model. |
|
|
The ID of the order referrer |
public getReferrerById($referrerId, $columns = []):Plenty\Modules\Order\Referrer\Models\OrderReferrer
Return type: OrderReferrer
Get an order referrer
Name |
Type |
Description |
|
The ID of the order referrer |
|
|
The columns (attributes) to load in the instances. |
public delete($referrerId):bool
Delete an order referrer.
Name |
Type |
Description |
|
The ID of the order referrer |
public getNextFreeMainReferrerId():float
Get next free main referrer ID
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Models
OrderReferrer
The order referrer model. An order referrer shows where a purchase was originally made.
Namespace
Plenty\Modules\Order\Referrer\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order referrer |
|
isEditable |
Flag that indicates if this referrer can be updated as well as deleted or not <ul><li>True = the referrer can be edited and deleted</li> <li>False = the referrer can neither be edited nor deleted</li></ul> |
|
backendName |
The backend name of the referrer |
|
name |
The public name of the referrer as it is displayed e.g. on documents |
|
orderOwnerId |
The user ID of whoever owns new orders from this referrer |
|
isFilterable |
Flag that indicates if this referrer can be used as a filter or not <ul><li>True = Can be used as a filter</li> <li>False = Cannot be used as a filter</li></ul> |
|
origin |
The origin of this referrer |
|
showInLeads |
Referrer is showed in list when creating a new lead |
Methods
public toArray()
Returns this model as an array.
Scheduler
Models
OrderScheduler
The legacy order model
Namespace
Plenty\Modules\Order\Scheduler\Models
Name | Type | Description |
---|---|---|
id |
The order id. |
|
contactId |
The contact id. |
|
methodOfPayment |
||
start |
||
last |
||
end |
||
deliveryAddress |
||
billingAddress |
||
addresses |
||
addressRelations |
Methods
public toArray()
Returns this model as an array.
SerialNumber
Contracts
OrderSerialNumberRepositoryContract
List serial numbers for orders
Namespace
Plenty\Modules\Order\SerialNumber\Contracts
Methods
public listSerialNumbersByOrder($orderId):void
List serial numbers of an order
Name |
Type |
Description |
|
The ID of the order |
public listSerialNumbersByOrderItem($orderItemId):void
List serial numbers if an order item
Name |
Type |
Description |
|
The ID of the order item |
public addSerialNumberToOrderItem($orderSerialNumber):Plenty\Modules\Order\SerialNumber\Models\OrderSerialNumber
Return type: OrderSerialNumber
Create item serial number and bind it to order item
Name |
Type |
Description |
|
Order serial number data |
Models
OrderSerialNumber
The order serial number model
Namespace
Plenty\Modules\Order\SerialNumber\Models
Name | Type | Description |
---|---|---|
serialNumberId |
The ID of the serial number |
|
orderId |
The ID of the order |
|
orderItemId |
The ID of the order item |
|
serialNumber |
The serial number |
|
itemSerialNumber |
Methods
public toArray()
Returns this model as an array.
Shipping
Contracts
EUCountryCodesServiceContract
The EUCountryCodesServiceContract model
Namespace
Plenty\Modules\Order\Shipping\Contracts
Methods
public isEUCountry($countryId, $date = null):bool
Name |
Type |
Description |
|
||
|
public hasCommunityTax($countryId, $date = null):bool
Name |
Type |
Description |
|
||
|
public getTaxTerritory($countryId, $date = null):int
Name |
Type |
Description |
|
||
|
public hasCommunityToll($countryId, $date = null):bool
Name |
Type |
Description |
|
||
|
public getTollTerritory($countryId, $date = null):int
Name |
Type |
Description |
|
||
|
public isExportDelivery($countryId, $merchandCountryId = null, $date = null):bool
Name |
Type |
Description |
|
||
|
||
|
ParcelServicePresetRepositoryContract
The ParcelServicePresetRepositoryContract is the interface for the shipping profile repository. This interface allows to get a shipping profile by the ID or list all shipping profiles.
Namespace
Plenty\Modules\Order\Shipping\Contracts
Methods
public getPresetList($columns = [], $with = null, $parcelServiceName = null, $filters = []):void
Lists shipping profiles.
Name |
Type |
Description |
|
The columns (attributes) to retrieve |
|
|
The parameter contains the name of an relation |
|
|
Filter that restricts the search result to parcel service presets with a specified service name (e.g. 'DHL' for DHL) |
|
|
Possible attributes are updatedAtBefore and updatedAtAfter (yyyy-mm-dd or yyyy-mm-dd hh:mm:ss) |
public getPresetById($presetId, $columns = []):Plenty\Modules\Order\Shipping\ParcelService\Models\ParcelServicePreset
Return type: ParcelServicePreset
Gets a shipping profile. The ID of the shipping profile must be specified.
Name |
Type |
Description |
|
The ID of the shipping profile |
|
|
The columns (attributes) to retrieve |
public getPresetNamesById($presetId):array
Gets a shipping profile names in all langauges. The ID of the shipping profile must be specified.
Name |
Type |
Description |
|
The ID of the shipping profile |
public getLastWeightedPresetCombinations($basket, $contactClass, $customParams = []):array
Calculate shipping costs and list last weighted preset combinations.
Name |
Type |
Description |
|
The basket |
|
|
The ID of the contact class |
|
|
User-defined parameters |
public getPreviewList($language = null, $useBackendName = false):array
Get an array with all parcel service preset with the ID as key and the name as value.
Name |
Type |
Description |
|
The names will be returned in this language. |
|
|
Use the backend name instead of the external name? |
public create($data):Plenty\Modules\Order\Shipping\ParcelService\Models\ParcelServicePreset
Return type: ParcelServicePreset
Creates an parcel service preset
Name |
Type |
Description |
|
The data as an associative array |
public update($data, $id):Plenty\Modules\Order\Shipping\ParcelService\Models\ParcelServicePreset
Return type: ParcelServicePreset
Update an parcel service preset
Name |
Type |
Description |
|
The data as an associative array |
|
|
The ID of the shipping profile |
public delete($id):Plenty\Modules\Order\Shipping\ParcelService\Models\ParcelServicePreset
Return type: ParcelServicePreset
Delete a parcel service preset
Name |
Type |
Description |
|
The ID of parcel service preset |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Events
AfterShippingCostCalculated
An event class fired after the shipping calculation is done. Listeners can add fees to the shipping costs. * The shipping provider type name is mandatory. The ID of the order is optional.
Namespace
Plenty\Modules\Order\Shipping\Events
Methods
public getShippingServiceProvider():int
Get the shipping service provider
public __construct($shippingServiceProvider, $orderId, $shippingProfileId):void
AfterShippingCostCalculated constructor.
Name |
Type |
Description |
|
The name of the shipping service provider |
|
|
The ID of the order |
|
|
The ID of the shipping profile |
public getOrderId():int
Get the ID of the order.
public getAdditonalFee():float
Get the additional fee.
public addAdditionalFee($additionalFee):Plenty\Modules\Order\Shipping\Events\AfterShippingCostCalculated
Return type: AfterShippingCostCalculated
Set the additional fee.
Name |
Type |
Description |
|
The additional fee |
public getShippingProfileId():int
Get the ID of the shipping profile.
public setShippingProfileId($shippingProfileId):void
Set the ID of the shipping profile.
Name |
Type |
Description |
|
The ID of the shipping profile |
Models
DefaultShipping
The Default Shipping model is used to define the standard referrer, the standard shipping region and the payment methods.
Namespace
Plenty\Modules\Order\Shipping\Models
Name | Type | Description |
---|---|---|
id |
The ID of the entry |
|
referrerId |
The ID of the referrer |
|
shippingDestinationId |
The ID of the shipping region |
|
position |
The position |
|
paymentMethod1 |
The first payment method |
|
paymentMethod2 |
The second payment method |
|
paymentMethod3 |
The third payment method |
Methods
public toArray()
Returns this model as an array.
Countries
Contracts
CountryRepositoryContract
Repository for Country
Namespace
Plenty\Modules\Order\Shipping\Countries\Contracts
Methods
public findIsoCode($countryId, $isoCodeType):string
Finds the ISO-Code
Name |
Type |
Description |
|
||
|
public getCountryById($countryId):Plenty\Modules\Order\Shipping\Countries\Models\Country
Return type: Country
Gets a country
Name |
Type |
Description |
|
public getCountriesList($active, $with, $onlyEUCountries = null):Illuminate\Support\Collection
Return type: Collection
Get countries
Name |
Type |
Description |
|
||
|
||
|
public getActiveCountriesList():Illuminate\Support\Collection
Return type: Collection
Get active countries
public getActiveCountryNameMap($language):array
Get names of countries
Name |
Type |
Description |
|
public getCountryByIso($isoCode, $isoType):void
Gets a country.
Name |
Type |
Description |
|
||
|
('isoCode2', 'isoCode3') |
public getCountryStateByIso($countryId, $isoCode):Plenty\Modules\Order\Shipping\Countries\Models\CountryState
Return type: CountryState
Gets a country state
Name |
Type |
Description |
|
||
|
public activateCountry($countryId):Plenty\Modules\Order\Shipping\Countries\Models\Country
Return type: Country
Activates a country
Name |
Type |
Description |
|
public deactivateCountry($countryId):Plenty\Modules\Order\Shipping\Countries\Models\Country
Models
Country
The country model representing a country with allocated states and a list of names in different languages.
Namespace
Plenty\Modules\Order\Shipping\Countries\Models
Name | Type | Description |
---|---|---|
id |
The country id. |
|
name |
The system country name. |
|
shippingDestinationId |
The shipping destination (region) id. |
|
active |
The active flag (1: active, 2: backend active, 3: supplier active |
|
storehouseId |
The id of the main warehouse in this country. |
|
isoCode2 |
The ISO 3166 ALPHA-2 code of the country. |
|
isoCode3 |
The ISO 3166 ALPHA-3 code of the country. |
|
lang |
The main language spoken in the country. |
|
isCountryStateMandatory |
Flag that states if a country state is mandatory for the country. |
|
states |
An array with country states. |
|
names |
An array with country names in different languages. |
|
vatCodes |
An array with country vat codes. |
|
region |
The region of the country. |
|
currencies |
Methods
public toArray()
Returns this model as an array.
CountryName
The CountryName model containing a name of a country in a specified language.
Namespace
Plenty\Modules\Order\Shipping\Countries\Models
Name | Type | Description |
---|---|---|
id |
||
language |
||
name |
Methods
public toArray()
Returns this model as an array.
ExportDocuments
Contracts
ExportDocumentsContract
Repository for Export Documents
Namespace
Plenty\Modules\Order\Shipping\ExportDocuments\Contracts
Methods
public listExportDocumentsByOrderId($orderId):Plenty\Modules\Order\Shipping\ExportDocuments\Models\ExportDocument
Return type: ExportDocument
List export documents by order ID
Name |
Type |
Description |
|
Information
Contracts
ShippingInformationRepositoryContract
The ShippingInformationRepositoryContract is the interface for the shipping information repository. This interface allows to get shipping information by order ID, create new shipping information or update shipping information.
Namespace
Plenty\Modules\Order\Shipping\Information\Contracts
Methods
public getShippingInformationByOrderId($orderId):Plenty\Modules\Order\Shipping\Information\Models\ShippingInformation
Return type: ShippingInformation
Get Shipping Information by an order ID.
Name |
Type |
Description |
|
The ID of the Order |
public getShippingExportLabelByOrderId($orderId):void
Get export label for an order ID.
Name |
Type |
Description |
|
The ID of the order |
public getOrdersShippingInformation($searchParams):array
Get all the orders with their shipping information
Name |
Type |
Description |
|
public listOrdersShippingInformation($searchParams, $itemsPerPage = null, $page = null):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Get all the orders with their shipping information in a paginated form
Name |
Type |
Description |
|
||
|
||
|
public resetShippingInformation($orderId):void
Delete Shipping Information by an order ID
Name |
Type |
Description |
|
The ID of the Order |
public saveShippingInformation($data):Plenty\Modules\Order\Shipping\Information\Models\ShippingInformation
Return type: ShippingInformation
Create Shipping Information
Name |
Type |
Description |
|
The shipping information data as associative array. |
public updateAdditionalData($data, $orderId):Plenty\Modules\Order\Shipping\Information\Models\ShippingInformation
Return type: ShippingInformation
Update Additional Data of Shipping Information by Order ID
Name |
Type |
Description |
|
The additional data as associative array. |
|
|
The ID of the order. |
public updateShippingStatus($data, $orderId):Plenty\Modules\Order\Shipping\Information\Models\ShippingInformation
Return type: ShippingInformation
Update Shipping Status of Shipping Information by Order ID
Name |
Type |
Description |
|
The status data as associative array. |
|
|
The ID of the order. |
Models
ShippingInformation
The ShippingInformationModel represents additional shipping information for an order.
Namespace
Plenty\Modules\Order\Shipping\Information\Models
Name | Type | Description |
---|---|---|
orderId |
The ID of the order |
|
shippingServiceProvider |
The name of the shipping service provider |
|
transactionId |
The ID of the transaction |
|
shippingStatus |
The shipping status. Possible values are 'open', 'prepared' and 'registered'. |
|
shippingCosts |
The shipping costs |
|
additionalData |
The additional data. Depending on the shipping service provider selected, this data may contain different information, e.g. shipping service, email address and order ID. |
|
registrationAt |
The date and time the shipment was registered |
|
shipmentAt |
The date the items will be shipped |
Methods
public toArray()
Returns this model as an array.
Package
Contracts
OrderShippingPackageItemsRepositoryContract
Create and get items in packages from order
Namespace
Plenty\Modules\Order\Shipping\Package\Contracts
Methods
public getItemsForPackage($packageId, $page = 1, $perPage = 1000, $sortBy = "id", $sortOrder = "desc"):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackageItems
Return type: OrderShippingPackageItems
Get items for a package
Name |
Type |
Description |
|
The ID of the package |
|
|
||
|
||
|
||
|
public getItemsInPackagesPalletsPaginated($orderId, $page = 1, $perPage = 1000, $sortBy = "id", $sortOrder = "asc"):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackageItems
Return type: OrderShippingPackageItems
Get all the packed items in the packages in the pallets in the order
Name |
Type |
Description |
|
The ID of the order |
|
|
||
|
||
|
||
|
public getItemsFromPackagesForOrder($orderId):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackageItems
Return type: OrderShippingPackageItems
Get items for an order
Name |
Type |
Description |
|
The ID of the order |
public getPackedItemsPerPackageForOrder($orderId):array
Get packed items in an order
Name |
Type |
Description |
|
The ID of the order |
public getPackedItemsFromPackage($packageId, $with = [], $page = 1, $perPage = 25, $sortBy = "variationId", $sortOrder = "asc"):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackageItems
Return type: OrderShippingPackageItems
Get packed items in a package
Name |
Type |
Description |
|
The ID of the package for which you want to get the items for |
|
|
Possible value is 'images' to get also the images for the items |
|
|
The page to get. By default, we take the first page |
|
|
The number of variations to get per each page. By default, we take 25 variations per page |
|
|
The column for which to sort the values with. Default value is 'variationId' |
|
|
The order in which to sort the values. Possible values are 'asc' and 'desc'. Default value is ascending |
public getUnpackedItemsFromPackagesForOrder($orderId):array
Get unpacked items for an order
Name |
Type |
Description |
|
The ID of the order |
public getUnpackedItemsForOrderPaginated($orderId, $page = 1, $perPage = 25, $sortBy = "itemVariationId", $sortOrder = "asc"):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackageItems
Return type: OrderShippingPackageItems
Get all the unpacked items in the order
Name |
Type |
Description |
|
The ID of the order |
|
|
The page to get. By default, we take the first page |
|
|
The number of variations to get per each page. By default, we take 25 variations per page |
|
|
The column for which to sort the values with. Default value is 'itemVariationId' |
|
|
The order in which to sort the values. Possible values are 'asc' and 'desc'. Default value is ascending |
public createItemsForPackageOrder($data, $packageId, $isCallFromLegacyCode = false):array
Create items for a package
Name |
Type |
Description |
|
Array with data including item id, variation id and the quantity of the item in package |
|
|
The ID of the package. This ID is optional. If the ID is not provided, it must be present in the $data array |
|
|
Optional. Flag to see if the call of this method is from legacy code or new code |
public updateItemsInOrderShippingPackage($id, $data):int
Update package, variation or quantity for an order
Name |
Type |
Description |
|
The ID of the order package item variation |
|
|
Array with data including package id, item id, variation id and/or the quantity of the item in package |
public deleteItemsInOrderShippingPackage($id):int
Delete a variation of an item from package in an order
Name |
Type |
Description |
|
The ID of the order package item variation |
public updateItemsFromPackage($packageId, $itemId, $variationId, $data):int
Deprecated!
This method will not be supported in the future. Please refrain from using it as soon as possible. |
Update items in a package
Name |
Type |
Description |
|
The ID of the package |
|
|
The ID of the item |
|
|
The ID of the variation |
|
|
Array with data including item id, variation id and the quantity of the item in package |
public deleteItemsFromPackage($packageId, $itemId, $variationId):Plenty\Repositories\Models\DeleteResponse
Deprecated!
This method will not be supported in the future. Please refrain from using it as soon as possible. |
Return type: DeleteResponse
Delete a variation of an item from package in order
Name |
Type |
Description |
|
The ID of the package |
|
|
The ID of the item |
|
|
The ID of the variation |
OrderShippingPackageRepositoryContract
Create, get, update and delete order shipping packages.
Namespace
Plenty\Modules\Order\Shipping\Package\Contracts
Methods
public getOrderShippingPackage($orderShippingPackageId, $columns = [], $orderId = null):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackage
Return type: OrderShippingPackage
Get an order shipping package
Name |
Type |
Description |
|
The ID of the order shipping package |
|
|
The properties to be loaded |
|
|
The ID of an order |
public listOrderShippingPackages($orderId, $columns = [], $with = [], $packageInputData = []):array
List order shipping packages
Name |
Type |
Description |
|
The ID of the order |
|
|
The properties to be loaded |
|
|
(optional) Possible value is 'labelBase64' to get the label with the response |
|
|
(optional) The package data which is being added by the user in the UI |
public getOrderShippingPackagesPaginated($orderId, $with = [], $page = 1, $perPage = 1000, $sortBy = "id", $sortOrder = "desc"):array
Get all the packages for the given order
Name |
Type |
Description |
|
The ID of the order |
|
|
(Optional) Possible values are 'labelBase64', 'items' to get the label and/or the items with the response |
|
|
||
|
||
|
||
|
public getPackagesFromPallet($palletId, $with = [], $page = 1, $perPage = 1000, $sortBy = "id", $sortOrder = "desc"):array
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
public createOrderShippingPackage($orderId, $data):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackage
Return type: OrderShippingPackage
Create an order shipping package
Name |
Type |
Description |
|
The ID of the order |
|
|
The request data |
public updateOrderShippingPackage($orderShippingPackageId, $data):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackage
Return type: OrderShippingPackage
Update an order shipping package
Name |
Type |
Description |
|
The ID of the order shipping package |
|
|
The request data |
public deleteOrderShippingPackage($orderShippingPackageId):void
Delete an order shipping package
Name |
Type |
Description |
|
The ID of the order shipping package |
public deleteAllPackagesInPallet($orderId, $palletId):void
Delete all order shipping packages in a pallet
Name |
Type |
Description |
|
The ID of the order shipping package |
|
|
The ID of the pallet |
public updateAllPackagesInPallet($orderId, $palletId, $data):void
Update all the packages in a pallet.
Name |
Type |
Description |
|
||
|
||
|
Models
OrderShippingPackage
The order shipping package model
Namespace
Plenty\Modules\Order\Shipping\Package\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order shipping package |
|
orderId |
The ID of the order |
|
packageId |
The ID of the package |
|
weight |
The weight of the package in grams |
|
extraWeight |
The extra weight of the package in grams |
|
itemsWeight |
The items weight of the package in grams |
|
packageNumber |
The package number |
|
labelPath |
The path to the label |
|
labelBase64 |
The base64 encoded label |
|
exportLabelBase64 |
The base64 encoded export label |
|
returnPackageNumber |
The return package number |
|
packageType |
The type of the package. The following types are valid: <ul> <li>0: unpacked</li> <li>1: Bale</li> <li>2: Dispenser</li> <li>3: Coil</li> <li>4: Roll pallet</li> <li>5: Colli</li> <li>6: Container</li> <li>7: Bucket</li> <li>8: Cask</li> <li>9: Bottles</li> <li>10: European flat pallet</li> <li>11: Structural frame</li> <li>12: Gas cylinder</li> <li>13: Pallet cage</li> <li>14: Hobbock</li> <li>15: Half pallet</li> <li>16: Pallet of food items</li> <li>17: Wooden coaster</li> <li>18: IBC container</li> <li>19: Pitcher</li> <li>20: Wicker bottle</li> <li>21: Case</li> <li>22: Canister</li> <li>23: Customer pallet</li> <li>24: Cardboard box</li> <li>25: Composite packaging</li> <li>26: Package</li> <li>27: Ring</li> <li>28: Role</li> <li>29: Sack</li> <li>30: units</li> <li>31: Tank</li> <li>32: Drum</li> <li>34: Crate</li> <li>35: Quarter pallet</li> <li>36: Other pallets</li> <li>37: Bin</li> <li>38: One-way pallet</li> <li>39: Foil bag</li> </ul> |
|
volume |
The volume of the package |
|
palletId |
The id of the pallet of which the package belong to |
|
isClosed |
Flag to say if the package is editable or not |
|
createdAt |
||
updatedAt |
||
packageSscc |
Amazon Vendor PackageSscc |
|
mrn |
Movement Reference Number (MRN) |
|
atlasRegistration |
ATLAS export declaration |
|
order |
The order the package belongs to |
|
items |
The items inside the package. |
Methods
public toArray()
Returns this model as an array.
OrderShippingPackageItems
The relation between package, item and variation model
Namespace
Plenty\Modules\Order\Shipping\Package\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order shipping package item. Primary key auto-increment |
|
packageId |
The ID of the package (id column from plenty_package_type2order) |
|
itemId |
The ID of the item (plenty_item_variation_base_item_id column from plenty_item_variation_base) |
|
variationId |
The ID of the variation (plenty_item_variation_base_id column from plenty_item_variation_base) |
|
itemQuantity |
The quantity of the item in the package |
Methods
public toArray()
Returns this model as an array.
PackageType
Contracts
ShippingPackageTypeRepositoryContract
The ShippingPackageTypeRepositoryContract is the interface for the shipping package type repository. This interface allows to list all shipping package types or to get a shipping package type by the ID.
Namespace
Plenty\Modules\Order\Shipping\PackageType\Contracts
Methods
public findShippingPackageTypeById($shippingPackageTypeId):Plenty\Modules\Order\Shipping\PackageType\Models\ShippingPackageType
Return type: ShippingPackageType
Gets a shipping package type. The ID of the shipping package type must be specified.
Name |
Type |
Description |
|
The ID of the shipping package type |
public listShippingPackageTypes():array
Lists shipping packages types.
Models
ShippingPackageType
The shipping package type model.
Namespace
Plenty\Modules\Order\Shipping\PackageType\Models
Name | Type | Description |
---|---|---|
id |
The ID of the shipping package type |
|
name |
The name of the shipping package type |
|
width |
The width of the shipping package type |
|
individualWeight |
The individual weight of the shipping package type |
|
height |
The height of the shipping package type |
|
length |
The length of the shipping package type |
|
unit |
The unit of the shipping package type dimension |
|
maxWeight |
The maximum weight of the shipping package type |
|
maxVolume |
The maximum volume of the shipping package type |
|
volumeType |
The volume type of the shipping package type |
Methods
public toArray()
Returns this model as an array.
Pallet
Contracts
OrderShippingPalletRepositoryContract
Create, get, update and delete order shipping pallet.
Namespace
Plenty\Modules\Order\Shipping\Pallet\Contracts
Methods
public getOrderShippingPallet($orderShippingPalletId):Plenty\Modules\Order\Shipping\Pallet\Models\OrderShippingPallet
Return type: OrderShippingPallet
Get an order shipping pallet
Name |
Type |
Description |
|
The ID of the order shipping pallet |
public listOrderShippingPallets($filters, $with):array
List order shipping pallets
Name |
Type |
Description |
|
||
|
public listPalletPackages($orderShippingPalletId, $orderId):array
Get all the packages in a pallet
Name |
Type |
Description |
|
||
|
public getPalletsFromOrders($orderIds):array
Get all pallets from given order IDs
Name |
Type |
Description |
|
public createOrderShippingPallet($data):Plenty\Modules\Order\Shipping\Pallet\Models\OrderShippingPallet
Return type: OrderShippingPallet
Create an order shipping pallet
Name |
Type |
Description |
|
The request data |
public updateOrderShippingPallet($orderShippingPalletId, $data):Plenty\Modules\Order\Shipping\Pallet\Models\OrderShippingPallet
Return type: OrderShippingPallet
Update an order shipping pallet
Name |
Type |
Description |
|
The ID of the order shipping pallet |
|
|
The request data |
public deleteOrderShippingPallet($orderShippingPalletId):Plenty\Modules\Order\Shipping\Pallet\Models\OrderShippingPallet
Return type: OrderShippingPallet
Delete an order shipping pallet
Name |
Type |
Description |
|
The ID of the order shipping pallet |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Models
OrderShippingPallet
The order shipping pallet model.
Namespace
Plenty\Modules\Order\Shipping\Pallet\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order shipping pallet |
|
weight |
The weight of the order shipping pallet, including it’s contents |
|
individualWeight |
The weight of the order shipping pallet |
|
width |
The width of the order shipping pallet |
|
height |
The height of the order shipping pallet |
|
length |
The length of the order shipping pallet |
|
isStackable |
Flag to tell if the pallet is stackable or not. If true, another pallet can be placed over the current one |
|
additionalInfo |
Additional info |
|
barcode |
The barcode |
|
isClosed |
Flag to tell if the pallet is closed or not. If true, the information within the pallet should not be changed anymore |
|
palletSscc |
Amazon Vendor PalletSscc |
|
orderId |
The id of the order |
Methods
public toArray()
Returns this model as an array.
ParcelService
Contracts
ParcelServiceConstraintRepositoryContract
The ParcelServiceConstraintRepositoryContract is the interface for the parcel service constraint type repository.
Namespace
Plenty\Modules\Order\Shipping\ParcelService\Contracts
Methods
public create($data):void
Create a new parcel service constraint entry
Name |
Type |
Description |
|
public getById($id):void
Fetch parcel service constraint by ID
Name |
Type |
Description |
|
public delete($id):void
Delete a parcel service constant by ID
Name |
Type |
Description |
|
Models
ParcelService
The Parcel Service Model
Namespace
Plenty\Modules\Order\Shipping\ParcelService\Models
Name | Type | Description |
---|---|---|
id |
||
backendName |
||
trackingUrl |
||
shippingServiceProviderId |
||
shippingServiceProviderAddress |
||
splitTrackingUrl |
||
splitDelimiter |
||
shippingServiceProvider |
||
parcelServiceNames |
Methods
public toArray()
Returns this model as an array.
ParcelServiceConstraint
The Parcel Service Constraint Model
Namespace
Plenty\Modules\Order\Shipping\ParcelService\Models
Name | Type | Description |
---|---|---|
parcelServiceRegionId |
||
constraintType |
||
subConstraintType |
||
constraintLimit |
||
cost |
||
startValue |
Methods
public toArray()
Returns this model as an array.
ParcelServiceName
The Parcel Service Name Model
Namespace
Plenty\Modules\Order\Shipping\ParcelService\Models
Name | Type | Description |
---|---|---|
parcelServiceId |
||
name |
||
lang |
Methods
public toArray()
Returns this model as an array.
ParcelServicePreset
The Parcel Service Preset Model
Namespace
Plenty\Modules\Order\Shipping\ParcelService\Models
Name | Type | Description |
---|---|---|
id |
The ID of the shipping profile (autoincrement value) |
|
parcelServiceId |
The ID of the shipping service provider |
|
backendName |
The back end name of the shipping profile |
|
flag |
The icon of the shipping profile |
|
priority |
The priority of the shipping profile |
|
category |
The category of the shipping profile |
|
useArticlePorto |
Flag that indicates if the extra shipping charge saved in the item data record is used |
|
isInsured |
Flag that indicates if the shipping profile is insured |
|
isExpress |
Flag that indicates if the shipping profile is used for express delivery |
|
isPostident |
Flag that indicates if the shipping profile includes an authority verification |
|
isDefaultEnabled |
Flag that indicates if the shipping profile is automatically assigned to new items |
|
islandFee |
The extra charge for islands saved in the shipping profile |
|
isCod |
Flag that indicates Cash on Delivery |
|
supportedMultishop |
The clients (stores) that are activated for the shipping profile |
|
supportedReferrer |
The order referrers that are activated for the shipping profile |
|
subreferrerSupport |
This field is currently without any function. |
|
excludedPaymentMethods |
The blocked payment methods that are not offered for the shipping profile |
|
excludedCustomerGroups |
The blocked customer groups for the shipping profile. Blocked customer groups cannot select the shipping profile during checkout. |
|
shippingGroup |
The group of the shipping profile |
|
dispatchIdentifier |
This field is currently without any function. |
|
auctionType |
The eBay listing type for the shipping profile |
|
supportedLoyaltyPrograms |
The loyalty programs that are supported by the shipping profile |
|
updatedAt |
The date the shipping profile was last updated |
|
parcelServicePresetNames |
||
parcelServiceNames |
||
showDataPrivacyAgreementHint |
||
transmitPrivacyRule |
||
alternativeEmail |
||
alternativePhone |
||
isParcelBox |
Indicates whether the e.g. paketshop is supported |
|
isPostOffice |
Indicates whether the e.g. postfiliale is supported |
|
parcelService |
The parcel service. |
|
parcelServiceRegionConstraint |
The parcel service region constraint |
Methods
public toArray()
Returns this model as an array.
ParcelServiceRegion
Contracts
ParcelServiceRegionNameRepositoryContract
Get parcel service region name
Namespace
Plenty\Modules\Order\Shipping\ParcelServiceRegion\Contracts
Methods
public create($data):Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models\ParcelServiceRegionName
Return type: ParcelServiceRegionName
Creates a Region
Name |
Type |
Description |
|
public getAllRegions():array
Return all the regions
ParcelServiceRegionRepositoryContract
Get parcel service region
Namespace
Plenty\Modules\Order\Shipping\ParcelServiceRegion\Contracts
Methods
public create($data):Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models\ParcelServiceRegion
Return type: ParcelServiceRegion
Creates a ParcelServiceRegion
Name |
Type |
Description |
|
public delete($id):void
Deletes a ParcelServiceRegion
Name |
Type |
Description |
|
public getParcelServiceRegion($parcelServiceRegionId, $columns = []):Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models\ParcelServiceRegion
Return type: ParcelServiceRegion
Get a parcel service region
Name |
Type |
Description |
|
The ID of the parcel service region. |
|
|
public listParcelServiceRegions($parcelServicePresetId, $columns = []):array
Lists parcel service regions by parcel service preset id.
Name |
Type |
Description |
|
The ID of the parcel service preset. |
|
|
Models
ParcelServiceRegion
The parcel service region model.
Namespace
Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models
Name | Type | Description |
---|---|---|
id |
The ID of the parcel service region |
|
shippingRegionId |
The ID of the shipping region |
|
parcelServicePresetId |
The ID of the parcel service preset |
|
shippingRegionName |
The name of the shipping region |
|
serviceType |
Type of the parcel service |
Methods
public toArray()
Returns this model as an array.
Returns
Contracts
ReturnsRepositoryContract
The ReturnsRepositoryContract is the interface for the order returns repository. This interface allows to register, assign to order and list order returns.
Namespace
Plenty\Modules\Order\Shipping\Returns\Contracts
Methods
public registerReturns($pluginName, $orderIds):Plenty\Modules\Order\Shipping\Returns\Models\RegisterReturnsResult
Return type: RegisterReturnsResult
Register a new return
Name |
Type |
Description |
|
||
|
public getReturnsLabelById($labelId, $with):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Get return label by ID
Name |
Type |
Description |
|
||
|
public assignLabel2Return($orderId, $returnsId):Plenty\Modules\Order\Shipping\Returns\Models\OrderReturns
Return type: OrderReturns
Assign return label to order
Name |
Type |
Description |
|
||
|
public getOrderReturns($orderId, $with = [], $page = 1, $itemsPerPage = 50, $sortBy = "id", $sortOrder = "desc"):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Get a paginated list of all order returns
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
public getOrderReturnsByReturnsOrderId($returnsOrderId, $with = [], $page = 1, $itemsPerPage = 50, $sortBy = "id", $sortOrder = "desc"):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Get a paginated list of all order returns
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
public createReturnsOrder($orderId, $data):void
Create a return
Name |
Type |
Description |
|
||
|
public updateReturnsOrder($returnsOrderId, $data):void
Update existing return
Name |
Type |
Description |
|
||
|
public deleteReturnsByReturnsOrderId($returnsOrderId):void
Name |
Type |
Description |
|
ReturnsServiceProviderRepositoryContract
The ReturnsServiceProviderRepositoryContract is the interface for the returns service provider repository. This interface allows to list returns service providers.
Namespace
Plenty\Modules\Order\Shipping\Returns\Contracts
Methods
public getReturnsServiceProviderList($columns = [], $page = 1, $itemsPerPage = 50, $filters = [], $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Get a paginated list of returns services providers
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
public findById($returnsServiceProviderId):Plenty\Modules\Order\Shipping\Returns\Models\ReturnsServiceProvider
Return type: ReturnsServiceProvider
Find a returns service provider by ID
Name |
Type |
Description |
|
public findByName($returnsServiceProviderName):array
Find a returns service provider by name
Name |
Type |
Description |
|
public saveReturnsServiceProvider($pluginName, $returnProviderAlias = null):Plenty\Modules\Order\Shipping\Returns\Models\ReturnsServiceProvider
Return type: ReturnsServiceProvider
Save a returns service provider
Name |
Type |
Description |
|
||
|
public getReturnsServiceProvider($orderId):Plenty\Modules\Order\Shipping\Returns\Models\ReturnsServiceProvider
Return type: ReturnsServiceProvider
Get the returns service provider for an order
Name |
Type |
Description |
|
public pluginList():void
Models
FailedRegisterOrderReturns
The FailedRegisterOrderReturns model.
Namespace
Plenty\Modules\Order\Shipping\Returns\Models
Methods
public addErrorMessage($errorMessage):void
Add a new error message
Name |
Type |
Description |
|
public setOrderId($orderId):void
Set the order ID variable
Name |
Type |
Description |
|
public addException($exception):void
Add a new exception object
Name |
Type |
Description |
|
public get($key):void
Name |
Type |
Description |
|
public hasGetMutator($key):bool
Determine if a get mutator exists for an attribute.
Name |
Type |
Description |
|
public setAttributes($attributes):void
Name |
Type |
Description |
|
public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set a given attribute on the model.
Name |
Type |
Description |
|
||
|
public hasSetMutator($key):bool
Determine if a set mutator exists for an attribute.
Name |
Type |
Description |
|
public changeValue($key, $callback):void
Name |
Type |
Description |
|
||
|
public offsetExists($offset):bool
Name |
Type |
Description |
|
public offsetGet($offset):void
Name |
Type |
Description |
|
public offsetSet($offset, $value):void
Name |
Type |
Description |
|
||
|
public offsetUnset($offset):void
Name |
Type |
Description |
|
public toArray($translate = false):array
Name |
Type |
Description |
|
Flag indicating if values should be translated. |
public toJson($options):string
Name |
Type |
Description |
|
public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel
Fill the model with an array of attributes.
Name |
Type |
Description |
|
public isFillable($key):bool
Determine if the given attribute may be mass assigned.
Name |
Type |
Description |
|
public getFillable():array
Get the fillable attributes for the model.
public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set the fillable attributes for the model.
Name |
Type |
Description |
|
public hasCast($key, $types = null):bool
Determine whether an attribute should be cast to a native type.
Name |
Type |
Description |
|
||
|
public fromJson($value, $asObject = false):void
Decode the given JSON back into an array or object.
Name |
Type |
Description |
|
||
|
OrderReturns
The model for OrderReturns
Namespace
Plenty\Modules\Order\Shipping\Returns\Models
Name | Type | Description |
---|---|---|
id |
||
orderId |
||
returnsOrderId |
||
providerId |
||
createdAt |
||
fileName |
||
externalNumber |
||
externalData |
||
availableUntil |
Methods
public toArray()
Returns this model as an array.
RegisterOrderReturnsResponse
The RegisterOrderReturnsResponse model.
Namespace
Plenty\Modules\Order\Shipping\Returns\Models
Methods
public addSuccessfullyRegisteredReturns($successfullyRegisteredReturn):void
Add successfully registered order returns
Name |
Type |
Description |
|
public addFailedRegisterOrderReturns($failedRegisterOrderReturn):void
Add failed registered order returns
Name |
Type |
Description |
|
public get($key):void
Name |
Type |
Description |
|
public hasGetMutator($key):bool
Determine if a get mutator exists for an attribute.
Name |
Type |
Description |
|
public setAttributes($attributes):void
Name |
Type |
Description |
|
public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set a given attribute on the model.
Name |
Type |
Description |
|
||
|
public hasSetMutator($key):bool
Determine if a set mutator exists for an attribute.
Name |
Type |
Description |
|
public changeValue($key, $callback):void
Name |
Type |
Description |
|
||
|
public offsetExists($offset):bool
Name |
Type |
Description |
|
public offsetGet($offset):void
Name |
Type |
Description |
|
public offsetSet($offset, $value):void
Name |
Type |
Description |
|
||
|
public offsetUnset($offset):void
Name |
Type |
Description |
|
public toArray($translate = false):array
Name |
Type |
Description |
|
Flag indicating if values should be translated. |
public toJson($options):string
Name |
Type |
Description |
|
public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel
Fill the model with an array of attributes.
Name |
Type |
Description |
|
public isFillable($key):bool
Determine if the given attribute may be mass assigned.
Name |
Type |
Description |
|
public getFillable():array
Get the fillable attributes for the model.
public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set the fillable attributes for the model.
Name |
Type |
Description |
|
public hasCast($key, $types = null):bool
Determine whether an attribute should be cast to a native type.
Name |
Type |
Description |
|
||
|
public fromJson($value, $asObject = false):void
Decode the given JSON back into an array or object.
Name |
Type |
Description |
|
||
|
RegisterReturnsResult
The model for RegisterReturnsResult
Namespace
Plenty\Modules\Order\Shipping\Returns\Models
Name | Type | Description |
---|---|---|
orderReturnsList |
||
failedRegisterOrderReturnsList |
Methods
public toArray()
Returns this model as an array.
ReturnsServiceProvider
The ReturnsServiceProvider model.
Namespace
Plenty\Modules\Order\Shipping\Returns\Models
Name | Type | Description |
---|---|---|
id |
The ID of the returns service provider |
|
name |
The name of the returns service provider |
|
pluginId |
The optional ID of the plugin when the returns service provider is registered as a plugin |
|
createdAt |
The time the returns service provider was created |
|
updatedAt |
The time the returns service provider was updated |
Methods
public toArray()
Returns this model as an array.
SuccessfullyRegisteredOrderReturns
The model for SuccessfullyRegisteredOrderReturns
Namespace
Plenty\Modules\Order\Shipping\Returns\Models
Methods
public setOrderId($orderId):void
Set orderId variable
Name |
Type |
Description |
|
public setFileName($fileName):void
Set fileName variable
Name |
Type |
Description |
|
public setExternalNumber($externalNumber):void
Set externalNumber variable
Name |
Type |
Description |
|
public setExternalData($externalData):void
Set externalData variable
Name |
Type |
Description |
|
public setAvailableUntil($availiableUntil):void
Set availableUntil variable
Name |
Type |
Description |
|
public setLabelBase64($labelBase64):void
Set labelBase64 variable
Name |
Type |
Description |
|
public setReturnsOrderId($returnsOrderId):void
Set returnsOrderId variable
Name |
Type |
Description |
|
public get($key):void
Name |
Type |
Description |
|
public hasGetMutator($key):bool
Determine if a get mutator exists for an attribute.
Name |
Type |
Description |
|
public setAttributes($attributes):void
Name |
Type |
Description |
|
public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set a given attribute on the model.
Name |
Type |
Description |
|
||
|
public hasSetMutator($key):bool
Determine if a set mutator exists for an attribute.
Name |
Type |
Description |
|
public changeValue($key, $callback):void
Name |
Type |
Description |
|
||
|
public offsetExists($offset):bool
Name |
Type |
Description |
|
public offsetGet($offset):void
Name |
Type |
Description |
|
public offsetSet($offset, $value):void
Name |
Type |
Description |
|
||
|
public offsetUnset($offset):void
Name |
Type |
Description |
|
public toArray($translate = false):array
Name |
Type |
Description |
|
Flag indicating if values should be translated. |
public toJson($options):string
Name |
Type |
Description |
|
public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel
Fill the model with an array of attributes.
Name |
Type |
Description |
|
public isFillable($key):bool
Determine if the given attribute may be mass assigned.
Name |
Type |
Description |
|
public getFillable():array
Get the fillable attributes for the model.
public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set the fillable attributes for the model.
Name |
Type |
Description |
|
public hasCast($key, $types = null):bool
Determine whether an attribute should be cast to a native type.
Name |
Type |
Description |
|
||
|
public fromJson($value, $asObject = false):void
Decode the given JSON back into an array or object.
Name |
Type |
Description |
|
||
|
Services
RegisterReturnsService
The RegisterReturnsService class offers the possibility to register returns, get returns label and persist returns label.
Namespace
Plenty\Modules\Order\Shipping\Returns\Services
Methods
public registerReturns($pluginName, $orderIds):Plenty\Modules\Order\Shipping\Returns\Models\RegisterReturnsResult
Return type: RegisterReturnsResult
Register returns for each order ID
Name |
Type |
Description |
|
||
|
public persistLabel($labelBase64, $returns):Plenty\Modules\Document\Models\Document
Return type: Document
Save the return label in base64
Name |
Type |
Description |
|
||
|
public getLabel($orderReturns):string
Get the return label
Name |
Type |
Description |
|
ReturnsServiceProviderService
The ReturnsServiceProviderService class offers the possibility to register a returns service provider class and method that can be called by plentymarkets returns controllers.
Namespace
Plenty\Modules\Order\Shipping\Returns\Services
Methods
public registerReturnsProvider($returnsServiceProviderCode, $returnsServiceProviderLabel, $returnsServiceProviderClass, $useParentOrderId = true):bool
Register returns service provider
Name |
Type |
Description |
|
||
|
||
|
||
|
public getReturnsServiceProviderEntryById($providerId):Plenty\Modules\Order\Shipping\Returns\Services\Entries\ReturnsServiceProviderEntry
Return type: ReturnsServiceProviderEntry
Get returns service provider by id
Name |
Type |
Description |
|
public hasReturnsServiceProviderMethod($returnsServiceProviderCode, $methodName):bool
Returns boolean whether the returns service provider has or has not the given method
Name |
Type |
Description |
|
||
|
Services
Entries
ReturnsServiceProviderEntry
The returns provider entry contains all information needed to use module returns in plentymarkets returns .
Namespace
Plenty\Modules\Order\Shipping\Returns\Services\Entries
Methods
public getReturnsServiceProviderLabel():string
Get the returns service provider label
public setReturnsServiceProviderLabel($returnsServiceProviderLabel):Plenty\Modules\Order\Shipping\Returns\Services\Entries\ReturnsServiceProviderEntry
Return type: ReturnsServiceProviderEntry
Set the returns service provider label
Name |
Type |
Description |
|
public getReturnsServiceProviderCode():string
Get the return service provider code
public setReturnsServiceProviderCode($returnsServiceProviderCode):Plenty\Modules\Order\Shipping\Returns\Services\Entries\ReturnsServiceProviderEntry
Return type: ReturnsServiceProviderEntry
Set the returns service provider code
Name |
Type |
Description |
|
public getReturnsServiceProviderClass($methodName):string
Get the returns service provider class
Name |
Type |
Description |
|
public methodExists($methodName):bool
Check if method exists in returnsServiceProviderClass
Name |
Type |
Description |
|
public getProviderId():int
Get the provider ID
public getUseParentOrderId():bool
Get setting for using parent order ID
ShippingServiceProviderEntry
The shipping provider entry contains all information needed to use module shipping in plentymarkets shipping .
Namespace
Plenty\Modules\Order\Shipping\ServiceProvider\Services\Entries
Methods
public getShippingServiceProviderClasses():array
Get the shipping service provider classes
public getShippingServiceProviderNames():void
Get the shipping service provider names
public setShippingServiceProviderNames($shippingServiceProviderNames):Plenty\Modules\Order\Shipping\ServiceProvider\Services\Entries\ShippingServiceProviderEntry
Return type: ShippingServiceProviderEntry
Set the shipping service provider names
Name |
Type |
Description |
|
public getShippingServiceProviderCode():string
Get the shipping service provider code
public setShippingServiceProviderCode($shippingServiceProviderCode):Plenty\Modules\Order\Shipping\ServiceProvider\Services\Entries\ShippingServiceProviderEntry
Return type: ShippingServiceProviderEntry
Set the shipping service provider entry
Name |
Type |
Description |
|
public getShippingServiceProviderClass($methodName):string
Get the shipping service provider class
Name |
Type |
Description |
|
public methodExists($methodName):bool
Check if method exists in shipping service provider classes
Name |
Type |
Description |
|
Tax
TaxInformation
This model holds all information about the data used to detect the order taxes.
Namespace
Plenty\Modules\Order\Legacy\Services\Tax
Methods
public getLocationId():int
Get the location ID.
public getBillingCountryId():int
Get the billing country ID.
public getDeliveryCountryId():int
Get the delivery country ID.
public getBillingTaxIdNumber():string
Get the tax id number of the billing address.
public getDeliveryTaxIdNumber():string
Get the tax id number of the delivery address.
public getDate():string
Get the date.
public getHasEntryCertificate():bool
Get whether the delivery address ha sn entry cerificat or not.
ServiceProvider
Contracts
ShippingServiceProviderPluginRepositoryContract
The ShippingServiceProviderPluginRepositoryContract is the interface for the shipping service provider plugin repository. This interface allows to list shipping service provider plugins.
Namespace
Plenty\Modules\Order\Shipping\ServiceProvider\Contracts
Methods
public plugins():void
Return list of shipping service provider plugins
public filteredPluginList($filter):void
Return list of shipping service provider plugins using a filter
Name |
Type |
Description |
|
Filter that restricts the search result |
ShippingServiceProviderRepositoryContract
The ShippingServiceProviderRepositoryContract is the interface for the shipping service provider repository. This interface allows to list shipping service providers.
Namespace
Plenty\Modules\Order\Shipping\ServiceProvider\Contracts
Methods
public all($columns = [], $page = 1, $itemsPerPage = 50, $filters = [], $with = []):void
Lists shipping service providers.
Name |
Type |
Description |
|
The columns to retrieve |
|
|
The page of results to search for |
|
|
The number of items to list per page |
|
|
Filters that restrict the search result |
|
|
The releations to be loaded with the shipping service provider |
public find($shippingServiceProviderId):Plenty\Modules\Order\Shipping\ServiceProvider\Models\ShippingServiceProvider
Return type: ShippingServiceProvider
Gets a shipping service provider. The ID of the shipping service provider must be specified.
Name |
Type |
Description |
|
The ID of the shipping service provider |
public findByName($shippingServiceProviderName):Plenty\Modules\Order\Shipping\ServiceProvider\Models\ShippingServiceProvider
Return type: ShippingServiceProvider
Gets a shipping service provider. The name of the shipping service provider must be specified.
Name |
Type |
Description |
|
The name of the shipping service provider |
public saveShippingServiceProvider($pluginName, $shippingServiceProviderName, $icon = null):Plenty\Modules\Order\Shipping\ServiceProvider\Models\ShippingServiceProvider
Return type: ShippingServiceProvider
Creates a shipping service provider or updates it if already existing
Name |
Type |
Description |
|
The plugin name the plugin is registered with |
|
|
The name of the shipping service provider |
|
|
The path of the icon |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
Models
FailedRegisterShipment
The FailedRegisterShipment model.
Namespace
Plenty\Modules\Order\Shipping\ServiceProvider\Models
Methods
public addErrorMessage($errorMessage):void
Name |
Type |
Description |
|
public addException($exception):void
Name |
Type |
Description |
|
public setOrderId($orderId):void
Name |
Type |
Description |
|
public get($key):void
Name |
Type |
Description |
|
public hasGetMutator($key):bool
Determine if a get mutator exists for an attribute.
Name |
Type |
Description |
|
public setAttributes($attributes):void
Name |
Type |
Description |
|
public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set a given attribute on the model.
Name |
Type |
Description |
|
||
|
public hasSetMutator($key):bool
Determine if a set mutator exists for an attribute.
Name |
Type |
Description |
|
public changeValue($key, $callback):void
Name |
Type |
Description |
|
||
|
public offsetExists($offset):bool
Name |
Type |
Description |
|
public offsetGet($offset):void
Name |
Type |
Description |
|
public offsetSet($offset, $value):void
Name |
Type |
Description |
|
||
|
public offsetUnset($offset):void
Name |
Type |
Description |
|
public toArray($translate = false):array
Name |
Type |
Description |
|
Flag indicating if values should be translated. |
public toJson($options):string
Name |
Type |
Description |
|
public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel
Fill the model with an array of attributes.
Name |
Type |
Description |
|
public isFillable($key):bool
Determine if the given attribute may be mass assigned.
Name |
Type |
Description |
|
public getFillable():array
Get the fillable attributes for the model.
public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set the fillable attributes for the model.
Name |
Type |
Description |
|
public hasCast($key, $types = null):bool
Determine whether an attribute should be cast to a native type.
Name |
Type |
Description |
|
||
|
public fromJson($value, $asObject = false):void
Decode the given JSON back into an array or object.
Name |
Type |
Description |
|
||
|
RegisterShipmentResponse
The RegisterShipmentResponse model.
Namespace
Plenty\Modules\Order\Shipping\ServiceProvider\Models
Methods
public addSuccessfullyRegisteredShipment($successfullyRegisteredShipment):void
Name |
Type |
Description |
|
Object containing data for successfully registering a shipment |
public addFailedRegisterShipment($failedRegisterShipment):void
Name |
Type |
Description |
|
Object containing data when shipment registration was not successful, e.g. incorrect or missing postcode |
public get($key):void
Name |
Type |
Description |
|
public hasGetMutator($key):bool
Determine if a get mutator exists for an attribute.
Name |
Type |
Description |
|
public setAttributes($attributes):void
Name |
Type |
Description |
|
public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set a given attribute on the model.
Name |
Type |
Description |
|
||
|
public hasSetMutator($key):bool
Determine if a set mutator exists for an attribute.
Name |
Type |
Description |
|
public changeValue($key, $callback):void
Name |
Type |
Description |
|
||
|
public offsetExists($offset):bool
Name |
Type |
Description |
|
public offsetGet($offset):void
Name |
Type |
Description |
|
public offsetSet($offset, $value):void
Name |
Type |
Description |
|
||
|
public offsetUnset($offset):void
Name |
Type |
Description |
|
public toArray($translate = false):array
Name |
Type |
Description |
|
Flag indicating if values should be translated. |
public toJson($options):string
Name |
Type |
Description |
|
public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel
Fill the model with an array of attributes.
Name |
Type |
Description |
|
public isFillable($key):bool
Determine if the given attribute may be mass assigned.
Name |
Type |
Description |
|
public getFillable():array
Get the fillable attributes for the model.
public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set the fillable attributes for the model.
Name |
Type |
Description |
|
public hasCast($key, $types = null):bool
Determine whether an attribute should be cast to a native type.
Name |
Type |
Description |
|
||
|
public fromJson($value, $asObject = false):void
Decode the given JSON back into an array or object.
Name |
Type |
Description |
|
||
|
ShippingServiceProvider
The service provider model
Namespace
Plenty\Modules\Order\Shipping\ServiceProvider\Models
Name | Type | Description |
---|---|---|
id |
The ID of the shipping service provider |
|
name |
The name of the shipping service provider |
|
pluginId |
The optional ID of the plugin when the shipping service provider is registered as a plugin |
|
icon |
The optional path of the icon |
|
createdAt |
The time the shipping service provider was created |
|
updatedAt |
The time the shipping service provider was updated |
Methods
public toArray()
Returns this model as an array.
SuccessfullyRegisteredShipment
The SuccessfullyRegisteredShipment model.
Namespace
Plenty\Modules\Order\Shipping\ServiceProvider\Models
Methods
public setOrderId($orderId):void
Set the order ID.
Name |
Type |
Description |
|
The ID of the order |
public setHasNewPackageNumber($hasNewPackageNumber):void
Set the variable $hasNewPackageNumber.
Name |
Type |
Description |
|
Flag that indicates whether the order has a new package number |
public addMessage($message):void
Add a message.
Name |
Type |
Description |
|
The message |
public addPackage($package):void
Add a package.
Name |
Type |
Description |
|
The order shipping package |
public get($key):void
Name |
Type |
Description |
|
public hasGetMutator($key):bool
Determine if a get mutator exists for an attribute.
Name |
Type |
Description |
|
public setAttributes($attributes):void
Name |
Type |
Description |
|
public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set a given attribute on the model.
Name |
Type |
Description |
|
||
|
public hasSetMutator($key):bool
Determine if a set mutator exists for an attribute.
Name |
Type |
Description |
|
public changeValue($key, $callback):void
Name |
Type |
Description |
|
||
|
public offsetExists($offset):bool
Name |
Type |
Description |
|
public offsetGet($offset):void
Name |
Type |
Description |
|
public offsetSet($offset, $value):void
Name |
Type |
Description |
|
||
|
public offsetUnset($offset):void
Name |
Type |
Description |
|
public toArray($translate = false):array
Name |
Type |
Description |
|
Flag indicating if values should be translated. |
public toJson($options):string
Name |
Type |
Description |
|
public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel
Fill the model with an array of attributes.
Name |
Type |
Description |
|
public isFillable($key):bool
Determine if the given attribute may be mass assigned.
Name |
Type |
Description |
|
public getFillable():array
Get the fillable attributes for the model.
public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel
Set the fillable attributes for the model.
Name |
Type |
Description |
|
public hasCast($key, $types = null):bool
Determine whether an attribute should be cast to a native type.
Name |
Type |
Description |
|
||
|
public fromJson($value, $asObject = false):void
Decode the given JSON back into an array or object.
Name |
Type |
Description |
|
||
|
Services
ShippingServiceProviderService
The ShippingServiceProviderService class offers the possibility to register a shipping provider class and method that can be called by plentymarkets shipping controllers.
Namespace
Plenty\Modules\Order\Shipping\ServiceProvider\Services
Methods
public registerShippingProvider($shippingServiceProviderCode, $shippingServiceProviderNames, $shippingServiceProviderClasses):bool
Registers a new shipping provider
Name |
Type |
Description |
|
||
|
||
|
public hasShippingServiceProviderMethod($shippingServiceProviderCode, $methodName):bool
Check if shipping service provider has specified method
Name |
Type |
Description |
|
||
|
Address
Contracts
OrderAddressRepositoryContract
The OrderAddressRepositoryContract is the interface for the order address repository. This interface allows you to get, create, update and delete addresses of an order.
Namespace
Plenty\Modules\Order\Address\Contracts
Methods
public findAddressByType($orderId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address
Get an address of an order
Name |
Type |
Description |
|
The ID of the order |
|
|
The ID of the address type |
public findSchedulerAddressByType($schedulerId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address
Get an address of a scheduler order
Name |
Type |
Description |
|
The ID of the scheduler |
|
|
The ID of the address type |
public createOrderAddress($data, $orderId, $typeId = \Plenty\Modules\Account\Address\Models\AddressRelationType::BILLING_ADDRESS):Plenty\Modules\Account\Address\Models\Address
Return type: Address
Create an address for an order
Name |
Type |
Description |
|
The address data |
|
|
The ID of the order |
|
|
[optional] The ID of the address type. The default ID is 1 for billing address. The types available are:
|
public updateOrderAddress($data, $addressId, $orderId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address
Update an address of an order
Name |
Type |
Description |
|
The address data |
|
|
The ID of address |
|
|
The ID of the order |
|
|
The ID of the address type. The types available are:
|
public getAddress($addressId, $with = []):Plenty\Modules\Account\Address\Models\Address
Return type: Address
Get an address
Name |
Type |
Description |
|
The ID of the address |
|
|
The relations to load in the address instance. The relations available are "options", "contacts", "orders", "country". |
public findAddresses($orderId):Illuminate\Database\Eloquent\Collection
Return type: Collection
List addresses of an an order
Name |
Type |
Description |
|
The ID of the order |
public getAddressOfOrder($addressId, $orderId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address
Get an address of an order
Name |
Type |
Description |
|
The ID of the address |
|
|
The ID of the order |
|
|
The ID of the address type. The types available are:
|
public getAddressOfScheduler($addressId, $schedulerId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address
Get an address of a scheduler
Name |
Type |
Description |
|
The ID of the address |
|
|
The ID of the scheduler |
|
|
The ID of the address type. The types available are:
|
public addOrderAddress($addressId, $orderId, $typeId):void
Create an address relation from an order to an address
Name |
Type |
Description |
|
The ID of the address |
|
|
The ID of the order |
|
|
The ID of the address type. The types available are:
|
public addSchedulerAddress($addressId, $schedulerId, $typeId):void
Create an address relation from a scheduler to an address
Name |
Type |
Description |
|
The ID of the address |
|
|
The ID of the scheduler |
|
|
The ID of the address type. The types available are:
|
public deleteOrderAddress($addressId, $orderId, $typeId):bool
Delete an address relation from an order
Name |
Type |
Description |
|
The ID of the address |
|
|
The ID of the order |
|
|
The ID of the address type. The types available are:
|
AdvanceOrder
Contracts
AdvanceOrderRepositoryContract
The AdvanceOrderRepositoryContract is the interface for the advance order repository. This interface allows you to create and update advance orders.
Namespace
Plenty\Modules\Order\AdvanceOrder\Contracts
Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create an advance order
Name |
Type |
Description |
|
||
|
||
|
public createWithCoupons($data, $coupons = [], $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create an advance order with coupon codes
Name |
Type |
Description |
|
||
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update an advance order
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($orderId):void
Delete an advance order
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from an advance order
Name |
Type |
Description |
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create an advance order from a parent order
Name |
Type |
Description |
|
||
|
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public convertFromSalesOrder($orderId):Plenty\Modules\Order\Models\Order
Return type: Order
Convert sales order into advance order
Name |
Type |
Description |
|
The order ID |
public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "variation" to "unassigned variation".
Name |
Type |
Description |
|
||
|
||
|
public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "unassigned variation" to "variation".
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
public previewCreate($data):array
Get an advance order create preview for the given order data.
Name |
Type |
Description |
|
public previewCreateWithCoupons($data, $coupons = []):array
Get an advance order create preview for the given order data with coupon codes.
Name |
Type |
Description |
|
||
|
public previewUpdate($orderId, $data):array
Get an advance order update preview for the given order data.
Name |
Type |
Description |
|
||
|
Booking
Contracts
OrderBookingRepositoryContract
Book orders, order items and order item transactions.
Namespace
Plenty\Modules\Order\Booking\Contracts
Methods
public bookOrder($orderId, $deliveryNoteNumber = null):Plenty\Modules\Order\Booking\Models\OrderBooking
Return type: OrderBooking
Book an order
Name |
Type |
Description |
|
||
|
public bookOrderItem($orderItemId, $deliveryNoteNumber = null):Plenty\Modules\Order\Booking\Models\OrderBooking
Return type: OrderBooking
Book an order item
Name |
Type |
Description |
|
||
|
public bookOrderItemTransactions($transactionIds, $warehouseId = null, $deliveryNoteNumber = null):Plenty\Modules\Order\Booking\Models\OrderBooking
Return type: OrderBooking
Book order item transactions
Name |
Type |
Description |
|
||
|
||
|
Template
Filters
OrderClientFilterBuilder
Used to represent the order client filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderCompletedAtFilterBuilder
Used to represent the order completed at filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderCreatedAtFilterBuilder
Used to represent the order created at filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderExcludeMainOrdersFilterBuilder
Used to represent the exclude main orders filter.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderIdFilterBuilder
Used to represent the order id filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():string
Returns an identifier for the filter
public setFilterData($filterData):void
This method will be filled by the specified values in a catalog. It should be used to provide the necessary manipulation so the filter that is returned by getFilter can be consumed by the export.
Name |
Type |
Description |
|
public getFilter($settings = []):void
Returns the filter that will be given to the export
Name |
Type |
Description |
|
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
Returns the UI representation of the filter
OrderItemTypeFilterBuilder
Used to represent the order item type filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderItemVariationIdFilterBuilder
Used to represent the order item variation filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():string
Returns an identifier for the filter
public setFilterData($filterData):void
This method will be filled by the specified values in a catalog. It should be used to provide the necessary manipulation so the filter that is returned by getFilter can be consumed by the export.
Name |
Type |
Description |
|
public getFilter($settings = []):void
Returns the filter that will be given to the export
Name |
Type |
Description |
|
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
Returns the UI representation of the filter
OrderOwnerFilterBuilder
Used to represent the order owner filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderPaidAtFilterBuilder
Used to represent the order paid at filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderPaymentMethodFilterBuilder
Used to represent the order payment method filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderReceivedDateFilterBuilder
Used to represent the order date filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderReferrerFilterBuilder
Used to represent the order referrer filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderShippingProfileFilterBuilder
Used to represent the shipping profile filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderStatusFilterBuilder
Used to represent the order status filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderTypeFilterBuilder
Used to represent the order status type in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderUpdatedAtFilterBuilder
Used to represent the order updated at filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
OrderWarehouseFilterBuilder
Used to represent the order warehouse filter in both the catalog export and UI.
Namespace
Plenty\Modules\Order\Catalogues\Order\Template\Filters
Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Name |
Type |
Description |
|
public getFilter($settings = []):void
Name |
Type |
Description |
|
ContactWish
Contracts
ContactWishRepositoryContract
This interface allows you to get and create contact wishes.
Namespace
Plenty\Modules\Order\ContactWish\Contracts
Methods
public getContactWish($orderId):Plenty\Modules\Order\ContactWish\Models\ContactWish
Return type: ContactWish
Get the contact wish
Name |
Type |
Description |
|
The ID of the order |
public createContactWish($orderId, $text):Plenty\Modules\Order\ContactWish\Models\ContactWish
Return type: ContactWish
Create a contact wish
Name |
Type |
Description |
|
The ID of the order |
|
|
The text for the contact wish |
CreditNote
Contracts
CreditNoteRepositoryContract
The CreditNoteRepositoryContract is the interface for the credit note repository. This interface allows you to create and update credit notes.
Namespace
Plenty\Modules\Order\CreditNote\Contracts
Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create a credit note
Name |
Type |
Description |
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update a credit note
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($orderId):void
Delete a credit note
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from a credit note
Name |
Type |
Description |
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create a credit note from a parent order
Name |
Type |
Description |
|
||
|
public validateFromParent($orderId, $data = []):array
Validate order items for create a credit note from a parent order
Name |
Type |
Description |
|
||
|
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "variation" to "unassigned variation".
Name |
Type |
Description |
|
||
|
||
|
public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "unassigned variation" to "variation".
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
public previewCreate($data):array
Get a credit note create preview for the given order data.
Name |
Type |
Description |
|
public previewUpdate($orderId, $data):array
Get a credit note update preview for the given order data.
Name |
Type |
Description |
|
||
|
Settings
Models
CreditNoteSettings
The model of the creditNote order settings.
Namespace
Plenty\Modules\Order\CreditNote\Settings\Models
Name | Type | Description |
---|---|---|
defaultStatusId |
||
setShippingCostsToZero |
||
copyShippingCostsFromOriginOrder |
||
validateQuantityFromParent |
||
defaultOrderStatus |
Deprecated, not filled anymore. Use $defaultStatusId instead. |
|
defaultCreditNoteReasonId |
Methods
public toArray()
Returns this model as an array.
OfferSettings
The model of the offer settings.
Methods
public toArray()
Returns this model as an array.
RepairSettings
The model of the repair order settings.
Namespace
Plenty\Modules\Order\Repair\Settings\Models
Name | Type | Description |
---|---|---|
defaultStatusId |
||
defaultOrderStatus |
Deprecated, not filled anymore. Use $defaultStatusId instead. |
|
resetOutgoingItemsStatusId |
Values: -1: no status change, 0: last status , >0: defined status |
|
defaultRepairReasonId |
||
defaultRepairStatusId |
Methods
public toArray()
Returns this model as an array.
ReturnOrderSettings
The model of the return order settings.
Namespace
Plenty\Modules\Order\ReturnOrder\Settings\Models
Name | Type | Description |
---|---|---|
defaultStatusId |
||
defaultOrderStatus |
Deprecated, not filled anymore. Use $defaultStatusId instead. |
|
defaultReturnReasonId |
||
defaultReturnStatusId |
||
setShippingCostsToZero |
||
copyShippingCostsFromOriginOrder |
Methods
public toArray()
Returns this model as an array.
OrderSettings
The model of the order settings.
Namespace
Plenty\Modules\Order\Settings\Models
Name | Type | Description |
---|---|---|
warehouseAssignment |
Possible values: 'order', 'order_row' |
|
warehouseSelection |
Possible values: 'shipping_country', 'primary_storehouse', 'maximum_stock', 'minimum_stock', 'highest_priority_warehouse', 'lowest_priority_warehouse', 'highest_priority_warehouse_fallback_primary_warehouse', 'lowest_priority_warehouse_fallback_primary_warehouse' |
|
orderItemPrefixes |
||
cancelStatusFrom |
||
cancelStatusTo |
||
reservationStatusFrom |
||
reservationStatusTo |
||
reservationOnlyPaidOrders |
||
noStockStatus4 |
||
stockChangeStatusFrom |
||
stockChangeStatusTo |
||
defaultVariationIdForDunningFees |
||
defaultReferrerId |
||
showInactivePaymentMethods |
||
downPayment |
||
useNewOrderUi |
||
oldUiDisplayAddress |
||
oldUiDisplayPricesNet |
||
oldUiChangeableBundleQuantity |
Methods
public toArray()
Returns this model as an array.
StoreOrderSettings
The model of the store order settings.
Namespace
Plenty\Modules\Order\Settings\Models
Name | Type | Description |
---|---|---|
defaultLanguage |
||
defaultParcelServiceId |
||
defaultParcelServicePresetId |
||
defaultMethodOfPaymentId |
||
defaultCustomerClassId |
Methods
public toArray()
Returns this model as an array.
WarrantySettings
The model of the warranty order settings.
Namespace
Plenty\Modules\Order\Warranty\Settings\Models
Name | Type | Description |
---|---|---|
defaultStatusId |
||
setShippingCostsToZero |
||
copyShippingCostsFromOriginOrder |
||
validateQuantityFromParent |
||
resetOutgoingItemsStatusId |
Values: -1: no status change, 0: last status , >0: defined status |
Methods
public toArray()
Returns this model as an array.
Contracts
OrderSettingsRepositoryContract
Get settings for orders.
Namespace
Plenty\Modules\Order\Settings\Contracts
Methods
public get():Plenty\Modules\Order\Settings\Models\OrderSettings
Return type: OrderSettings
Get basic order settings
public set($data):Plenty\Modules\Order\Settings\Models\OrderSettings
Return type: OrderSettings
Update basic order settings
Name |
Type |
Description |
|
public getStoreSettings($storeId):Plenty\Modules\Order\Settings\Models\StoreOrderSettings
Return type: StoreOrderSettings
Get order settings for store
Name |
Type |
Description |
|
CreditNoteReason
Contracts
CreditNoteReasonRepositoryContract
Use this interface to retrieve order credit note reasons.
Namespace
Plenty\Modules\Order\CreditNoteReason\Contracts
Methods
public all():array
Get all credit note reasons.
public get($id):Plenty\Modules\Order\CreditNoteReason\Models\CreditNoteReason
Return type: CreditNoteReason
Get a credit note reason.
Name |
Type |
Description |
|
The ID of the credit note reason. |
public set($data):array
Set a credit note reason.
Name |
Type |
Description |
|
public delete($id):bool
Delete an order credit note reason
Name |
Type |
Description |
|
Models
CreditNoteReason
The credit note reason model.
Namespace
Plenty\Modules\Order\CreditNoteReason\Models
Name | Type | Description |
---|---|---|
id |
The ID of the credit note reason. |
|
reason |
The specified reason in system language. |
|
names |
The specified reason in different languages. |
Methods
public toArray()
Returns this model as an array.
Date
Contracts
OrderDateRepositoryContract
The OrderDateRepositoryContract contains the functionality to find available OrderDateTypes with their names in a specific language. Furthermore it is possible to create new OrderDateTypes, to update or delete existing date types and to create date type names for a language.
Namespace
Plenty\Modules\Order\Date\Contracts
Methods
public findNamesByTypeId($typeId):void
List names of a date type
Name |
Type |
Description |
|
The ID of the date type |
public findNameByTypeIdAndLang($typeId, $lang):Plenty\Modules\Order\Date\Models\OrderDateTypeName
Return type: OrderDateTypeName
Get a name of a date type
Name |
Type |
Description |
|
The ID of the date type |
|
|
The language ISO 639-1 code, e.g. "en" for English |
public findTypes($languages = []):void
List date types
Name |
Type |
Description |
|
The languages to load |
public findTypeById($typeId):Plenty\Modules\Order\Date\Models\OrderDateType
Return type: OrderDateType
Get a date type
Name |
Type |
Description |
|
The ID of the date type |
public create($data = []):Plenty\Modules\Order\Date\Models\OrderDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder instead |
Return type: OrderDate
Create an order date
Name |
Type |
Description |
|
The order date data. The properties that are required to create an order can be found in the OrderDate model. |
public update($data, $orderDateId):Plenty\Modules\Order\Date\Models\OrderDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder instead |
Return type: OrderDate
Update a date
Name |
Type |
Description |
|
The order date data. The properties that are required to create an order can be found in the OrderDate model. |
|
|
The ID of the order date |
public save($data = []):Plenty\Modules\Order\Date\Models\OrderDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder instead |
Return type: OrderDate
Create or update an order date
Name |
Type |
Description |
|
The order date data. The properties that are required to create an order can be found in the OrderDate model. |
public delete($orderDateId):bool
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder instead |
Delete a date
Name |
Type |
Description |
|
The ID of the order date |
public deleteByOrderIdAndType($orderId, $typeId):void
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder instead |
Delete an order date from an order by the type of the order date
Name |
Type |
Description |
|
The ID of the order |
|
|
The ID of the date type. |
public findByOrderIdAndTypeId($orderId, $typeId):Plenty\Modules\Order\Date\Models\OrderDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::findOrderById instead |
Return type: OrderDate
Get an order date from an order by the type of the order date
Name |
Type |
Description |
|
The ID of the order |
|
|
The ID of the date type |
public findByOrderId($orderId):void
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::findOrderById instead |
List order dates of an order
Name |
Type |
Description |
|
The ID of the order |
public createType($data):Plenty\Modules\Order\Date\Models\OrderDateType
Return type: OrderDateType
Create an order date type.
Name |
Type |
Description |
|
public updateType($id, $data):Plenty\Modules\Order\Date\Models\OrderDateType
Return type: OrderDateType
Update an order date type.
Name |
Type |
Description |
|
||
|
public deleteType($id):bool
Delete an order date type.
Name |
Type |
Description |
|
OrderItemDateRepositoryContract
The OrderItemDateRepositoryContract contains the functionality to get, create, update and delete OrderItemDate instances.
Namespace
Plenty\Modules\Order\Date\Contracts
Methods
public find($id):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::findOrderById order instead |
Return type: OrderItemDate
Get an order item date
Name |
Type |
Description |
|
The ID of the order item date. |
public create($data = []):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Return type: OrderItemDate
Create an order item date
Name |
Type |
Description |
|
The order item date data. The properties that are required to create an order item can be found in the OrderItemDate model. |
public update($data, $id):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Return type: OrderItemDate
Update an order date
Name |
Type |
Description |
|
The order item date data. The properties that are required to create an order item can be found in the OrderItemDate model. |
|
|
The ID of the order item date |
public save($data = []):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Return type: OrderItemDate
Create or update an order item date
Name |
Type |
Description |
|
The order item date data. The properties that are required to create or update an order can be found in the OrderItemDate model. |
public delete($id):bool
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Delete a date
Name |
Type |
Description |
|
The ID of the order item date |
public findByOrderItemIdAndTypeId($orderItemId, $typeId):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::findOrderById order instead |
Return type: OrderItemDate
Get an order item date by an order item and an order date type.
Name |
Type |
Description |
|
The ID of the order item |
|
|
The ID of the date type |
public createByOrderItemIdAndTypeId($data, $orderItemId, $typeId):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Return type: OrderItemDate
Create an order item date by an order item and an order date type.
Name |
Type |
Description |
|
The order item date data. The properties that are required to create an order can be found in the OrderItemDate model. |
|
|
The ID of the order item |
|
|
The ID of the date type |
public updateByOrderItemIdAndTypeId($data, $orderItemId, $typeId):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Return type: OrderItemDate
Update an order item date by an order item and an order date type.
Name |
Type |
Description |
|
The order item date data. The properties that are required to update an order can be found in the OrderItemDate model. |
|
|
The ID of the order item |
|
|
The ID of the date type |
public deleteByOrderItemIdAndTypeId($orderItemId, $typeId):bool
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Delete an order item date by an order item and an order date type.
Name |
Type |
Description |
|
The ID of the order item |
|
|
The ID of the date type |
public findByOrderItemId($orderItemId):void
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::findOrderById order instead |
List order item dates of an order item.
Name |
Type |
Description |
|
The ID of the order |
Models
OrderDate
The OrderDate model.
Namespace
Plenty\Modules\Order\Date\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order date |
|
orderId |
The ID of the order that the date belongs to |
|
typeId |
The ID of the date type. The following types are available:
|
|
date |
The date plus hours, minutes and seconds. The date format must comply with the W3C standard. |
|
createdAt |
The date when the date was created |
|
updatedAt |
The date when the date was last updated |
|
type |
The type of date |
Methods
public toArray()
Returns this model as an array.
OrderDateType
The OrderDateType model.
Namespace
Plenty\Modules\Order\Date\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order date type. The following date types are available:
|
|
isErasable |
Flag that indicates if this type can be deleted or not. |
|
position |
The position for sorting |
|
names |
The names for this OrderDateType |
|
orderDates |
The actual dates that belong to the order date type |
Methods
public toArray()
Returns this model as an array.
OrderDateTypeName
The OrderDateTypeName model. Order date types can have several names. One name per language. Each name has a unique ID.
Namespace
Plenty\Modules\Order\Date\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order date type name |
|
typeId |
The ID of the date type that this name belongs to. The following date types are available:
|
|
lang |
The ISO 639-1 language code for the name, e.g. "en" for English |
|
name |
The name of the order date type |
|
type |
The date type that this name belongs to |
Methods
public toArray()
Returns this model as an array.
OrderItemDate
The OrderItemDate model.
Namespace
Plenty\Modules\Order\Date\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order date |
|
orderItemId |
The ID of the order item that the date belongs to |
|
typeId |
The ID of the date type. The following types are available:
|
|
date |
The date plus hours, minutes and seconds. The date format must comply with the W3C standard. |
|
createdAt |
The date when the date was created |
|
updatedAt |
The date when the date was last updated |
|
type |
The type of the date. The following date types are available:
|
|
orderItem |
The order item the date belongs to. |
Methods
public toArray()
Returns this model as an array.
DeliveryOrder
Contracts
DeliveryOrderRepositoryContract
The DeliveryOrderRepositoryContract is the interface for the delivery order repository. This interface allows you to create, update or delete delivery orders. A delivery order will be created according to a parent order and can either be created manually or automatically.
Namespace
Plenty\Modules\Order\DeliveryOrder\Contracts
Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create a delivery order
Name |
Type |
Description |
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update a delivery order
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($orderId):void
Delete a delivery order
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from a delivery
Name |
Type |
Description |
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create a delivery order from a parent order
Name |
Type |
Description |
|
The ID of the parent order, for which the delivery should be created. |
|
|
The order item Ids with quantities to be added to the delivery order. |
public validateFromParent($orderId, $data = []):array
Validate order items for create a delivery order from a parent order
Name |
Type |
Description |
|
||
|
public createAllAutomaticallyFromParent($orderId):Illuminate\Support\Collection
Return type: Collection
Create delivery orders automatically for all order items
Name |
Type |
Description |
|
The ID of the parent order, for which the delivery should be created. |
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public validateCancelBooking($orderId):array
Validate cancellation of the booking of an order
Name |
Type |
Description |
|
public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "variation" to "unassigned variation".
Name |
Type |
Description |
|
||
|
||
|
public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "unassigned variation" to "variation".
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
public previewCreate($data):array
Get a delivery order create preview for the given order data.
Name |
Type |
Description |
|
public previewUpdate($orderId, $data):array
Get a delivery order update preview for the given order data.
Name |
Type |
Description |
|
||
|
Documents
Contracts
DocumentAccountingSummaryRepositoryContract
Get document accounting summaries.
Namespace
Plenty\Modules\Order\Documents\Contracts
Methods
public list($page = 1, $itemsPerPage = 10):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Lists document accounting summaries. A document accounting summary is saved along with each reversal document (for invoice and credit note). It contains accounting information about the order for this point in time. The summary is saved because an order can be updated after a reversal_document is generated. The information about the order before the update is needed for accounting.
Name |
Type |
Description |
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of summaries to be displayed per page. The default number of orders per page is 10. |
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
OrderDocumentStorageContract
Provides methods to store, get and delete order document files. The files are stored on an AWS S3 storage by default. The implementation for this contract can be replaced by your own implementation.
Namespace
Plenty\Modules\Order\Documents\Contracts
Methods
public fileExists($path):bool
Check if the file path exists on the storage.
Name |
Type |
Description |
|
The file path |
public put($path, $file):void
Store a file on the storage.
Name |
Type |
Description |
|
The file path |
|
|
The file to store. Can be either a file path on the file system or an object. |
public get($path):Plenty\Modules\Cloud\Storage\Models\StorageObject
Return type: StorageObject
Get a file from the storage
Name |
Type |
Description |
|
The file path |
public delete($path):bool
Delete a file from the storage.
Name |
Type |
Description |
|
The file path |
Events
Canceled
AfterOrderCanceled
An event class fired after an order is canceled.
Namespace
Plenty\Modules\Order\Events\Canceled
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
BeforeOrderCanceled
An event class fired before an order will be canceled.
Namespace
Plenty\Modules\Order\Events\Canceled
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
Changed
OrderStatusChanged
An event class fired after the status of an order has changed.
Namespace
Plenty\Modules\Order\Events\Changed
Methods
public __construct($order, $oldStatus):void
OrderStatusChanged constructor.
Name |
Type |
Description |
|
||
|
public getOldStatus():float
Get the old order status.
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
Created
CreditNoteCreated
An event class fired after a new credit note is created.
Namespace
Plenty\Modules\Order\Events\Created
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
DeliveryOrderCreated
An event class fired after a new delivery order is created.
Namespace
Plenty\Modules\Order\Events\Created
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
MultiCreditNoteCreated
An event class fired after a new multi credit note is created.
Namespace
Plenty\Modules\Order\Events\Created
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
MultiOrderCreated
An event class fired after a new multi order is created.
Namespace
Plenty\Modules\Order\Events\Created
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
RepairCreated
An event class fired after a new repair is created.
Namespace
Plenty\Modules\Order\Events\Created
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
ReturnCreated
An event class fired after a new returns is created.
Namespace
Plenty\Modules\Order\Events\Created
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
SalesOrderCreated
An event class fired after a new sales order is created.
Namespace
Plenty\Modules\Order\Events\Created
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
WarrantyCreated
An event class fired after a new warranty is created.
Namespace
Plenty\Modules\Order\Events\Created
Methods
public __construct($order):void
OrderEvent constructor.
Name |
Type |
Description |
|
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order
Get the order instance.
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
Injection
Contracts
OrderInjectionOnCreateContract
Contract for injections on create.
Namespace
Plenty\Modules\Order\Injection\Contracts
Methods
public handle($data):array
Manipulate the order data on create.
Name |
Type |
Description |
|
OrderInjectionOnUpdateContract
Contract for injections on update.
Namespace
Plenty\Modules\Order\Injection\Contracts
OrderInjectionServiceContract
Service to register injections for order creation.
Namespace
Plenty\Modules\Order\Injection\Contracts
Methods
public registerOnCreateBeforeValidation($orderTypeIds, $class):void
Register an injection on create before the validation.
Name |
Type |
Description |
|
||
|
public registerOnCreateBeforeSumsCalculation($orderTypeIds, $class):void
Register an injection on create before the sums calculation.
Name |
Type |
Description |
|
||
|
public registerOnCreateAfterSumsCalculation($orderTypeIds, $class):void
Register an injection on create after the sums calculation.
Name |
Type |
Description |
|
||
|
public registerOnUpdateBeforeValidation($orderTypeIds, $class):void
Register an injection on update before the validation.
Name |
Type |
Description |
|
||
|
public registerOnUpdateBeforeSumsCalculation($orderTypeIds, $class):void
Register an injection on update before the sums calculation.
Name |
Type |
Description |
|
||
|
public registerOnUpdateAfterSumsCalculation($orderTypeIds, $class):void
Register an injection on update after the sums calculation.
Name |
Type |
Description |
|
||
|
public inject($saveType, $injectionPoint, $data, $order = null):array
Inject the data.
Name |
Type |
Description |
|
||
|
||
|
||
|
Models
Legacy
Order
The legacy order model
Namespace
Plenty\Modules\Order\Models\Legacy
Name | Type | Description |
---|---|---|
id |
The Id of an order |
|
orderType |
The type of an order type |
|
contactId |
The ID of the contact |
|
referrerId |
The referrer |
|
status |
The status |
|
userId |
The owner of an order |
|
entryDate |
The date that the order was entered |
|
webstoreId |
The ID of the webstore |
|
warehouseId |
The ID of the warehouse |
|
sellerAccount |
The seller account |
|
deliveryAddress |
||
billingAddress |
||
addresses |
||
addressRelations |
Methods
public toArray()
Returns this model as an array.
MultiCreditNote
Contracts
MultiCreditNoteRepositoryContract
The MultiCreditNoteRepositoryContract is the interface for the multi credit note repository. This interface allows you to update multi credit notes.
Namespace
Plenty\Modules\Order\MultiCreditNote\Contracts
Methods
public update($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update a multi credit note
Name |
Type |
Description |
|
||
|
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
MultiSalesOrder
Contracts
MultiSalesOrderRepositoryContract
The MultiSalesOrderRepositoryContract is the interface for the multi sales order repository. This interface allows you to update multi orders.
Namespace
Plenty\Modules\Order\MultiSalesOrder\Contracts
Methods
public update($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update a multi sales order
Name |
Type |
Description |
|
||
|
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Offer
Contracts
OfferRepositoryContract
The OfferRepositoryContract is the interface for the offer repository. This interface allows you to create and update offers.
Namespace
Plenty\Modules\Order\Offer\Contracts
Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create an offer
Name |
Type |
Description |
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update an offer
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($orderId):void
Delete an offer
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from an offer
Name |
Type |
Description |
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create an offer from a parent order
Name |
Type |
Description |
|
||
|
public previewCreate($data):array
Get an offer create preview for the given order data.
Name |
Type |
Description |
|
The order data for the create preview. |
public previewUpdate($orderId, $data):array
Get an offer update preview for the given order data.
Name |
Type |
Description |
|
||
|
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "variation" to "unassigned variation".
Name |
Type |
Description |
|
||
|
||
|
public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Payment
Contracts
OrderPaymentRepositoryContract
The OrderPaymentRepositoryContract is the interface for the order payment repository. This interface allows you to update the paid amount of orders.
Namespace
Plenty\Modules\Order\Payment\Contracts
Methods
public addPaidAmount($orderId, $paidAmount, $currency = null, $date = null, $options = []):Plenty\Modules\Order\Models\Order
Return type: Order
Add a given paid amount to the already existing paid amount of an order.
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
public overwritePaidAmount($orderId, $paidAmount, $currency = null, $date = null, $options = []):Plenty\Modules\Order\Models\Order
Events
ManualOrderExecutePayment
The event is triggered after the order is placed within the manual order creation.
Namespace
Plenty\Modules\Order\Payment\Events
Methods
public setType($type):Plenty\Modules\Order\Payment\Events\ManualOrderExecutePayment
Return type: ManualOrderExecutePayment
Name |
Type |
Description |
|
public getType():string
Gets the content type.
public setValue($value):Plenty\Modules\Order\Payment\Events\ManualOrderExecutePayment
Return type: ManualOrderExecutePayment
Set the value of the content type.
Name |
Type |
Description |
|
The value of the content type |
public getValue():string
Gets the value of the content type.
public setOrderId($orderId):Plenty\Modules\Order\Payment\Events\ManualOrderExecutePayment
Return type: ManualOrderExecutePayment
Set the order id.
Name |
Type |
Description |
|
public getOrderId():int
Gets the order id.
public getAdditionalData():array
public setAdditionalData($additionalData):Plenty\Modules\Order\Payment\Events\ManualOrderExecutePayment
Return type: ManualOrderExecutePayment
Name |
Type |
Description |
|
ManualOrderPreparePayment
The event is triggered before the order is placed within the manual order creation.
Namespace
Plenty\Modules\Order\Payment\Events
Methods
public setType($type):Plenty\Modules\Order\Payment\Events\ManualOrderPreparePayment
Return type: ManualOrderPreparePayment
Name |
Type |
Description |
|
public getType():string
Gets the content type.
public setValue($value):Plenty\Modules\Order\Payment\Events\ManualOrderPreparePayment
Return type: ManualOrderPreparePayment
Set the value of the content type.
Name |
Type |
Description |
|
The value of the content type |
public getValue():string
Gets the value of the content type.
public setOrderData($orderData):Plenty\Modules\Order\Payment\Events\ManualOrderPreparePayment
Return type: ManualOrderPreparePayment
Set the order data.
Name |
Type |
Description |
|
public getOrderData():array
Gets the order data.
Property
Contracts
OrderItemPropertyRepositoryContract
The OrderItemPropertyRepositoryContract contains the functionality to find, create, update and delete OrderItemProperty instances.
Namespace
Plenty\Modules\Order\Property\Contracts
Methods
public find($id):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::findOrderById order instead |
Return type: OrderItemProperty
Find an order item property by its ID.
Name |
Type |
Description |
|
The ID of the order item property. |
public create($data = []):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Return type: OrderItemProperty
Create an order item property
Name |
Type |
Description |
|
The order item property data. The properties that are required to create an order item can be found in the OrderItemProperty model. |
public update($data, $id):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Return type: OrderItemProperty
Update an order item property
Name |
Type |
Description |
|
The order item property data. The properties that are required to create an order item can be found in the OrderItemProperty model. |
|
|
The ID of the order item property |
public save($data = []):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Return type: OrderItemProperty
Create or update an order item property
Name |
Type |
Description |
|
The order item property data. The properties that are required to create an order can be found in the OrderItemProperty model. |
public delete($id):bool
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Delete an order item property
Name |
Type |
Description |
|
The ID of the order item property |
public findByOrderItemIdAndTypeId($orderItemId, $typeId):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::findOrderById order instead |
Return type: OrderItemProperty
Get an order item property by an order item ID and an order property type ID.
Name |
Type |
Description |
|
The ID of the order item |
|
|
The ID of the property type |
public createByOrderItemIdAndTypeId($data, $orderItemId, $typeId):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Return type: OrderItemProperty
Create an order item property by an order item ID and an order property type ID.
Name |
Type |
Description |
|
The order item property data. The properties that are required to create an order can be found in the OrderItemProperty model. |
|
|
The ID of the order item |
|
|
The ID of the property type |
public updateByOrderItemIdAndTypeId($data, $orderItemId, $typeId):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Return type: OrderItemProperty
Update an order item property by an order item ID and an order property type ID.
Name |
Type |
Description |
|
The order item property data. The properties that are required to create an order can be found in the OrderItemProperty model. |
|
|
The ID of the order item |
|
|
The ID of the property type |
public deleteByOrderItemIdAndTypeId($orderItemId, $typeId):bool
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder order instead |
Delete an order item property by an order item ID and an order property type ID.
Name |
Type |
Description |
|
The ID of the order item |
|
|
The ID of the property type |
public findByOrderItemId($orderItemId):void
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::findOrderById order instead |
List order item properties of an order item.
Name |
Type |
Description |
|
The ID of the order |
OrderPropertyRepositoryContract
The OrderPropertyRepositoryContract contains the functionality to get, list, create, update and delete OrderPropertyTypes and OrderProperties as well as OrderProperties. Order properties contain information that are additional to an order. Each property has a type and each type can have several names, but only one name per language. An order can only have one property of each property type.
Namespace
Plenty\Modules\Order\Property\Contracts
Methods
public create($data = []):Plenty\Modules\Order\Property\Models\OrderProperty
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder instead |
Return type: OrderProperty
Create an order property
Name |
Type |
Description |
|
The order property data. The properties that are required to create an order can be found in the OrderProperty model. |
public update($data, $orderPropertyId = null):Plenty\Modules\Order\Property\Models\OrderProperty
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder instead |
Return type: OrderProperty
Update an order property
Name |
Type |
Description |
|
The order property data. The properties that are required to create an order can be found in the OrderProperty model. |
|
|
The ID of the order property. |
public delete($data = []):bool
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::updateOrder instead |
Deletes an order property. The ID of the order property must be specified.
Name |
Type |
Description |
|
Either the ID of the property or an array holding the composite key composed of the order ID and the type ID. |
public findByOrderId($orderId, $typeId = null):void
Deprecated! (since 2019-09)
Please use OrderRepositoryContract::findOrderById instead |
List order properties of an order
Name |
Type |
Description |
|
The ID of the order. |
|
|
The ID of the type. |
public getType($typeId, $languages = []):Plenty\Modules\Order\Property\Models\OrderPropertyType
Return type: OrderPropertyType
Get a property type
Name |
Type |
Description |
|
The ID of the property type |
|
|
The languages to load |
public getTypes($languages = []):void
List order property types
Name |
Type |
Description |
|
The languages to load |
public createType($data = []):Plenty\Modules\Order\Property\Models\OrderPropertyType
Return type: OrderPropertyType
Create an order property type
Name |
Type |
Description |
|
The order property type data. The properties that are required to create a type can be found in the OrderPropertyType model. |
public updateType($data = [], $id = null):Plenty\Modules\Order\Property\Models\OrderPropertyType
Return type: OrderPropertyType
Update an order property type
Name |
Type |
Description |
|
The order property type data. |
|
|
The ID of the order property type. |
public deleteType($id):bool
Delete an order property type
Name |
Type |
Description |
|
The ID of the order property type |
Models
OrderItemProperty
The order item property model.
Namespace
Plenty\Modules\Order\Property\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order item property. |
|
orderItemId |
The ID of the order item that the property belongs to. |
|
typeId |
The ID of the property type.
|
|
value |
The value of the property. The value depends on type. |
|
createdAt |
The date that the property was created. |
|
updatedAt |
The date that the property was last updated. |
|
orderItem |
The order item that the property belongs to. |
|
type |
The type of the property. |
Methods
public toArray()
Returns this model as an array.
OrderProperty
The order properties model. Each order property has a type.
Namespace
Plenty\Modules\Order\Property\Models
Name | Type | Description |
---|---|---|
id |
The ID of the order property |
|
orderId |
The ID of the order that the property belongs to |
|
typeId |
The ID of the property type. The following types are available:
|
|
value |
The value of the property. The value depends on the type. |
|
createdAt |
The date that the property was created. |
|
updatedAt |
The date that the property was updated last. |
|
order |
The order that the property belongs to. |
|
type |
The property type instance |
Methods
public toArray()
Returns this model as an array.
OrderPropertyType
The OrderPropertyType model. Each order property must have a property type. An order can have one property of each property type. The default property types provided by plentymarkets are listed here.
Namespace
Plenty\Modules\Order\Property\Models
Name | Type | Description |
---|---|---|
id |
The ID of the property type |
|
isErasable |
Flag that states if this type can be deleted or not. |
|
position |
The position for sorting |
|
cast |
The data type of the values of this property type. Valid types are:
|
|
names |
The names of the order property types. |
Methods
public toArray()
Returns this model as an array.
OrderPropertyTypeName
The order property type name model. Each order property type can have one name per language.
Namespace
Plenty\Modules\Order\Property\Models
Name | Type | Description |
---|---|---|
id |
The ID of type name |
|
typeId |
The ID of the property type |
|
name |
The name of property type |
|
lang |
The language of the type name |
|
type |
The property type instance. |
Methods
public toArray()
Returns this model as an array.
Redistribution
Contracts
RedistributionRepositoryContract
Create and update redistributions.
Namespace
Plenty\Modules\Order\Redistribution\Contracts
Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create a redistribution
Name |
Type |
Description |
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update a redistribution
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($orderId):void
Delete a redistribution
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from a redistribution
Name |
Type |
Description |
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create a redistribution from a parent order
Name |
Type |
Description |
|
The ID of the parent order, for which the reorder should be created. |
|
|
The order item Ids with quantities to be added to the reorder. |
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public previewCreate($data):array
Get a redistribution create preview for the given order data.
Name |
Type |
Description |
|
public previewUpdate($orderId, $data):array
Get a redistribution update preview for the given order data.
Name |
Type |
Description |
|
||
|
RelationReference
Contracts
OrderRelationReferenceRepositoryContract
Get, create, update and delete order relation references.
Namespace
Plenty\Modules\Order\RelationReference\Contracts
Methods
public find($id):Plenty\Modules\Order\RelationReference\Models\OrderRelationReference
Return type: OrderRelationReference
Get a relation reference by ID
Name |
Type |
Description |
|
The ID of the relation reference |
public findByComposite($orderId, $referenceType, $relation):Plenty\Modules\Order\RelationReference\Models\OrderRelationReference
Return type: OrderRelationReference
Get a relation reference by composite key
Name |
Type |
Description |
|
The ID of the order |
|
|
The reference type. Valid types are:
|
|
|
The relation. Valid relations are:
|
public findByOrderId($orderId):void
List relation references by order ID
Name |
Type |
Description |
|
The ID of the order |
public findByAnyValues($values, $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List relation references by any values
Name |
Type |
Description |
|
The array with the given filter values. E.g. ['referenceType' ⇒ 'contact']. Valid filters are:
|
|
|
The page to get |
|
|
The items per page |
public create($data):Plenty\Modules\Order\RelationReference\Models\OrderRelationReference
Return type: OrderRelationReference
Create a relation reference
Name |
Type |
Description |
|
The request data |
public update($id, $data):Plenty\Modules\Order\RelationReference\Models\OrderRelationReference
Return type: OrderRelationReference
Update a relation reference by ID
Name |
Type |
Description |
|
The ID of the relation reference |
|
|
The request data |
public updateByComposite($orderId, $referenceType, $relation, $data):Plenty\Modules\Order\RelationReference\Models\OrderRelationReference
Return type: OrderRelationReference
Update a relation reference by composite key
Name |
Type |
Description |
|
The ID of the order |
|
|
The reference type. Valid types are:
|
|
|
The relation. Valid relations are:
|
|
|
The request data |
public delete($id):bool
Delete a relation reference by ID
Name |
Type |
Description |
|
The ID of the relation reference |
public deleteByComposite($orderId, $referenceType, $relation):bool
Delete a relation reference by composite key
Name |
Type |
Description |
|
The ID of the order |
|
|
The reference type. Valid types are:
|
|
|
The relation. Valid relations are:
|
Models
OrderRelationReference
The order relation reference model specifies how references and orders are related to one another.
Namespace
Plenty\Modules\Order\RelationReference\Models
Name | Type | Description |
---|---|---|
id |
The relation reference id. |
|
orderId |
The order id. |
|
referenceType |
The reference type. The reference types available are the following:
|
|
referenceId |
The reference id. |
|
relation |
The relation between a reference and an order. The relation types available are the following:
|
|
order |
The order that the reference belongs to. |
|
contactReceiver |
The Contact referenced with relation "receiver". |
|
contactSender |
The Contact referenced with relation "sender". |
|
accountReceiver |
The Account referenced with relation "receiver". |
|
accountSender |
The Account referenced with relation "sender". |
Methods
public toArray()
Returns this model as an array.
Reorder
Contracts
ReorderRepositoryContract
Create and update reorders.
Namespace
Plenty\Modules\Order\Reorder\Contracts
Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create a reorder
Name |
Type |
Description |
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update a reorder
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($orderId):void
Delete a reorder
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from a reorder
Name |
Type |
Description |
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create a reorder from a parent order
Name |
Type |
Description |
|
The ID of the parent order, for which the reorder should be created. |
|
|
The order item Ids with quantities to be added to the reorder. |
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public getDeliveryDate($orderId):Carbon\Carbon
Return type: Carbon
Get the date when the reorder will probably be delivered.
Name |
Type |
Description |
|
public updateDeliveryDates($orderId, $date = null, $transferToOrderItems = null):Plenty\Modules\Order\Models\Order
Return type: Order
Calculate and save the delivery dates
Name |
Type |
Description |
|
||
|
||
|
public generateFromOrder($orderId, $data):array
Create reorder(s) for an order
Name |
Type |
Description |
|
||
|
public generateFromOrderItems($orderId, $data):array
Create / update reorder(s) for order items
Name |
Type |
Description |
|
||
|
public validateGenerateFromOrder($orderId):array
Validate order items for create a reorder from a sales order, delivery order, repair and warranty
Name |
Type |
Description |
|
public previewCreate($data):array
Get a reorder create preview for the given order data.
Name |
Type |
Description |
|
public previewUpdate($orderId, $data):array
Get a reorder update preview for the given order data.
Name |
Type |
Description |
|
||
|
public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "variation" to "unassigned variation".
Name |
Type |
Description |
|
||
|
||
|
public assignVariation($orderItemId, $variationId, $variationSupplierId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Repair
Contracts
RepairRepositoryContract
The RepairRepositoryContract is the interface for the repair repository. This interface allows you to create and update repairs.
Namespace
Plenty\Modules\Order\Repair\Contracts
Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create a repair
Name |
Type |
Description |
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update a repair
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($orderId):void
Delete a repair
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from a repair
Name |
Type |
Description |
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create a repair from a parent order
Name |
Type |
Description |
|
||
|
public validateFromParent($orderId, $data = []):array
Validate order items for create a repair from a parent order
Name |
Type |
Description |
|
||
|
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public book($orderId, $data = []):bool
Book order.
Name |
Type |
Description |
|
||
|
public cancelBooking($orderId, $data = []):bool
Cancellation the booking of an order. The ID of the order must be specified.
Name |
Type |
Description |
|
||
|
public validateCancelBooking($orderId):array
alidate cancellation of the booking of an order
Name |
Type |
Description |
|
public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "variation" to "unassigned variation".
Name |
Type |
Description |
|
||
|
||
|
public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "unassigned variation" to "variation".
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
public previewCreate($data):array
Get a repair order create preview for the given order data.
Name |
Type |
Description |
|
public previewUpdate($orderId, $data):array
Get a repair order update preview for the given order data.
Name |
Type |
Description |
|
||
|
RepairReason
Contracts
RepairReasonRepositoryContract
Use this interface to retrieve order repair reasons.
Namespace
Plenty\Modules\Order\RepairReason\Contracts
Methods
public all():array
Get all repair reasons.
public get($id):Plenty\Modules\Order\RepairReason\Models\RepairReason
Return type: RepairReason
Get a repair reason.
Name |
Type |
Description |
|
The ID of the repair reason. |
public set($data):array
Set a repair reason.
Name |
Type |
Description |
|
public delete($id):bool
Delete an order repair reason
Name |
Type |
Description |
|
Models
RepairReason
The repair reason model.
Namespace
Plenty\Modules\Order\RepairReason\Models
Name | Type | Description |
---|---|---|
id |
The ID of the repair reason. |
|
reason |
The specified reason in system language. |
|
names |
The specified reason in different languages. |
Methods
public toArray()
Returns this model as an array.
RepairStatus
Contracts
RepairStatusRepositoryContract
Use this interface to retrieve order repair status.
Namespace
Plenty\Modules\Order\RepairStatus\Contracts
Methods
public all():array
Get all repair status.
public get($id):Plenty\Modules\Order\RepairStatus\Models\RepairStatus
Return type: RepairStatus
Get a repair status.
Name |
Type |
Description |
|
The ID of the repair status. |
public set($data):array
Set a repair status.
Name |
Type |
Description |
|
public delete($id):bool
Delete an order repair status
Name |
Type |
Description |
|
Models
RepairStatus
The repair status model.
Namespace
Plenty\Modules\Order\RepairStatus\Models
Name | Type | Description |
---|---|---|
id |
The ID of the repair status. |
|
status |
The specified status in system language. |
|
names |
The specified status in different languages. |
Methods
public toArray()
Returns this model as an array.
ReturnOrder
Contracts
ReturnOrderRepositoryContract
The ReturnOrderRepositoryContract is the interface for the return order repository. This interface allows you to create and update return orders.
Namespace
Plenty\Modules\Order\ReturnOrder\Contracts
Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create a return
Name |
Type |
Description |
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update a return
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($orderId):void
Delete a return
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from a return
Name |
Type |
Description |
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create a return from a parent order
Name |
Type |
Description |
|
||
|
public validateFromParent($orderId, $data = []):array
Validate order items for create a return from a parent order
Name |
Type |
Description |
|
||
|
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public book($orderId, $data = []):void
Book order items of return
Name |
Type |
Description |
|
||
|
public validateBook($orderId):array
Validate booking of an return
Name |
Type |
Description |
|
public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "variation" to "unassigned variation".
Name |
Type |
Description |
|
||
|
||
|
public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "unassigned variation" to "variation".
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
public previewCreate($data):array
Get a return create preview for the given order data.
Name |
Type |
Description |
|
public previewUpdate($orderId, $data):array
Get a return update preview for the given order data.
Name |
Type |
Description |
|
||
|
ReturnReason
Contracts
ReturnReasonRepositoryContract
Use this interface to retrieve order return reasons.
Namespace
Plenty\Modules\Order\ReturnReason\Contracts
Methods
public all():array
Get all return reasons.
public get($id):Plenty\Modules\Order\ReturnReason\Models\ReturnReason
Return type: ReturnReason
Get a return reason.
Name |
Type |
Description |
|
The ID of the return reason. |
public set($data):array
Set a return reason.
Name |
Type |
Description |
|
public delete($id):bool
Delete an order return reason
Name |
Type |
Description |
|
Models
ReturnReason
The return reason model.
Namespace
Plenty\Modules\Order\ReturnReason\Models
Name | Type | Description |
---|---|---|
id |
The ID of the return reason. |
|
reason |
The specified reason in system language. |
|
names |
The specified reason in different languages. |
Methods
public toArray()
Returns this model as an array.
ReturnStatus
Contracts
ReturnStatusRepositoryContract
Use this interface to retrieve order return status.
Namespace
Plenty\Modules\Order\ReturnStatus\Contracts
Methods
public all():array
Get all return status.
public get($id):Plenty\Modules\Order\ReturnStatus\Models\ReturnStatus
Return type: ReturnStatus
Get a return status.
Name |
Type |
Description |
|
The ID of the return status. |
public set($data):array
Set a return status.
Name |
Type |
Description |
|
public delete($id):bool
Delete an order return status
Name |
Type |
Description |
|
Models
ReturnStatus
The return status model.
Namespace
Plenty\Modules\Order\ReturnStatus\Models
Name | Type | Description |
---|---|---|
id |
The ID of the return status. |
|
status |
The specified status in system language. |
|
names |
The specified status in different languages. |
Methods
public toArray()
Returns this model as an array.
SalesOrder
Contracts
SalesOrderRepositoryContract
The SalesOrderRepositoryContract is the interface for the sales order repository. This interface allows you to create and update sales orders.
Namespace
Plenty\Modules\Order\SalesOrder\Contracts
Methods
public create($with = [], $lazyLoaded = false, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create a sales order
Name |
Type |
Description |
|
||
|
||
|
public createWithCoupons($data, $coupons = [], $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create a sales order with coupon codes
Name |
Type |
Description |
|
||
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update a sales order
Name |
Type |
Description |
|
||
|
||
|
The relations to load in the order instance |
|
|
Load order instance without default relations |
public delete($orderId):void
Delete a sales order
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from a sales order
Name |
Type |
Description |
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create a sales order from a parent order
Name |
Type |
Description |
|
||
|
public validateFromParent($orderId, $data = []):array
Validate order items for create a sales order from a parent order
Name |
Type |
Description |
|
||
|
public previewCreate($data):array
Get a sales order create preview for the given order data.
Name |
Type |
Description |
|
The order data for the preview. |
public previewCreateWithCoupons($data, $coupons = []):array
Get a sales order create preview for the given order data with coupon codes
Name |
Type |
Description |
|
||
|
public previewUpdate($orderId, $data):array
Get an sales order update preview for the given order data.
Name |
Type |
Description |
|
||
|
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public book($orderId, $data = []):bool
Book order.
Name |
Type |
Description |
|
||
|
public cancelBooking($orderId, $data = []):bool
Cancellation the booking of an order. The ID of the order must be specified.
Name |
Type |
Description |
|
||
|
public validateCancelBooking($orderId):array
Validate cancellation of the booking of an order
Name |
Type |
Description |
|
public convertFromAdvanceOrder($orderId):Plenty\Modules\Order\Models\Order
Return type: Order
Convert advance order into sales order
Name |
Type |
Description |
|
The order ID |
public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "variation" to "unassigned variation".
Name |
Type |
Description |
|
||
|
||
|
public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Search
Aggregations
StatusAggregation
aggregation for order status
Namespace
Plenty\Modules\Order\Search\Aggregations
Methods
public getName():string
public getField():string
public getAggregation():array
public setInclude($string):void
Name |
Type |
Description |
|
public toArray():array
public process($data):array
Name |
Type |
Description |
|
public addAggregation($aggregation):void
Name |
Type |
Description |
|
public addSource($source):Plenty\Modules\Cloud\ElasticSearch\Lib\Search\Aggregation\AggregationInterface
Return type: AggregationInterface
Name |
Type |
Description |
|
public setPage($page, $rowsPerPage):Plenty\Modules\Cloud\ElasticSearch\Lib\Search\Aggregation\AggregationInterface
Return type: AggregationInterface
Name |
Type |
Description |
|
||
|
public getSources():void
StatusAggregationProcessor
aggregation processor for order status
Namespace
Plenty\Modules\Order\Search\Aggregations
Methods
public process($data):array
Name |
Type |
Description |
|
public getName():void
public getDependencies():array
public addMutator($mutator):Plenty\Modules\Cloud\ElasticSearch\Lib\Processor\BaseProcessor
Return type: BaseProcessor
Name |
Type |
Description |
|
public addCondition($conditions):Plenty\Modules\Cloud\ElasticSearch\Lib\Processor\BaseProcessor
Return type: BaseProcessor
Name |
Type |
Description |
|
Contracts
OrderElasticSearchScrollRepositoryContract
This interface is deprecated and will be removed in the next version.
Deprecated!
This class will not be supported in the future. Please refrain from using it as soon as possible. |
Namespace
Plenty\Modules\Order\Search\Contracts
Methods
public hasNext():bool
public setNumberOfDocumentsPerShard($size):void
Name |
Type |
Description |
|
public clear():void
public setIndex($index):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Name |
Type |
Description |
|
public addSearch($search):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Name |
Type |
Description |
|
public execute():array
ShippingProfiles
Contracts
OrderShippingProfilesRepositoryContract
Order shipping profile repository contract to load the shipping profile combinations for an order or for the given order data as an array
Namespace
Plenty\Modules\Order\ShippingProfiles\Contracts
Methods
public getCombinations($orderId, $uniqueMainShippingProfiles = false):array
Get the shipping profile combinations for an order.
Name |
Type |
Description |
|
||
|
When true, only one result per main shipping profile is returned |
public getCombinationsForOrderData($data, $uniqueMainShippingProfiles = false):array
Get the shipping profile combinations for the given order data.
Name |
Type |
Description |
|
The (basket) data. |
|
|
When true, only one result per main shipping profile is returned |
Status
Contracts
OrderStatusRepositoryContract
The OrderStatusRepositoryContract is the interface for the order status repository. This interface allows you to get a single order status or to list order statuses as well as to create, update or delete.
Namespace
Plenty\Modules\Order\Status\Contracts
Methods
public get($statusId):Plenty\Modules\Order\Status\Models\OrderStatus
Return type: OrderStatus
Get an order status.
Name |
Type |
Description |
|
The number of the order status. |
public search($page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Search order status.
Name |
Type |
Description |
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of order statuses to be displayed per page. The default number per page is 50. |
public all():Illuminate\Database\Eloquent\Collection
Return type: Collection
List order statuses.
public create($data):Plenty\Modules\Order\Status\Models\OrderStatus
Return type: OrderStatus
Create an order status.
Name |
Type |
Description |
|
The order status data to be created. |
public update($statusId, $data):Plenty\Modules\Order\Status\Models\OrderStatus
Return type: OrderStatus
Update an order status.
Name |
Type |
Description |
|
The number of the order status to be updated. |
|
|
The order status data, which is updated. |
public delete($statusId):void
Delete an order status.
Name |
Type |
Description |
|
The number of the order status, to be deleted. |
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Models
OrderStatus
The order status model
Namespace
Plenty\Modules\Order\Status\Models
Name | Type | Description |
---|---|---|
statusId |
The ID of the status. |
|
isErasable |
Flag that indicates whether the status is erasable or not. |
|
createdAt |
The date, when the status was created. |
|
updatedAt |
The date, when the status was updated. |
|
isFrontendVisible |
Indicates visibility in frontend. |
|
isReorderVisible |
Indicates visibility in reorder. |
|
isRedistributionVisible |
Indicates visibility in redistribution. |
|
color |
The color of the status. |
|
names |
The names of the order status. |
Methods
public toArray()
Returns this model as an array.
StatusHistory
Contracts
StatusHistoryRepositoryContract
This interface allows you to get the status history of an order and to list the status histories of all orders.
Namespace
Plenty\Modules\Order\StatusHistory\Contracts
Methods
public getStatusHistoryByOrderId($orderId, $columns = []):Illuminate\Database\Eloquent\Collection
Return type: Collection
Get the status history of an order
Name |
Type |
Description |
|
The ID of the order |
|
|
The columns to get |
public getStatusHistory($columns = [], $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List status histories
Name |
Type |
Description |
|
The columns to get |
|
|
The page to get |
|
|
The number of entries from status histories listed per page |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Models
StatusHistoryEntry
The status history entry model
Namespace
Plenty\Modules\Order\StatusHistory\Models
Name | Type | Description |
---|---|---|
id |
The ID of the status history entry |
|
orderId |
The ID of the order |
|
statusId |
The ID of the status |
|
createdAt |
The date when the entry was created |
|
userId |
The ID of the user |
|
procedureText |
The information text of the procedure that created the entry |
Methods
public toArray()
Returns this model as an array.
Subscription
Contracts
SubscriptionOrderRepositoryContract
The SubscriptionOrderRepositoryContract allows you to find subscriptions, that due either today or on any given date, so that corresponding orders are created for them.
Namespace
Plenty\Modules\Order\Subscription\Contracts
Methods
public runToday():bool
Finds all subscriptions that are due today and creates corresponding orders for them.
public runAnyDate($runDate):bool
Finds all subscriptions that are due on the given date and creates corresponding orders for them.
Name |
Type |
Description |
|
The date that the subscriptions are due on. Given in the following format: Y-m-d |
public manualRun($orderId, $skipNextRun = false):Plenty\Modules\Order\Models\Order
SubscriptionRepositoryContract
The SubscriptionRepositoryContract is the interface for the subscription repository. This interface allows you to create and update subscriptions.
Namespace
Plenty\Modules\Order\Subscription\Contracts
Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create a subscription
Name |
Type |
Description |
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update a subscription
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($orderId):void
Delete a subscription
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from a subscription
Name |
Type |
Description |
|
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public previewCreate($data):array
Get a subscription create preview for the given order data.
Name |
Type |
Description |
|
public previewUpdate($orderId, $data):array
Get a subscription update preview for the given order data.
Name |
Type |
Description |
|
||
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
TaricVatAssignment
Contracts
TaricVatAssignmentRepositoryContract
The TaricVatAssignmentRepositoryContract contains the functionality to get, list, create, update, and delete the taricVatAssignment. Taric identifiers contain information that are necessary to determine the exact vat rate. Taric codes are linked in a variation. A taric vat assignment can only have one entry of each taric code / country ID combination.
Namespace
Plenty\Modules\Order\TaricVatAssignment\Contracts
Methods
public create($data = []):Plenty\Modules\Order\TaricVatAssignment\Models\TaricVatAssignment
Return type: TaricVatAssignment
Create a taric vat assignment.
Name |
Type |
Description |
|
The taric vat assignment data. |
public update($data):Plenty\Modules\Order\TaricVatAssignment\Models\TaricVatAssignment
Return type: TaricVatAssignment
Update a taric vat assignment
Name |
Type |
Description |
|
The taric vat assignment data. |
public delete($data = []):bool
Deletes a taric vat assignment.
Name |
Type |
Description |
|
Either the ID of the taric vat assignment or an array holding the composite key composed of the taric code and the country ID. |
public search($page = 1, $itemsPerPage = \Plenty\Modules\Order\TaricVatAssignment\Models\TaricVatAssignment::MAX_ITEMS_PER_PAGE, $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Search taric vat assignments.
Name |
Type |
Description |
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of order statuses to be displayed per page. The default number per page is 50. |
|
|
public findByTaricCodeAndCountryId($taricCode, $countryNumber):Plenty\Modules\Order\TaricVatAssignment\Models\TaricVatAssignment
Return type: TaricVatAssignment
List taric vat assignment of a taric code
Name |
Type |
Description |
|
The number of the taric code. |
|
|
The ID of the country. |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Models
TaricVatAssignment
The taric vat assignment model.
Namespace
Plenty\Modules\Order\TaricVatAssignment\Models
Name | Type | Description |
---|---|---|
id |
The ID of the taric vat assignment |
|
taricCode |
The taric code |
|
countryId |
The ID of the country that the taric code configuration belongs to |
|
vatField |
The ID of the VAT rate of the taric code / country id combination. |
|
createdAt |
The date that the taric vat assignment was created. |
|
updatedAt |
The date that the taric vat assignment was updated last. |
|
taricVatAssignmentUsed |
Is the Taric code is used by a variation |
Methods
public toArray()
Returns this model as an array.
Transaction
Contracts
OrderItemTransactionRepositoryContract
List and create order item transactions.
Namespace
Plenty\Modules\Order\Transaction\Contracts
Methods
public list($orderItemId, $columns = [], $with = []):Illuminate\Database\Eloquent\Collection
Return type: Collection
List transactions
Name |
Type |
Description |
|
||
|
||
|
public create($data):Plenty\Modules\Order\Transaction\Models\OrderItemTransaction
Return type: OrderItemTransaction
Create a transaction
Name |
Type |
Description |
|
public createMany($data):array
Create multiple transactions
Name |
Type |
Description |
|
public update($transactionId, $data):Plenty\Modules\Order\Transaction\Models\OrderItemTransaction
Return type: OrderItemTransaction
Update a transaction
Name |
Type |
Description |
|
||
|
public delete($transactionId):bool
Delete a transaction
Name |
Type |
Description |
|
public search($page = 1, $itemsPerPage = 50, $columns = [], $with = [], $sortBy = "orderItemId", $sortOrder = "asc"):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Search transactions
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
public createForOrder($orderId, $data):Illuminate\Database\Eloquent\Collection
Return type: Collection
Create transactions for order
Name |
Type |
Description |
|
||
|
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Models
OrderItemTransaction
The order item transaction model.
Namespace
Plenty\Modules\Order\Transaction\Models
Name | Type | Description |
---|---|---|
id |
The ID of the transaction |
|
orderItemId |
The ID of the order item |
|
quantity |
The quantity |
|
userId |
The ID of the user |
|
identification |
External identification. Can be an arbitrary string. |
|
direction |
The direction. Possible values are 'in' and 'out'. |
|
status |
The status. Possible values are 'regular' and 'cancelled'. |
|
receiptId |
The receipt ID |
|
warehouseLocationId |
The ID of the warehouse location |
|
batch |
The batch |
|
bestBeforeDate |
The best before date |
|
deliveryNoteNumber |
The delivery note number |
|
batchBestBeforeDateId |
Deprecated. Replaced by $batch and $bestBeforeDate. |
|
createdAt |
The date the transaction was created |
|
updatedAt |
The date the transaction was last updated |
|
orderItem |
The order item the transaction belongs to |
|
warehouseLocation |
The related warehouse location |
Methods
public toArray()
Returns this model as an array.
WarehouseLocation
Warranty
Contracts
WarrantyRepositoryContract
The WarrantyRepositoryContract is the interface for the warranty repository. This interface allows you to create and update warranties.
Namespace
Plenty\Modules\Order\Warranty\Contracts
Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Create a warranty
Name |
Type |
Description |
|
||
|
||
|
public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Update a warranty
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($orderId):void
Delete a warranty
Name |
Type |
Description |
|
public deleteOrderItem($orderItemId):bool
Delete an order item from a warranty
Name |
Type |
Description |
|
public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Create a warranty from a parent order
Name |
Type |
Description |
|
||
|
public validateFromParent($orderId, $data = []):array
Validate order items for create a warranty from a parent order
Name |
Type |
Description |
|
||
|
public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order
Update currency
Name |
Type |
Description |
|
||
|
public book($orderId, $data = []):bool
Book order.
Name |
Type |
Description |
|
||
|
public cancelBooking($orderId, $data = []):bool
Cancellation the booking of an order. The ID of the order must be specified.
Name |
Type |
Description |
|
||
|
public validateCancelBooking($orderId):array
Validate cancellation of the booking of an order
Name |
Type |
Description |
|
public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "variation" to "unassigned variation".
Name |
Type |
Description |
|
||
|
||
|
public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order
Change an order item of type "unassigned variation" to "variation".
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
public previewCreate($data):array
Get a warranty create preview for the given order data.
Name |
Type |
Description |
|
public previewUpdate($orderId, $data):array
Get a warranty update preview for the given order data.
Name |
Type |
Description |
|
||
|