Overriding Batch Template

I am trying to customize StripeBundle templates, respectively vendor\payum\stripe\Payum\Stripe\Resources\views\Action\obtain_checkout_token.html.twig .

This is because I want the Stripe popup to appear on the same page as the object you paid for, and not on a separate page with a single button. Say I want to pay for a product, I click "pay" on the verification page and I want a pop-up window to appear there.

I looked at another similar question , but I can't get it to work. I tried every combination of folder names in app/Resources with PayumStripeBundle, Payum, Payum / Stripe, but none of them overrides the template used.

The package structure is also rather strange, because its namespace is Payum\Bundle\PayumBundle , but the Stripe component, which is not a package that contains a template, is located in a different folder.

The value is set here , so maybe Symfony never looks in the folder because of this?

What should the folder structure look like in app/Resources if it works like this? Or if this is another way to do it.

+5
source share
1 answer

Try this in your config.yml and put the Action folder in this path with the necessary templates.

 twig: debug: "%kernel.debug%" strict_variables: ~ paths: "%kernel.root_dir%/../app/Resources/PayumBundle/Stripe/views": PayumStripe 
+1
source

Source: https://habr.com/ru/post/1241507/


All Articles