Can someone please tell me how to edit template for invoice (order_invoice.twig)?
I change the file and save it but changes doesn't show when I'm logging in as
admin and show an invoice.
Pelle
Backend > main page > top right >> click on the gear button . . and delete cache.
If yo uhave also OCMod or/and VQMod related extension, this cache files have to be deleted too.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
How do you mean that?paulfeakins wrote: ↑Thu Jan 16, 2020 8:54 pmIf you have ever edited it through the admin then changes to the files won't take effect.
If a template file is edited through the internal template editing extension (that's why it is for), the output should be displayed with the changes.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
If i am not mistaken then if you use the theme editor to edit a file then the file is saved in the database and used when calledOSWorX wrote: ↑Fri Jan 17, 2020 1:16 amHow do you mean that?paulfeakins wrote: ↑Thu Jan 16, 2020 8:54 pmIf you have ever edited it through the admin then changes to the files won't take effect.
So if you then later go on to edit the same file directly you will not see the changes as the saved database file is called
Ah, okay 2 different cases!cyclops12 wrote: ↑Fri Jan 17, 2020 1:36 amIf i am not mistaken then if you use the theme editor to edit a file then the file is saved in the database and used when calledOSWorX wrote: ↑Fri Jan 17, 2020 1:16 amHow do you mean that?paulfeakins wrote: ↑Thu Jan 16, 2020 8:54 pmIf you have ever edited it through the admin then changes to the files won't take effect.
So if you then later go on to edit the same file directly you will not see the changes as the saved database file is called
My own fault, did not think that someone may edit the file(s) by the integrated theme editor AND also directly.
Who would do such useless grap?
So the sentence
has to be read correctly .. and is wrong.If you have ever edited it through the admin then changes to the files won't take effect.
If someone edit the file by the integrated editor - Theme Editor - the changes are displayed right after saving the change.
This "new" template is stored in the database from where it is always called when the template is required.
Another story is when someone edit the file "manual" means with an editor on his PC/Mac.
And loads after editing this file with FTP back into the shop.
What is important and valid for all cases: if OCMod and/or VQMod is used, and this file is already modified by one of them, the cached files have to be deleted also!
For OCMod is this done by clicking the button right top at Extensions.
If VQMod is used - and no VQMod manager is in play - these files and the 2 mod files a folder up have to be deleted manual.
Guess all possible cases are described-
Or what do you think Paul?
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
No, it is correct.
If you have ever edited a template via the admin, then subsequent changes to the files (i.e. not via the admin) will have no effect.
When you make a change via the admin this is not a change to the "file" it is a change to the database.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Correct or not, if a template is edited via the integrated "Theme Editor", for the user it makes no difference if the file or the stored entry in the database is edited.paulfeakins wrote: ↑Fri Jan 17, 2020 5:15 pmNo, it is correct.
If you have ever edited a template via the admin, then subsequent changes to the files (i.e. not via the admin) will have no effect.
When you make a change via the admin this is not a change to the "file" it is a change to the database.
Simply a technical definition nobody cares at the end.
Because when I speak about editing a template by the "Theme Editor", it is through the admin (backend) and NOT direct and manual with an local installed editor.
And most of the user are "endusers" working through the "Admin" and editing templates through the "Theme Editor".
So, don't confuse them too much.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
They need to know that if they edit a template through the admin, they will not then be able to make changes to that template by editing the file directly in the filesystem e.g. via FTP.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Okay fine ..paulfeakins wrote: ↑Fri Jan 17, 2020 10:14 pmThey need to know that if they edit a template through the admin, they will not then be able to make changes to that template by editing the file directly in the filesystem e.g. via FTP.
And is there any help or notice in the backend about that fact?
Cannot see any .. and I guess not many will read this thread here.
There should be something like this in my German translation:
btw.: if I tell a client to edit a file via FTP (which I never will do!), they ask me it this is something to eat .. ?!
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
but leaves the default-original Source File untouched, it would be a top class surplus
Admin Tool. This, because, after a 'global' cache clean function, the modification
made would no longer exist, and people would start to wonder, where it went ....
If I understud the above right, at least ...
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Now this is a good thing that should be added in the next release( as long as the theme editor will still be used in future releases)OSWorX wrote: ↑Fri Jan 17, 2020 10:48 pm
Okay fine ..
And is there any help or notice in the backend about that fact?
Cannot see any .. and I guess not many will read this thread here.
There should be something like this in my German translation:
btw.: if I tell a client to edit a file via FTP (which I never will do!), they ask me it this is something to eat .. ?!
Or maybe make a mod for it
That's easy to implement: simply add it to the translation/language file:
Code: Select all
../admin/language/YOUR_LANG_CODE/design/theme.php
Code: Select all
text_twig
https://www.opencart.com/index.php?rout ... n_id=31048
So, if someone wants such help/tip also in the English language, the en-gb language has to be edited.
Or any other language package.
No need for a mod ..
btw: I have enhanced the message a bit:
Reason for that: once a file is edited by the Theme Editor and stored (in the database), no other script (like VQMod or OCMod) has further access to the stored file.
That means for example: customer has an Extension (OCMod or VQMod) which edits the template file (e.g. product.twig - see image).
Later he edit the same template with the Theme Editor.
The changes are done on the original file, not the already modified.
Means also, the stored file in the Theme Editor (modified or not) has to be deleted to be available further by external scripts (e.g. OCMod).And as long as the file is stored (edited or not) in the Theme Editor, possible changes by other scripts are not possible/available anymore!
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Read my previous comment - the process is exactly as you describe.IP_CAM wrote: ↑Sat Jan 18, 2020 6:30 amWell, if that Admin File Editor really only places it's modified Code into the Database,
but leaves the default-original Source File untouched, it would be a top class surplus
Admin Tool. This, because, after a 'global' cache clean function, the modification
made would no longer exist, and people would start to wonder, where it went ....
If I understud the above right, at least ...
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Users browsing this forum: Bing [Bot] and 316 guests