Skip to content

Magento 2.4.3-p1 custom sort by option with custom entity id not working

I have created a custom sorting option distance in magento 2.4.3-p1 and sort the collection with custom sorted entity ids di.xml `<type name=”MagentoCatalogModelConfig”> <plugin name=”catalog_config_plugin” type=”SunarcNearByProductPluginConfig” /> </type>` <preference for=”MagentoCatalogBlockProductProductListToolbar” type=”SunarcNearByProductBlockCatalogProductProductListToolbar” /> <type name=”MagentoElasticsearchModelResourceModelFulltextCollectionSearchCriteriaResolver”> <plugin name=”ajourquin_unset_es_order” type=”SunarcNearByProductPluginElasticsearchModelResourceModelFulltextCollectionSearchCriteriaResolver” /> </type> appcodeSunarcNearByProductPluginconfig.php… Read More »Magento 2.4.3-p1 custom sort by option with custom entity id not working

Trying to override InvoiceSender

I tried to override InvoiceSender (in /app/code/UFS/Sales/Model/Order/Email/Sender/InvoiceSender.php) but it doesn’t work and I don’t understand why. I added “‘created_at_formatted’ => $order->getCreatedAtFormatted(3)”. My di.xml looks like: <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <preference for=”MagentoSalesModelOrderEmailSender” type=”UFSSalesModelOrderEmailSender” /> </config> My InvoiceSender.php looks like: <?php /** *… Read More »Trying to override InvoiceSender

pre order on the category page

How to change the label of add to cart to pre order on all magento 2.4.5 based on the below conditions: if(qty<0 , product is salable and getBackorders()/true ) to show pre order else add to cart