Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
okazy committed Oct 12, 2020
1 parent 1c198f2 commit 31a7bff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Eccube/Controller/Admin/Order/EditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ public function searchProduct(Request $request, $page_no = null, Paginator $pagi
foreach ($Products as $Product) {
/* @var $builder \Symfony\Component\Form\FormBuilderInterface */
$builder = $this->formFactory->createNamedBuilder('', AddCartType::class, null, [
'product' => $this->productRepository->findWithSortedClassCategories($Product->getId()),
'product' => $Product,
]);
$addCartForm = $builder->getForm();
$forms[$Product->getId()] = $addCartForm->createView();
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Repository/ProductRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct(
public function findWithSortedClassCategories($productId)
{
$qb = $this->createQueryBuilder('p');
$qb
$qb->addSelect(['pc', 'cc1', 'cc2', 'pi', 'pt'])
->innerJoin('p.ProductClasses', 'pc')
->leftJoin('pc.ClassCategory1', 'cc1')
->leftJoin('pc.ClassCategory2', 'cc2')
Expand Down

0 comments on commit 31a7bff

Please sign in to comment.