Skip to main content

Posts

How to add custom button in category form admin ?

Here we will learn how to add button on category page. The category form is generated via ui-component, the ui-component name for category form is view/adminhtml/ui_component/category_form.xml You need to create a file with the same name and path in your own module: Create same file [Namespace]/[Module]/view/adminhtml/ui_component/category_form.xml and copy following content: <?xml version="1.0" encoding="UTF-8"?> <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= "buttons" xsi:type= "array" > <item name= "exercise" xsi:type= "string" > AGM\Exercise\Block\Adminhtml\Category\Edit\ExerciseButton </item> </item> </argu
Recent posts

How to add custom attribute to customer programmatically?

How to Add Custom Attribute to Customer Programmatically? This post will guide you how to create customer custom attribute in Magento 2.0.x programatically. Firstly, you need create file InstallData.php in your setup folder: Create file: app/code/AGM/Exercise/Setup/InstallData.php Insert code as below and change your attribute name. <?php namespace AGM\Exercise\Setup; use Magento\Customer\Setup\CustomerSetupFactory; use Magento\Customer\Model\Customer; use Magento\Eav\Model\Entity\Attribute\Set as AttributeSet; use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; class InstallData implements InstallDataInterface { /** * @var customerSetupFactory */ protected $customerSetupFactory ; /** * @var attributeSetFactory

How to add new tab into products backend and frontend ?

Follow below steps to add new tab into backend and frontend, read and apply same changes accordingly. Create new attribute 'warranty' from Backend : Menu: Catalog >> Attributes >> Manage Attributes Go on menu: Catalog >> Attributes >> Manage Attribute Sets  and create new Group and drag newly created attribute from right end side (unassigned attributes) into that group. By above things tab should be added from your BE manage products. Now edit any product and go into Warrenty tab and paste your static block identifier). Frontend: 1. app/design/frontend/[theme]/default/layout/catalog.xml And find below line: <block type= "catalog/product_view_attributes" name= "product.attributes" as= "additional" template= "catalog/product/view/attributes.phtml" > Now add your own “tab” code afterwards, as below: <block type= "catalog/product_view_attributes" name= "produ