Categories
CMS Magento Mastering Development

How to save data in custom table onclick custom button from Customer Edit page Adminhtml? magento 2

Basically so far I have added a custom button(highlighted in image) on admin/customer/edit page. In order to add the custom button I have overridden \vendor\magento\module-customer\view\base\ui_component\customer_form.xml TO app\code\Vendor\Customer\view\base\ui_component\customer_form.xml app\code\Vendor\Customer\view\base\ui_component\customer_form.xml <button name=”newsignupreview” class=”Vendor\Customer\Block\Adminhtml\Edit\NewSignupReviewButton”/> app\code\Vendor\Customer\etc\di.xml <preference for=”Vendor\Customer\Api\Data\NewSignupReviewInterface” type=”Vendor\Customer\Model\Customer\NewSignupReview” /> app\code\Vendor\Customer\Block\Adminhtml\Edit\NewSignupReviewButton.php <?php namespace Vendor\Customer\Block\Adminhtml\Edit; use Vendor\Customer\Api\Data\NewSignupReviewInterface; use Magento\Customer\Block\Adminhtml\Edit\GenericButton; use Magento\Customer\Api\AccountManagementInterface; use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; class NewSignupReviewButton extends GenericButton implements ButtonProviderInterface { […]

Categories
CMS Magento Mastering Development

How to save data in custom table onclick custom button from Customer Edit page Adminhtml? magento 2

Basically so far I have added a custom button(highlighted in image) on admin/customer/edit page. In order to add the custom button I have overridden \vendor\magento\module-customer\view\base\ui_component\customer_form.xml TO app\code\Vendor\Customer\view\base\ui_component\customer_form.xml app\code\Vendor\Customer\view\base\ui_component\customer_form.xml <button name=”newsignupreview” class=”Vendor\Customer\Block\Adminhtml\Edit\NewSignupReviewButton”/> app\code\Vendor\Customer\etc\di.xml <preference for=”Vendor\Customer\Api\Data\NewSignupReviewInterface” type=”Vendor\Customer\Model\Customer\NewSignupReview” /> app\code\Vendor\Customer\Block\Adminhtml\Edit\NewSignupReviewButton.php <?php namespace Vendor\Customer\Block\Adminhtml\Edit; use Vendor\Customer\Api\Data\NewSignupReviewInterface; use Magento\Customer\Block\Adminhtml\Edit\GenericButton; use Magento\Customer\Api\AccountManagementInterface; use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; class NewSignupReviewButton extends GenericButton implements ButtonProviderInterface { […]

Categories
CMS Magento Mastering Development

How to save data in custom table onclick custom button from Customer Edit page Adminhtml? magento 2

Basically so far I have added a custom button(highlighted in image) on admin/customer/edit page. In order to add the custom button I have overridden \vendor\magento\module-customer\view\base\ui_component\customer_form.xml TO app\code\Vendor\Customer\view\base\ui_component\customer_form.xml app\code\Vendor\Customer\view\base\ui_component\customer_form.xml <button name=”newsignupreview” class=”Vendor\Customer\Block\Adminhtml\Edit\NewSignupReviewButton”/> app\code\Vendor\Customer\etc\di.xml <preference for=”Vendor\Customer\Api\Data\NewSignupReviewInterface” type=”Vendor\Customer\Model\Customer\NewSignupReview” /> app\code\Vendor\Customer\Block\Adminhtml\Edit\NewSignupReviewButton.php <?php namespace Vendor\Customer\Block\Adminhtml\Edit; use Vendor\Customer\Api\Data\NewSignupReviewInterface; use Magento\Customer\Block\Adminhtml\Edit\GenericButton; use Magento\Customer\Api\AccountManagementInterface; use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; class NewSignupReviewButton extends GenericButton implements ButtonProviderInterface { […]

Categories
CMS Development Magento

Magento2:In admin form after save image couldn’t save into database and directory

enter code`Install schema.php namespace Magik\Helloworld\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\DB\Ddl\Table; class InstallSchema implements InstallSchemaInterface { public function install(SchemaSetupInterface $setup, ModuleContextInterface $context) { $installer = $setup; $installer->startSetup(); // Get tutorial_simplenews table $tableName = $installer->getTable(‘magik_helloworld_slider’); // Check if the table already exists if ($installer->getConnection()->isTableExists($tableName) != true) { // Create tutorial_simplenews table $table = $installer->getConnection() […]

Categories
CMS Development Magento

Magento2:In admin form after save image couldn’t save into database and directory

enter code`Install schema.php namespace Magik\Helloworld\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\DB\Ddl\Table; class InstallSchema implements InstallSchemaInterface { public function install(SchemaSetupInterface $setup, ModuleContextInterface $context) { $installer = $setup; $installer->startSetup(); // Get tutorial_simplenews table $tableName = $installer->getTable(‘magik_helloworld_slider’); // Check if the table already exists if ($installer->getConnection()->isTableExists($tableName) != true) { // Create tutorial_simplenews table $table = $installer->getConnection() […]

Categories
CMS Development Magento

Magento2:In admin form after save image couldn’t save into database and directory

enter code`Install schema.php namespace Magik\Helloworld\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\DB\Ddl\Table; class InstallSchema implements InstallSchemaInterface { public function install(SchemaSetupInterface $setup, ModuleContextInterface $context) { $installer = $setup; $installer->startSetup(); // Get tutorial_simplenews table $tableName = $installer->getTable(‘magik_helloworld_slider’); // Check if the table already exists if ($installer->getConnection()->isTableExists($tableName) != true) { // Create tutorial_simplenews table $table = $installer->getConnection() […]