0

We have different store views: Spanish (es_es), French (fr_fr) and English (en). And we have a RMA extension where you can create them. Once you create a RMA you redirect to the same RMA page; we assume it works for the english storeview because of the code of the storeview is "en", not like the spanish and the french ones which have respectively (es_es) and (fr_fr) which redirect to the homepage.

This is the condition that redirects:

if ($result[0] == self::HTTP_CODE_OK) {
                                $this->sendEmailSuccessCreateRma($result[1]);
                                $this->messageManager->addSuccessMessage(__('RMA was created successfully'));
                                $this->_redirect('sap/rma/index');
                            } else {
                                $this->messageManager->addErrorMessage($result[1]);
}

And this statement in the phtml:

<div class="actions-toolbar">
    <div class="primary">
        <button type="submit" class="action primary" data-role="rma-submit">
            <span><?= __('Submit Request') ?></span>
        </button>
    </div>
</div>

We have tried doing another class class like:

\Magento\Store\Model\StoreManagerInterface $storeManager

with this code:

$url = $this->_storeManager->getStore()->getUrl('sap/rma/index');
$this->_redirect($url);

But it leaves us a blank page and we can't see anything wrong in the logs.

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.