PHP code example of dsheiko / magentosearchquerybuilder
1. Go to this page and download the library: Download dsheiko/magentosearchquerybuilder library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dsheiko / magentosearchquerybuilder example snippets
use Dsheiko\SearchCriteria;
$builder = new SearchCriteria();
$builder
->filterGroup([
[ "name", "%25Leggings%25", "like" ],
[ "name", "%25Parachute%25", "like" ],
])
->filterGroup([
[ "price", 30, "lt" ],
])
->sortOrder( "created_at", "DESC")
->limit(1, 10);
$builder->toString();
$builder->toArray();