Jump to content

[SOLVED]Manual order. Show more result in product search field


ptityop

Recommended Posts

hello

\src\PrestaShopBundle\Controller\Admin\Sell\Order OrderController

            /** @var FoundProduct[] $foundProducts */
            $foundProducts = $this->getQueryBus()->handle(new SearchProducts($searchPhrase, 10💥, $currencyIsoCode, $orderId));

            return $this->json([
                'products' => $foundProducts,
            ]);
        } catch (ProductSearchEmptyPhraseException $e) {
            return $this->json(
                ['message' => $this->getErrorMessageForException($e, $this->getErrorMessages($e))],
                Response::HTTP_BAD_REQUEST
            );
        } catch (Exception $e) {
            return $this->json(
                ['message' => $this->getErrorMessageForException($e, [])],
                Response::HTTP_INTERNAL_SERVER_ERROR
            );
        }
    }

That's the limit.

  • Like 1
Link to comment
Share on other sites

Thanks a lot for this, sorry i forgot to mention my Prestashop version which was 9 as the code you sent is different, but i did find the lines . Thanks a lot for the help 

 

 /** @var FoundProduct[] $foundProducts */
            $foundProducts = $this->dispatchQuery(new SearchProducts($searchPhrase, 100, $currencyIsoCode, $orderId));

            return $this->json([
                'products' => $foundProducts,
            ]);
        } catch (ProductSearchEmptyPhraseException $e) {
            return $this->json(
                ['message' => $this->getErrorMessageForException($e, $this->getErrorMessages($e))],
                Response::HTTP_BAD_REQUEST
            );
        } catch (Exception $e) {
            return $this->json(
                ['message' => $this->getErrorMessageForException($e, [])],
                Response::HTTP_INTERNAL_SERVER_ERROR
            );
        }
    }

Link to comment
Share on other sites

  • ptityop changed the title to [SOLVED]Manual order. Show more result in product search field

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...