Giter VIP home page Giter VIP logo

shopwaredowntown / downtown Goto Github PK

View Code? Open in Web Editor NEW
45.0 22.0 27.0 5.67 MB

With our portal, we want to support local authorities and merchants. We want to connect merchants with closed stores to their customers. And we want to keep in mind, that not every merchant has a sophisticated digital strategy - or even a homepage.

Home Page: https://github.com/shopwareDowntown/portal/wiki

License: MIT License

Shell 0.24% PHP 50.87% HTML 7.74% JavaScript 3.27% CSS 6.28% TypeScript 12.02% Makefile 0.09% Twig 15.26% SCSS 4.23%
ecommerce covid-19 shopware php mysql

downtown's Introduction

About this project

This is a non-profit project. The portal is an open-source project that was created in collaboration with the Shopware community to help local retailers in this trying time.

It allows local governments, cities, or similar authorities to give local merchants an easy way of keeping in touch with their customers and selling goods and services online.

After installing the project on a web server, local authorities can register within the portal.

After registration and activation by the portal owner, a sub-portal will be automatically created for each local authority. After this step, local retailers can register within their local authority's sub-portal. Next, customers can register and interact with retailers in their area.

Tweet

Goal

At the time this project is created, the COVID-19 pandemic has a serious impact on the economy. Since retail stores are forced to close, they now need new solutions to generate an income.

The portal project is trying to help. It is created to serve the project downtowns.io, but since it is open source anyone is able to set up a a web server and provide the same service as downtowns to their local community.

How it works

A picture is worth a thousand words, so here are some example screen designs of the portal. The text is in german, since the portal was initially developed for the german market.

The registration page

After the registration, the organisation has to be activated by the portal owner. Then these steps follow:

  • An organisation (e.g. a city) registers within the portal
  • Organisations are created as a sales channel
  • Retail stores register within the organisation, internally they are handled as categories
  • Retail stores can use an App to upload products
  • Users (buyers) can browse retail stores and see what’s in stock

This is how the landing page for an organisation or local authority looks:

Landing page for a local authority

And here is an example of a retailer's landing page:

Landing page for a retailer

Technology

How to install

The Portal

Prerequisites: docker, docker-compose, node/npm

⚠️ The docker setup currently only works if your user ID is 1000.
Execute id -u on your terminal to check.

Clone the project:

git clone https://github.com/shopwareDowntown/downtown.git

Change into the project directory, then start the docker containers, add the cache directory and change into the app container:

cd downtown
docker-compose up -d
docker-compose exec cli bash

When inside the app container, do a basic install, generate a JWT secret and an App Secret, then exit the container:

composer install
bin/console system:setup

Change the default credentials as listed and confirm those at the end:

Database user [app]: downtown
Database password: uptown
Database host [localhost]: mysql
Database port [3306]: 3306
Database name [shopware]: downtown
bin/console system:install --create-database --basic-setup --force
exit

Check if your URL to /public folder [http://shopware.local] is set in /etc/hosts

Please note:

  • Administration is available at http://localhost/admin with user admin and password shopware
  • Each sales channel represents an organisation/local authority
  • Merchants show up in categories after registration and activation
  • Merchants register through the separate Angular Merchant Administration described below

You can shut down the portal with this command:

docker-compose down --remove-orphans

The Angular Merchant Administration

Currently there is no docker container available, so you need to start the project using npm.

Change into the directory src/MerchantFrontend. Then install dependencies and run the project:

cd src/MerchantFrontend
npm install && npm run start

After the promt Compiled successfully, the merchant portal is available at http://localhost:4200/.

Please be aware: The registration for organisations is currently not wired up to the portal, it's just a hubspot form, for production use replace it with your own. For new organisations please create a sales channel manually in the portal.

Merchants are able to register and choose a category. To activate a merchant either click on the link in the registration request e-mail or, in case you haven't set up e-mail sending in the portal, do it directly in the database:

docker-compose exec mysql mysql -p # password is root
USE downtown;
UPDATE merchant SET active=1, activation_code = null WHERE email='[email protected]';
quit;

Using the UI

Explaining how to use a UI is easier done via video, so here is a tutorial video on how to configure organisations and merchants:

Youtube: Portal tutorial video

Payments

Mollie Plugin

Mollie is the selected payment provider for downtown. If you want to enable these payment methods, please install and activate the Mollie plugin. Then activate required payment methods and assign it to your sales channel.

Please note, you have to change the APP_URL to be something else then localhost to comply with Mollie API guidelines. Use the /etc/hosts entry for local development.

Enable Payment Methods for Merchants

If you sign is as merchant you'll have access to a new payments tab in your account data. Here you can set your molli API keys and test modes.

In addition to this, you can select what payments of your assigned sales channel should be enabled for your merchant. Only payment methods that are valid for the sales channel and are enabled in here will be shown during the checkout.

Contributing

You have an idea or you found an issue? Please open an issue here: shopwareDowntown/portal/issues Help retailers by contributing to this project.

Contributors

shyim arnoldstoba PaddyS FloBWer JanPietrzyk PascalThesing Kevin Mattutat Andreas Wolf and-wolf oterhaar MalteJanz seggewiss maike93 Maike Sestendrup marcelbrode swDennis Oliver Terhaar xPand4B Carlos Jansen Carlosjan Draykee jakob-kruse lukasrump SebastianFranze Christian-Rades florianklockenkemper niklas-rudde dnoegel Jakob Kruse Luke Wenkers

downtown's People

Contributors

3stadt avatar and-wolf avatar arnoldstoba avatar boxblinkracer avatar breaker92 avatar carlosjan avatar carlosshopware avatar christian-rades avatar dasistweb-ak avatar dependabot[bot] avatar draykee avatar flobwer avatar florianklockenkemper avatar janpietrzyk avatar liaraalis avatar lukasrump avatar maltejanz avatar marcelbrode avatar msestendrup avatar ndzoesch avatar niklas-rudde avatar oterhaar avatar pascalthesing avatar sebastianfranze avatar seggewiss avatar shyim avatar sthamann avatar swdennis avatar vienthuong avatar xpand4b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

downtown's Issues

Registration Endpoint

  • Create a new Merchant entity - done
  • Event Listener to create a customer when a merchant is written and link them together - done
  • Event Listener to remove a customer
  • Double optin Mail - done

Create own double optin registration mail

We need a own template for double optin for merchants.

Also should we not use the same frontend route for confirmation. The customer route loggs the customer in. And we don't want that

Running merchant migration fails

I was running the system install command including all migrations and ran into the following error:

bin/console system:install --create-database --basic-setup
Prepare installation

Created database `swportal`
Importing base schema.sql


Get collection from directories
migrate Migrations
 203/223 [=========================░░░]  91%20:13:02 ERROR     [app] Migration: "Shopware\Production\Merchants\Migration\Migration1585212510CustomerDeleteCascade" failed: "An exception occurred while executing '        ALTER TABLE merchant
            ADD CONSTRAINT `fk.merchant.customer_id` FOREIGN KEY (`customer_id`)
            REFERENCES `customer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;':

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'swportal.merchant' doesn't exist"
 ---------- ----------------------
  Action     Number of migrations
 ---------- ----------------------
  Migrated   219 out of 223
 ---------- ----------------------


In MigrationCommand.php line 105:

  Migration error: An exception occurred while executing '        ALTER TABLE merchant
              ADD CONSTRAINT `fk.merchant.customer_id` FOREIGN KEY (`customer_id`)
              REFERENCES `customer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;':

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'swportal.merchant' doesn't exist
  Trace:
  #0 /home/sebastian/sw-portal/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(166): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException()
  #1 /home/sebastian/sw-portal/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(146): Doctrine\DBAL\DBALException::wrapException()
  #2 /home/sebastian/sw-portal/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(912): Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
  #3 /home/sebastian/sw-portal/src/Merchants/Migration/Migration1585212510CustomerDeleteCascade.php(23): Doctrine\DBAL\Connection->executeQuery()
  #4 /home/sebastian/sw-portal/vendor/shopware/core/Framework/Migration/MigrationRuntime.php(47): Shopware\Production\Merchants\Migration\Migration1585212510CustomerDeleteCascade->update()
  #5 /home/sebastian/sw-portal/vendor/shopware/core/Framework/Migration/Command/MigrationCommand.php(55): Shopware\Core\Framework\Migration\MigrationRuntime->migrate()
  #6 /home/sebastian/sw-portal/vendor/shopware/core/Framework/Migration/Command/MigrationCommand.php(98): Shopware\Core\Framework\Migration\Command\MigrationCommand->getMigrationGenerator()
  #7 /home/sebastian/sw-portal/vendor/symfony/console/Command/Command.php(255): Shopware\Core\Framework\Migration\Command\MigrationCommand->execute()
  #8 /home/sebastian/sw-portal/src/Command/SystemInstallCommand.php(177): Symfony\Component\Console\Command\Command->run()
  #9 /home/sebastian/sw-portal/src/Command/SystemInstallCommand.php(159): Shopware\Production\Command\SystemInstallCommand->runCommands()
  #10 /home/sebastian/sw-portal/vendor/symfony/console/Command/Command.php(255): Shopware\Production\Command\SystemInstallCommand->execute()
  #11 /home/sebastian/sw-portal/vendor/symfony/console/Application.php(1029): Symfony\Component\Console\Command\Command->run()
  #12 /home/sebastian/sw-portal/vendor/symfony/framework-bundle/Console/Application.php(97): Symfony\Component\Console\Application->doRunCommand()
  #13 /home/sebastian/sw-portal/vendor/symfony/console/Application.php(272): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand()
  #14 /home/sebastian/sw-portal/vendor/symfony/framework-bundle/Console/Application.php(83): Symfony\Component\Console\Application->doRun()
  #15 /home/sebastian/sw-portal/vendor/symfony/console/Application.php(148): Symfony\Bundle\FrameworkBundle\Console\Application->doRun()
  #16 /home/sebastian/sw-portal/bin/console(68): Symfony\Component\Console\Application->run()
  #17 {main}


system:install [--create-database] [--drop-database] [--basic-setup] [-f|--force] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>

System:
php7.4
dev env
mysql 5.7

Add admin menu point "delivery" to merchant portal

in the merchant portal the merchant can create delivery packages, where he can:

  • add a recipient address
  • add the package content
  • add a comment for the delivery boy
  • select a delivery boy for packages

login with modal

the login component needs to be put in a modal like in the screendesign

Edit DeliveryPackageEntity

because we need a correct address to plan the route, the recipient property has to be changed to an address
and the comment property is missing

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.