In this post I am going to explain how to get current customer group id in PrestaShop 1.7.

1) Inside module or controller file (php)

2) Inside template file (tpl)