Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/CoreShop/Bundle/CoreBundle/Report/CategoriesReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ public function getReportData(ParameterBag $parameterBag): array
INNER JOIN object_query_$orderItemClassId AS orderItems ON orderItems.product__id = catProductDependencies.targetId
INNER JOIN object_relations_$orderClassId AS orderRelations ON orderRelations.dest_id = orderItems.oo_id AND orderRelations.fieldname = \"items\"
INNER JOIN object_query_$orderClassId AS `orders` ON `orders`.oo_id = orderRelations.src_id
WHERE orders.store = :storeId" . $orderStateInClause . " AND orders.orderDate > :fromTimestamp AND orders.orderDate < :toTimestamp AND orderItems.product__id IS NOT NULL
WHERE orders.store = :storeId" . $orderStateInClause . ' AND orders.orderDate > :fromTimestamp AND orders.orderDate < :toTimestamp AND orderItems.product__id IS NOT NULL
GROUP BY categories.oo_id
ORDER BY quantityCount DESC
LIMIT " . (int) $offset . ', ' . (int) $limit;
LIMIT ' . (int) $offset . ', ' . (int) $limit;
$results = $this->db->fetchAllAssociative($query, $queryParameters);
}

Expand Down
4 changes: 2 additions & 2 deletions src/CoreShop/Bundle/CoreBundle/Report/ProductsReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ public function getReportData(ParameterBag $parameterBag): array
INNER JOIN object_relations_$orderClassId AS orderRelations ON orderRelations.src_id = orders.oo_id AND orderRelations.fieldname = \"items\"
INNER JOIN object_query_$orderItemClassId AS orderItems ON orderRelations.dest_id = orderItems.oo_id
INNER JOIN object_localized_query_" . $orderItemClassId . '_' . $locale . " AS orderItemsTranslated ON orderItems.oo_id = orderItemsTranslated.ooo_id
WHERE `orders`.store = :storeId AND $productTypeCondition" . $orderStateInClauseOrders . " AND `orders`.orderDate > :fromTimestamp AND `orders`.orderDate < :toTimestamp
WHERE `orders`.store = :storeId AND $productTypeCondition" . $orderStateInClauseOrders . ' AND `orders`.orderDate > :fromTimestamp AND `orders`.orderDate < :toTimestamp
GROUP BY orderItems.objectId
ORDER BY orderCount DESC
LIMIT " . (int) $offset . ', ' . (int) $limit;
LIMIT ' . (int) $offset . ', ' . (int) $limit;
}

$queryParameters = array_merge([
Expand Down