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 custom admin table DateTime slider doesn’t work

I’ve been trying to get the Magento Admin to let me enter a time using the proper components, however it appears to error out. I can’t even get it to match the Date above it. Posted below are the errors: And Here is the Component being rendered with the error: Here is the XML for […]

Categories
Mastering Development

How to write custom findAll() with Specification in JPA repository

When I use skuRepository.getAll(), it works OK, but when I apply filters, defined in Specification (List filteredRegs = skuRepository.getAll(specification)) I still get all the rows of the table What should i do to apply the specifications to my custom method? public interface SkuRepository extends CrudRepository<Sku, Integer>, JpaSpecificationExecutor<Sku> { @Query(“select s from Sku s join fetch […]

Categories
Database Development

The database returned no natively generated identity value

I am virgin to the spring framework technology and having a problem solving the following error please someone take my virginity I have the following code inside UserEntity class import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name=”users”, schema = “photo_app” ) public class UserEntity implements Serializable { […]

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; […]