Skip to content

magento man

Logger Not Working

I’m currently working on a Magento 2 project and encountering issues with the “custom logger” when attempting to use it in developer mode. I’m hoping someone can help me troubleshoot this problem. “custom logger” Magento 2 version: 2.4.6 Logger used:… Read More »Logger Not Working

How I can get products with random order?

I am making a custom module and I want to get 5 random product skus. So far I tried: $objectManager = ObjectManager::getInstance(); /** * @var ProductRepository */ $productRepository = $objectManager->create(ProductRepository::class); /** * @var SearchCriteriaBuilder */ $searchCriteria = $objectManager->create(SearchCriteriaBuilder::class); $searchCriteria->addSortOrder(new SortOrder());… Read More »How I can get products with random order?

How I can load the Product repository without using the dependency injection?

I made my own command to seed a table: namespace MageGuideFirstModuleConsoleCommand; use MageGuideFirstModuleModelBlogPost; use MageGuideFirstModuleModelResourceModelBlogPostResource; use MagentoFrameworkAppObjectManager; use SymfonyComponentConsoleCommandCommand; use SymfonyComponentConsoleHelperProgressBar; use SymfonyComponentConsoleInputInputInterface; use SymfonyComponentConsoleOutputOutputInterface; /** * Seed Multiple Blogposts with Skus */ class BlogpostSeeder extends Command { const BLOGPOSTS_NUM=10000;… Read More »How I can load the Product repository without using the dependency injection?

Comparison Between Several Web Hosting Providers

If anyone has any opinions, experience or knowledge on any of the following shared hosting providers, in particular how they compare to each… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1903641&goto=newpost

How I can provide arguments towards the existing graphql request?

I made the followig schema.graphqls type BlogPost { blog_post_id: ID title: String post: String } input BlogpostAttributeFilterInput { page: Int limit: Int } type Query { allBlogPosts(input: BlogpostAttributeFilterInput) : [BlogPost] @resolver(class: “\MageGuide\FirstModule\Model\Resolver\GetBlogPosts”) @doc(description:”Retrieve All BlogPosts”) @cache(cacheable: false) } And I… Read More »How I can provide arguments towards the existing graphql request?

How I can provide a Collection at the constructor of my Graphql Resolver?

In my module I defined a etc/schema.graphqls: type BlogPost { blog_post_id: ID title: String post: String } input BlogpostAttributeFilterInput { page: Int limit: Int } type Query { allBlogPosts(input: BlogpostAttributeFilterInput) : [BlogPost] @resolver(class: “\MageGuide\FirstModule\Model\Resolver\GetBlogPosts”) @doc(description:”Retrieve All BlogPosts”) @cache(cacheable: false) }… Read More »How I can provide a Collection at the constructor of my Graphql Resolver?