Categories
CMS Drupal Mastering Development

Applying patch on core module failing

I am trying to apply patch on core module systems. But it is failing with the message "Could not apply patch! Skipping. The error was: Cannot apply patch patches/path-alias-8.9.2.patch". Below is my composer.json file and patch file { "name": "drupal-composer/drupal-project", "description": "Project template for Drupal 8 projects with composer", "type": "project", "license": "GPL-2.0-or-later", "authors": [ […]

Categories
CMS Drupal Mastering Development

Custom field widget with user entity reference doesn’t work

I have created a custom field and custom field widget. The field widget has an entity_reference to a user field, which is never saved when the field is saved. I see the following error when I try to add a user. The default_property has to be an entity object The code I am using is […]

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 Magento Mastering Development

Magento 2 plugins (interceptor) beforeCancel() making the cancel order bug

I have created a plugin which intercept the cancel function from the interface Magento\Sales\Api\OrderManagementInterface, the plugin intercept before the cancel function is called. My problem is that when my module is activated, I can’t cancel any orders, neither from the page admin/sales/order/view/order_id/10 or from the list of orders. For example, when i click the cancel […]

Categories
CMS Magento Mastering Development

How to add Custom Registeration field from admin

Hi i have a form in admin and i want that when select the type this values should reflect on an appropriate selected form but am not able to do so can anyone guide me here is a screenshot InstallSchema.php <?php /** * @category Eecom * @package Eecom_CustomCustomerAttribute */ namespace Eecom\CustomCustomerAttribute\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; […]

Categories
CMS Magento Mastering Development

Magento 2 plugins (interceptor) beforeCancel() making the cancel order bug

I have created a plugin which intercept the cancel function from the interface Magento\Sales\Api\OrderManagementInterface, the plugin intercept before the cancel function is called. My problem is that when my module is activated, I can’t cancel any orders, neither from the page admin/sales/order/view/order_id/10 or from the list of orders. For example, when i click the cancel […]

Categories
CMS Magento Mastering Development

How to add Custom Registeration field from admin

Hi i have a form in admin and i want that when select the type this values should reflect on an appropriate selected form but am not able to do so can anyone guide me here is a screenshot InstallSchema.php <?php /** * @category Eecom * @package Eecom_CustomCustomerAttribute */ namespace Eecom\CustomCustomerAttribute\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; […]

Categories
CMS Magento Mastering Development

Magento 2 admin Grid form Status

Hi am new in magento and am learning module development am trying to add a status drop down button that is yes or no in mt button click form in admin grid but but my admin grid disappear. am sharing the codes below:- AddNewAttribute.php <?php namespace Eecom\CustomCustomerAttribute\Block\Adminhtml\Custom\Edit\Tab; class AddNewAttribute extends \Magento\Backend\Block\Widget\Form\Generic implements \Magento\Backend\Block\Widget\Tab\TabInterface { /** […]