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

customize template #84

Closed
itwhy opened this issue Nov 19, 2018 · 10 comments · Fixed by #116
Closed

customize template #84

itwhy opened this issue Nov 19, 2018 · 10 comments · Fixed by #116
Labels
Bug Confirmed bugs or bugfixes.

Comments

@itwhy
Copy link

itwhy commented Nov 19, 2018

Hi, i tried to customise pdf template like other bundle but nothing change : /

my path is Templates/SyliusInvoicingPlugin/Invoice/Download/ ..

edit : the path is actually : Templates/bundles/SyliusInvoicingPlugin/Invoice/Download/ ..

do you know why ?

thx you !

@Zales0123 Zales0123 added the Bug Confirmed bugs or bugfixes. label Nov 19, 2018
@Zales0123
Copy link
Member

Hello Mathieu, in fact, it should work without a problem :/ I'll try to investigate it asap and give you some feedback.

@itwhy
Copy link
Author

itwhy commented Nov 19, 2018

thank you very much !

@Zales0123
Copy link
Member

I've just checked it and indeed there is some problem with overriding 😢 Maybe it's because plugin templates are placed in Resources/views? Thank you for the report, anyway, we will try to find a solution as soon as possible. Of course, if you have any idea what can be wrong, feel free to contribute :)

@teohhanhui
Copy link
Contributor

Could it have anything to do with Symfony's bundle naming convention?

@itwhy
Copy link
Author

itwhy commented Nov 20, 2018

haha, i'd really like to help ! but i'm just a "user", and very sylius noob :)

@itwhy
Copy link
Author

itwhy commented Dec 14, 2018

hi guys, any news for this issue ?

@bartoszpietrzak1994
Copy link
Contributor

Hello Mathieu,

Unfortunately, there's a bug in Sylius due to a conflict between new Twig and Sylius' ThemeBundle conventions since 1.3.1 version. Although we are working on a solution, right now I'd suggest downgrading Sylius to 1.3.0 version if you are in a hurry.

@nemoneph
Copy link

Hello,
I'm facing the same problem on 1.4-BETA.

Any news on this ?
Thx :)

bartoszpietrzak1994 added a commit that referenced this issue Mar 13, 2019
This PR was merged into the 1.0-dev branch.

Discussion
----------

Fixes #84

Ok, I think we've finally managed (kinda) to resolve this problem 😄 There are some problems in Sylius (or even in Symfony itself) with overwriting templates, that are not configured with a one, specific path style. It should always follow `@SyliusTestPlugin/Catalog/templateName.html.twig` convention - and as you can see, there were some other conventions used :) It would be good if someone could test these changes before merging (cc @itwhy), but I've tested all plugin templates on a fresh Sylius-Standard application and it worked 🚀 

Commits
-------

15e5966 Make all plugin templates possible to overwrite
@bartoszpietrzak1994
Copy link
Contributor

bartoszpietrzak1994 commented Mar 13, 2019

Hello @itwhy @nemoneph !

We've managed to dig into this problem and find a solution that allows us to customize templates under templates/Bundles/SyliusInvoicingPlugin path.

The new version of SyliusInvoicingPlugin has just been relased (v0.8.3) so please update it via composer and let us know if everything works like a charm :)

@itwhy
Copy link
Author

itwhy commented Mar 14, 2019

hi guys,
sorry i found another way to do it (app/Ressources/SyliusInvoicingPlugin/) and i'm now too late to test the new way, the deadline is too close.
i'll try that in the next v.
anyway, thx you ! hope this will help others guys ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bugs or bugfixes.
Development

Successfully merging a pull request may close this issue.

5 participants