getSessionId example

$query->select([
            self::BASKET_TABLE_ALIAS . '.price as end_price',
            self::BASKET_TABLE_ALIAS . '.netprice as net_price',
            self::BASKET_TABLE_ALIAS . '.tax_rate',
            self::BASKET_TABLE_ALIAS . '.quantity',
        ]);

        $query->from(self::BASKET_TABLE_NAME, self::BASKET_TABLE_ALIAS);
        $query->andWhere(self::BASKET_TABLE_ALIAS . '.modus = 0');
        $query->andWhere(self::BASKET_TABLE_ALIAS . '.sessionID = :session');
        $query->andWhere(self::BASKET_TABLE_ALIAS . '.tax_rate != 0');
        $query->setParameter(':session', $discountContext->getSessionId());

        return $query;
    }

    /** * {@inheritdoc} */
    public function getInsertDiscountQuery(DiscountContext $discountContext)
    {
        $query = $this->connection->createQueryBuilder();
        $price = $discountContext->getPrice();

        
Home | Imprint | This part of the site doesn't use cookies.