Skip to content

Environment setup

lucia-ebizmarts edited this page Nov 18, 2022 · 5 revisions

Prerequisites

Setup

  1. Install Magento 2.4.0 or higher.

  2. Set Magento to developer mode:

    bin/magento deploy:mode:set developer

  3. Install sample data using composer:

    composer require magento/module-bundle-sample-data magento/module-catalog-rule-sample-data magento/module-catalog-sample-data magento/module-cms-sample-data magento/module-configurable-sample-data magento/module-customer-sample-data magento/module-downloadable-sample-data magento/module-grouped-product-sample-data magento/module-msrp-sample-data magento/module-offline-shipping-sample-data magento/module-product-links-sample-data magento/module-review-sample-data magento/module-sales-rule-sample-data magento/module-sales-sample-data magento/module-swatches-sample-data magento/module-tax-sample-data magento/module-theme-sample-data magento/module-widget-sample-data magento/module-wishlist-sample-data magento/sample-data-media
    

    bin/magento setup:upgrade

  4. Add your public ssh key to gitlab.hyva.io (ask for credentials to gitlab.hyva.io)

  5. Run the following commands:

    composer config repositories.hyva-themes/magento2-theme-module git [email protected]:hyva-themes/magento2-theme-module.git
    composer config repositories.hyva-themes/magento2-reset-theme git [email protected]:hyva-themes/magento2-reset-theme.git
    composer config repositories.hyva-themes/magento2-email-module git [email protected]:hyva-themes/magento2-email-module.git
    composer config repositories.hyva-themes/magento2-default-theme git [email protected]:hyva-themes/magento2-default-theme.git
    composer config repositories.hyva-themes/magento2-graphql-tokens git [email protected]:hyva-themes/magento2-graphql-tokens.git
    composer require hyva-themes/magento2-default-theme --prefer-source
    
  6. Disable incompatibility modules depending on Magento version:

    • Magento 2.4.0 - 2.4.2:
      bin/magento module:disable Dotdigitalgroup_Email Dotdigitalgroup_Chat Dotdigitalgroup_Sms
      
    • Magento 2.4.3 - 2.4.3-p2:
      bin/magento module:disable Dotdigitalgroup_Email Dotdigitalgroup_Chat Dotdigitalgroup_ChatGraphQl Dotdigitalgroup_EmailGraphQl Dotdigitalgroup_Sms
      
  7. From the terminal run the following commands:

    bin/magento setup:upgrade
    bin/magento cache:clean
    bin/magento cache:flush
    
  8. Access to Magento admin -> Content -> Design Configuration once here edit default store view theme, select Hyvä Default and save config.

  9. Access to the frontend site if you see Hyvä theme follow the next steps, in any other case see common errors.

  10. Install Hyvä react checkout:

    composer require hyva-themes/magento2-react-checkout
    bin/magento setup:upgrade
    bin/magento config:set hyva_react_checkout/general/enable 1
    
  11. Access to magentoRootDirectory/vendor/hyva-themes/magento2-react-checkout/src/reactapp once here run the following commands:

    npm install
    NODE_ENV=production npm run build
    
  12. If we have not any issue here follow with the next steps, in other case maybe you have some missing dependency or need to install a package.

  13. Install our compatibility module for hyvä checkout, to do this add the below code in your package.json:

    "config": {
        "paymentMethodsRepo": {
            "sagepaysuitepi": "[email protected]:ebizmarts/magento2-hyva-checkout-sage-pay-suite.git"
        }
    },
    
  14. Run again the following commands:

    npm install
    NODE_ENV=production npm run build
    
Clone this wiki locally