Skip to content

products

Auto Added by WPeMatico

Magento 2 – Error after setting Varnish host and port in purges when trying to save modifications to a product

I have configured the host and port to purge Varnish as it says in the official documentation: bin/magento setup:config:set –http-cache-hosts=varnish_host:varnish_port But when I try to save the modifications of a product for example, I get the following error in logs:… Read More »Magento 2 – Error after setting Varnish host and port in purges when trying to save modifications to a product

How can I catch more detailed information about a reindexing error or when reindexing is stuck?

The size of the catalog is about 70k products. When reindexing sometimes it turns out Could not acquire lock for index:catalog_category_product and Could not acquire lock for index:catalog_product_category or only stuck in INSERT INTO catalog_category_product_index_store2_tmp (‘category_id’, ‘product_id’, ‘position’, ‘i.. (I… Read More »How can I catch more detailed information about a reindexing error or when reindexing is stuck?

How I can get products using multiple skus?

In my custom block I loaded the ProductRepository: namespace PcmagasFirstModuleBlockMyList; class MyList extends MagentoFrameworkViewElementTemplate { private ProductRepository $productRepository; public function __construct( TemplateContext $context, ProductRepository $productRepository, array $data = [] ){ $this->productRepository=$productRepository; } public function getRelatedProducts() { /** * @var String[]… Read More »How I can get products using multiple skus?

How to sort products in Magento by new from date?

I wanted to sort products by new from date , please see the query but it is not working perfectly $collection->getSelect() ->joinLeft( [‘catalog_product_entity_datetime’ => ‘catalog_product_entity_datetime’], ‘e.entity_id = catalog_product_entity_datetime.entity_id AND catalog_product_entity_datetime.attribute_id = (SELECT attribute_id FROM eav_attribute WHERE attribute_code = “news_from_date” LIMIT… Read More »How to sort products in Magento by new from date?

Error Exception #0 (Exception): Notice: Object of class MagentoFrameworkPhrase could not be converted after upgrade magento version

Can anyone have faced the below error while opening the product listing page at the storefront? After upgrade magento version 2.4.3 to 2.4.5 I am facing. 1 exception(s): Exception #0 (Exception): Notice: Object of class MagentoFrameworkPhrase could not be converted… Read More »Error Exception #0 (Exception): Notice: Object of class MagentoFrameworkPhrase could not be converted after upgrade magento version