Skip to content

magento man

Use widget function from an other jquery widget

How can I use a custom widget function in a magento jquery widget? requirejs-config.js var config = { “map”: { “*”: { “customwidget”: “Vendor_Module/js/customwidget”, “Magento_Catalog/js/catalog-add-to-cart”: “Vendor_Module/js/catalog-add-to-cart” } } }; catalog-add-to-cart.js define([ ‘jquery’, ‘mage/translate’, ‘underscore’, ‘Magento_Catalog/js/product/view/product-ids-resolver’, ‘Magento_Catalog/js/product/view/product-info-resolver’, ‘Vendor_Module/js/customwidget’, ‘jquery-ui-modules/widget’ ], function… Read More »Use widget function from an other jquery widget

Replace error message using a custom plugin

I’d like to replace the error message in this magento core function. vendor/magento/module-inventory-sales/Model/IsProductSalableCondition/BackOrderNotifyCustomerCondition.php public function execute(string $sku, int $stockId, float $requestedQty): ProductSalableResultInterface { $stockItemConfiguration = $this->getStockItemConfiguration->execute($sku, $stockId); if ($stockItemConfiguration->isManageStock() && $stockItemConfiguration->getBackorders() === StockItemConfigurationInterface::BACKORDERS_YES_NOTIFY ) { $stockItemData = $this->getStockItemData->execute($sku, $stockId); if… Read More »Replace error message using a custom plugin

Fail to override interface module in magento2

i need problem with extension interface in magento2. Mi extension_attributes.xml: <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Api/etc/extension_attributes.xsd”> <extension_attributes for=”MagentoSalesRuleApiDataCouponGenerationSpecInterface”> <attribute code=”specific” type=”string” /> </extension_attributes> </config> Mi di.xml <preference for=”MagentoSalesRuleBlockAdminhtmlPromoQuoteEditTabCouponsForm” type=”CustomSalesRuleBlockAdminhtmlPromoQuoteEditTabCouponsForm” /> <preference for=”MagentoSalesRuleHelperCoupon” type=”CustomSalesRuleHelperCoupon”/> <preference for=”MagentoSalesRuleModelServiceCouponManagementService” type=”CustomSalesRuleModelServiceCouponManagementService”/> <preference for=”MagentoSalesRuleModelCouponMassgenerator” type=”CustomSalesRuleModelCouponMassgenerator”/> <preference for=”MagentoSalesRuleModelDataCouponGenerationSpec” type=”CustomSalesRuleModelDataCouponGenerationSpec”/> Mi… Read More »Fail to override interface module in magento2