Coder Social home page Coder Social logo

dhduc / magento2samplemodule Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tzyganu/magento2samplemodule

0.0 1.0 0.0 441 KB

This is where I would put a Magento 2.0 Sample CRUD module if I had one.

License: MIT License

PHP 96.97% HTML 3.03%

magento2samplemodule's Introduction

Magento 2.0 Sample Module

Last tested on Magento2 version 2.1

Magento 2 Sample Module

What I got so far:

  • One custom entity Author. flat and related to store views
  • Backend section for the entity mentioned above
  • Frontend list and view for the entity mentioned above
  • List on Author view page on frontend
  • Rss feeds for author list.
  • Breadcrumbs support for list and view pages.

The other types of entities and features listed in the purpose will follow. Don't put many hopes in this. Based on the comments on the magento 2 repo the grid system will be changed...A LOT.

The purpose

....of this repository is to hold a sample CRUD module for Magento 2.0. This module should contain the following:

  • 4 Entities.
  • 1 Flat - with a store selector. Similar to CMS pages
  • 1 Flat but behaving as a tree - with a store selector. Similar to categories but non EAV
  • 1 EAV - similar to products
  • 1 EAV but behaving as tree - Similar to categories.
  • Backend files for managing the entities mentioned above
  • Frontend files for list and view each of the entities mentioned above
  • RSS feeds for each entity mentioned above
  • SOAP & REST API files for the entities mentioned above
  • URL rewrites filed for frontend for the entities above
  • Files needed for a many to many relation between the entities above and products
  • Files needed for a many to many relation between the entities above and categories
  • Files needed for a many to many relation between the entities above (among themselves)
  • Each entity must support different attribute types:
  • Text
  • Textarea (with and without WYSIWYG editor)
  • Date
  • Yes/No
  • Dropdown (with different source models)
  • Multi-select (with different source models)
  • File
  • Image
  • Decimal
  • Integer (signed and unsigned)
  • Color
  • Each entity should have fronend links to the list page in one of the menu/link areas provided by the default theme
  • Each entity must have SEO attributes (meta-title, meta-description, meta-keywords)
  • Would be nice to have unit tests for every class in the code - but that's low priority.
  • Each entity type must have widgets for frontend (link, short view).
  • Each entity must support customer comments.
  • Each EAV entity must have a section for managing attributes (similar to product attributes).

After this is complete (or almost) it will become the base source for the Ultimate Module Creator 2.0 which will be a version for Magento 2.0 of the Ultimate Module Creator for Magento 1.7.

Any other ideas and pieces of code are welcomed even encouraged.

Install

Manually: To install this module copy the code from this repo to app/code folder of your Magento 2 instance, If you do this after installing Magento 2 you need to run php bin/magento setup:upgrade

Via composer

  • composer config repositories.sample-module-news git [email protected]:tzyganu/Magento2SampleModule.git
  • sudo composer require sample/module-news:dev-master
  • php bin/magento setup:upgrade

Uninstall

If you installed it manually:

  • remove the folder app/code/Sample/News
  • drop the tables sample_news_author_store and sample_news_author (in this order)
  • remove the config settings. DELETE FROM core_config_data WHERE path LIKE 'sample_news/%'
  • remove the module Sample_News from app/etc/config.php
  • remove the module Sample_News from table setup_module: DELETE FROM setup_module WHERE module='Sample_News'

If you installed it via composer:

  • run this in console bin/magento module:uninstall -r Sample_News. You might have some problems while uninstalling. See more details here:

magento2samplemodule's People

Contributors

strajeru avatar tzyganu avatar magekube avatar osrecio avatar deepanshu27193 avatar kevinjavitz avatar

Watchers

Duc Dao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.