I need to customize the Stripe Checkout template in Sylius 1.4.
Things I tried so far but did not work:
1- I added this config to config.yaml:
sylius_payum:
template:
layout: '@SyliusShop/payumlayout.html.twig'
obtain_credit_card: '@SyliusShop/obtainCheckoutToken.html.twig'
2- I tried to override @SyliusPayum/Action/obtainCheckoutToken.html.twig. Interestingly editing this file itself does not change the template!.
The only way that the template changes is to edit @Payum/Stripe/Action/obtainCheckoutToken.html.twig.
How I can override this file in Sylius?
So it turn out to be easy:
To override the file I needed to alter the
configfield of stripe_checkout record atsylius_gateway_configtable of Sylius database as below.in my case the record id was 2.
SyliusPayumBundle::obtainCheckoutToken.html.twigandSyliusPayumBundle::layout.html.twigare the new overriding files.The question is why the keys are not encrypted in the database and I think its not a good practice to have the override config at the database level.