Showing posts with label magento2. Show all posts
Showing posts with label magento2. Show all posts

Tuesday, June 9, 2020

Magento 2


Magento Layered Architecture






Unit tests are designed to test individual class methods in isolation, asserting all possible combinations and taking care of the smallest testable part of an application.


Integration tests test the interaction between individual components, layers, and an environment.


Static tests do not really run the code; they analyze it. They are used to verify that the code conforms to certain coding standards

Integrity tests check how an application is linked. They check for things such as merged configuration validation. Basically, they tell us if your application should be able to run.

Functional tests mimic the user interaction with our application. They literally mean testing in the form of browser interaction, which involves clicking on the page, adding products to the cart, and so on.



Books


https://learning.oreilly.com/library/view/magento-2-development/9781789343441/














Thursday, November 30, 2017

Magento 2 local setup - Version 2


it seems the following docker image works better for magento 2 local development


To Clean up docker image, volume, etc (Optional)


# docker system prune

# stop all containers:
# docker kill $(docker ps -q)

# remove all containers
# docker rm $(docker ps -a -q)

# remove all docker images
# docker rmi $(docker images -q)

# remove all volumes
#docker volume rm $(docker volume ls -f dangling=true -q)



  • git clone https://github.com/markoshust/magento2-docker.git
  • cd magento2-docker
  • docker-compose run --rm setup

after this command the DB setup would have completed and will have just the DB Image



  • Un comment docker-compose.override
  • mv docker-compose.override.yml.dist docker-compose.override.yml
  • docker-compose up -d app

This will create another 2 docker container, so we should have 3 containers running.



  • cp CONTAINER ID:/var/www/html ./ .      ( this is the container id of magento2docker_phpfpm_1)
  • http://m2.localhost:8000/index.php
  • Admin : http://m2.localhost:8000/index.php/admin_16wb2m/










Sample HelloWorld Module


Follow the steps in 











Connecting to Database












Saturday, November 25, 2017

Magento 2 Local Setup






1. Create an account in Magento connect and have Public and private Key






2. Install Docker Edge Channel







3.  Once Docker Installed Execute this command

    git clone https://github.com/clean-docker/Magento2.git m2-docker &&
cd m2-docker && docker-compose up -d ;


Reference : https://rafaelstz.github.io/magento2/Install-Magento2-Docker-Development.html





4. Log Into docker Image


  docker exec -ti m2docker_apache_1 bash


5. Install Magento

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2


6. Get Mysql Ip

  docker inspect m2docker_db_1 | grep IPAddress


7. Start the setup of Magento2

















8. Docker Tips
    
      The first time installation might not work right if so if you wanted to clean up docker use these handy commands


# stop all containers:
# docker kill $(docker ps -q)

# remove all containers
# docker rm $(docker ps -a -q)

# remove all docker images
# docker rmi $(docker images -q)

9. How to setup Php Storm and edit the files in the container
        ToDo: Need to research how to setup docker volumes so that files can be shared and edited.         
10.   Links
           http://localhost:8080/
           http://localhost/
           http://localhost:8025/#
           http://localhost/magento2/
           http://localhost/magento2/admin_6p1kqi/

11.How the edit the magento2 files

         under the directory there is a mapping folder src

             m2-docker/src/magento2




ToDo:


   these Steps can be further simplified  with just one command docker-compose up;