How to install Magento 2.0 extension? - magento2

Can someone give me a step-by-step installation guide for extensions from zip files for Magento latest version?

Copy the extension file in your magento 2 Directory
(if not executable permission for magento CLI.. got to YOUR_INSTALLATION_DIR) (sudo ) chmod +x bin/magento
./bin/magento module:enable NAMESPACE_MODULENAME
./bin/magento magento setup:upgrade
Update after comment:
step 3: The NAMESPACE_MODULENAME means there should be this folder structure like app/code/NAMESPACE/MODULE/ inside your magento installation folder. Some extension don't have this but many files and folders like Model, Block... and a composer.json. If so
open composer.json and look on name at the top
"name": "TEST/MODULE"
....
if so you create dir like app/code/TEST/MODULE and copy content of zip file inside Module. This steps(3) simply enable the module, same as adding xml file in app/etc/modules/TEST_MODULE.xml in magento 1x.
Step 4. upgrade the database scheme of extension.

Magento Devdocs provide very detail instruction on how to set up extensions. (You can also filter through each version on top)
https://devdocs.magento.com/#/individual-contributors
I found this guy's Youtube video to be super helpful. Not to mention his cute accent. :)
Course from Magento U
Andy Myers
Hope this helps!

Related

How to install extensions in contao 4.4

I installed contao 4.4 in my localhost successfully.After successful installation I tried to install an extension via contao manager.Unfortunately it fails with console error.So I download zip file of extenson from codefog
and put it in the folder root/system/modules .But the extension is not found in backend.I think the extension is not installed successfully. How to make it works? Please help me.
This is how i install extensions in my contao 4 standard-edition. As commented, this only applies to the standard-edition, not the managed-edition. If you don't want to change to the standard-edition, you may better wait, until they fix the problem in the contao manager... Otherwise this is how it works:
Installing a Contao 4 bundle
Info: A bundle is the best thing you can find for extending contao.
It is the cleanest way of adding functionality to the contao cms.
Find the module on https://packagist.org/
Get the "require ..." command from under the title
Connect to your hosting (or if local, open cmd or terminal)
Change to the root of your hosting
Execute the require ... command for this extension
composer require madeyourday/contao-rocksolid-columns
Add the module to AppKernel (File: app/AppKernel.php)
In the "$bundles" array we can now add our bundle to the list of bundles, that contao should load: (the bundle name used in this line can be found in vendor/%developer%/%extension%/src/ and then there is a ...Bundle... php File there, that tells you the name of the bundle)
new MadeYourDay\RockSolidColumns\RockSolidColumnsBundle(),
Open the installtool of contao (contao/install) and update the database
Installing a Contao 4 extension
Info: A contao 4 extension is defined by it's developer, it is actually still the same method of programming like in 3.5 but someone has tested it in contao 4 and approved of its functionality. This is the second best thing you can find for extending contao.
Find the module on https://packagist.org/
Get the "require ..." command from under the title
Connect to your hosting (or if local, open cmd or terminal)
Change to the root of your hosting
Execute the require command for this extension
composer require heimrichhannot/dlh_googlemaps
Add the module to AppKernel (File: app/AppKernel.php)
In the "$bundles" array we can now add our extension to the list of extensions, that contao should load:
new ContaoModuleBundle('dlh_googlemaps', $this->getRootDir()),
Open the installtool of contao (contao/install) and update the database
Installing a Contao 3.5 extension
Info: A contao 3.5 extension is your last hope, it is the same code as in contao 3.5 may or may not work - you have to test it yourself.
Find the module on github (or some other repo)
Conntect to your hosting with ssh (or if local, just open cmd or terminal)
Change into "system/modules"
Download the repo (e.g. git clone https://github.com/ContaoBlackForest/contao-system-notification system-notification) - notice the added "system-notification" at the end, that should be the foldername, in which the extions has to be (you can find the folder in the composer.json file inside the extension under "Resources/contao")
Create syslinks (bin/console contao:symlinks)
Add the module to AppKernel (File: app/AppKernel.php)
This line should be added once, just after "use Symfony\Component\HttpKernel\Kernel;" (this only has to be added once and only if you are using contao 3.5 extensions)
use Contao\CoreBundle\HttpKernel\Bundle\ContaoModuleBundle;
In the "$bundles" array we can now add our extension to the list of extensions, that contao should load:
new ContaoModuleBundle('system-notification', $this->getRootDir()),
Open the installtool of contao (contao/install) and update the database
Your Question
To awnser your question, as the module you want to install, is a contao 4 extension, you could use the according instructions from above.
contao 4 extension - https://packagist.org/packages/codefog/contao-news_categories
You do not need to install this extension manually. Simply run
composer require codefog/contao-news_categories
in the root folder of your Contao installation. Depending on how you installed composer the command might be different.

How can I add a composer.json to a static TYPO3 project?

I am using a working TYPO3 7.6.14 environment with many extensions. Now I want to add a composer.json file manually. I do not want to create a new project which will download the latest TYPO3 core and TYPO3 extensions. I am afraid that this could accidently overwrite some extension's PHP files.
I need a safe way to add a composer.json file which will not change the present TYPO3 PHP files automatically. I prefer to download TYPO3 and the extensions manually. Therefore I do not want to use the composer mode. I must find a way to prevent composer from overwriting my self written PHP files.
I need a composer.json file because I want to add the external TCPDF library which is on its own place on the file system and not inside of a vendor folder inside of TYPO3. And the file ext_autoload.php is not supported any more by TYPO3 7.6.
I have read the https://usetypo3.com/typo3-and-composer.html#c51 recommendations. But it only shows the way how to create a new TYPO3 project using the command line and the composer command. Is it also possible to download a composer.json file into a TYPO3 folder (which?) in order to tell the autoloader where it will find the external TCPDF library?
I have unzipped the TCPDF file under /var/www/html/TCPDF-master/tcpdf.php . I want to use TCPDF, TYPO3 and its extensions unchanged and never updated by any composer command.
Introducing Composer for not using it's features seems a bit strange to me, but yes, it's possible to define a dedicated version or commit-hash in a repository to disable updates.
However, I would recommend to make use of the tilde ~ operator to enable updates on the accordant branch, to e.g. include security updates automatically. For TYPO3 CMS this dependency would look like the following, to stay on the 7.6 branch:
"require": {
"typo3/cms": "~7.6.14"
}
Find further details on how to declare versions in the Composer documentation.
Besides that, it seems, that you're not using Composer at all for the root project. You could then create a wrapper extension for TCPDF with one of these options:
use Composer for that extension to require TCPDF and load the generated autoload file (e.g. in typo3conf/ext/tcpdf/vendor/autoload.php) in your wrapper extension
directly copy & paste TCPDF's source (which seems to be the scenario you're up to) and add the autoloading information to ext_emconf.php, which is similar to previous ext_autoload.php - find details about that in a blog post about class loading

moodle plugin installing issue?

I am unable to install the following question types with my moodle
1. Drag and drop into text (qtype_ddwtos)
2. Drag and drop matching (qtype_ddmatch)
I am using I am using Moodle 2.5.4 (Build: 20140113), php 5.4.7, MySQL 5.5.27, Apache 2.4.3, XAMPP server version 1.8.1
I have downloaded the plugins and unzip it then placed in the moodle->question->type. After that if I click the notifications link it is showing only blank page. Please advise me how to go further and how to resolve this issue and make use of those plugins.
the idea is to give the 755 permission to the "ddmatch" and "ddwtos" folders.
1- copy the two folder to moodle->question->type (as you did)
2- cd to this this directory:
cd /opt/lampp/htdocs/moodle/question/type
3- and change the permission of the two folder:
sudo chmod -R 755 ddwtos ddmatch
it worked for me !
I just checked out 2.5.4 and downloaded the plugins you mentioned - making sure they were both 2.5 versions - and extracted them into /question/type
https://moodle.org/plugins/view.php?plugin=qtype_ddmatch
https://moodle.org/plugins/view.php?plugin=qtype_ddwtos
Then went to notifications, they both require other plugins
qtype_match doesn't exist unfortunately
https://moodle.org/plugins/view.php?plugin=qtype_match
However gapselect does, so I downloaded that one too
https://moodle.org/plugins/view.php?plugin=qtype_gapselect
Then ran the upgrade and no errors were shown.
Is this on linux? Its possible that the extracted files haven't got the correct permissions - check the ownership of the folders : http://docs.moodle.org/25/en/Security_recommendations#Running_Moodle_on_a_dedicated_server
I would also double check that the files have been unzipped into the correct folder - so you should have /question/type/ddmatch, /question/type/ddwtos and /question/type/gapselect
If all that is okay then, like davosmith says, if you can switch on debugging and paste the error here. If you can't get into the system then edit /config.php and add these 2 lines after $CFG = new stdClass();
$CFG->debug = 32767;
$CFG->debugdisplay = 1;
Then try going to notifications again and see what the error is /admin/index.php

upgrade magento to latest version

I am currently using Magento community edition, version 1.7.0.0, and as recommended by Magento due to a major security loophole fix, I want to upgrade my application to use latest version, 1.7.0.2.
What is the best way to upgrade magento version?
I know there are ways like command-line upgrade and using Magento Connect Manager, but not sure which and how to use.
thanks
The easiest way is to go to the Magento Connect Manager and press the Check for Upgrades Button.
Then you can see updates for all versions.
If you want to Update all packages then take Mage_All_Latest
I think when you are in the same Major release the update should work without any problems.
If you get some trouble with dependencies. You can do an upgrade with your console:
./mage upgrade-all --force
After using force you should check all your functions.
Follow the below steps:
Download the latest magento version(say 1.9) from http://www.magentocommerce.com/download
Backup every thing
Now remove all files and folder from your site code(mine say 1.7) and put in a new folder say ‘x’ folder.Put maintenance flag and place all magento files from latest magento download folder.
Now from magento 1.7( ‘x’ folder) merge the following custom folders into 1.9
app/code/local
app/code/community
Media
Your theme or package (app/design/frontend/default/<your theme> or app/design/frontend/<your package>)
Folders from Skin (both for adminhtml and frontend).
Copy app/etc/modules/ to current app/etc/modules/ from ‘x’ folder
Custom admin theme folder from adminhtml/default/yourtheme.
copy your custom folders from adminhtml/default/default/ (‘x’ folder) to adminhtml/default/default/ (1.9).
Custom js files from app/js/. from ‘x’ folder
Now go to app/etc/local.xml of 1.9 and put your database and password details
Remove maintenance.flag file and run your site on browser, and you are done

Zf Tool cannot find Zend Framework

Just started working with the Zend Framework Zf Tool and I've already come across a problem I've spent hours trying to figure out.
For some reason when I run the Zf show version command I get a ZF ERROR indicating it cant find the Zend Framework a to add it to my php.ini include_directory.
Here is my setup. I'm currently have WAMP installed on my local machine.
c:\wamp
I copied the zf.bat and zf.php files into the servers php directory. The path to the php directory has been added to the path environment variable. I'm pretty sure it works because I run the zf show version command in the console and get a ZF ERROR.
I keep my copy of the Zend Framework inside
c:\wamp\includes
So I added this to the php.ini include_path. include_path = ".;c:\wamp\includes"
I checked that this setting was set correctly by checking phpinfo() function. Which shows
include_path .;c:\wamp\includes .;c:\wamp\includes
So I think I have everything setup correctly. I can't work out what I'm missing.
I also tried setting the ZEND_TOOL_INCLUDE_PATH with no success.
Any help would be appreciated. PS I did check other posts here but none of the suggested
I have worked it out! Finally. The way I have my local wamp setup there is 2 php.ini files I have to edit.
The one that made the different is the php.ini inside the Apache2 directory.
Thanks everyone for their help. I appreciate it.
Well im not sure how you downloaded installed the framework but my guess is that you dont have enough of you include path based on the way Zend release packages are constructed. The Zend folder contained in the Zend Framework installation needs its parent folder to be on the include path so typically you would add something like:
c:\wamp\includes\ZF_BASE_DIR\library
This is because the zf package structure looks like:
ZendFramework-VERSION/
README.txt
INSTALL.txt
LICENSE.txt
bin/
library/
If you extracted ZF from the archive you will get a Zend-some_version folder, but the actual ZF is in
"include_path\Zend-some_version\library\Zend", so your include path should point include_path\Zend-some_version\library\
Just to add to what Tjorriemorrie said and to explain in detail how I got my installation on win 7 to work as simply as possible:
Download your preferred Zend package from "http://framework.zend.com/downloads/latest" to "C:\wamp\www\"
unzip your zip file so that you have the extracted Zend folder (with version name) under "C:\wamp\www\".
Rename your folder by removing the version so that you end up with "C:\wamp\www\ZendFramework"
Run a simple php file with phpinfo() in your browser. Note the entries for: "_SERVER["PATH"]" under PHP Variables
"Path" under Environment
"Loaded Configuration File" at the top
"include_path" under Core and
"extension_dir" under Core as well.
"_SERVER["PATH"]" and "Path" must be identical (no brainer)
There should be only one listing for your apache server and that should be the listing under "Loaded Configuration File" but without the "php.ini". So, if your "Loaded Configuration File" is "C:\wamp\bin\apache\apache2.2.22\bin\php.ini" you must have "C:\wamp\bin\apache\apache2.2.22\bin" in your path and that must be the ONLY reference to an apache server. If you have multiple references to apache servers Windows may pick the wrong one depending on your PATH order and use the wrong php.ini file.
Your "extension_dir" will tell you the version and location of php you are using. It is common to have different php folders lying around such as "C:\php", "C:\wamp\bin\php\php5.4.3", "C:\wamp\bin\php\php5.3....", etc. The extension directory will tell you which one of these php folders ZF will "reference" when it is looking for its library. For example, if your extension directory says "c:/wamp/bin/php/php5.4.3/ext/", you want to focus on "c:/wamp/bin/php/php5.4.3"
Go back to your PATH and a) add the string for this php version and b) remove all the other references to the other php folders
Now that you know your running and primary php and apache folders, shutdown (do not restart), shut down your computer and boot back up (restart does not always let the PATH completely reset.
Go to BOTH php.ini files at a) "C:\wamp\bin\apache\apache2.x.y\bin" and "C:\wamp\bin\php\php5.4.3" and find the include_path variable for Windows
Replace the default line, which looks like:
;include_path = ".;c:\php\includes;"
with
include_path = ".;c:\php\includes;C:\wamp\www\ZendFramework\library"
ON BOTH FILES just as Tjorriemorrie notes.
Restart All Services by clicking the wamp icon and selecting said option
At this point my zf tool was working. But, just to be safe, shut down and bootup
Smile and grab a beer!