Shahab Alam
Shahab Alam

Reputation: 51

OpenCart 3: system cache cleaning, ocmod and twig. I made changes in controller but its not reflecting

I want to change something related to product attributes in the product details page: /index.php?route=product/product&product_id=100

So I changed \catalog\controller\product\product.php file and saved it.

but it's not reflecting my changes even I removed the cache and refreshed the page but it's not working. Even I removed the whole code in the PHP file. But it's not reflecting my changes

Upvotes: 4

Views: 4855

Answers (2)

Igor Vasiliev
Igor Vasiliev

Reputation: 1716

Since you are here and your template is not updating, then the cache reset did not work for you. Indeed, this CMS has a problem with this. The only way in the "Dashboard" is to disable the cache in the templates, at the bottom, under the charts.

Then in the left side menu, open the "Design" tab, In the dropdown list, find "Theme Editor"

Disable cache

Disable cache

enter image description here

Choose your store theme

And click on the template to edit

enter image description here

Very important! Make changes to the twig file.

Click the "Save" button!

Next, go to the site - "Ctrl+Shift+R"

Your template has changed! :)

Upvotes: 0

focus.style
focus.style

Reputation: 6760

If you are using OpenCart 3 - it might be ocmod cache or twig cache.

To clear twig cache in your admin dashboard click on the gear button on top right corner, and then clear the Theme cache. enter image description here

To clear ocmod cache in admin panel go to Extensions - Modifications and click reload button in top right corner. enter image description here

Upvotes: 3

Related Questions