Skip to content

rest-api

Auto Added by WPeMatico

Magento 2.4.6 search synonyms doesn’t work on REST API

I am trying to make use of search synonyms. I have created a synonym group, and added synonyms comma separated, and afterwards ran full re index. http://website/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=name&searchCriteria[filter_groups][0][filters][0][value]=%25cucumber%25&searchCriteria[filter_groups][0][filters][0][condition_type]=like&searchCriteria[pageSize]=5&searchCriteria[currentPage]=1 This is returning data. But if I replace ‘cucumber’ with the synonyms ,… Read More »Magento 2.4.6 search synonyms doesn’t work on REST API

Tracking User Interactions, Saving them to Database Table and then send it to GA4 . Events and data events are saved as null in my table

This is the function that captures some data protected function captureRequestData(RequestInterface $oRequest, $aPostParams) { return [ ‘request’ => [ ‘status’ =>’pending’, ‘params’ => json_encode($aPostParams), ‘endpoint’ => $oRequest->getRequestUri(), ‘view’ => json_encode($oRequest->getHeaders()->toArray()), ‘event’ => $this->_oEventobserver->getEventName(), ‘data’ => json_encode($this->_oEventobserver->getEventData() ), ‘ip’ => $oRequest->getClientIp(),… Read More »Tracking User Interactions, Saving them to Database Table and then send it to GA4 . Events and data events are saved as null in my table

Magento 2 api for layer navigation filters available?

<?php namespace handymustFilterModel; use handymustFilterApiFilterInterface; use MagentoCatalogModelLayerResolver; use MagentoCatalogModelLayerCategoryFilterableAttributeList; use MagentoCatalogModelLayerFilterList; use MagentoFrameworkExceptionLocalizedException; class Filter implements FilterInterface { protected $layerResolver; protected $filterList; protected $filterableAttributeList; public function __construct( Resolver $layerResolver, FilterList $filterList, FilterableAttributeList $filterableAttributeList ) { $this->layerResolver = $layerResolver; $this->filterList =… Read More »Magento 2 api for layer navigation filters available?

API searchCriteria not working with “FROM and TO” for “created_at” field, fetching the wrong results

Im trying to get data for orders that created between 2 dates(2023-10-05 – 2023-10-01). Im using the search condition type FROM and TO but its not fetching the right details. This is what im trying: rest/default/V1/orders? searchCriteria[filterGroups][0][filters][0][field]=created_at& searchCriteria[filterGroups][0][filters][0][value]=2023-10-01& searchCriteria[filterGroups][0][filters][0][conditionType]=from& searchCriteria[filterGroups][0][filters][1][field]=created_at&… Read More »API searchCriteria not working with “FROM and TO” for “created_at” field, fetching the wrong results