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?”

How to override order info.phtml template in Magento 2?

Order/info.phtml file display all the order information regarding the order.

If you need to override the info template with your module or theme level, you can do it with ease.

Template declaration will be found from the Block class, Magento\Sales\Block\Order\Info with protected $_template variable. Continue reading “How to override order info.phtml template in Magento 2?”