Post by frontend1 » Mon Jul 24, 2017 6:17 pm

Hi,
I just installed Opencart 3.0.2.0 in local (XAMPP) and I am trying to edit some part of the code in .twig pages with some code editor. (Notepad++). When I edit and saved changes , refresh Opencart and nothing ...everything stays the same ? I tried to install in and online and click from the admin panel modifications - clear, modify buttons and save changes, clear cache browser and again nothing. When I go to admin panel ... theme editor and I can not preview there my changes on the page why ? I don't want to use all time admin panel edit theme panel because is very small and uncomfortable. I tried to edit default theme .... common ->header.twig and delete for example phone and some small elements. Save the page , refresh the website and nothing reflect on it. With Opencart x2 no problem to make some changes. Now with .twig file I am not sire how to refresh them some ideas ?
Some ideas or help ? Thanks!

Newbie

Posts

Joined
Mon Jul 24, 2017 5:15 pm

Post by opencartboost » Mon Jul 24, 2017 10:01 pm

Did you try clear cache in folder storage too?

Active Member

Posts

Joined
Thu Jul 09, 2015 5:59 am

Post by JNeuhoff » Mon Jul 24, 2017 11:29 pm

Normally the twig rendering engine compares the dates of the common/header.twig and its processed cache file to see whether it should update the cache with your changes.

However, if you have also done some changes via the admin backend's Design > Theme Editor it will grab the common/header.twig file from the database and totally ignore any changes elsewhere, e.g. those from view/*/before event handlers or from OCmod based changes. This is a severe issue which I hope Daniel can resolve, see this github entry for more details.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by frontend1 » Wed Aug 02, 2017 3:43 pm

opencartboost wrote:
Mon Jul 24, 2017 10:01 pm
Did you try clear cache in folder storage too?
Yes , all time I need to clear all files in this folder. Only this is works fine. It is really slow and stupid way to programming fast and preview changes in the website. Thanks!

Newbie

Posts

Joined
Mon Jul 24, 2017 5:15 pm

Post by frontend1 » Wed Aug 02, 2017 3:46 pm

JNeuhoff wrote:
Mon Jul 24, 2017 11:29 pm
Normally the twig rendering engine compares the dates of the common/header.twig and its processed cache file to see whether it should update the cache with your changes.

However, if you have also done some changes via the admin backend's Design > Theme Editor it will grab the common/header.twig file from the database and totally ignore any changes elsewhere, e.g. those from view/*/before event handlers or from OCmod based changes. This is a severe issue which I hope Daniel can resolve, see this github entry for more details.
Yes, I got it. I am working only with code editor, it is not possible to work in this small editor in the admin panel. I need years to do something there. Only with clear a cash folder all time. Really unuseful .... is not easy for programmers that 2.x versions

Newbie

Posts

Joined
Mon Jul 24, 2017 5:15 pm

Post by JNeuhoff » Wed Aug 02, 2017 5:19 pm

frontend1 wrote:
Wed Aug 02, 2017 3:46 pm
Yes, I got it. I am working only with code editor, it is not possible to work in this small editor in the admin panel. I need years to do something there. Only with clear a cash folder all time. Really unuseful .... is not easy for programmers that 2.x versions
The way it should work is as follows:

In the theme editor, whenever you save your changes, it should also automatically clear the cache.

Also, it should cooperate with other modification systems in OpenCart, in the following order:
  1. Theme Editor
  2. OCmod (including possible Integrated VQmod)
  3. event handlers for view/*/before
  4. VQmod from https://github.com/vqmod/vqmod/releases
  5. Override Engine
  6. event handlers for view/*/after
Also we need support for all the available theme engines for the frontend (e.g. '.tpl' and '.twig' at the moment).

It's not that hard to make it work that way.

When I have time, I'll submit some changes to github for Daniel to review.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by josuito » Fri Oct 06, 2017 2:21 am

Go to the Opencart Dashboard and click on the Gear in top right of the screen, then turn OFF the cache for the Theme, and then Refresh

Done.

Newbie

Posts

Joined
Tue Feb 02, 2016 1:23 am

Post by Dhaupin » Wed Nov 08, 2017 8:12 am

@JNeuhoff - Wow, thanks for making that issue report. I hope it is resolved soon.

josuito wrote:
Fri Oct 06, 2017 2:21 am
Go to the Opencart Dashboard and click on the Gear in top right of the screen, then turn OFF the cache for the Theme, and then Refresh
>:D UX Sin 1:
Putting the clear theme and SASS cache in a gear icon in the corner of admin dashboard.

>:D UX Sin 2:
Putting the clear modification cache in a separate area, operating aside from the install/uninstall mechanism as a manual button click.

>:D UX Sin 3:
Not listening to your users for the past 5+ years asking for a concise area to clear caches.

Seriously, what is hard about a cache settings page that it didnt exist through 2.x and now 3.x? Why are cache settings scattered throughout the Admin or not there at all? Do all the OC devs not realize that a huge majority of support issues deal with caching in some way or another?

Make a page in admin for CACHING enable, settings, clears, refreshes, etc. Some examples of what everyone wants in an admin cache area, so everything and its setting is in one place:

- Image Thumb Cache
- Default Storage Cache
- Theme Cache
- SASS Cache
- Browser Cache (yes this exists).
- An EASY way to Ocmod in more settings to this page for other caches such as pagecaches, Cloudflare, etc. A few simple PHP comment targets strings would be great.

Boom.

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA

Post by webmedialdh » Wed Nov 08, 2017 3:12 pm

Make sure you refresh the developer settings from dashboard of your admin panel
http://prntscr.com/h7nb5f

Regards

Webx IT Solutions
Tel: +91 99154 09292, Skype: webmedialdh, Email: support@webxitsolutions.com
Image


User avatar
New member

Posts

Joined
Fri Apr 22, 2016 5:52 pm
Location - Ludhiana, Punjab

Post by sajithk123 » Wed Mar 21, 2018 5:23 pm

@webmedialdh Iit worked, Thanx

Newbie

Posts

Joined
Wed Mar 21, 2018 5:17 pm

Post by ohmashoes » Thu Apr 12, 2018 7:50 pm

Please help...nothing I do to the theme shows up;
1. I have installed extensions from the marketplace,
2. refresh modification and the blue gear in the dashboard.
3. I have installed op-sharp theme but I am not able to see in the theme editor or the in the settings.

Nothing I do shows up.

What am i doing wrong pls?
I upgraded from 1.5.4 to 3.0.2

Thanks

Newbie

Posts

Joined
Mon Jul 09, 2012 12:43 am

Post by straightlight » Thu Apr 12, 2018 7:54 pm

Ensure to follow those steps from the forum rules: viewtopic.php?f=176&p=718325#p717782 and viewtopic.php?f=176&p=718325#p718325

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by thinks » Tue May 15, 2018 9:55 pm

:) WOW THANKS josuito! I spent literally HOURS making changes in twig files, css file- yet nothing changed. URGH. Brain-draining time. All I wanted to do was to change the background colour of the navbar. AAAAND- using your tip of clearing the cache, WORKED!! WHOO!

Which leads on to the question- WHY have we not got more documentation on this??? I must admit I'm struggling with twig. I much preferred the html/css/templates etc way of doing things- all straightforward, easily located... when I DO have TIME, I'll have to brush up on twig. Anyone have any easy to understand and useful references to twig docs, please??

Newbie

Posts

Joined
Sat Jul 07, 2012 9:28 pm

Post by sw!tch » Wed May 16, 2018 2:02 am

thinks wrote:
Tue May 15, 2018 9:55 pm
Which leads on to the question- WHY have we not got more documentation on this??? I must admit I'm struggling with twig. I much preferred the html/css/templates etc way of doing things- all straightforward, easily located... when I DO have TIME, I'll have to brush up on twig. Anyone have any easy to understand and useful references to twig docs, please??
You can google twig cheat sheets some of these are super useful if new to it.

Backup and learn how to recover before you make any changes!
Full Stack Web Developer :: Contact via PM for custom work.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by Daniel » Fri Sep 28, 2018 7:16 pm

the system now grabs the modified files first. but still requires clearing the old template if already saved.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by glolar » Tue Jan 01, 2019 5:28 pm

Ok,

I've read everything I can find on this problem where twig file changes are not saved.

1. I've done all my editing in the Admin panel's Theme Editor.
2. I've cleared my theme cache and module cache each time after making and saving my changes to the twig files.
3. Re-enter the Admin panel's Theme Editor, and my changes are GONE.

Can someone please shed some light on what I am doing wrong here?

OpenCart 3.0.2.0 default theme.

Thank you in advance!

User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by xxvirusxx » Tue Jan 01, 2019 6:02 pm

Edit twig files using a FTP client

viewtopic.php?t=206283

OC 2.3.0.2 | OC 3.0.3.6 | Extensions converted by me | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by oc2020 » Sat Jun 13, 2020 9:50 pm

xxvirusxx wrote:
Tue Jan 01, 2019 6:02 pm
Edit twig files using a FTP client

viewtopic.php?t=206283

I'm a little confused about this even after reading several threads in this forum. To my understanding, There are 2 ways of editing twig files:

A. Use any external editor to change the ". twig" files and upload to the site via FTP

B. Use theme editor from opencart admin panel to edit and save.

Both ways should just changing the file itself and reflect to the site layout without problems, but I noticed the first approach sometimes doesn't work even if I clear all the cache from the admin panel.

Anyone can explain this cache system better? Like how can I clear all the cache manually from a certain cache folder so I can immediately see my changes?

New member

Posts

Joined
Wed May 13, 2020 5:11 am

Post by xxvirusxx » Sat Jun 13, 2020 10:55 pm

oc2020 wrote:
Sat Jun 13, 2020 9:50 pm
A. Use any external editor to change the ". twig" files and upload to the site via FTP

B. Use theme editor from opencart admin panel to edit and save.
A. Refresh ocmod, Clear theme cache, SASS cache (or disable both)
B. Ignore

OC 2.3.0.2 | OC 3.0.3.6 | Extensions converted by me | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by oc2020 » Sun Jun 14, 2020 12:48 am

xxvirusxx wrote:
Sat Jun 13, 2020 10:55 pm
oc2020 wrote:
Sat Jun 13, 2020 9:50 pm
A. Use any external editor to change the ". twig" files and upload to the site via FTP

B. Use theme editor from opencart admin panel to edit and save.
A. Refresh ocmod, Clear theme cache, SASS cache (or disable both)
B. Ignore

As I said, your solution doesn't work.

New member

Posts

Joined
Wed May 13, 2020 5:11 am
Who is online

Users browsing this forum: Google [Bot] and 28 guests