By cj_hoang, 2 December, 2022

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.

By cj_hoang, 29 November, 2022

Today I was banging my head that CSS3 calc() property was not working correctly in any browsers. Then I realized I am using LESS and any math operators between brackets would be calculated and then only CSS would be parsed by browsers.

My problem was:

@asideWidth: 30px;

.post {
    width: calc(100% - @asideWidth);
}

This was giving me output as 70%. Horrible. Right after the moment, I realized - anything inside brackets in the LESS would be calculated by LESS first. So I had to parse the calc as Escape string for LESS, like: