Skip to content

Flow / NeosCMS e-commerce package for high performance web shops

License

Notifications You must be signed in to change notification settings

ashok2009it/aimeos-flow

 
 

Repository files navigation

Aimeos logo

Aimeos Flow/Neos package

Build Status Scrutinizer Code Quality

The repository contains the web shop package for Flow/Neos integrating the Aimeos e-commerce library into Flow/Neos. The package provides controllers for e.g. faceted filter, product lists and detail views, for searching products as well as baskets and the checkout process. A full set of pages including routing is also available for a quick start in Flow.

Aimeos Flow demo

Table of content

Installation

This document is for the latest Aimeos Flow 2016.10 release and later.

  • Stable release: 2017.04
  • LTS release: 2016.10

The Aimeos Flow/Neos web shop package is a composer based library that can be installed easiest by using Composer.

Make sure that the database is set up and it is configured. If you want to use a database server other than MySQL, please have a look into the article about supported database servers and their specific configuration.

Neos has a nice setup page for this when opening the /setup URL of your installation. For Flow, this is done in your Configuration/Settings.yaml file and must at least include these settings:

Neos:
  Flow:
    persistence:
      backendOptions:
        host: '<host name or IP address>'
        dbname: '<database name>'
        user: '<database user name>'
        password: '<secret password>'

Important: The configuration file format requires each additional indention to be two spaces. Not more, not less and no tabs at all! Otherwise, you will get an error about an invalid configuration file format.

Then add these lines to your composer.json of your Flow/Neos project:

    "extra": {
        "installer-paths": {
            "Packages/Extensions/{$name}/": ["type:aimeos-extension"]
        }
    },
    "prefer-stable": true,
    "minimum-stability": "dev",
    "require": {
        "aimeos/aimeos-flow": "~2016.10",
        ...
    },

Afterwards, install the Aimeos shop package using

composer update

Setup

To create all required tables and to add the demo data, you need to execute a Flow console command in the base directory of your Flow application:

./flow aimeos:setup --option=setup/default/demo:1

In a production environment or if you don't want that the demo data gets installed, leave out the --option=setup/default/demo:1 option.

Note: If you get an error like Neos\Flow\Core\ApplicationContext not found, execute composer update again to install the missing typo/flow package.

For Flow only you need to import the routes from the Aimeos web shop package into your Configuration/Routes.yaml nice looking URLs. Insert the lines below to the beginning of the Routes.yaml file:

-
  name: 'Aimeos'
  uriPattern: 'shop/<AimeosShopRoutes>'
  subRoutes:
    AimeosShopRoutes:
      package: 'Aimeos.Shop'

It's important to import the routes from the Aimeos web shop package before the FlowSubroutes lines. If you add it afterwards, the default Flow routes will match first and you will get an error that the requested package/action wasn't found.

Now Flow would basically know which controller/action it shall execute. But with Neos, one additional step is needed:

Add the following PrivilegeTarget to Configuration/Policy.yaml

privilegeTargets:
  Neos\Flow\Security\Authorization\Privilege\Method\MethodPrivilege:
    'MyShop:AllActions':
      matcher: 'method(Aimeos\Shop\Controller\(.*)Controller->(.*)Action())'

roles:
  'Neos.Flow:Everybody':
    privileges:
      -
        privilegeTarget: 'MyShop:AllActions'
        permission: GRANT

The above will grant access to all Aimeos Controller/Actions pairs, for everyone - probably not what you want. Please refine to your needs!

Then, you should be able to call the catalog list page in your browser using

http://<your web root>/shop/list

For the administration interface you have to setup authenticaton first and log in before you will be able to get into the shop management interface:

http://<your web root>/shop/admin

License

The Aimeos Flow/Neos package is licensed under the terms of the LGPLv3 license and is available for free.

Links

About

Flow / NeosCMS e-commerce package for high performance web shops

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 53.4%
  • CSS 29.0%
  • JavaScript 12.6%
  • HTML 4.2%
  • Shell 0.8%