opencart/opencart — pull request #236 by chrisatomix (2012-11-15 00:51:11+00:00)
Title: Simplify Customer Group ID Retrieval Code

Reduced the code needed to obtain the Customer Group ID (depending if user is logged in or not).

Before:
```php
if ($this->customer->isLogged()) {
$customer_group_id = $this->customer->getCustomerGroupId();
} else {
$customer_group_id = $this->config->get('config_customer_group_id');
}
```
(This code appears around 10 times in various model functions).

After:
```php
$customer_group_id = $this->customer->getCustomerGroupId();
```

The helper function will now return the default customer group ID if the user is not authenticated.