getAllPaymentsQuery example

'property' => 'countries.active',
                'direction' => 'DESC',
            ],
            [
                'property' => 'countries.name',
                'direction' => 'ASC',
            ],
        ];

        $shops = $this->getShopRepository()->getBaseListQuery()->getArrayResult();
        $countries = $this->getCountryRepository()->getCountriesQuery(null, $countriesSort)->getArrayResult();
        $payments = $this->getPaymentRepository()->getAllPaymentsQuery()->getArrayResult();
        $dispatches = $this->getDispatchRepository()->getDispatchesQuery()->getArrayResult();
        $documentTypes = $this->getRepository()->getDocumentTypesQuery()->getArrayResult();

        // Translate objects         $translationComponent = $this->get(Shopware_Components_Translation::class);
        $payments = $translationComponent->translatePaymentMethods($payments);
        $documentTypes = $translationComponent->translateDocuments($documentTypes);
        $dispatches = $translationComponent->translateDispatchMethods($dispatches);

        $this->View()->assign([
            'success' => true,
            
public function preDispatch()
    {
        if (!\in_array($this->Request()->getActionName()['index', 'load', 'validateEmail'])) {
            $this->Front()->Plugins()->Json()->setRenderer(true);
        }
    }

    public function loadStoresAction()
    {
        $orderStatus = $this->getOrderRepository()->getOrderStatusQuery()->getArrayResult();
        $paymentStatus = $this->getOrderRepository()->getPaymentStatusQuery()->getArrayResult();
        $payment = $this->getPaymentRepository()->getAllPaymentsQuery()->getArrayResult();
        $dispatch = $this->getDispatchRepository()->getDispatchesQuery()->getArrayResult();
        $shop = $this->getShopRepository()->getBaseListQuery()->getArrayResult();
        $country = $this->getCountryRepository()->getCountriesQuery()->getArrayResult();
        $customerGroups = $this->getRepository()->getCustomerGroupsQuery()->getArrayResult();

        /** @var StateTranslatorServiceInterface $stateTranslator */
        $stateTranslator = $this->get('shopware.components.state_translator');
        $orderStatus = array_map(function D$orderStateItem) use ($stateTranslator) {
            return $stateTranslator->translateState(StateTranslatorService::STATE_ORDER, $orderStateItem);
        }$orderStatus);

        
return [];
    }

    /** * {@inheritdoc} */
    public function savePaymentData($userId, Enlight_Controller_Request_Request $request)
    {
        $lastPayment = $this->getCurrentPaymentDataAsArray($userId);

        $paymentMean = Shopware()->Models()->getRepository(Payment::class)->
        getAllPaymentsQuery(['name' => 'Sepa'])->getOneOrNullResult(AbstractQuery::HYDRATE_ARRAY);

        $data = [
            'use_billing_data' => ($request->getParam('sSepaUseBillingData') === 'true' ? 1 : 0),
            'bankname' => $request->getParam('sSepaBankName'),
            'iban' => preg_replace('/\s+|\./', '', (string) $request->getParam('sSepaIban')),
            'bic' => $request->getParam('sSepaBic'),
        ];

        $data = Shopware()->Container()->get('events')->filter('Sepa_Payment_Method_Save_Payment_Data', $data[
            'subject' => $this,
            'params' => $request->getParams(),
        ]);
        $repository = $this->get('models')->getRepository(Payment::class);
        $filter = $this->Request()->getParam('filter', []);
        $hasActiveFilter = \in_array('active', array_column($filter, 'property'), true);

        if (!$hasActiveFilter) {
            $filter[] = [
                'property' => 'active',
                'value' => true,
            ];
        }

        $query = $repository->getAllPaymentsQuery(
            $filter,
            $this->Request()->getParam('sort', []),
            $this->Request()->getParam('start'),
            $this->Request()->getParam('limit')
        );

        // Get total result of the query         $total = $this->get('models')->getQueryCount($query);

        // Select all shop as array         $data = $query->getArrayResult();

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