ptityop Posted Friday at 10:26 PM Share Posted Friday at 10:26 PM (edited) Hello, i would like to know if we can change the settings of the product search box when creating a manual order, and show more results , currently seems to be capped at 10. Thanks in advance Edited Sunday at 11:46 PM by ptityop (see edit history) Link to comment Share on other sites More sharing options...
juanrojas Posted Saturday at 01:17 AM Share Posted Saturday at 01:17 AM 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. 1 Link to comment Share on other sites More sharing options...
ptityop Posted Sunday at 11:45 PM Author Share Posted Sunday at 11:45 PM 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now