This is the original path – vendor/magento/module-cms/Helper/Wysiwyg/Images.php I want to put a plugin for this function getImageHtmlDeclaration() I want to pass different HTML tag if (!$renderAsTag) { $src = $this->isUsingStaticUrlsAllowed() ? $fileUrl : $this->escaper->escapeHtml($directive); $html = sprintf('<img class="hello" src="%s" alt="" />', $src); }
Magento2
How to make a negative number in excel as a number. Here is my code MagentoFrameworkAppResponseHttpFileFactory $fileFactory, $content[] = [ 'qty' => __("QTY"), 'part_number' => __("PART NUMBER"), 'invoice' => __("INVOICE #"), 'date' => __("DATE"), 'description' => __("Description"), 'retail' => __("RETAIL"), 'd_discount' => __("DEALER DISCOUNT"), 'a_discount' => __("ADDITIONAL DISCOUNT"), 'total' => […]
I want to put an around plugin. This is the core file vendor/magento/module-cms/Controller/Adminhtml/Wysiwyg/Images/Thumbnail.php The main purpose is on the execute function I want to upload a custom icon for WYSIWYG. $image = $this->_objectManager->get(MagentoFrameworkImageAdapterFactory::class)->create(); $image->open('media/wysiwyg/test_icon.png'); $resultRaw->setHeader('Content-Type', $image->getMimeType()); $resultRaw->setContents($image->getImage());
We use the following code, to get the category name of a specific product. This works fine, but we face the issue with the store views. It only works well if the specific store view does have a unique value for the category name. See this part $cond[] = $items->getSelect()->getConnection()->quoteInto("category_name.store_id=?", […]
I initially launched my site using a git clone of magento2 repo. Since then, it appears installing this way is unsupported. Using git pull and changing git branches I was able to get my site from 2.4.3 to 2.4.4. But now I’m not sure how to get it to 2.4.5 […]
I don’t need or want to have the item condition to follow some business rules, avoiding showing them on the admin panel or emails. How could I remove it?
I am integrating UI grid with complete CRUD operations with UI component on frontend. But i am facing 1 issue of caching, when we edit from Actions column on frontend grid, the data provider is called and i get the loaded data only after i flush cache from terminal. So […]
After upgrading my Magento 2.4.5 to Magento 2.4.6, I can’t disable the 2FA extension in my local environment anymore. This is the error that appeared. Unable to change status of modules because of the following constraints: Cannot disable Magento_TwoFactorAuth because modules depend on it: Magento_AdminAdobeImsTwoFactorAuth: Magento_AdminAdobeImsTwoFactorAuth->Magento_TwoFactorAuth How could I solve […]
I want to remove the block from the currently applied third-party theme. What is the standard way to achieve this in Magento 2?? Please provide the guidelines considering the future Magento upgrade activity.