src/CartItem.php
public function getId()
    {
        // keys to ignore in the hashing process
        $ignoreKeys = ['quantity'];

        // data to use for the hashing process
        $hashData = $this->data;
        foreach ($ignoreKeys as $key) {
            unset($hashData[$key]);
        }

        $hash = sha1(serialize($hashData));

        return $hash;
    }
public function getId()
    {
        // keys to ignore in the hashing process
        $ignoreKeys = ['quantity'];

        // data to use for the hashing process
        $hashData = $this->data;
        foreach ($ignoreKeys as $key) {
            unset($hashData[$key]);
        }

        $hash = sha1(serialize($hashData));

        return $hash;
    }
public function getId ( ) { // keys to ignore in the hashing process $ ignoreKeys = [ 'quantity' ] ; // data to use for the hashing process $ hashData = $ this -> data ; foreach ( $ ignoreKeys as $ key ) { unset ( $ hashData [ $ key ] ) ; } $ hash = sha1 ( serialize ( $ hashData ) ) ; return $ hash ; }
Get the cart item id.

@return string
Get the cart item id .