public function getReference($client = false)
    {
        if (empty($this->reference)) {

            $reference = $this->createReference();

            if ($client) {
                if (isset($_COOKIE[$client->getCookieCartName()])) {
                    $reference = $_COOKIE[$client->getCookieCartName()];
                } else {
                    setcookie($client->getCookieCartName(), $reference, strtotime($client->getCookieLifetime()), '/');
                }
            }
            $this->setReference($reference);
        }

        return $this->reference;
    }