OpenCart .twig file not showing changes - php

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.

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.

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.

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.

Related

Magento CSS cannot be updated

I'm Trying to replace my style files with new files that have been implemented on another machine, but nothing changed
I Flushed all caches (images and CSS) , Disabled Mergeing CSS Files and run the compilation
Without knowing what files you have overridden and your current theme design this will be hard do debug, but one this I can suggest doing is to disable all caches, disable merging and disable compilation. This should help you to see if you are changing the correct files. If after this step your changes are not being made then you are changing the wrong files.
After that what you can look at doing is simply updating the file you think should be called and adding some weird css like adding a green border around everything, but obviously this is not great on a live site so you could but in place a maintenance page to all up your own ip.

Wordpress Admin doesn't load css files and images

I'm having a serious problem. I have wordpress 3.9 installed on my server. the problem is that my website front end loads good, but my back end just loads text :
I have updated/reinstalled wordpress but nothing has happend. What should I do?
Thanks for help.
I'm 100% sure that if you simply do the following, you'll figure out what's wrong and fix it.
Deactivate all plugins without use of your WP-Admin.
Activate them, 2 or 3 at a time, and determine which plugin is the culprit
If none of these plugins are the culprit, go to the WordPress site and download WordPress. With an FTP utility such as FileZilla or another client if you already have one, then upload the entire wp-admin folder to your server, overwriting older files.
Your WordPress admin will be fine after these steps. And of course, never alter any core WordPress files -- ever. The only files you should ever tinker with are files in your child theme, which is something you should be using.
Would be great to have a bit more information about this topic. First of all: Is this a new problem respectively did the admin run without errors before? (3.9 sounds like the page is not a new clean install).
Usually I would start debugging the page via e.g. firebug => Check the Stats of the CSS-Files.
If they load correctly (200) check if they are empty or incomplete (Incompleteness can be checked via diff against the original file ... most IDEs will handle that for you)! If they aren't you have probably just diabled CSS in your browser for the URL of the admin-panel.
If they don't load, try to check why! If the files exist its most probably an error in your .htaccess (wrong rewrite, blocked directory, etc.).

Not able to edit contents in magento from backend after a installing modules

I have site build in Magento 1.7
I have installed a new shipping module Bpost through magento connect. When I installed that, it raised the error that, it is already existing plugin. After that when I accessed the site, the maintenance flag was active.
When I removed the maintenance flag and checked the site, everything seems to be working fine in the front-end. But I am not able to add or edit contents from the back-end. Click is not detecting in the existing lists of contents and when I click on add new (for cms block, page etc) the new section appears, but no action is performed while clicking save.
Why is this happening ? How can I resolve this issue ?
I recreated the site with my backup files to a new location. After that removed all the existing plugins and installed all the plugins. At that time all seems to be working fine. After that I have edited the header.phtml file and added some additional script.
The script was for getting contents and displaying it using script. After that when I run the site and went to backend everything again went to non editable mode. Now I am not able to click or edit any cms contents in the site of static blocks, products etc.
Why is this happening ? How can I resolve this issue ?
In my opinion, the problem comes from a javascript with an error that blocks the rest of the javascript. All buttons use javascript to fire events. With firebug or something similar, check which error is raised in the admin javascript and try to fix it. Using the solution that Niraj Jani gave about disabling module is a good way to check if it is really the module that blocks the javascript. If the problem is linked with prototype, it can come from the definition of blocks in php, the design template or layout...
Have you tried after claering cache?
Take Look at below link and its answer,
In Magento after installing extension Admin panel in unable to load
Delete (or move to another folder) files in /var/www/var/cache
Delete (or move to another folder) files in /tmp
From a shell, run
/var/www/shell$ php indexer.php --reindexall
You've just manually cleared your caches and re indexed your data. See if your system comes back to life.

Cannot overwrite Wordpress file via FTP

I'm currently working on a wordpress website, of which I'm trying to overwrite content-extensions.php with a new version. On uploading this it appears to work, the file transfer is successful. However, there is no change in the browser even after refreshing and clearing the cache. I've also ensured that there are no plugin's caching within wordpress, and file permissions are what they should be within FileZilla.
Here's the odd bit.
If I go into theme editor, and locate content-extensions.php I can see the changes that I've made in the source code. For whatever reason they're just not appearing in the browser.
I'd be really grateful if someone could point me in the right direction for this one, as I haven't a pickle.
Many thanks.
Are you working with an extension or with a theme based function?
If it's an extension, remember to activate it, i often forget that, i upload code, see it in the extension manager but forget to activate it.
If it's in the theme, are you sure you are using the right theme and not the basic one?
I know this doesn't shed any light on why it's actually happening but I've had that before and just deleted the file and uploaded the new one rather than trying to overwrite it.

Magento file changes not taking effect and flushing cache

I'm copying a Magento Enterprise 1.11.2.0 core file called Preview.php into the local folder with same directory structure to override this particular file because it is not functioning properly. More specifically, it is not allowing the transactional emails to be previewed. I made changes for a fix in the .php file that goes in the local folder, but Magento doesn't seem to think there are any changes. I even tried modifying the core file itself to additional garbage strings appended to the returned variable, but that didn't register either.
Now, as I understand it, I need to flush the cache, but I don't think I'm doing this properly for these changes to take effect. In the Cache Management section, I've tried "Flush Magento Cache," but I have not tried "Flush Cache Storage" because I was told not to touch that from the person who set up our installation. What are the differences? Could flushing the cache storage make the overriding preview.php kick into action?
ADD:
The directory structure is correct. As I mentioned, some files (while others take effect just fine) changes is not recognized by Magento installation for some reason.. One of our guys thinks maybe it's one of the extensions we're using that is overriding some portions, but I really don't see anything that's overriding the core app files or images in the skin folder.
For example, if I delete "logo_email.gif" in the theme folder we're using, it should fall back to the default Magento logo image. Instead, the Magento instanace thinks the file is still there and even loads it! I'm forced to create our own logo file called logo_email.png and load this file in the email templates, because deleting or overwriting this file doesn't work.
I've submitted a support ticket to Magento.. I will update if I make any progress.
I believe the culprit was the Magento compilation feature, under System -> Tools. Disabling this allows for the code changes to take effect!

Categories