Difference between Modification Controllers and Catalog Controllers - opencart

I am confused that what is the difference between controllers modifications in the storage directory and the catalog directory.
Editions in extensions don't affect pages in catalog controllers.
Can you enlight me?

When you see a core file in storage/modification folder, it means that you have an OCMod file that needs to edit that core file. for example:
Core File (OpenCart original file):
catalog/controller/product/product.php
Modification File (copy of original file with some edits altered by OCMod):
storage/modification/catalog/controller/product/product.php
Go to admin panel / Extensions / Modifications, you should see a list of installed OCMod files. also you can see a Refresh button on top of this page, if you hit this button all files in storage/modification folder will be deleted And if necessary, it will be rebuilt.
Read more about modification system:
https://github.com/opencart/opencart/wiki/Modification-System

Related

Opencart extension not creating files

I have a custom Opencart shipping extension. It has upload/ and install.xml. When I upload extension.ocmod.zip through extension installer, it completes installation. But the extension is not visible under Extensions > Shipping.
I checked the code and none of the files from the extension is present under upload/admin/controller/extension/shipping.
I have refreshed modifications and cache from the dashboard.
Make sure that your file extension.ocmod.zip contains:
the upload folder and install.xml file directly
and there is not another subdirectory contains them
Without knowing the OC version you're using, my guess is that your path structure should be:
install.xml
upload/admin/view/extension/shipping/*
upload/admin/model/extension/shipping/*
upload/admin/controller/extension/shipping/*
upload/admin/language/en-gb/extension/shipping/*
upload/catalog/view/theme/default/extension/shipping/*
upload/catalog/model/extension/shipping/*
upload/catalog/controller/extension/shipping/*
upload/catalog/language/en-gb/extension/shipping/*

JUCE image buttons without embedding files

Is there anyway to just include a file from a relative path using JUCE? Between graphics, up and down button states, I have about 40 images and trying to create them through the ProJucer causes thousands of lines (over 20,00 in this particular situation) to be generated and embedded in my GUI component. This is causing huge performance issues in Xcode for me. Is it possible to just include the files via relative path and save all that embedded code? The .cpp is so large even GitHub says they are too large to display. Any help is greatly appreciated.
To use embedded images in your project, but not have them taking up space inside each component's .cpp file as generated by the Projucer, do this instead:
Add the image files to the Projucer project itself.
When you save the Projucer project, the image data will be added to your project's BinaryData.h/cpp file that's located in the JuceLibraryCode directory.
When you want to create the ImageButton, instead of selecting 'create a new image resource' (which would put the binary data into your component's source directly), select the BinaryData resource that you created above:

Zurb foundation 6 , what-input.min.js file functionality

Id like to know the relevance of what-input.min.js include in Zurbs foundation-6 framework , in the js/vendor directory , this is because i keep getting an 404 not found error not loading while running the site , ... js/vendor/jquery.min.map file , is there any connection ?
You don't need the .map file which is used to map a minified file back to the original. It is available for download from jquery's site. Source maps are can be ignored in inspector settings which makes sense when you don't plan on debugging minified javascript files
It is unrelated to the source map file 404 but what-input.min.js is a JS library "to watch for mouse, keyboard and touch events"
They have a github page with more documentation: https://github.com/ten1seven/what-input
and a demo:
https://ten1seven.github.io/what-input/
"Tab, click or tap the links and form controls to see how What Input allows them to be styled differently"
I had this exact same problem on every site when using JointsWP with Foundation 6 framework. I finally just figured it out. I turned off css source mapping and still received the error. It turns out that it wasn't lying to me and the js file really does not exist where it is trying to load it from:
/vendor/what-input/what-input.min.js
But it is under the dist folder within that same directory. So if you find your enqueue-scripts.php file where the what-input.min.js is loaded, you can fix the directory path to:
/vendor/what-input/dist/what-input.min.js
And no more 404!

Uploading files with an ImageField and saving them to a static location

I have a problem with my app here. My configuration is as such I can upload a new release and symbolically link it for production -- however, this means every time I upload a new release, all of the photos that were uploaded in any parts of my entire project are wrapped into the old release and disappear.
How can I save these files to a static file location which does not get wrapped in the release? Thanks in advance.
I guess best for this is keeping your media files out of your source project folder, you could eg have a structure like:
myproject
|
|----media
|----src
There's no need to have the media folder in the same directory as your source code, apps etc. So you have a solution where the dir with your release only contains static files! The same applies to the database, if you are using sqlite... Have a look at this for a more detailled structure!
Of course this no must, but experience shows it makes live much easier!

Excluding a single project file from an SVN repository

I have a django project that I have been working on as a solo developer, and have been using TortoiseSVN to keep the code managed in a repository on a work server. I work on this on a local installation of django etc.
There is now a second person who will be working on this project, and the possibility of working on some other PCs.
Now, there should, for the time being, only be one development version (branch?) of this project, but the configuration file (settings.py) will need to be different on each computer that is being used. I want to create one local version of this file on each PC which should not need to be changed again.
How can I set the repository (preferably within TortoiseSVN) to exclude this one file? E.g. the repository should not include settings.py. When a checkout occurs, it should update all files in the local folder but not change/remove the local copy of settings.py. When a commit occurs, settings.py should be ignored and not uploaded.
At the moment settings.py is overwritten/updated as per any other file in the project folder/repository.
Any nudges in the right direction would be useful - I'm new to SVN generally and would like to know if this is something that's going to need detailed understanding of branching or if there is a simpler way.
Thanks
In TortoiseSVN, when you try to commit your files, in the file list dialog, right click the file and look for the Ignore option. You can ignore by complete filename or extension.
If the file is already in the repository, and you want to remove it from there and ignore it, you can simply right-click the file and in the TortoiseSVN menu look for the 'Delete and add to ignore list' option.
You'll be looking for the svn:ignore property, which tells subversion to not version files matching a pattern or patterns you specify.
There's some guidance on using it with TortoiseSVN at:
http://arcware.net/tortoisesvn-global-ignore-pattern-vs-svn-ignore/
These should help:
I have a file in my project that every developer must change, but I don't want those local mods to ever be committed. How can I make 'svn commit' ignore the file?
Excluding Items from the Commit List
The typical solution is to do what bgever said and ignore the settings file itself, and then commit a file with example values, something like settings.py.example. That file should only be updated when you add or remove settings. When deploying, you'd copy that to settings.py and edit the values.