How to add new field before shipping methods in checkout page Magento 2?

Checkout Shipping Step page, You can display the input field between shipping address and shipping methods.

Magento 2, To display the Input field before shipping methods, you need to create a checkout_index_index.xml file to set the content of the file. Continue reading “How to add new field before shipping methods in checkout page Magento 2?”

How to update customer group programmatically Magento 2?

Update Customer Group in Magento 2 by Customer id for the customer.

If you want to change existing customer groups to different customer groups for the Customer you can do it using Customer Repository interface API.

To Retrieve the Customer Object by customer id, set Group id using the setGroupId() method to the return object and save the customer object to update group id. Continue reading “How to update customer group programmatically Magento 2?”

How to Delete Payment transaction details by id Magento 2?

Once you place an order using an online payment gateway, Gateway details will be stored in the database table sales_payment_transaction.

The table contains the transaction id, payment id, additional_information and many more columns to save the payment data.

If you want to delete a specified transaction record from the table, you can easily remove the given record by the transaction id with the use of the Transaction Repository Interface. Continue reading “How to Delete Payment transaction details by id Magento 2?”