OrderRepository
class OrderRepository extends EntityRepository
Class OrderRepository is injected as alligator.order_repository service. OrderRepository is used for crud operation for entity.
Use this class to work with database.
Traits
Constants
| ALIAS |
Alias for entity |
| USER_ALIAS |
Alias for user entity |
| PRODUCT_ALIAS |
Alias for product entity |
| COMPANY_ALIAS |
Alias for company entity |
| ADDRESS_ALIAS |
Alias for address entity |
| ORDER_ITEM_ALIAS |
Alias for order item entity |
| SHIPPING_ALIAS |
Alias for shipping entity |
| PRODUCT_ATTRIBUTE_VALUES_ALIAS |
Alias for product attribute value entity |
| ATTRIBUTE_VALUE_ALIAS |
Alias for attribute value entity |
| ATTRIBUTE_ALIAS |
Alias for attribute entity |
| ADJUSTMENTS_ALIAS |
Alias for adjustment entity |
| USERNAME_PARAM |
|
| JOIN_WITH_USER |
|
| JOIN_WITH_SHIPPING |
|
| JOIN_WITH_PRODUCT_ATTRIBUTE_VALUES |
|
| JOIN_WITH_ATTRIBUTE_VALUE |
|
| JOIN_WITH_ATTRIBUTE |
|
| JOIN_WITH_ADDRESS |
|
| JOIN_WITH_ORDER_ITEM |
|
| JOIN_USER_WITH_COMPANY |
|
| JOIN_USER_WITH_ADDRESS |
|
| JOIN_WITH_ADJUSTMENTS |
|
| DATE_PARAM_FROM |
|
| DATE_PARAM_TO |
|
| ABANDONED_CART |
|
| ORDER_STATE_PARAM |
|
| ORDER_PK_QUERY_PART |
|
| DATE_BETWEEN_WITH_STRING_PARAM |
|
| TABLE_NAME |
|
| JOIN_WITH_GROUP_PRODUCT |
|
| JOIN_WITH_GROUP_SIMPLE_PRODUCT_AGGREGATION |
|
| JOIN_WITH_SIMPLE_PRODUCT |
|
| USER_NOT_BOUGHT_QUERY_CACHE |
|
Methods
Should contain group by which jqgrid uses.
JQGrid function
JQGrid function
No description
No description
No description
No description
No description
{@inheritdoc}
Find all products that user hasn't bought
Retrieve reference for provided class and id
Find order by id
Find order by transaction id
Find order with all relationships by criteria(start and end date, user and state)
Find all orders without abandoned carts
Find all orders that have state abandoned cart
Find id and erp code of all orders
Find id of all orders
Retrieve data for statistics
Retrieve data for statistics
Retrieve data for statistics
Find provided number of finished orders for dashboard
Find all finished orders by currency for dashboard
Remove provided order
Find all orders that match provided ids
Retrieve summary of payment depending on payment type
start db transaction
commit db transaction
rollback db transaction
Find all orders in state pending or processing
Find order with relationships by id
Retrieve orders in abandoned cart state with pagination
JQGrid function
JQGrid function
JQGrid function
Find order by id
Retrieve reference for order
Find order by token
Find last unfinished order for provided user
Find order by id
Retrieve number of sales for provided product
Get order with custom information - used to send data to Google Analytics
Retrieve summary for order
Create and persist new order with provided currency and locale
Find all group products in order
Update coupon code for order
Set parameter to cache
Delete parameter from cache
Retrieve id of all orders
Get all unfinished orders that are in state "payment_bank"
Flushes all changes to objects that have been queued up to now to the database
Retrieve id of all orders that are synchronized with erp
Find all orders that match provided ids
Delete parameter from cache
Details
in JQGridTrait at line 27
jQGridJoinFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)
All joins used in select.
Override in the repository class if needed. Should do nothing otherwise
in JQGridTrait at line 42
jQGridGroupByFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)
Should contain group by which jqgrid uses.
Override in the repository class if needed. Should do nothing otherwise
in JQGridTrait at line 61
array
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams, JQGridWrapper $jqGridWrapper)
JQGrid function
in JQGridTrait at line 94
array
searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
JQGrid function
in AvailabilityChangeRepositoryTrait at line 24
productLimitDataDQL(QueryBuilder $qb, array $limitData)
in AvailabilityChangeRepositoryTrait at line 56
string
productLimitDataSQL(string $productAlias, array $limitData, bool $addAnd = true)
in AvailabilityChangeRepositoryTrait at line 94
brandLimitDataDQL(QueryBuilder $qb, array $limitData, string $brandAlias = null)
at line 131
static Closure
retrieveWhereClosure()
at line 152
static Closure
retrieveDoCustomSearchOptions()
at line 177
__construct($em, ClassMetadata $class)
{@inheritdoc}
at line 204
array
getBestSellerThatAreNotBoughtByUser(int|null $userId, int $numberOfProducts, array|null $limitData = null)
Find all products that user hasn't bought
at line 272
Order|Proxy|null|object
getReference(int $id, string $class = Order::class)
Retrieve reference for provided class and id
at line 346
Order|object|null
findOrderByIdNew(int $orderId)
Find order by id
at line 358
Order|object|null
findOrderByTransId(int $transId)
Find order by transaction id
at line 412
mixed
findOrdersForReport(array $params)
Find order with all relationships by criteria(start and end date, user and state)
at line 473
array
findOrdersWithoutAbandonedCart(mixed $user, mixed $forLiveSale = false, mixed $number = 0)
Find all orders without abandoned carts
at line 497
array
findAbandonedCarts()
Find all orders that have state abandoned cart
at line 509
array
getOrderIdErpCodes()
Find id and erp code of all orders
at line 524
array
getAllOrderIds()
Find id of all orders
at line 543
array
loadOrderStatisticsInLast14Days(string|null $currency = null)
Retrieve data for statistics
at line 579
array|null
loadOrderDetailsGraphData(string $date)
Retrieve data for statistics
at line 635
array
loadGraphDataForInterval(string $dateFrom, string $dateTo, string|null $currency = null)
Retrieve data for statistics
at line 674
array
getOrdersForDashboard(int $number)
Find provided number of finished orders for dashboard
at line 706
array
getOrdersForDashboardByCurrency(string|null $currency = null, int $number = 5, array|null $params = null)
Find all finished orders by currency for dashboard
at line 749
boolean
deleteOrders(array $orders)
Remove provided order
at line 771
array
getOrdersArray(array $array)
Find all orders that match provided ids
at line 790
array
getAmountByTypeOfPayment(array|null $searchParams, int|null $userId = null)
Retrieve summary of payment depending on payment type
at line 920
startTransaction()
start db transaction
at line 928
commitTransaction()
commit db transaction
at line 936
rollbackTransaction()
rollback db transaction
at line 948
completeOrder(Order $order)
Complete order that match provided ids
at line 964
setStatus(Order $order, String $status)
Update status of orders that match provided ids
at line 977
array
getPendingOrders()
Find all orders in state pending or processing
at line 997
Order
getDBOrderForDetails(int $id)
Find order with relationships by id
at line 1033
mixed
getAbandonedCartsForPagination(int $userId, int $page, int $offset)
Retrieve orders in abandoned cart state with pagination
at line 1064
array
getOrdersForPagination(int $userId, int $page, int $offset, bool $hidePending = true)
JQGrid function
at line 1106
mixed
countAbandonedCartsByUserForPagination(int $userId)
JQGrid function
at line 1126
array
countOrdersByUserForPagination(int $userId, bool $hidePending = true)
JQGrid function
at line 1153
Order
getOrderForSocket(int $id)
Find order by id
at line 1174
Order|Proxy|null|object
getOrderReference(int $orderId)
Retrieve reference for order
at line 1186
Order
getOrderByToken(string $token)
Find order by token
at line 1231
Order|null
getLastUnfinishedOrderForUser(User $user, mixed $sessionId = null)
Find last unfinished order for provided user
at line 1258
mixed
getCompleteOrder(int $id)
Find order by id
at line 1287
mixed
getNumberOfSalesOfProduct(int $productId)
Retrieve number of sales for provided product
at line 1306
bool
setOrderCurrency(Order $order)
Update currency and currency ratio for provided order
at line 1327
bool
setOrderLocale(Order $order)
Update locale for provided order
at line 1348
array
getOrderForGoogleAnalytics(int $orderId)
Get order with custom information - used to send data to Google Analytics
at line 1395
array
getOrdersSummary(int $id)
Retrieve summary for order
at line 1419
Order
generateNewOrderFromBackend(array $additionalData)
Create and persist new order with provided currency and locale
at line 1462
array
getAllGroupProductsForOrder(int $orderId)
Find all group products in order
at line 1510
bool
updateCouponCode(int $orderId, string $code)
Update coupon code for order
at line 1528
setToCache(string $key, mixed $object)
Set parameter to cache
at line 1538
deleteFromCache(string $key)
Delete parameter from cache
at line 1548
array
getAllOrdersIds()
Retrieve id of all orders
at line 1563
array
getAllUnfinishedBankOrdersBeforeDate(DateTime $currentDate)
Get all unfinished orders that are in state "payment_bank"
at line 1578
saveChanges()
Flushes all changes to objects that have been queued up to now to the database
at line 1588
array
getUnsyncedErpOrderIds()
Retrieve id of all orders that are synchronized with erp
at line 1606
array
getOrdersForIds(array $ids)
Find all orders that match provided ids
at line 1623
deleteQueryCache(string $key)
Delete parameter from cache