Daily Archives: May 18, 2020
Is it possible to have a random sort when searching with repositories? Checked dev docs and unsure. Not found much elsewhere. https://devdocs.magento.com/guides/v2.3/extension-dev-guide/searching-with-repositories.html#sorting use MagentoFrameworkApiFilterBuilder; use MagentoFrameworkApiSearchCriteriaBuilder; use MagentoFrameworkApiSortOrder; use MagentoFrameworkApiSortOrderFactory; $this->searchCriteriaBuilder->addFilter(MessageInterface::STATUS, [Data::ENABLED], 'eq'); $randomSort = $this->sortOrderFactory ->create() ->setField(MessageInterface::SORT) ->setDirection(SortOrder::SORT_ASC); // random sort here $this->searchCriteriaBuilder->setSortOrders([$randomSort]); $searchCriteria = $this->searchCriteriaBuilder->create(); return $this->messageRepositoryInterface->getList($searchCriteria)->getItems();
I want to show my products out of stock. I have assigned a source in my products when product quantity is negative but it shows In stock. You can check the screenshot then you will get my query.
As I don’t have implemented admin theme I have to override /vendor/magento/module-payment/view/adminhtml/templates/info/default.phtml file in my custom module. how can I write my layout file to call this file? I have copied default.html in my custom module
When I try open link with image then I get 404 not found. Log: 2020-05-17 11:33:29.128103 [ERROR] [10840] [HTAccess] Failed to open [/home/web/domains/catalog.website.com/public_html/pub/media/wysiwyg/.htaccess]: Permission denied 2020-05-17 11:33:49.211472 [ERROR] [10840] [HTAccess] Failed to open [/home/web/domains/catalog.website.com/public_html/pub/media/logo/.htaccess]: Permission denied 2020-05-17 11:33:49.266410 [ERROR] [10840] [HTAccess] Failed to open [/home/web/domains/catalog.website.com/public_html/pub/media/wysiwyg/.htaccess]: Permission denied 2020-05-17 11:34:00.722778 [ERROR] […]