Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot override MyAccount.tpl in theme #167

Open
Djohel opened this issue Jun 4, 2024 · 1 comment
Open

Cannot override MyAccount.tpl in theme #167

Djohel opened this issue Jun 4, 2024 · 1 comment

Comments

@Djohel
Copy link

Djohel commented Jun 4, 2024

In the hookDisplayCustomerAccount method line 348, the template path is currently set to:

$this->getLocalPath() . 'views/templates/hook/front/MyAccount.tpl'
This prevents us from being able to override the template. Instead, it should be set to:

'module:saferpayofficial/views/templates/hook/front/MyAccount.tpl'
This change would allow us to properly override the template as needed.

below the function changed :

public function hookDisplayCustomerAccount()
    {
        $isCreditCardSaveEnabled =
            Configuration::get(\Invertus\SaferPay\Config\SaferPayConfig::CREDIT_CARD_SAVE);
        if (!$isCreditCardSaveEnabled) {
            return;
        }
        if (\Invertus\SaferPay\Config\SaferPayConfig::isVersion17()) {
            return $this->context->smarty->fetch(
                // $this->getLocalPath() . 'views/templates/hook/front/MyAccount.tpl'
                'module:saferpayofficial/views/templates/hook/front/MyAccount.tpl'
            );
        }

        return $this->context->smarty->fetch(
            // $this->getLocalPath() . 'views/templates/hook/front/MyAccount_16.tpl'
            'module:saferpayofficial/views/templates/hook/front/MyAccount_16.tpl'
        );
    }

Thanks !

@justelis22
Copy link
Collaborator

Hi there @Djohel, thanks for waiting!

Thank you for the information, we will check with our team and implement a possible fix.

I will keep you updated about the progress.

Best Regards,
Invertus Support team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants