I have an old OpenCart set up but not the extension source files.
I need to copy all OpenCart extensions from my first installation to a new one.
Both OpenCart installations have the same version. The extensions include some vQmod scripts as well.
Open Cart installation has multiple extensions installed. We have to move them to another open cart store.
We do not have the zip files for extensions so we can not find out which files we have to move for each extension.
is there any way to identify the files for each extension or download them from the first opencart setup ?
admin(remove config.php)
catalog
download
image
system
vqmod
index.php
copy all files to your new opencart excpet the config.php and admin/config.php
which openCart version you are using???
Actually there is no way to find it automatically But there is a way manually but it took too much time
compare your exiting opencart version files with same version default opencart files(Remaining Files are your Extension Files )Here you can find defaul OpenCart versions Files, Download and compare with your relevant version
Secondly go into Admin side there in modification there you will find modification log there you can find where and to which files to some specify extent-on are effected For Example
`----------------------------------------------------------------
MOD: NitroPack
FILE: system/library/db.php
CODE: if (class_exists($class)) {
LINE: 37
FILE: system/engine/front.php
CODE: require_once(DIR_SYSTEM . 'journal2/startup.php');
LINE: 52
FILE: system/engine/router.php
CODE: require_once(DIR_SYSTEM . 'journal2/startup.php');
LINE: 52
FILE: system/library/image.php
CODE: public function save($file, $quality = 90) {
LINE: 117
CODE: if ($width_orig != $width || $height_orig != $height) {
LINE: 34
CODE: if ($width_orig != $width || $height_orig != $height) {
LINE: 34
FILE: system/library/document.php
CODE: return $this->styles;
LINE: 125
CODE: return $this->scripts[$postion];
LINE: 153
----------------------------------------------------------------`
This is the log for my installed Extension (module NitroPAck) here you can see that every trace and modification is described
Related
I would like to use a custom font in my shiny app (on plots) on shinyapps.io. I have my Roboto-Regular.ttf in the ./www/ directory. And this is the upper portion of my app.R file:
dir.create('~/.fonts')
system("chmod +x ./www/Roboto-Regular.ttf")
system("cp ./www/Roboto-Regular.ttf ~/.fonts/")
system('fc-cache -f -v ~/.fonts/')
system('fc-match Roboto')
library(ggplot2)
library(shiny)
library(shinythemes)
library(extrafont)
font_import(pattern="Roboto",prompt=FALSE)
loadfonts()
print(fonts())
Upon deploying the app, I end up with an error that looks like this:
Registering fonts with R
Scanning ttf files in /usr/share/fonts/, ~/.fonts/ ...
Extracting .afm files from .ttf files...
/home/shiny/.fonts/Roboto-Regular.ttfWarning in gzfile(dest, "w") :
cannot open compressed file '/opt/R/3.5.1/lib/R/library/extrafontdb/metrics/Roboto-Regular.afm.gz', probable reason 'Permission denied'
Error in value[[3L]](cond) : cannot open the connection
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
Does anyone see what might be wrong?
After a bit of struggle I found an even simpler solution that works on shinyapps.io:
Here we go:
Place custom font in www directory: e.g. IndieFlower.ttf from here
Follow the steps from here
This leads to the following upper part of the app.R file:
dir.create('~/.fonts')
file.copy("www/IndieFlower.ttf", "~/.fonts")
system('fc-cache -f ~/.fonts')
Since Linux looks into the .fonts directory to search fonts, you don't need the extrafont package, but you can directly use those fonts like:
ggplot(mapping=aes(x=seq(1,10,.1), y=seq(1,10,.1))) +
geom_line(position="jitter", color="red", size=2) + theme_bw() +
theme(text=element_text(size = 16, family = "IndieFlower"))
This is the answer I received from RStudio regarding this. I haven't tested this out myself.
Hi,
Our developer was able to advise this is due to a possibly unfortunate design choice made when they created extrafont and the associated extrafontdb package. The extrafont font database is stored in the extrafontdb package directory -- that's essentially all that the extrafontdb package is used for.
This means that the extrafontdb directory needs to be user-writable. If the user installs the package, this will work fine, but if root installs the package (as is the case on shinyapps.io), then it won't work.
One potential workaround is to install the extrafontdb package to library that is in subdirectory of the app.
To do it: create an r-lib/ subdir, and download the extrafontdb source package there:
dir.create('r-lib')
download.file('https://cran.r-project.org/src/contrib/extrafontdb_1.0.tar.gz','r-lib/extrafontdb_1.0.tar.gz')
When deployed, the app will include this r-lib/ subdirectory and the extrafontdb source package.
Then, at the top of the app, install the extrafontdb package from the source package, into the r-lib directory.
.libPaths(c('r-lib', .libPaths()))
install.packages('r-lib/extrafontdb_1.0.tar.gz',type = 'source',repos = NULL)
They deployed an app on shinyapps.io that does the extrafontdb installation, and it works fine. The libpath is set so so that install.packages() will install from the provided source package to the r-lib/ subdirectory of the app.
Please let us know if you're able to implement the above or have any additional questions.
Thanks,
Adding an alternative answer to symbolrush's answer which I found did not work. Here was the code I used initially:
# Add fonts to shiny linux server
if (Sys.info()[['sysname']] == 'Linux') {
dir.create('~/.fonts')
fonts = c(
"www/IBMPlexSans-Regular.ttf",
"www/IBMPlexSans-Bold.ttf",
"www/IBMPlexSans-Medium.ttf"
)
file.copy(fonts, "~/.fonts")
system('fc-cache -f ~/.fonts')
}
# Load fonts and set theme
font_paths("fonts")
font_add("IBMPlexSans", regular = "IBMPlexSans-Regular.ttf")
font_add("IBMPlexSans-Bold", regular = "IBMPlexSans-Bold.ttf")
font_add("IBMPlexSans-Medium", regular = "IBMPlexSans-Medium.ttf")
showtext_auto()
The bizarre thing is that the first instance of the app on shinyapps.io worked, including the custom fonts. However when the app went to sleep and was opened a second time, I get this error in the log:
Error in value[[3L]](cond) : font file not found for 'regular' type
I was never able to debug why this was the case, but I tried a simpler solution that has worked perfectly so far. I moved my fonts to a /font folder in the app folder (I don't think using the /www folder is necessary) and added the /font folder using path_folder():
library(showtext)
# Load fonts and set theme
font_paths("fonts")
font_add("IBMPlexSans", regular = "IBMPlexSans-Regular.ttf")
font_add("IBMPlexSans-Bold", regular = "IBMPlexSans-Bold.ttf")
font_add("IBMPlexSans-Medium", regular = "IBMPlexSans-Medium.ttf")
showtext_auto()
I hope this helps anyone who is having problems with their app not running after the first instance, as I could not find the same situation anywhere on stackoverflow.
I have taken a copy of an OpenCart installation (version 2.0.3.1) and put on to Windows localhost.
I've fixed a couple of the issues, but I've now come up against an error that I can't resolve:
Fatal error: Class 'Config' not found in ..\index.php on line 31
I've searched Google, but no-one else seems to have come across the same problem.
Can someone tell me where this class resides?
The relevant lines in the index.php file are:
CODE:
23 // Registry
24 $registry = new Registry();
25
26 // Loader
27 $loader = new Loader($registry);
28 $registry->set('load', $loader);
29
30 // Config
31 $config = new Config(); // HERE
32 $registry->set('config', $config);
I got this error - but it was due to me adding config.php to my .gitignore file.
I only wanted to ignore my settings files but this caused the config.php class file to also be ignored from the /system/library folder (same name!)
just make sure that config.php exists in the library folder - but make sure it contains config class - not your oc settings!
I faced the same issue while integrating it on the local machine. Follow these steps, it might help:-
Download the opencart package of version 2.0.3.1 from the website or download from this link: https://www.opencart.com/index.php?route=download/download/success&download_id=41
Open the downloaded folder and navigate to System/library folder.
Copy config.php file from there and paste in your project location in the same folder System/library.
It will ask to replace the file, do that and it should solve the problem.
Also, make sure you have written something like this on top of index file or not require_once('config.php');
I hope this helps.
I am using Opencart 1.5.6.1 and VQMOD 2.4.1. I have just installed eWay Rapid 3.0 extension and in the checkout, I get this error:
Notice: Error: Could not load controller payment/eway!
in (.....)\vqmod\vqcache\vq2-system_engine_controller.php on line 47
Line 47 is trigger_error('Error: Could not load controller ' . $child . '!');
I'm not sure if this is something to do with VQMOD or eWay extension. Does anyone have any idea how to resolve this?
Steps to try:
Check whether you've a file named eway.php in catalog/controller/payment folder.
Verify the class name of that file: class ControllerPaymentEway extends Controller {.
Check the file permission.
Have a nice day!!
Just got a solution to this, see here.
Described solution:
New function hasAction in system/engine/controller.php missing global $vqmod;
Edit vqmod/xml/vqmod_opencart.xml
For <file name="system/engine/controller.php">
Change:
<search position="before" index="1"><![CDATA[$vqmod->modCheck($action->getFile()]]></search>
Into
<search position="before"><![CDATA[if (file_exists($vqmod->modCheck($action->getFile()))) {]]></search>
I had the same error as you on 1.5.6 and VQMOD 2.4.
The error appeared because I had previously installed an older version of the official eWay module.
This old version of the module left over a folder in catalog\controller\payment\eWay folder.
Delete this eway subfolder as the only eWay file here should be catalog\controller\payment\eway.php
It seems that the controller function gets confused and tried to load the folder instead of the sway.php file.
This fixed the problem for me using eWay Rapid 3.1 Transparent Direct Version.
Best of Luck!
Oliver
I am beginning a project on Python that implements PyAIML and I wrote the following code to create a brain for my project:
import aiml
k=aiml.Kernel()
k.learn("std-startup.xml")
k.respond("LOAD AIML B")
k.saveBrain("jarvis.brn")
When I run the program I get this error: WARNING: No match found for input: LOAD AIML B
I understand that I needed to download an AIML set to begin development. So I did, but I'm stuck there.
Please help. I'm a noob programmer so don't be rough on me for this dumb mistake.
Thanks in advance!
The .learn() method will not throw an error if the file you pass it does not exist, and I'm guessing that you are trying to learn patterns from "std-startup.xml" without having this file in your directory.
Make sure the file std-startup.xml is in the directory you are running your script from. You should also have a directory called standard in your working directory that contains the standard set of aiml files. Basically your directory should look like this:
mydir/my_script.py
mydir/std-startup.xml
mydir/standard/a-bunch-of-std-aiml-files.aiml
These files can be found in the "Other Files/Standard AIML Set/" folder on the pyaiml source forge site. Go to that folder and download the one of the tarballs or the zip.
A few things:
If your AIML is loading properly, pyAIML will respond with a line that will read something like:
Loading std-startup.aiml... done (1.00 seconds)
It will not necessarily throw an error if it does not find a file to load, so if you don't see this line, pyAIML has not loaded the AIML file.
I don't see 'std-startup.xml' in the sourceforge directory either, but this shouldn't matter. All that you're loading is any AIML file that will allow you to test the kernel. Try loading the 'self-test.aiml' file in the /aiml directory instead. (Double-check to make sure the file suffix in your code is .aiml and not .xml)
k.respond() is for giving the bot some input and 'LOAD AIML B' is just a test phrase. Once you've loaded 'self-test.aiml' try k.respond('test date') and you should get
The date is Wed Mar 13 01:37:07 2013 in response.
How can I handle 3rd party dependencies in a .jad file? Is it possible to bundle a .jar? Do you need to unpack it and include the .class files?
See approach of working with kXML2 open source library:
for release you have to preverify it & build proj with ant:
Ahmad Ferdous Bin Alam - How to Import kxml jar File to Your Project
Slashdev - BlackBerry Development with Ant & Eclipse
UPDATE:Tutorial: How To Use 3rd Party Libraries in your Applications
for debug you have to add kXML sources and org.xmlpull.v1 sources to your BB project
JAR files can NOT be combined with COD files. You first need to convert these JAR files to COD files (and you should sign them as well). If additional JAR files are supposed to be used as library COD files you need to use the -library switch instead of -midlet for the rapc.exe compiler.
Once you got your COD files you need to refer in your JAD file to all of the COD files including file sizes. The COD file might look like:
Manifest-Version: 1.0
MIDlet-Data-Size: 2048
MIDlet-Version: 1.4.1
MIDlet-Jar-Size: 136999
MIDlet-Icon: /icons/myprogram.png
MicroEdition-Configuration: CLDC-1.1
MIDlet-Jar-URL: myprogram.jar
MIDlet-Name: myprogram
MIDlet-1: myprogram,/icons/myprogram.png,com.stackoverflow.myprogram
MicroEdition-Profile: MIDP-2.0
MIDlet-Vendor: My Company
Ant-Version: Apache Ant 1.6.5
Skylab-Build-Number: 2968:2970
Created-By: 1.5.0_01-b08 (Sun Microsystems Inc.)
RIM-COD-Module-Dependencies: net_rim_cldc,lib_1,lib_2,lib_3,lib_4,net_rim_locationapi
RIM-COD-URL: myprogram.cod
RIM-COD-Size: 77576
RIM-COD-URL-1: myprogram-1.cod
RIM-COD-Size-1: 29960
RIM-COD-URL-2: lib_1.cod
RIM-COD-Size-2: 28668
RIM-COD-URL-3: lib_2.cod
RIM-COD-Size-3: 8712
RIM-COD-URL-4: lib_3.cod
RIM-COD-Size-4: 18232
RIM-COD-URL-5: lib_4.cod
RIM-COD-Size-5: 12752
RIM-MIDlet-Flags-1: 0
RIM-MIDlet-Position-1: 0
RIM-COD-Module-Name: myprogram
RIM-MIDlet-NameResourceId-1: 0
RIM-COD-Creation-Time: 1143020761
RIM-COD-SHA1: 0b 9f b1 da 47 bc 6f 97 62 eb 32 66 77 ca a9 6f 24 4d 10 8a
Can't speak too much for J2ME generically but for BlackBerry you can turn compiled .jar files into .cod files (the BlackBerry binary file format - basically an optimized .jar) and include those along with your application .cod files. You will have to list the additional .cod files in the .jad.
This link from the BlackBerry knowledgebase should help.
If library is not a BlackBerry COD file but a plain MIDP 2.0 JAR file then what you have to do to bundle that with your application is to do the following using the Eclipse JDE plugin:
Right-click your project file and select: "Build Path" > "Configure Build Path...". This will open the Properties screen with "Java Build Path" option showing.
Click on the "Libraries" tab and click "Add JARs..." (or "Add External JARs...") and pick the JAR you want in the next dialog and "OK" it. You should see the JAR that you picked in the list.
Now, click on the "Order and Export" tab and check the checkbox next to the JAR that you added. This makes sure that the build step actually merges this JAR file into your applications output and creates a COD file that includes both.
The above method works for me but has two problems:
Everytime I change anything related to the "BlackBerry Project Properties" of the project (such as changing the Title or Version of the application), this setting reverts so I have to go through it again. This is a major inconvenience but the steps to follow are not that complicated.
You have to preverify the JAR files that you include as explained in the kXML2 link given in this answer. Failing to do so will result in random verification errors (random in the sense that I don't get them all the time).