Skip to content

magento man

Arguments shared between multiple instances of same block

I have created a custom block and tried to insert it multiple times in the same page: <block class=”MyCompanyMyModuleBlockProducttabsCategoryProducts” name=”category.products.slider1″ template=”MyCompany_MyModule::producttabs/category-items-new.phtml”> <arguments> <argument name=”category_id” xsi:type=”string”>31</argument> <argument name=”block_title” xsi:type=”string”>Lorem ipsum</argument> <argument name=”block_text” xsi:type=”string”>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</argument> </arguments>… Read More »Arguments shared between multiple instances of same block

Add field to Checkout

I created a custom field for customer: <?php declare(strict_types=1); namespace VendorMyModuleSetupPatchData; use MagentoCustomerModelCustomer; use MagentoCustomerSetupCustomerSetup; use MagentoCustomerSetupCustomerSetupFactory; use MagentoEavModelEntityAttributeSet; use MagentoEavModelEntityAttributeSetFactory; use MagentoFrameworkSetupModuleDataSetupInterface; use MagentoFrameworkSetupPatchDataPatchInterface; use MagentoFrameworkSetupPatchPatchRevertableInterface; class AddCustomAttributeCustomerAttribute implements DataPatchInterface, PatchRevertableInterface { /** * @var ModuleDataSetupInterface */ private $moduleDataSetup;… Read More »Add field to Checkout