2

I've been trying to change the product/catalog.twig file, to remove some unnecessary buttons such as the "add to wishlist" and "compare product" options, which are just useless for the store I'm attempting to make.

On the theme editor, I've removed the two buttons from the .twig file, yet the changes aren't showing on the store. I've heard it might be an issue with caching, like it's bringing up the old site. So I deleted the cache from the storage folder, yet the problem still persists.

DigitCart
  • 2,980
  • 2
  • 18
  • 28
arsenalftw067
  • 241
  • 1
  • 4
  • 16

3 Answers3

5

In OpenCart 3.0.2.0 there is button with a gear icon in admin dashboard. It open up a modal that allow you to clear cache or disable cache.

enter image description here

DigitCart
  • 2,980
  • 2
  • 18
  • 28
  • 1
    In which situation, does not it work ? I added some code in head.twig files of default and custom template , but it does't seem. Button does not work in some situation as i see. – egemen Jul 26 '18 at 09:18
  • 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 – nodws Oct 15 '18 at 23:59
2

Sometimes, depending on the file you want to edit, you have to Rebuild The Modification Cache. Simply go to Extensions -> Modifications, and click the "Refresh" button at the top of the panel.

Dharman
  • 30,962
  • 25
  • 85
  • 135
jon
  • 121
  • 8
1

First of all, Its better to use the OC's builtin Theme Editor to make any change in any template file. In-case you want to change something directly using FTP Client or a file-manager, you must know the OpenCart Structure a little :-)

Anyway, bellow are the few things that can be helpful for anyone looking for the solution.

1) You have enabled the cashing, you can clean it as described by @DigitCart - Alternatively, you can clear all the files in following folder YOUR_STORAGE_DIRECTORY/cache/* (Don't remove the cache folder)

2) Probably you are trying to make change in a file that is modified previously by an Extension, You can find the modified files under YOUR_STORAGE_DIRECTORY/modification/* You can make a small extension and install it through Extensions > Installer to make changes in these files. OR, you can change these files directly via FTP, but its not recommended.

Muaaz Khalid
  • 2,199
  • 2
  • 28
  • 51