Skip to content

magento2.4

Auto Added by WPeMatico

How I could install HtmlPurifier in my custom module?

I made my own form: <?xml version=”1.0″?> <form xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Ui:etc/ui_configuration.xsd”> <argument name=”data” xsi:type=”array”> <item name=”js_config” xsi:type=”array”> <item name=”provider” xsi:type=”string”>customer_form.customer_form_data_source</item> </item> <item name=”label” xsi:type=”string” translate=”true”>Blogpost Actions</item> <item name=”reverseMetadataMerge” xsi:type=”boolean”>true</item> </argument> <settings> <buttons> <button name=”save” class=”MageGuideFirstModuleBlockAdminhtmlEditSaveButton”/> <button name=”back” class=”MageGuideFirstModuleBlockAdminhtmlEditBackButton”/> </buttons> <layout> <navContainerName>content</navContainerName>… Read More »How I could install HtmlPurifier in my custom module?

Does magento2.4 sanitizes form input in order to avoid XSS or I have to implement my own methods?

I made my first form: <?xml version=”1.0″?> <form xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Ui:etc/ui_configuration.xsd”> <argument name=”data” xsi:type=”array”> <item name=”js_config” xsi:type=”array”> <item name=”provider” xsi:type=”string”>customer_form.customer_form_data_source</item> </item> <item name=”label” xsi:type=”string” translate=”true”>Blogpost Actions</item> <item name=”reverseMetadataMerge” xsi:type=”boolean”>true</item> </argument> <settings> <buttons> <button name=”save” class=”MageGuideFirstModuleBlockAdminhtmlEditSaveButton”/> <button name=”back” class=”MageGuideFirstModuleBlockAdminhtmlEditBackButton”/> </buttons> <layout> <navContainerName>content</navContainerName>… Read More »Does magento2.4 sanitizes form input in order to avoid XSS or I have to implement my own methods?

How I can add a `Create New Button` to my Grid in magento2 where redirects to another page?

I am learning magento extention creation, and I try to add a “Create New” record in my admin grid. So far I made this grid: namespace MageGuideFirstModuleBlockAdminhtml; use MageGuideFirstModuleModelFactoriesBlogPostCollectionFactory as BlogPostCollectionFactory; use MagentoBackendBlockTemplateContext; use MagentoBackendHelperData; use MagentoFrameworkObjectManagerInterface; use MagentoBackendBlockWidgetGridExtended; use… Read More »How I can add a `Create New Button` to my Grid in magento2 where redirects to another page?

How I can retrieve the Image Url of a given product?

I have a custom block in magento 2.4 where I retrieve a image List namespace PcmagasFirstModuleBlockMyList; use MagentoCatalogModelProductRepository; use MagentoFrameworkApiSearchCriteriaBuilder; use MagentoFrameworkViewElementTemplate; class MyList extends Template { private ProductRepository $productRepository; private SearchCriteriaBuilder $searchCriteriaBuilder; public function __construct( TemplateContext $context, ProductRepository $productRepository,… Read More »How I can retrieve the Image Url of a given product?

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?