Way to load locally developed magento extension - magento

I am developing a magento extension. After getting help from stackoverflow, I am able to create a package extension which is stored in [magento]/var/connect folder. I noticed that package.xml, myextension.xml and myextension-1.0.0.0.1.tgz files are created therein.
I created another magento instance locally where I want to load that package and test. It's not possible to get my extension verified by magento team and then use it quickly or is it? I copied those package files under /var/connect of the test instance but I cannot see that appear in admin-> system -> magento connect -> package extensions.
Any idea how I can do that? All I need is he ability to let my customer have my zip files(package files), then they will upload somewhere. Any help would be appreciated.

You can upload packaged Magento extension by going to:
System > Magento Connect > Magento Connect Manager
then uploading the package under the Direct package file upload section.
Furthermore, if you decide not to package your extension, just copy the working file structure of your extension to it's own folder, and you can simply drop your extension files into the working root directory of compatibility Magento installs. Just be sure your extension file structures are correct. EX: app/code/local/MyNamespace/MyExtension etc.

Related

How to reuse custom module with all in one installation in magento 1.9

I created a custom module that represents a custom payment method, the steps I follow are;
1) Create a module architecture in /app/local/NameSpace/MyModule
2) Create an xml file in /etc/modules to configure my module
3) Create templates /design/frontend/base/default/template/mymodule
The module works well, but i want to reuse the module in other projects with all in one installation. now, i want to know if i must develop a script to copy the xml file in /etc/modules and templates manually? or there is an existing solution in magento 1.9 to do this operation?
Thanks in advance,
You want to create a Magento Connect package. There's a UI for doing this under the System Magento menu (although the UI is sort of terrible) and some googling around should set you right. Once you have a connect package, you can install it into any system via the /downloader UI (also available via the System menu) or the ./mage CLI command.
Also -- if you choose "Magento Other" as the role for all your files, your resulting tgz archive can simply get uncompressed/unarchived into any Magento system's root folder. Also of interest -- my script for creating Connect Packages from raw tar archives.

joomla-extracting a component as installable?

I am writing a joomla componenet but it has many folders and sql tables. I don't prefere to make the package manually. Is there any know extension to make me able to extract my component as a zip file to make it installable.
I'm so confused. Why would you need an extension to compile your component? By the sounds of thing, you have simply started editing a pre-made component.
You should have started with the folder and file stricture when you first started building the component.
Create 2 folders:
admin
site
Put all backend end related folder inside the admin folder, and all frontend related folders inside the site folder.
Then edit your XML file accordingly to it points to the correct folders
There is a third-party component: http://joomlatoys.com/index.php/toys/jtbuilder which can package the selected extensions and generate an installable archive for you.

How to create a folder withing a setup script of custom Magento module?

I am developing an extension, which can be installed by copying the extension folder into Magento folder. This extension includes a folder within Magento media folder, which should be writable by Magento. Since the folder can be copied with the rights different from the rights, which Magento runs on, I am looking for the way of creating this folder in the setup script.
It looks like a bad practice to me to run this code within the script for sql or entity setup. Is there any way in Magento to do such task in appropriate setup script or should I make the perfectionist in me shut up and simply put the code in the sql setup script?
if you want to create a folder for custom extension in magento use this code.
$customDir = Mage::getBaseDir('media').DS.'foldername';
$ioFile = new Varien_Io_File();
$ioFile->checkAndCreateFolder($customDir);
You can use Varien_Io_File::checkAndCreateFolder() to check and create directory not in setup script, but in the place of the actual usage of the folder.
I think it is not Magento-esque to create those folders in a setup script. It is more logical to just pack them with your extension and let the user put them in the correct place. Imho.
To make sure about the rights, you can test them in the code and produce an error message if incorrect, and make sure you mention it in the manual to the user.

Edit and package DNN module without solution file

I've recently been given a DotNetNuke module to edit and publish back to the website. However the module folder that I have been given is missing the visual studio solution file. It has all the individual cs files so I can open them up one by one but there is no overall file for the module, and so I'm not sure how I can then repackage and deploy the changes once I've completed them.
I have tried creating a blank solution to add the project to but I get an error when I try to do this that goes like:
Unable to read the project file '...csproj'. The imported project "....nuget\nuget.targets" was not found. Confirm that the path in the < Import > declaration is correct, and that the file exists on disk
Can anyone help?
Thanks
The module might have been built as a WSP type project where there is no compiled DLL and .NET just compiles the files in place. If you got a module package, you should be able to install the module into a DotNetNuke site, add the module to a page and then just make changes to the files within the App_Code and DesktopModules folders and refresh the page to see the changes.
When you're done, you can either just copy the updated files into the zip package or, you can go to Host -> Extensions. Then edit the module and from the Manage Menu select "Create Package" and it will generate a new Package.

Can't find the package when packaging a Magento Extension

I have created a new theme for magento.I want to submit it to the communtity.When i tried to package extension,I m getting The package data has been saved message,but there is no package in var/pear directory.Is it not possible to pack extension in localhost?Do you need more information?Any help would be appreciated.
Please see this article:- Magento: How to create extension package? (IMAGES)
Check if the data is filled correctly.
While creating your extension package, under Package Info -> Supported releases
If you have chosen "1.5.0.0 & later" then your extension package is stored in var/connect directory. This supports Magento connect 2.0.
If you have chosen "Pre-1.5.0.0" then your extension package is stored in var/pear directory. This is for Magento connect 1.0.
If you have selected both options, then the extension packages is stored in both places (var/connect and var/pear).
When uploading the 1.0 version from var/pear – Magento Connect will
make the 2.0 version for you. If you wish to only support 1.5 and
higher versions of Magento only then only upload the 2.0 file from the
var/connect directory to Magento. Source:
http://www.magentocommerce.com/wiki/7_-_magento_connect/packaging_a_magento_extension_in_1.5
Edit:
I tried to create a package with app/design and skin folder. It worked fine and I could see other folder and files in the package file inside var/pear.
I tested with default theme and default skin. In 'Contents' section, I kept like this:-
Target: Magento Theme Skin
Path: frontend/default/default
Type: Recursive Dir
Target: Magento User Interface
Path: frontend/default/default
Type: Recursive Dir
What version did you select for "Supported releases"? Check in the var/package/ folder too. Check both folders have user and group write access.
Packges are saved with a .tgz extension, so running
find . -name '*.tgz'
from the magento base folder is always a good way to find your packages.
Also, as of 1.5, Magento changed their package management system. This is why you had to choose a supported releases option. For 1.5 and later packages Magento will, by default, drop the files into
var/connect
The var/package folder is only used if you opt to create a pre 1.5 package.

Resources