Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Invoice path should be stored relatively to invoices_root_dir #4

Closed
ambroisemaupate opened this issue Feb 22, 2018 · 3 comments
Closed

Comments

@ambroisemaupate
Copy link
Contributor

Once invoice file has been generated, its absolute path is hardcoded in database. This could be a problem if you want to move your Sylius project elsewhere!

Could we just store path relative to invoices_root_dir parameter, so that we just store 19be581a08453.pdf in database. This would much more portable.

@bitbager
Copy link
Member

Indeed. Could you provide a PR?

@czende
Copy link
Contributor

czende commented Feb 22, 2018

Or even better - render invoice data on the fly with some twig template? That pdf can be stored in var/ directory.

@ambroisemaupate
Copy link
Contributor Author

ambroisemaupate commented Feb 22, 2018

@czende That’s already working like that. PDF is customizable with Twig template, then you can customize your storage folder. Default to var/invoices folder would be better, I agree.

@bitbager I’ll try to find time to create a PR with this issue and a better invoice file naming. Something like orderId _ orderDate _ randomHash . pdf

ambroisemaupate added a commit to ambroisemaupate/SyliusInvoicingPlugin that referenced this issue Feb 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants