skip to Main Content

Create custom api to get filterable attribute for specific category in magento 2

I am creating api to get filterable attribute for specific category in magento 2. We see in category page for layered navigation. I want to achieve exact same data in api. $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $filterableAttributes = $objectManager->get(MagentoCatalogModelLayerCategoryFilterableAttributeList::class); $appState = $objectManager->get(MagentoFrameworkAppState::class);…

VIEW QUESTION

Magento 2.2 product collection factory not returning all products

I'm trying to get all products using collectionFactory in a custom module like this: $products = $this->_productCollectionFactory->create(); ->addAttributeToSelect('*'); where _productCollectionFactory is initialized in the __construct() as an instance of MagentoCatalogModelResourceModelProductCollectionFactory $productCollectionFactory, the problem is that, without any applied filter, the…

VIEW QUESTION

Magento2 OR query on collection

We have been trying to make a query when a user apply some filters on front end. We are trying to make OR query in products collection: tried the following but none of them work $collection->addAttributeToFilter(['web_mobile_filter','offer_group_name_value'], [ ['in' => '1122'],…

VIEW QUESTION

How to add tooltip in Magento 2

I am using a custom template and just added: <span class="custom-tooltip"> <a href="#" class="tooltip-toggle">Test ?</a> <span class="tooltip-content">Tolltip description come here</span> </span> and than added below style code in my theme styles-l.css .custom-tooltip { .lib-tooltip(right); } but its not working, am…

VIEW QUESTION
Back To Top
Search