Skip to main content


Power your online business with the most flexible and scalable ecommerce platform

Magento 2 search results relevance with elasticsearch?

Magento 2.3 still use "OR" logic for mysql and elasticsearch. Plus "should" conditions (query to ES) are wrong. That's why relevance almost same. But ES significantly improve performance of search and catalog (layered navigation).


you have to set AND operator in your elastic search json queries, Override the module-elasticsearch/SearchAdapter/Query/Builder/Match.php. file in your custom module and then The code you have to edit in the build function in line no 75


How to Get Value of Product Custom Option from Cart & Order in Magento 2

If you are wondering how to get the value of product custom option from cart and order in Magento 2, this is the right place for you to learn that. Published by Mageplaza, this topic will point you how to do that with two examples as the following.

Firstly, you can use ObjectManager:

Get custom options of products present in shopping cart

Use CURL library to get token and lists in Magento2

'cURL' is a command-line tool that lets you transmit HTTP requests and receive responses from the command line or a shell script. It is available for Linux distributions, Mac OS X, and Windows. To use cURL to run your REST web API call, use the cURL command syntax to construct the command. To create the endpoint in the call, append the REST URI that you constructed in Construct a request to this URL: https:////rest/ To pass the customer data object in the POST call payload, specify a JSON or XML request body on the call.

Magento 2 Delete the not used Cart after upgrade Magento

It's very recommanded to delete unused carts after you finish the upgrade using these queries all customers carts that are not converted to order will be deleted 


select * 
FROM `quote_address`
WHERE `customer_address_id` IS NULL AND `firstname` IS NULL AND `lastname` IS NULL and quote_id in (SELECT entity_id FROM `quote` where is_active= 1)


select *    from quote where entity_id not in (select quote_id from quote_address)