Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest for Quick Order functionality doesn't work #855

Closed
pakoordoniez opened this issue Apr 10, 2018 · 5 comments
Closed

Suggest for Quick Order functionality doesn't work #855

pakoordoniez opened this issue Apr 10, 2018 · 5 comments
Assignees
Labels

Comments

@pakoordoniez
Copy link

Suggest doesn't work for "Enter SKU or Product Name" field in Quick Order B2B functionality when product name or incomplete SKU is provided.

Preconditions

  • Debian 8
  • PHP 7.1.12
  • nginx 1.13.7
  • Percona 5.7.20
  • ElasticSearch 5.6.7

Magento Version : Commerce (EE) 2.2.3 with B2B modules in version 1.0.3

ElasticSuite Version : 2.5.6

Environment : Developer and Production

Third party modules : Same problem at clean Magento instance.

Steps to reproduce

  1. Make sure you have enabled "Quick Order" functionality in "Configuration > General > B2B Features".
  2. Register and login as B2B customer.
  3. Go to Quick Order page with form to provide products SKU.
  4. Open browser developer tools and filter requests by XHR type.
  5. Type product name in "Enter SKU or Product Name" and check response for /quickorder/ajax/product_suggest/?q=joust request. It should contain call stack with PHP error posted below.

Expected result

  1. Suggest with products list should be shown when product name or incomplete SKU was provided in "Enter SKU or Product Name" field (??).
  2. There is no error in response for product search XHR request.

Actual result

  1. Error message is shown: "The SKU was not found in the catalog".
  2. In response for /quickorder/ajax/product_suggest/?q=joust above call stack is returned.
( ! ) TypeError: Argument 3 passed to Magento\QuickOrder\Model\FulltextSearch::__construct() must implement interface Magento\Search\Api\SearchInterface, instance of Smile\ElasticSuiteCore\Model\Search given, called in /var/www/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 111 in /var/www/vendor/magento/module-quick-order/Model/FulltextSearch.php on line 57
1  0.2007374848   {main}( ) .../index.php:0
2  0.377110523928 Magento\Framework\App\Bootstrap->run( ) .../index.php:37
3  0.382011155680 Magento\Framework\App\Http\Interceptor->launch( ) .../Bootstrap.php:256
4  0.382311161320 Magento\Framework\App\Http\Interceptor->launch( ) .../Interceptor.php:24
5  0.484517470888 Magento\Framework\App\FrontController\Interceptor->dispatch( ) .../Http.php:135
6  0.486217518344 Magento\Framework\App\FrontController\Interceptor->___callPlugins( ) .../Interceptor.php:26
7  0.486317519088 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}( ) .../Interceptor.php:153
8  0.490117720408 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch( ) .../Interceptor.php:135
9  0.492517794984 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}( ) .../BuiltinPlugin.php:73
10 0.499018068600 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch( ) .../Interceptor.php:135
11 0.502518141272 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}( ) .../RequestPreprocessor.php:94
12 0.502518141688 Magento\Framework\App\FrontController\Interceptor->___callParent( ) .../Interceptor.php:138
13 0.502518141688 Magento\Framework\App\FrontController\Interceptor->dispatch( ) .../Interceptor.php:58
14 0.812634561560 Magento\Framework\App\Router\Base->match( ) .../FrontController.php:50 150.812634562048Magento\Framework\App\Router\Base->matchAction( ) .../Base.php:158
16 0.813234656376 Magento\Framework\App\ActionFactory->create( ) .../Base.php:297 170.813234656376Magento\Framework\App\ObjectManager->create( ) .../ActionFactory.php:40
18 0.813234656376 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create( ) .../ObjectManager.php:56
19 0.813834690688 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments( ) .../Developer.php:59
20 0.813934690688 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->resolveArgumentsInRuntime( ) .../Developer.php:34
21 0.814034692336 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->resolveArgument( ) .../AbstractFactory.php:230
22 0.814134692336 Magento\Framework\App\ObjectManager->get( ) .../AbstractFactory.php:144
23 0.814134692336 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create( ) .../ObjectManager.php:70
24 0.814534718000 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments( ) .../Developer.php:59
25 0.814534718000 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->resolveArgumentsInRuntime( ) .../Developer.php:34
26 0.814634718776 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->resolveArgument( ) .../AbstractFactory.php:230
27 0.814634718776 Magento\Framework\App\ObjectManager->get( ) .../AbstractFactory.php:144
28 0.814634718776 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create( ) .../ObjectManager.php:70
29 0.837036238496 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->createObject( ) .../Developer.php:66
30 0.837036238656 Magento\QuickOrder\Model\FulltextSearch->__construct( )  .../AbstractFactory.php:111
@pakoordoniez pakoordoniez changed the title Suggest for Quick Order functionality does't work Suggest for Quick Order functionality doesn't work Apr 10, 2018
@romainruaud romainruaud self-assigned this Apr 11, 2018
@romainruaud
Copy link
Collaborator

Hello @pakoordoniez and thank you for submitting this issue.

I will have a look on this one.

@romainruaud
Copy link
Collaborator

Reproduced.

I will look how I'll be able to fix this one. Might be necessary to publish a new module dedicated to QuickOrder handling outside the Elasticsuite core.

We'll keep you in touch.

@romainruaud
Copy link
Collaborator

Since PR #873 has been merged, could you update to Elasticsuite 2.5.8 ?

Once this is done, please try to add also this side module we made to ensure compatibility with the Quick Order form : https://github.com/Smile-SA/magento2-module-elasticsuite-quick-order

Let me know if this fixes your issue.

@pakoordoniez
Copy link
Author

OK, thank you for information. I'll check this soon.

@afoucret
Copy link
Contributor

Closed since @romainruaud provided a solution to this issue.

BR,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants