getAreaQuery example

public function getRules(Group $customerGroup, ?Area $area = null, ?Country $country = null, ?State $state = null)
    {
        $query = $this->connection->createQueryBuilder();
        $query->select($this->fieldHelper->getTaxFields())
            ->from('s_core_tax', 'tax');

        $statement = $query->execute();
        $data = $statement->fetchAll(PDO::FETCH_ASSOC);

        $rules = [];

        $query = $this->getAreaQuery(
            $customerGroup,
            $area,
            $country,
            $state
        );

        foreach ($data as $tax) {
            $query->setParameter(':taxId', $tax['__tax_id']);

            $statement = $query->execute();

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