Coder Social home page Coder Social logo

symfony-magento's Introduction

Symfony Integration with Magento

๐Ÿ“ฆ Microservices with Symfony 5.

Installation

In order to run this app do the following:

1-Minute Install

  • Get the application code and install php dependencies and node packages.
git clone https://github.com/VuThuan/symfony-magento.git symfony-magento
  • Open the Magento project, create new db name is magento243 and run command
  cd magento243
  composer update 
  bin/magento setup:install --base-url=http://magento243.local/ \                                                   
    --db-host=localhost --db-name=amlabel --db-user=root --db-password=admin123 \
    --admin-firstname=Magento --admin-lastname=User [email protected] \
    --admin-user=admin --admin-password=admin123 --language=en_US \
    --currency=USD --timezone=America/Chicago --cleanup-database \
    --sales-order-increment-prefix="ORD$" --session-save=db --use-rewrites=1 \
    --search-engine=elasticsearch7 --elasticsearch-host=localhost \
    --elasticsearch-port=9200
  • In case you work with LAMP Server, you will need to configure your apache virtual host for Magento project.
<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName magento243.local
    ServerAlias www.magento243.local
    DocumentRoot /var/www/symfony-magento/magento243/pub
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
        <Directory /var/www/symfony-magento/magento243/pub>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
        </Directory>
</VirtualHost>
  • After that you need following guide to create new Integration

Make sure you set the Resource Access for Magento_Catalog::products

  • Copy the Access token and Base url Magento into Symfony settings file located
namespace App\Controller;

class DefaultController extends AbstractController
{
    protected $urlMagento = "http://magento243.local/";

    protected $accessToken = "mff8x55yav8vszt0vb56vvvrxbxzobxk";
}

Deploy The Symfony Application

  • Download and install the symfony-cli tool
wget https://get.symfony.com/cli/installer -O - | bash
  • After that, add the Symfony installation path to the PATH user
export PATH="$HOME/.symfony/bin:$PATH"
  • Open the Symfony project
cd symfony
composer install
symfony server:start

Result

About Project

This project works like this:

  • The symfony side will have the effect of displaying the sku replace form, push the data to the Magento server through the api and receive the returned data for display.
  • Magento side will be responsible for storing data and handling those APIs through REST API
  • About the replace form sku will work as follows: When user input OLD_SKU and press replace button will check if this sku exists on Magento server side or not. Otherwise, it will show an error. And NEW_SKU is similar but opposite.

symfony-magento's People

Contributors

vuthuan avatar

Watchers

James Cloos avatar  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.