Gadoma / walmart-api-php-client

[2016] Walmart Open API PHP client
MIT License
8 stars 10 forks source link

Facets with facetRange only not working #4

Closed Ryp007 closed 7 years ago

Ryp007 commented 8 years ago

In class ProductService extends AbstractService implements ProductServiceInterface public function getBySearch($phrase, $category = '', $facets = 'off', $facetFilter = '', $facetRange = '', $start = 1, $limit = self::DEFAULT_PAGE_SIZE, $sortField = self::DEFAULT_SORT_FIELD, $sortOrder = self::DEFAULT_SORT_ORDER)


if ($facets == 'on' && $facetFilter !== '') {
            $constraints['facet.filter'] = $facetFilter;

            if ($facetRange !== '') {
                $constraints['facet.range'] = $facetRange;
            }
        }

Should be replaced with


    if ($facets == 'on' ) {
            if( $facetFilter !== '')
                $constraints['facet.filter'] = $facetFilter;

            if ($facetRange !== '') {
                $constraints['facet.range'] = $facetRange;
            }
ValeriiTsarov commented 7 years ago

Is this project not supported?

Gadoma commented 7 years ago

@Lomaster it is supported 😈 A fix is on the way! 💃