All Projects → EaDesgin → m2-ComposerRepo

EaDesgin / m2-ComposerRepo

Licence: other
Composer Repository Manager for selling Magento 2 extension and offering composer installation for ordered packages.

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to m2-ComposerRepo

magento2-module-noreservations
No description or website provided.
Stars: ✭ 12 (-33.33%)
Mutual labels:  magento2, magento2-module
magento2-link-product
Custom Product Relation for Magento 2.2.x and 2.3.x sample extension
Stars: ✭ 45 (+150%)
Mutual labels:  magento2, magento2-module
magento2-module-cron-schedule
A Magento2 visual cronjob overview for magento2 backend
Stars: ✭ 35 (+94.44%)
Mutual labels:  magento2, magento2-module
Dev-Tools-Magento-2-Module
A collection of utilities meant to improve the experience of developing modules for Magento without breaking existing functionality.
Stars: ✭ 18 (+0%)
Mutual labels:  magento2, magento2-module
magento2-catalog-lazy-load
Improve the load time of your Magento 2 categories pages by loading your images on demand with our Lazy Load Extension
Stars: ✭ 56 (+211.11%)
Mutual labels:  magento2, magento2-module
nosto-magento2
marketplace.magento.com/nosto-module-nostotagging.html
Stars: ✭ 19 (+5.56%)
Mutual labels:  magento2, magento2-module
magento2-module-slack
Magento 2 Module to send Notifications to a Slack Channel via Webhook.
Stars: ✭ 14 (-22.22%)
Mutual labels:  magento2, magento2-module
module-geoip
Detect Country by IP in Magento 2
Stars: ✭ 51 (+183.33%)
Mutual labels:  magento2, magento2-module
magento2-showoutofstockprice
This Magento2 Module adds prices and the add-to-cart button to out-of-stock configurable products.
Stars: ✭ 22 (+22.22%)
Mutual labels:  magento2, magento2-module
PagSeguro-Magento-Transparente-M2
Módulo PagSeguro para Magento 2
Stars: ✭ 15 (-16.67%)
Mutual labels:  magento2, magento2-module
module-translation
magefan.com/magento-2-translation-extension
Stars: ✭ 35 (+94.44%)
Mutual labels:  magento2, magento2-module
magento2-dev-plus-exam
📚Magento 2 Certified Professional Developer Plus Exam
Stars: ✭ 79 (+338.89%)
Mutual labels:  magento2, magento2-module
magento-ngrok
Magento 2 module for ngrok.io service support
Stars: ✭ 45 (+150%)
Mutual labels:  magento2, magento2-module
module-lazyload
magefan.com/magento-2-image-lazy-load-extension
Stars: ✭ 47 (+161.11%)
Mutual labels:  magento2, magento2-module
magento-2-security
Magento 2 Security extension FREE. Security extension gives store owners the ability to detect the IP addresses that are intentionally attacking their store at any given time. Therefore, they have timely measures to prevent this issue such as blocking those IP addresses or sending warning emails to store owners.
Stars: ✭ 40 (+122.22%)
Mutual labels:  magento2, magento2-module
magento2-prometheus-exporter
Simple Magento 2 Prometheus Exporter.
Stars: ✭ 40 (+122.22%)
Mutual labels:  magento2, magento2-module
magento2-pimcore-bridge
Magento 2 module for Pimcore integration.
Stars: ✭ 28 (+55.56%)
Mutual labels:  magento2, magento2-module
magento2-widget-parameters
Useful widget types for Magento 2 like image selector and wysiwyg text editor.
Stars: ✭ 51 (+183.33%)
Mutual labels:  magento2, magento2-module
magento2-sample-imageuploader
A Magento 2 sample module demonstrating how to upload an image file within a grid and form UI Component.
Stars: ✭ 27 (+50%)
Mutual labels:  magento2, magento2-module
enhanced-privacy
Magento 2 Enhanced Privacy extension for easier compliance with GDPR. Allows customers to delete, anonymize, or export their personal data.
Stars: ✭ 45 (+150%)
Mutual labels:  magento2, magento2-module

Magento 2 Composer Repository

Credits

Composer  Repository for Magento 2

  • This extension works as a Magento 2 private storage manager for extension developers who sell Magento 2 extensions and want to provide easy installation of the composer. Extension was originally implemented for Magento 1 by Genmato, but we adapted the code and made it available to Magento 2. The logic is very similar to the M1 module but we actually re created the extension.

Requirements:

  • Magento 2.x
  • Composer
  • Satis

How does it work

The extension  is using Satis, composer.json and packages (stored on the server). For each package ordered through the web shop it checks if the ordered products are M2 packages (based on product_id) and inserts this into the customer_packages table so that the user will have access to the purchased package. If there is no customer_auth key available one will be generated.

Here's how the extension works in the 3 steps outlined below:

  1. With the auth key and secret the customer can install the package from the command file with Composer. For this Composer will request the packages.json from the repository. Based on the used key and secret the customer_id is checked for available packages and the output is built.

  2. When a download is requested it requests /composer/download/file/ with the parameters (m/[package_name]/h/[package_hash]/v/[normalized_version, again based on the used key and secret access to the file and version is checked, if allowed file is send from the [satis archive directory] to the user.

  3. Thru the notify-batch URL the installation of a package is recorded for the user (stores IP, Package, Version and User ID).

Configuration:

Satis installation

Install Satis outside of Magento Webroot, but accessible from the Magento web user. To install it, run the following command in your console:

php bin/magento eadesign:composerrepo

[path] → The place where you want to install the Satis directory.

NOTE !!!

The Satis installation folder should not be accessible from the web. It is only used to collect composer's json files and to generate downloaded files.

Repository Configuration

After installation of the extension go to: Stores => Configuration => EADESIGN SETTINGS  =>  Composer Repo  and complete the following fields:

[Configuration]

  • Repository name: This name is used for the composer config repositories (for example: Eadesign's repositories),

  • Repository URL: The url that serves the Repository (for example: [  your domain ]/composer/packagist/index ),

  • Include dev-master: Optionally enable the option to allow access to the dev-master package (disabled by default),

  • Update period: The period in months that user can get free updates to a newer release, when the period ends the user only has access to the versions release before. Not possible when dev-master is enabled, leave empty for unlimited updates,

  • Email Active: Yes or No.(By enabling this option, you can set when someone purchases a product from your store, also send installation instructions to the composer using the generated keys).

[Satis Configuration]

  • Satis command path: Path to the Satis executable (for example:  [ your project ]/satis/bin/satis ),

  • Satis config path: Path to the satis.json configuration file (for example: [ your project ]/satis/satis.json ),

  • Name: Repository name (used for satis.json),

  • Homepage URL: Repository URL (used for satis.json, example: [ your domain ]/composer/packagist/index ),

  • Output directory: Path the the Satis web directory (for example:  [ your project]/satis/web ),

[Satis Archive]

  • Format: Export format (zip or tar) of the packages (for example: zip)

  • Absolute Directory: Path to where the downloaded packages should be places (for example: [your project]/satis/packages/)

M2 Package configuration:

The Magento 2 package/extensions should be stored in a repository, it is important that the account where Satis is running from has access to download from this repository.

Adding M2 packages:

To add a Magento 2 package go to: Eadesign =>  Composer Repository => Packages => Add new Package

[Package Information]

  • Package Name: composer package name (for example: eadesign/composerrepo),

  • Status: Enabled,

  • Package Type: Normal / Bundled (Bundled packages will always be available in the packages.json, this can be useful for required library packages.),

  • Package Title: Used to describe the package in the customer menu,

  • Magento Product ID: Matching product entity_id for the ordered item,

  • Repository URL: Git URL to the repository (for example: [email protected]:EaDesgin/m2-ComposerRepo.git)

  • Repository options: json format of options available for the repository in the satis.json (see https://getcomposer.org/doc/articles/handling-private-packages-with-satis.md for details).

Building the repository data

When the configuration and packages are ready the configration can be build with:

php bin/magento eadesign:composerrepo

This command can also be scheduled to run daily (or any frequency you prefer) and automatically update the repository data.

Todo's:

  • add email template;
  • add statistics;
  • code improvement.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].