Browse Source

refactored checkout workflow with stripe

bach 3 years ago
parent
commit
02c983e7e0
48 changed files with 1082 additions and 165 deletions
  1. 11 2
      composer.json
  2. 562 110
      composer.lock
  3. 1 0
      config/sync/autologout.role.adherent.yml
  4. 1 0
      config/sync/autologout.role.admin.yml
  5. 1 0
      config/sync/autologout.role.admin_showroom.yml
  6. 1 0
      config/sync/autologout.role.alpha_testeur.yml
  7. 1 0
      config/sync/autologout.role.contact_company.yml
  8. 1 0
      config/sync/autologout.role.free_user.yml
  9. 1 0
      config/sync/autologout.role.root.yml
  10. 1 0
      config/sync/autologout.role.student.yml
  11. 1 0
      config/sync/autologout.role.translator.yml
  12. 1 0
      config/sync/autologout.role.unverified.yml
  13. 7 1
      config/sync/autologout.settings.yml
  14. 46 0
      config/sync/block.block.checkoutprogress.yml
  15. 12 0
      config/sync/block.block.tabs.yml
  16. 24 18
      config/sync/commerce_checkout.commerce_checkout_flow.materio_checkout_flow.yml
  17. 7 6
      config/sync/commerce_payment.commerce_payment_gateway.cm_cic.yml
  18. 20 0
      config/sync/commerce_payment.commerce_payment_gateway.stripe.yml
  19. 0 4
      config/sync/content_sync.AdminSettings.yml
  20. 0 3
      config/sync/content_sync.settings.yml
  21. 11 0
      config/sync/core.entity_view_display.commerce_order.default.default.yml
  22. 9 0
      config/sync/core.entity_view_display.commerce_order.materio_order_type.default.yml
  23. 11 0
      config/sync/core.entity_view_display.commerce_order.recurring.default.yml
  24. 39 0
      config/sync/core.entity_view_display.commerce_product.materio_product_type.home_summary.yml
  25. 1 1
      config/sync/core.entity_view_display.node.frontpage.default.yml
  26. 10 0
      config/sync/core.entity_view_mode.commerce_product.home_summary.yml
  27. 3 1
      config/sync/core.extension.yml
  28. 3 0
      config/sync/currency.amount_formatting.yml
  29. 22 0
      config/sync/currency.currency.XXX.yml
  30. 10 0
      config/sync/currency.currency_locale.en_US.yml
  31. 9 0
      config/sync/currency.exchange_rate_provider.yml
  32. 3 0
      config/sync/currency.exchanger.fixed_rates.yml
  33. 0 1
      config/sync/language/fr/core.entity_form_mode.simplenews_subscriber.materio_block.yml
  34. 61 2
      config/sync/views.view.commerce_licenses.yml
  35. 5 0
      package-lock.json
  36. 1 0
      package.json
  37. 2 2
      web/modules/custom/materio_home/materio_home.module
  38. 2 2
      web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedCommerceProductReferences.php
  39. 5 2
      web/modules/custom/materio_user/materio_user.module
  40. 29 0
      web/themes/custom/materiotheme/assets/dist/main.css
  41. 8 0
      web/themes/custom/materiotheme/assets/dist/main.js
  42. 15 0
      web/themes/custom/materiotheme/assets/styles/base/_reset.scss
  43. 27 5
      web/themes/custom/materiotheme/assets/styles/main.scss
  44. 5 1
      web/themes/custom/materiotheme/materiotheme.theme
  45. 27 0
      web/themes/custom/materiotheme/templates/content/commerce-product--home-summary.html.twig
  46. 2 2
      web/themes/custom/materiotheme/vuejs/components/Content/Product.vue
  47. 58 1
      web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue
  48. 5 1
      web/themes/custom/materiotheme/vuejs/components/User/UserTools.vue

+ 11 - 2
composer.json

@@ -20,13 +20,15 @@
         "composer/installers": "^1.2",
         "drupal/amswap": "^2.0",
         "drupal/auto_entitylabel": "^2.x-dev",
-        "drupal/commerce": "^2.16",
+        "drupal/commerce": "^2.22",
         "drupal/commerce_cart_api": "^1.4",
-        "drupal/commerce_license": "^2.0@alpha",
+        "drupal/commerce_cart_redirection": "^3.0",
+        "drupal/commerce_license": "2.x-dev@dev",
         "drupal/commerce_migrate": "^2.0",
         "drupal/commerce_monetico": "^1.0",
         "drupal/commerce_pricelist": "2.x-dev",
         "drupal/commerce_recurring": "^1.x-dev",
+        "drupal/commerce_stripe": "1.x-dev@dev",
         "drupal/commerce_variation_cart_form": "^1.x-dev",
         "drupal/computed_field": "^2.0@beta",
         "drupal/config_devel": "^1.7",
@@ -36,6 +38,7 @@
         "drupal/content_sync": "2.x-dev@dev",
         "drupal/core-composer-scaffold": "^9.0",
         "drupal/debug_bar": "^1.4",
+        "drupal/devel": "^4.1",
         "drupal/editor_advanced_link": "^1.8",
         "drupal/entity_clone": "^1.0",
         "drupal/error_log": "^1.0",
@@ -56,7 +59,10 @@
         "drupal/migrate_tools": "5.x-dev@dev",
         "drupal/mimemail": "^1.x-dev",
         "drupal/modules_weight": "^1.8",
+        "drupal/payment": "^2.1",
+        "drupal/payment_commerce": "2.x-dev@dev",
         "drupal/permissions_filter": "^1.1",
+        "drupal/recurring_period": "^1.0",
         "drupal/restui": "^1.16",
         "drupal/search_api_autocomplete": "^1.2",
         "drupal/search_api_page": "^1.x-dev",
@@ -149,6 +155,9 @@
             "drupal/field_group": {
               "undefined index name 18 https://www.drupal.org/project/field_group/issues/3064890" : "https://www.drupal.org/files/issues/2020-10-01/field_group-undefined-index-name-3064890-18.patch",
               "undefined index name 16 https://www.drupal.org/project/field_group/issues/3064890" : "https://www.drupal.org/files/issues/2020-08-10/field_group-undefined-index-name-3064890-16.patch"
+            },
+            "drupal/stripe": {
+              "Stripe is a web service and should be in system.admin_config_services https://www.drupal.org/project/stripe/issues/3090652": "https://www.drupal.org/files/issues/2020-01-08/stripe-link_menu_in_services-3090652-5.patch"
             }
         },
         "drupal-scaffold": {

+ 562 - 110
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "3d12b27bce24c17b1d9786c4053a60b3",
+    "content-hash": "18823c92aa8ab02c87f03c1d766c7d7a",
     "packages": [
         {
             "name": "alchemy/zippy",
@@ -332,6 +332,96 @@
             "description": "Internationalization library powered by CLDR data.",
             "time": "2020-10-04T20:58:22+00:00"
         },
+        {
+            "name": "commercie/currency",
+            "version": "1.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Commercie/currency.git",
+                "reference": "64812cb8d5e8cdbc406c2f7c114399c814e2d898"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Commercie/currency/zipball/64812cb8d5e8cdbc406c2f7c114399c814e2d898",
+                "reference": "64812cb8d5e8cdbc406c2f7c114399c814e2d898",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "php": "~5.5 || ~7.0"
+            },
+            "require-dev": {
+                "justinrainbow/json-schema": "~1.4",
+                "phpunit/phpunit": "~4.0"
+            },
+            "suggest": {
+                "drupal/currency": "Integrates this package with Drupal."
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Commercie\\Currency\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Bart Feenstra",
+                    "email": "bart@mynameisbart.com",
+                    "homepage": "http://mynameisbart.com",
+                    "role": "Developer"
+                }
+            ],
+            "time": "2018-05-11T10:11:38+00:00"
+        },
+        {
+            "name": "commercie/currency-exchange",
+            "version": "1.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Commercie/currency-exchange.git",
+                "reference": "bb6a0c3b682aaed2eda205ceda5582673cb444af"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Commercie/currency-exchange/zipball/bb6a0c3b682aaed2eda205ceda5582673cb444af",
+                "reference": "bb6a0c3b682aaed2eda205ceda5582673cb444af",
+                "shasum": ""
+            },
+            "require": {
+                "ext-bcmath": "*",
+                "ext-json": "*",
+                "php": "~5.5 || ~7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.0"
+            },
+            "suggest": {
+                "commercie/currency-exchange-yahoo-finance": "Retrieves currency exchange rates from Yahoo! Finance.",
+                "drupal/currency": "Integrates this package with Drupal."
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Commercie\\CurrencyExchange\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Bart Feenstra",
+                    "email": "bart@mynameisbart.com"
+                }
+            ],
+            "description": "A library for retrieving currency exchange rates.",
+            "time": "2016-07-01T11:01:48+00:00"
+        },
         {
             "name": "components/highlightjs",
             "version": "9.7.0",
@@ -3339,17 +3429,17 @@
         },
         {
             "name": "drupal/commerce",
-            "version": "2.21.0",
+            "version": "2.22.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/commerce.git",
-                "reference": "8.x-2.21"
+                "reference": "8.x-2.22"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/commerce-8.x-2.21.zip",
-                "reference": "8.x-2.21",
-                "shasum": "3b38b58458e26f14cc4c203cda3f01ac84296909"
+                "url": "https://ftp.drupal.org/files/projects/commerce-8.x-2.22.zip",
+                "reference": "8.x-2.22",
+                "shasum": "c80e7dc0a6dada11a145fee2241053984d6d27f9"
             },
             "require": {
                 "commerceguys/intl": "^1.0.0",
@@ -3381,8 +3471,8 @@
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-2.21",
-                    "datestamp": "1600787975",
+                    "version": "8.x-2.22",
+                    "datestamp": "1610116363",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -3518,6 +3608,58 @@
                 "issues": "https://www.drupal.org/project/issues/commerce_cart_api"
             }
         },
+        {
+            "name": "drupal/commerce_cart_redirection",
+            "version": "3.0.5",
+            "source": {
+                "type": "git",
+                "url": "https://git.drupalcode.org/project/commerce_cart_redirection.git",
+                "reference": "3.0.5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://ftp.drupal.org/files/projects/commerce_cart_redirection-3.0.5.zip",
+                "reference": "3.0.5",
+                "shasum": "362dcdf3a4a3e686dca238737d26e369d6b32190"
+            },
+            "require": {
+                "drupal/core": "^8 || ^9"
+            },
+            "type": "drupal-module",
+            "extra": {
+                "drupal": {
+                    "version": "3.0.5",
+                    "datestamp": "1604876635",
+                    "security-coverage": {
+                        "status": "covered",
+                        "message": "Covered by Drupal's security advisory policy"
+                    }
+                }
+            },
+            "notification-url": "https://packages.drupal.org/8/downloads",
+            "license": [
+                "GPL-2.0+"
+            ],
+            "authors": [
+                {
+                    "name": "AndyD328",
+                    "homepage": "https://www.drupal.org/user/2261214"
+                },
+                {
+                    "name": "calbasi",
+                    "homepage": "https://www.drupal.org/user/318818"
+                }
+            ],
+            "description": "Redirect to your cart page after adding a product to it",
+            "homepage": "https://www.drupal.org/project/commerce_cart_redirection",
+            "keywords": [
+                "Drupal"
+            ],
+            "support": {
+                "source": "http://cgit.drupalcode.org/commerce_cart_redirection",
+                "issues": "https://www.drupal.org/project/issues/commerce_cart_redirection"
+            }
+        },
         {
             "name": "drupal/commerce_checkout",
             "version": "2.21.0",
@@ -3568,17 +3710,11 @@
         },
         {
             "name": "drupal/commerce_license",
-            "version": "2.0.0-alpha18",
+            "version": "dev-2.x",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/commerce_license.git",
-                "reference": "8.x-2.0-alpha18"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/commerce_license-8.x-2.0-alpha18.zip",
-                "reference": "8.x-2.0-alpha18",
-                "shasum": "5f6950b15960e441be9351137865dac8c734d722"
+                "reference": "f1128fd1a75b30ed6ed7be24f6bd6cebb6e6c9cd"
             },
             "require": {
                 "drupal/advancedqueue": "^1.0",
@@ -3596,12 +3732,15 @@
             },
             "type": "drupal-module",
             "extra": {
+                "branch-alias": {
+                    "dev-2.x": "2.x-dev"
+                },
                 "drupal": {
-                    "version": "8.x-2.0-alpha18",
-                    "datestamp": "1533546784",
+                    "version": "8.x-2.0-alpha18+1-dev",
+                    "datestamp": "1580896875",
                     "security-coverage": {
                         "status": "not-covered",
-                        "message": "Alpha releases are not covered by Drupal security advisories."
+                        "message": "Dev releases are not covered by Drupal security advisories."
                     }
                 }
             },
@@ -3647,7 +3786,8 @@
             "support": {
                 "source": "http://cgit.drupalcode.org/commerce_license",
                 "issues": "https://www.drupal.org/project/issues/commerce_license"
-            }
+            },
+            "time": "2020-02-05T10:00:53+00:00"
         },
         {
             "name": "drupal/commerce_migrate",
@@ -4203,6 +4343,87 @@
                 "source": "https://git.drupalcode.org/project/commerce"
             }
         },
+        {
+            "name": "drupal/commerce_stripe",
+            "version": "dev-1.x",
+            "source": {
+                "type": "git",
+                "url": "https://git.drupalcode.org/project/commerce_stripe.git",
+                "reference": "14aa4b67b850528e5535e79aa70b6b7c30bf749d"
+            },
+            "require": {
+                "drupal/commerce": "^2.15",
+                "drupal/commerce_payment": "*",
+                "drupal/core": "^8.7.7 || ^9",
+                "stripe/stripe-php": "^7.25"
+            },
+            "type": "drupal-module",
+            "extra": {
+                "branch-alias": {
+                    "dev-1.x": "1.x-dev"
+                },
+                "drupal": {
+                    "version": "8.x-1.0-rc4+2-dev",
+                    "datestamp": "1600788297",
+                    "security-coverage": {
+                        "status": "not-covered",
+                        "message": "Dev releases are not covered by Drupal security advisories."
+                    }
+                }
+            },
+            "notification-url": "https://packages.drupal.org/8/downloads",
+            "license": [
+                "GPL-2.0-or-later"
+            ],
+            "authors": [
+                {
+                    "name": "Damien Tournoud",
+                    "homepage": "https://www.drupal.org/user/22211"
+                },
+                {
+                    "name": "GuGuss",
+                    "homepage": "https://www.drupal.org/user/1237516"
+                },
+                {
+                    "name": "aviindub",
+                    "homepage": "https://www.drupal.org/user/2565920"
+                },
+                {
+                    "name": "bojanz",
+                    "homepage": "https://www.drupal.org/user/86106"
+                },
+                {
+                    "name": "iler",
+                    "homepage": "https://www.drupal.org/user/726092"
+                },
+                {
+                    "name": "jsacksick",
+                    "homepage": "https://www.drupal.org/user/972218"
+                },
+                {
+                    "name": "mglaman",
+                    "homepage": "https://www.drupal.org/user/2416470"
+                },
+                {
+                    "name": "rszrama",
+                    "homepage": "https://www.drupal.org/user/49344"
+                },
+                {
+                    "name": "torgosPizza",
+                    "homepage": "https://www.drupal.org/user/151333"
+                },
+                {
+                    "name": "vasike",
+                    "homepage": "https://www.drupal.org/user/156237"
+                }
+            ],
+            "description": "Provides Commerce integration for Stripe Payments.",
+            "homepage": "http://drupal.org/project/commerce_stripe",
+            "support": {
+                "source": "https://git.drupalcode.org/project/commerce_stripe"
+            },
+            "time": "2020-09-22T15:24:39+00:00"
+        },
         {
             "name": "drupal/commerce_variation_cart_form",
             "version": "dev-1.x",
@@ -5673,6 +5894,65 @@
                 "issues": "https://www.drupal.org/project/issues/ctools"
             }
         },
+        {
+            "name": "drupal/currency",
+            "version": "3.3.0",
+            "source": {
+                "type": "git",
+                "url": "https://git.drupalcode.org/project/currency.git",
+                "reference": "8.x-3.3"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://ftp.drupal.org/files/projects/currency-8.x-3.3.zip",
+                "reference": "8.x-3.3",
+                "shasum": "9e4fa704caa3fdded1419aebb1c289abdf5c27d3"
+            },
+            "require": {
+                "commercie/currency": "~1.0",
+                "commercie/currency-exchange": "~1.0",
+                "drupal/core": "^8.8 || ^9",
+                "drupal/plugin": "^2.6",
+                "ext-bcmath": "*",
+                "php": "~7.1"
+            },
+            "type": "drupal-module",
+            "extra": {
+                "drupal": {
+                    "version": "8.x-3.3",
+                    "datestamp": "1595621136",
+                    "security-coverage": {
+                        "status": "covered",
+                        "message": "Covered by Drupal's security advisory policy"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Drupal\\currency\\": "src"
+                }
+            },
+            "autoload-dev": {
+                "psr-4": {
+                    "Drupal\\Tests\\currency\\": "tests/src"
+                }
+            },
+            "notification-url": "https://packages.drupal.org/8/downloads",
+            "license": [
+                "GPL-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "Berdir",
+                    "homepage": "https://www.drupal.org/user/214652"
+                }
+            ],
+            "description": "Provides your Drupal site with currency conversion, currency information & metadata, and amount/price display functionality.",
+            "homepage": "https://www.drupal.org/project/currency",
+            "support": {
+                "source": "https://git.drupalcode.org/project/currency"
+            }
+        },
         {
             "name": "drupal/date_range_formatter",
             "version": "3.1.0",
@@ -5771,17 +6051,17 @@
         },
         {
             "name": "drupal/devel",
-            "version": "4.0.1",
+            "version": "4.1.1",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/devel.git",
-                "reference": "4.0.1"
+                "reference": "4.1.1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/devel-4.0.1.zip",
-                "reference": "4.0.1",
-                "shasum": "cf2458de1cbac00a88ed26ae3da2cf331e1bc047"
+                "url": "https://ftp.drupal.org/files/projects/devel-4.1.1.zip",
+                "reference": "4.1.1",
+                "shasum": "88e5d49dda26a3136291ecd97bc6c8e897b24198"
             },
             "require": {
                 "doctrine/common": "^2.7",
@@ -5792,16 +6072,7 @@
                 "kint-php/kint": "<3"
             },
             "require-dev": {
-                "composer/installers": "^1",
-                "cweagans/composer-patches": "~1.0",
-                "drupal/core-composer-scaffold": "^8.0",
-                "drupal/core-dev": "^8.0",
-                "drupal/core-recommended": "^8.0",
-                "drush/drush": "^10",
-                "mglaman/phpstan-drupal": "^0.12",
-                "php-parallel-lint/php-parallel-lint": "^1.2",
-                "phpstan/phpstan-deprecation-rules": "^0.12",
-                "zaporylie/composer-drupal-optimizations": "^1.0"
+                "drush/drush": "^10"
             },
             "suggest": {
                 "kint-php/kint": "Kint provides an informative display of arrays/objects. Useful for debugging and developing."
@@ -5809,82 +6080,20 @@
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "4.0.1",
-                    "datestamp": "1600300079",
+                    "version": "4.1.1",
+                    "datestamp": "1609419527",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
                     }
                 },
-                "installer-paths": {
-                    "web/core": [
-                        "type:drupal-core"
-                    ],
-                    "web/libraries/{$name}": [
-                        "type:drupal-library"
-                    ],
-                    "web/modules/contrib/{$name}": [
-                        "type:drupal-module"
-                    ],
-                    "web/profiles/{$name}": [
-                        "type:drupal-profile"
-                    ],
-                    "web/themes/{$name}": [
-                        "type:drupal-theme"
-                    ],
-                    "drush/{$name}": [
-                        "type:drupal-drush"
-                    ]
-                },
-                "drupal-scaffold": {
-                    "locations": {
-                        "web-root": "web/"
-                    }
-                },
                 "drush": {
                     "services": {
                         "drush.services.yml": "^9 || ^10"
                     }
                 }
             },
-            "autoload": {
-                "classmap": [
-                    ".spoons/ScriptHandler.php"
-                ]
-            },
             "notification-url": "https://packages.drupal.org/8/downloads",
-            "scripts": {
-                "si": [
-                    "drush si -v --db-url=${SIMPLETEST_DB:-mysql://root:password@mariadb/db}"
-                ],
-                "phpcs": [
-                    "phpcs --runtime-set ignore_warnings_on_exit 1 --runtime-set ignore_errors_on_exit 1 web/modules/custom"
-                ],
-                "lint": [
-                    "parallel-lint --exclude web --exclude vendor ."
-                ],
-                "webserver": [
-                    "cd web && php -S 0.0.0.0:8888 .ht.router.php"
-                ],
-                "chromedriver": [
-                    "chromedriver --port=9515 --verbose --whitelisted-ips --log-path=/tmp/chromedriver.log --no-sandbox"
-                ],
-                "unit": [
-                    "phpunit --verbose web/modules/custom"
-                ],
-                "phpstan": [
-                    "phpstan analyse web/modules/custom"
-                ],
-                "stylelint": [
-                    "yarn --silent --cwd web/core stylelint --formatter verbose --config ./.stylelintrc.json ../modules/custom/**/*.css"
-                ],
-                "eslint": [
-                    "yarn --silent --cwd web/core eslint -c ./.eslintrc.json ../modules/custom"
-                ],
-                "post-update-cmd": [
-                    "Spoons\\ScriptHandler::createSymlinks"
-                ]
-            },
             "license": [
                 "GPL-2.0-or-later"
             ],
@@ -6711,6 +6920,10 @@
                         "status": "not-covered",
                         "message": "Dev releases are not covered by Drupal security advisories."
                     }
+                },
+                "patches_applied": {
+                    "undefined index name 18 https://www.drupal.org/project/field_group/issues/3064890": "https://www.drupal.org/files/issues/2020-10-01/field_group-undefined-index-name-3064890-18.patch",
+                    "undefined index name 16 https://www.drupal.org/project/field_group/issues/3064890": "https://www.drupal.org/files/issues/2020-08-10/field_group-undefined-index-name-3064890-16.patch"
                 }
             },
             "notification-url": "https://packages.drupal.org/8/downloads",
@@ -9631,6 +9844,123 @@
                 "source": "https://git.drupalcode.org/project/pathologic"
             }
         },
+        {
+            "name": "drupal/payment",
+            "version": "2.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://git.drupalcode.org/project/payment.git",
+                "reference": "8.x-2.1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://ftp.drupal.org/files/projects/payment-8.x-2.1.zip",
+                "reference": "8.x-2.1",
+                "shasum": "7a74d4cb89b443e1c9fde8538b3b96ee9c6893d1"
+            },
+            "require": {
+                "drupal/core": "^8.8 || ^9",
+                "drupal/currency": "~3.0",
+                "drupal/plugin": "~2.2",
+                "ext-bcmath": "*",
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "drupal/payment_reference": "*"
+            },
+            "type": "drupal-module",
+            "extra": {
+                "drupal": {
+                    "version": "8.x-2.1",
+                    "datestamp": "1595623153",
+                    "security-coverage": {
+                        "status": "covered",
+                        "message": "Covered by Drupal's security advisory policy"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Drupal\\payment\\": "src",
+                    "Drupal\\payment_form\\": "modules/payment_form/src",
+                    "Drupal\\payment_reference\\": "modules/payment_reference/src"
+                }
+            },
+            "autoload-dev": {
+                "psr-4": {
+                    "Drupal\\Tests\\payment\\": "tests/src",
+                    "Drupal\\Tests\\payment_form\\": "modules/payment_form/tests/src",
+                    "Drupal\\Tests\\payment_reference\\": "modules/payment_reference/tests/src"
+                }
+            },
+            "notification-url": "https://packages.drupal.org/8/downloads",
+            "license": [
+                "GPL-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "Berdir",
+                    "homepage": "https://www.drupal.org/user/214652"
+                },
+                {
+                    "name": "ricovandevin",
+                    "homepage": "https://www.drupal.org/user/1243726"
+                },
+                {
+                    "name": "torotil",
+                    "homepage": "https://www.drupal.org/user/865256"
+                }
+            ],
+            "description": "Allows payments to be made using any of the available payment methods.",
+            "homepage": "https://www.drupal.org/project/payment",
+            "support": {
+                "source": "https://git.drupalcode.org/project/payment"
+            }
+        },
+        {
+            "name": "drupal/payment_commerce",
+            "version": "dev-2.x",
+            "source": {
+                "type": "git",
+                "url": "https://git.drupalcode.org/project/payment_commerce.git",
+                "reference": "deaa480c6c9a8f3e32567650e265d47f0e93e67e"
+            },
+            "require": {
+                "drupal/commerce_payment": "*",
+                "drupal/core": "~8.0",
+                "drupal/payment": "*"
+            },
+            "type": "drupal-module",
+            "extra": {
+                "branch-alias": {
+                    "dev-2.x": "2.x-dev"
+                },
+                "drupal": {
+                    "version": "8.x-2.x-dev",
+                    "datestamp": "1507110244",
+                    "security-coverage": {
+                        "status": "not-covered",
+                        "message": "Dev releases are not covered by Drupal security advisories."
+                    }
+                }
+            },
+            "notification-url": "https://packages.drupal.org/8/downloads",
+            "license": [
+                "GPL-2.0-or-later"
+            ],
+            "authors": [
+                {
+                    "name": "ricovandevin",
+                    "homepage": "https://www.drupal.org/user/1243726"
+                }
+            ],
+            "description": "Allows Drupal Commerce orders to be paid using Payment.",
+            "homepage": "https://www.drupal.org/project/payment_commerce",
+            "support": {
+                "source": "https://git.drupalcode.org/project/payment_commerce"
+            },
+            "time": "2017-10-04T09:40:53+00:00"
+        },
         {
             "name": "drupal/permissions_filter",
             "version": "1.1.0",
@@ -9723,6 +10053,69 @@
                 "issues": "https://www.drupal.org/project/issues/persistent_login"
             }
         },
+        {
+            "name": "drupal/plugin",
+            "version": "2.8.0",
+            "source": {
+                "type": "git",
+                "url": "https://git.drupalcode.org/project/plugin.git",
+                "reference": "8.x-2.8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://ftp.drupal.org/files/projects/plugin-8.x-2.8.zip",
+                "reference": "8.x-2.8",
+                "shasum": "dc97912f7982fc87d905d32167e90c13d7d44093"
+            },
+            "require": {
+                "drupal/core": "^8.7.7 || ^9",
+                "php": "~7.1"
+            },
+            "type": "drupal-module",
+            "extra": {
+                "drupal": {
+                    "version": "8.x-2.8",
+                    "datestamp": "1595360847",
+                    "security-coverage": {
+                        "status": "covered",
+                        "message": "Covered by Drupal's security advisory policy"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Drupal\\plugin\\": "src"
+                }
+            },
+            "autoload-dev": {
+                "psr-4": {
+                    "Drupal\\Tests\\plugin\\": "tests/src"
+                }
+            },
+            "notification-url": "https://packages.drupal.org/8/downloads",
+            "license": [
+                "GPL-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "Berdir",
+                    "homepage": "https://www.drupal.org/user/214652"
+                },
+                {
+                    "name": "bradjones1",
+                    "homepage": "https://www.drupal.org/user/405824"
+                },
+                {
+                    "name": "joachim",
+                    "homepage": "https://www.drupal.org/user/107701"
+                }
+            ],
+            "description": "Provides tools that extend Drupal's plugin system.",
+            "homepage": "https://www.drupal.org/project/plugin",
+            "support": {
+                "source": "https://git.drupalcode.org/project/plugin"
+            }
+        },
         {
             "name": "drupal/profile",
             "version": "1.2.0",
@@ -9793,30 +10186,30 @@
         },
         {
             "name": "drupal/recurring_period",
-            "version": "1.0.0-alpha5",
+            "version": "1.0.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/recurring_period.git",
-                "reference": "8.x-1.0-alpha5"
+                "reference": "8.x-1.0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/recurring_period-8.x-1.0-alpha5.zip",
-                "reference": "8.x-1.0-alpha5",
-                "shasum": "441ab529d266c08977c97021f37746cf3203b017"
+                "url": "https://ftp.drupal.org/files/projects/recurring_period-8.x-1.0.zip",
+                "reference": "8.x-1.0",
+                "shasum": "da6506bc12de892d86706fba7904691de822e10b"
             },
             "require": {
-                "drupal/core": "~8.0",
+                "drupal/core": "^8.8 || ^9",
                 "drupal/interval": "*"
             },
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-1.0-alpha5",
-                    "datestamp": "1561811286",
+                    "version": "8.x-1.0",
+                    "datestamp": "1607335704",
                     "security-coverage": {
-                        "status": "not-covered",
-                        "message": "Project has not opted into security advisory coverage!"
+                        "status": "covered",
+                        "message": "Covered by Drupal's security advisory policy"
                     }
                 }
             },
@@ -14984,6 +15377,63 @@
             "description": "Automatic BASH completion for Symfony Console Component based applications.",
             "time": "2019-11-24T17:03:06+00:00"
         },
+        {
+            "name": "stripe/stripe-php",
+            "version": "v7.67.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/stripe/stripe-php.git",
+                "reference": "935d2c67912007f6d17b6c08a62050252c509129"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/stripe/stripe-php/zipball/935d2c67912007f6d17b6c08a62050252c509129",
+                "reference": "935d2c67912007f6d17b6c08a62050252c509129",
+                "shasum": ""
+            },
+            "require": {
+                "ext-curl": "*",
+                "ext-json": "*",
+                "ext-mbstring": "*",
+                "php": ">=5.6.0"
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "2.17.1",
+                "php-coveralls/php-coveralls": "^2.1",
+                "phpunit/phpunit": "^5.7",
+                "squizlabs/php_codesniffer": "^3.3",
+                "symfony/process": "~3.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Stripe\\": "lib/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Stripe and contributors",
+                    "homepage": "https://github.com/stripe/stripe-php/contributors"
+                }
+            ],
+            "description": "Stripe PHP Library",
+            "homepage": "https://stripe.com/",
+            "keywords": [
+                "api",
+                "payment processing",
+                "stripe"
+            ],
+            "time": "2020-12-09T19:00:34+00:00"
+        },
         {
             "name": "symfony-cmf/routing",
             "version": "1.4.1",
@@ -17895,9 +18345,10 @@
     "minimum-stability": "dev",
     "stability-flags": {
         "drupal/auto_entitylabel": 20,
-        "drupal/commerce_license": 15,
+        "drupal/commerce_license": 20,
         "drupal/commerce_pricelist": 20,
         "drupal/commerce_recurring": 20,
+        "drupal/commerce_stripe": 20,
         "drupal/commerce_variation_cart_form": 20,
         "drupal/computed_field": 10,
         "drupal/content_sync": 20,
@@ -17914,6 +18365,7 @@
         "drupal/migrate_plus": 20,
         "drupal/migrate_tools": 20,
         "drupal/mimemail": 20,
+        "drupal/payment_commerce": 20,
         "drupal/search_api_page": 20,
         "drupal/select_translation": 20,
         "drupal/simplenews": 20,

+ 1 - 0
config/sync/autologout.role.adherent.yml

@@ -1,2 +1,3 @@
 enabled: false
 timeout: null
+url: ''

+ 1 - 0
config/sync/autologout.role.admin.yml

@@ -2,3 +2,4 @@ enabled: true
 timeout: 0
 _core:
   default_config_hash: Oe-fB2enOwHHacGGf5HLP31RdU9bEsQZ19YQ6AS8pjw
+url: ''

+ 1 - 0
config/sync/autologout.role.admin_showroom.yml

@@ -1,2 +1,3 @@
 enabled: false
 timeout: null
+url: ''

+ 1 - 0
config/sync/autologout.role.alpha_testeur.yml

@@ -1,2 +1,3 @@
 enabled: false
 timeout: null
+url: ''

+ 1 - 0
config/sync/autologout.role.contact_company.yml

@@ -1,2 +1,3 @@
 enabled: false
 timeout: null
+url: ''

+ 1 - 0
config/sync/autologout.role.free_user.yml

@@ -1,2 +1,3 @@
 enabled: false
 timeout: null
+url: ''

+ 1 - 0
config/sync/autologout.role.root.yml

@@ -2,3 +2,4 @@ enabled: true
 timeout: 0
 _core:
   default_config_hash: Oe-fB2enOwHHacGGf5HLP31RdU9bEsQZ19YQ6AS8pjw
+url: ''

+ 1 - 0
config/sync/autologout.role.student.yml

@@ -1,2 +1,3 @@
 enabled: false
 timeout: null
+url: ''

+ 1 - 0
config/sync/autologout.role.translator.yml

@@ -1,2 +1,3 @@
 enabled: false
 timeout: null
+url: ''

+ 1 - 0
config/sync/autologout.role.unverified.yml

@@ -1,2 +1,3 @@
 enabled: false
 timeout: null
+url: ''

+ 7 - 1
config/sync/autologout.settings.yml

@@ -15,4 +15,10 @@ langcode: fr
 _core:
   default_config_hash: m2pxH8tc4KIlh127R5TYim65W7NBY9gpYQnIXlvDp0M
 dialog_title: 'materiO’ Alert'
-no_individual_logout_threshold: false
+no_individual_logout_threshold: true
+role_logout_max: true
+inactivity_message_type: status
+disable_buttons: false
+yes_button: ''
+no_button: ''
+whitelisted_ip_addresses: ''

+ 46 - 0
config/sync/block.block.checkoutprogress.yml

@@ -0,0 +1,46 @@
+uuid: f1f79e84-77c7-4d8a-a4b5-a8a84f380cb0
+langcode: en
+status: true
+dependencies:
+  module:
+    - commerce_checkout
+    - context
+    - ctools
+  theme:
+    - materiotheme
+id: checkoutprogress
+theme: materiotheme
+region: content_top
+weight: 0
+provider: null
+plugin: commerce_checkout_progress
+settings:
+  id: commerce_checkout_progress
+  label: 'Checkout progress'
+  provider: commerce_checkout
+  label_display: '0'
+visibility:
+  view_inclusion:
+    id: view_inclusion
+    negate: null
+    view_inclusion: {  }
+    context_mapping: {  }
+  request_path_exclusion:
+    id: request_path_exclusion
+    pages: ''
+    negate: null
+    context_mapping: {  }
+  'entity_bundle:commerce_product_variation':
+    id: 'entity_bundle:commerce_product_variation'
+    bundles:
+      materio_product_variation_type: materio_product_variation_type
+    negate: false
+    context_mapping:
+      commerce_product_variation: '@commerce_product.product_variation_route_context:commerce_product_variation'
+  'entity_bundle:commerce_product':
+    id: 'entity_bundle:commerce_product'
+    bundles:
+      materio_product_type: materio_product_type
+    negate: false
+    context_mapping:
+      commerce_product: '@commerce_product.product_route_context:commerce_product'

+ 12 - 0
config/sync/block.block.tabs.yml

@@ -3,6 +3,7 @@ langcode: en
 status: true
 dependencies:
   module:
+    - context
     - user
   theme:
     - materiotheme
@@ -23,8 +24,19 @@ visibility:
   user_role:
     id: user_role
     roles:
+      authenticated: authenticated
       admin: admin
       root: root
     negate: false
     context_mapping:
       user: '@user.current_user_context:current_user'
+  view_inclusion:
+    id: view_inclusion
+    negate: null
+    view_inclusion: {  }
+    context_mapping: {  }
+  request_path_exclusion:
+    id: request_path_exclusion
+    pages: ''
+    negate: null
+    context_mapping: {  }

+ 24 - 18
config/sync/commerce_checkout.commerce_checkout_flow.materio_checkout_flow.yml

@@ -5,54 +5,60 @@ dependencies:
   module:
     - commerce_payment
     - commerce_promotion
+    - commerce_stripe
     - email_registration
 id: materio_checkout_flow
 label: 'materio checkout flow'
 plugin: multistep_default
 configuration:
   display_checkout_progress: true
+  display_checkout_progress_breadcrumb_links: true
   panes:
-    login:
-      allow_guest_checkout: true
-      allow_registration: true
-      step: login
-      weight: 0
     email_registration_login:
       allow_guest_checkout: true
-      allow_registration: true
-      step: login
-      weight: 1
+      allow_registration: false
+      step: _disabled
+      weight: 8
     contact_information:
       double_entry: false
       step: order_information
-      weight: 2
+      weight: 0
     payment_information:
       step: order_information
-      weight: 3
+      weight: 1
     review:
       step: review
-      weight: 4
+      weight: 2
+    stripe_review:
+      button_id: edit-actions-next
+      step: review
+      weight: 3
     payment_process:
       capture: true
       step: payment
-      weight: 5
+      weight: 4
     completion_message:
       message:
         value: "Your order number is [commerce_order:order_number].\r\nYou can view your order on your account page when logged in."
         format: plain_text
       step: complete
-      weight: 6
-    completion_register:
-      step: complete
-      weight: 7
+      weight: 5
     order_summary:
       view: commerce_checkout_order_summary
       step: _sidebar
-      weight: 8
+      weight: 6
     coupon_redemption:
       allow_multiple: false
       step: _sidebar
-      weight: 9
+      weight: 7
     email_registration_completion_registration:
+      step: _disabled
+      weight: 9
+    completion_register:
       step: _disabled
       weight: 10
+    login:
+      allow_guest_checkout: true
+      allow_registration: false
+      step: _disabled
+      weight: 11

+ 7 - 6
config/sync/commerce_payment.commerce_payment_gateway.cm_cic.yml

@@ -1,21 +1,22 @@
 uuid: 9fd9ac25-5b14-4630-a056-546da6b3b418
 langcode: en
-status: true
+status: false
 dependencies:
   module:
     - commerce_cmcic
 id: cm_cic
-label: CM-CIC
-weight: null
+label: CIC-CM
+weight: -10
 plugin: commerce_cmcic
 configuration:
-  display_label: CM-CIC
+  display_label: 'Credit Card via CIC-CM'
   mode: test
   payment_method_types:
     - credit_card
-  bank_type: cic
+  collect_billing_information: true
+  bank_type: monetico
   version: '3.0'
-  security_key: 7C86189FA72DA637A722BB395BFB9D403D3C70P7
+  security_key: 7C86189FA72DA637A722BB395BFB9D403D3C7097
   tpe: '6277685'
   company: materio
 conditions: {  }

+ 20 - 0
config/sync/commerce_payment.commerce_payment_gateway.stripe.yml

@@ -0,0 +1,20 @@
+uuid: e41e2a00-d6e1-4a9b-add4-058e4fbde0d2
+langcode: en
+status: true
+dependencies:
+  module:
+    - commerce_stripe
+id: stripe
+label: Stripe
+weight: -10
+plugin: stripe
+configuration:
+  publishable_key: pk_test_51I7RAuBp8BkjanLQtX3lktLLC3PIOkzKVqPqijC9GZz1XD2PHLZHEQOSJzjVnvxO2aMuk0mQybVZnNnLsJDSWMP800VENEIUqZ
+  secret_key: sk_test_51I7RAuBp8BkjanLQSwUpyIDFUwvWgXjsJZHI5HAcZK9XCe3Gw1BuhxvvgZccv5Feb6jAo8ZskId2K5Oy4IIUsOQP00Mb4LdMfO
+  display_label: Stripe
+  mode: test
+  payment_method_types:
+    - credit_card
+  collect_billing_information: true
+conditions: {  }
+conditionOperator: AND

+ 0 - 4
config/sync/content_sync.AdminSettings.yml

@@ -1,4 +0,0 @@
-site_uuid_override: '0'
-help_menu_disabled: false
-_core:
-  default_config_hash: WvXLN1x52wMWWAMFc8gpSuFK5mrsLBp4e1pRR2-M08k

+ 0 - 3
config/sync/content_sync.settings.yml

@@ -1,3 +0,0 @@
-content_sync:
-  site_uuid_override: 0
-  help_menu_disabled: true

+ 11 - 0
config/sync/core.entity_view_display.commerce_order.default.default.yml

@@ -6,6 +6,7 @@ dependencies:
     - commerce_order.commerce_order_type.default
   module:
     - commerce_order
+    - commerce_price
     - state_machine
     - user
 _core:
@@ -15,6 +16,15 @@ targetEntityType: commerce_order
 bundle: default
 mode: default
 content:
+  balance:
+    type: commerce_price_default
+    label: inline
+    weight: 9
+    settings:
+      strip_trailing_zeroes: false
+      currency_display: symbol
+    third_party_settings: {  }
+    region: content
   changed:
     type: timestamp
     weight: 4
@@ -91,5 +101,6 @@ content:
 hidden:
   billing_profile: true
   order_number: true
+  search_api_excerpt: true
   store_id: true
   total_paid: true

+ 9 - 0
config/sync/core.entity_view_display.commerce_order.materio_order_type.default.yml

@@ -15,6 +15,15 @@ targetEntityType: commerce_order
 bundle: materio_order_type
 mode: default
 content:
+  balance:
+    type: commerce_price_default
+    label: inline
+    weight: 12
+    settings:
+      strip_trailing_zeroes: false
+      currency_display: symbol
+    third_party_settings: {  }
+    region: content
   billing_profile:
     type: entity_reference_revisions_entity_view
     weight: 10

+ 11 - 0
config/sync/core.entity_view_display.commerce_order.recurring.default.yml

@@ -8,6 +8,7 @@ dependencies:
     - field.field.commerce_order.recurring.billing_schedule
   module:
     - commerce_order
+    - commerce_price
     - commerce_recurring
     - state_machine
     - user
@@ -18,6 +19,15 @@ targetEntityType: commerce_order
 bundle: recurring
 mode: default
 content:
+  balance:
+    type: commerce_price_default
+    label: inline
+    weight: 10
+    settings:
+      strip_trailing_zeroes: false
+      currency_display: symbol
+    third_party_settings: {  }
+    region: content
   billing_period:
     type: commerce_billing_period_default
     weight: 0
@@ -102,5 +112,6 @@ hidden:
   billing_profile: true
   billing_schedule: true
   order_number: true
+  search_api_excerpt: true
   store_id: true
   total_paid: true

+ 39 - 0
config/sync/core.entity_view_display.commerce_product.materio_product_type.home_summary.yml

@@ -0,0 +1,39 @@
+uuid: 52c3ccdf-4fb5-4c18-bc17-bf6d0129bd7e
+langcode: en
+status: true
+dependencies:
+  config:
+    - commerce_product.commerce_product_type.materio_product_type
+    - core.entity_view_mode.commerce_product.home_summary
+    - field.field.commerce_product.materio_product_type.body
+    - field.field.commerce_product.materio_product_type.field_price_description
+  module:
+    - text
+id: commerce_product.materio_product_type.home_summary
+targetEntityType: commerce_product
+bundle: materio_product_type
+mode: home_summary
+content:
+  body:
+    type: text_default
+    weight: 1
+    region: content
+    label: hidden
+    settings: {  }
+    third_party_settings: {  }
+  title:
+    type: string
+    weight: 0
+    region: content
+    label: hidden
+    settings:
+      link_to_entity: false
+    third_party_settings: {  }
+hidden:
+  created: true
+  field_price_description: true
+  langcode: true
+  search_api_excerpt: true
+  stores: true
+  uid: true
+  variations: true

+ 1 - 1
config/sync/core.entity_view_display.node.frontpage.default.yml

@@ -255,7 +255,7 @@ content:
     weight: 6
     region: content
     settings:
-      view_mode: summary
+      view_mode: home_summary
       link: false
     third_party_settings: {  }
     type: entity_reference_entity_view

+ 10 - 0
config/sync/core.entity_view_mode.commerce_product.home_summary.yml

@@ -0,0 +1,10 @@
+uuid: 42591e4f-3a62-4225-b025-f4436508aeb9
+langcode: en
+status: true
+dependencies:
+  module:
+    - commerce_product
+id: commerce_product.home_summary
+label: 'Home summary'
+targetEntityType: commerce_product
+cache: true

+ 3 - 1
config/sync/core.extension.yml

@@ -36,6 +36,7 @@ module:
   commerce_promotion: 0
   commerce_recurring: 0
   commerce_store: 0
+  commerce_stripe: 0
   commerce_tax: 0
   commerce_variation_cart_form: 0
   computed_field: 0
@@ -50,12 +51,12 @@ module:
   contact: 0
   content_lock: 0
   content_lock_timeout: 0
-  content_sync: 0
   context: 0
   contextual: 0
   cshs: 0
   ctools: 0
   ctools_block: 0
+  currency: 0
   date_range_formatter: 0
   datetime: 0
   datetime_range: 0
@@ -141,6 +142,7 @@ module:
   pathologic: 0
   permissions_filter: 0
   persistent_login: 0
+  plugin: 0
   profile: 0
   recurring_period: 0
   redirect: 0

+ 3 - 0
config/sync/currency.amount_formatting.yml

@@ -0,0 +1,3 @@
+plugin_id: currency_basic
+_core:
+  default_config_hash: KxmQKHtm7y2OHcdp0pt27aKtDrezgRSJCsXQ0fFQ-Sg

+ 22 - 0
config/sync/currency.currency.XXX.yml

@@ -0,0 +1,22 @@
+uuid: cde6b53b-b481-4c4f-b182-673281e65b9a
+langcode: en
+status: true
+dependencies: {  }
+_core:
+  default_config_hash: Z1YlONWzZZRT4LTq7RYN4hf3MEcT160wbomEsxLoPZ8
+alternativeSigns: {  }
+currencyCode: XXX
+currencyNumber: '999'
+label: 'No currency'
+roundingStep: null
+sign: ¤
+subunits: 0
+usages:
+  -
+    start: ''
+    end: ''
+    countryCode: AQ
+  -
+    start: ''
+    end: ''
+    countryCode: ZZ

+ 10 - 0
config/sync/currency.currency_locale.en_US.yml

@@ -0,0 +1,10 @@
+uuid: 451e712c-eec9-4a60-9402-d17b1619ee2e
+langcode: en
+status: true
+dependencies: {  }
+_core:
+  default_config_hash: nAygxNkoV-dysf09n8eaT2MeULBzTisuxlMqdXEJbr8
+decimalSeparator: .
+groupingSeparator: ','
+locale: en_US
+pattern: '¤#,##0.00;(¤#,##0.00)'

+ 9 - 0
config/sync/currency.exchange_rate_provider.yml

@@ -0,0 +1,9 @@
+plugins:
+  -
+    plugin_id: currency_fixed_rates
+    status: true
+  -
+    plugin_id: currency_historical_rates
+    status: true
+_core:
+  default_config_hash: TrKWV8zxs3oIJUC4bRlCJZrOFimdU4FgrGrFusfxJME

+ 3 - 0
config/sync/currency.exchanger.fixed_rates.yml

@@ -0,0 +1,3 @@
+rates: {  }
+_core:
+  default_config_hash: wgwYiaurYzrbMFP3CJz93tXZV-PTtGq_G0GLCXZ_VH8

+ 0 - 1
config/sync/language/fr/core.entity_form_mode.simplenews_subscriber.materio_block.yml

@@ -1 +0,0 @@
-label: Bloc

+ 61 - 2
config/sync/views.view.commerce_licenses.yml

@@ -14,6 +14,7 @@ dependencies:
     - profile
     - state_machine
     - user
+    - views_bulk_operations
 _core:
   default_config_hash: qDJpXJ_8FkzPY58X9u7E69YkFZTYVb-pIw1qMrHC6yk
 id: commerce_licenses
@@ -242,6 +243,64 @@ display:
       row:
         type: fields
       fields:
+        views_bulk_operations_bulk_form:
+          id: views_bulk_operations_bulk_form
+          table: views
+          field: views_bulk_operations_bulk_form
+          relationship: none
+          group_type: group
+          admin_label: ''
+          label: 'Views bulk operations'
+          exclude: false
+          alter:
+            alter_text: false
+            text: ''
+            make_link: false
+            path: ''
+            absolute: false
+            external: false
+            replace_spaces: false
+            path_case: none
+            trim_whitespace: false
+            alt: ''
+            rel: ''
+            link_class: ''
+            prefix: ''
+            suffix: ''
+            target: ''
+            nl2br: false
+            max_length: 0
+            word_boundary: true
+            ellipsis: true
+            more_link: false
+            more_link_text: ''
+            more_link_path: ''
+            strip_tags: false
+            trim: false
+            preserve_tags: ''
+            html: false
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: true
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: true
+          empty: ''
+          hide_empty: false
+          empty_zero: false
+          hide_alter_empty: true
+          batch: true
+          batch_size: 10
+          form_step: true
+          buttons: false
+          clear_on_exposed: true
+          action_title: Action
+          selected_actions:
+            2:
+              action_id: views_bulk_operations_delete_entity
+          plugin_id: views_bulk_operations_bulk_form
         license_id:
           id: license_id
           table: commerce_license
@@ -1624,7 +1683,7 @@ display:
       display_extenders:
         views_ef_fieldset: {  }
     cache_metadata:
-      max-age: -1
+      max-age: 0
       contexts:
         - 'languages:language_content'
         - 'languages:language_interface'
@@ -1644,7 +1703,7 @@ display:
         views_ef_fieldset: {  }
       path: admin/commerce/licenses
     cache_metadata:
-      max-age: -1
+      max-age: 0
       contexts:
         - 'languages:language_content'
         - 'languages:language_interface'

+ 5 - 0
package-lock.json

@@ -4611,6 +4611,11 @@
       "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
       "dev": true
     },
+    "check-password-strength": {
+      "version": "1.0.15",
+      "resolved": "https://registry.npmjs.org/check-password-strength/-/check-password-strength-1.0.15.tgz",
+      "integrity": "sha512-e43Hzwets7P/oeFmCxdzLC9xUVH3mfP70WRchAj23+NPct8dy/yLEZC3ikTZ0/Cht9rcPMoACIiEGyVkiqWjkw=="
+    },
     "chownr": {
       "version": "1.1.3",
       "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz",

+ 1 - 0
package.json

@@ -19,6 +19,7 @@
   "license": "MIT",
   "dependencies": {
     "axios": "^0.21.0",
+    "check-password-strength": "^1.0.15",
     "vue": "^2.6.12",
     "vue-autofocus-directive": "^1.0.4",
     "vue-cool-lightbox": "^2.6.9",

+ 2 - 2
web/modules/custom/materio_home/materio_home.module

@@ -106,7 +106,7 @@ function materio_home_entity_bundle_field_info(EntityTypeInterface $entity_type,
         ->setTargetEntityTypeId($entity_type->id())
         // // The Entity Type bundle this field belongs to.
         ->setTargetBundle($bundle)
-        ->setSetting('target_type', 'commerce_product_variation')
+        ->setSetting('target_type', 'commerce_product')
         ->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED)
         ->setComputed(TRUE)
         ->setRevisionable(FALSE)
@@ -116,7 +116,7 @@ function materio_home_entity_bundle_field_info(EntityTypeInterface $entity_type,
             'label' => 'hidden',
             'weight' => -5,
           ])
-        ->setClass(\Drupal\materio_home\Plugin\Field\FieldType\ComputedProdVariationsReferences::class);
+        ->setClass(\Drupal\materio_home\Plugin\Field\FieldType\ComputedCommerceProductReferences::class);
 
       return $fields;
   }

+ 2 - 2
web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedProdVariationsReferences.php → web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedCommerceProductReferences.php

@@ -13,7 +13,7 @@ use Drupal\Core\TypedData\ComputedItemListTrait;
 // https://www.cornel.co/article/entity-reference-computed-field-example-drupal
 // https://www.caxy.com/blog/drupal-custom-form-and-computed-fields
 
-class ComputedProdVariationsReferences extends EntityReferenceFieldItemList
+class ComputedCommerceProductReferences extends EntityReferenceFieldItemList
 {
   use ComputedItemListTrait;
   /**
@@ -35,7 +35,7 @@ class ComputedProdVariationsReferences extends EntityReferenceFieldItemList
    * Compute the values.
    */
   protected function computeValue() {
-    $query = \Drupal::entityQuery('commerce_product_variation')
+    $query = \Drupal::entityQuery('commerce_product')
         ->condition('status', 1)
         ->sort('created', 'ASC')
         // ->exists('field_visuel')

+ 5 - 2
web/modules/custom/materio_user/materio_user.module

@@ -50,7 +50,9 @@ function materio_user_form_user_modal_form_alter(&$form, FormStateInterface $for
 
   $form['actions']['submit']['#attributes'] = array(
     "@click.prevent" => "register",
-    "@keyup.enter" => "register"
+    "@keyup.enter" => "register",
+    "ref" => "register"
+    // ":class" => "can_register"
   );
 
 }
@@ -59,7 +61,8 @@ function _materio_user_process_password_confirm($element){
   // ksm($element);
   $element['pass1']['#attributes'] += array(
     "v-model" => "pass1",
-    "placeholder" => $element['pass1']['#title']
+    "placeholder" => $element['pass1']['#title'],
+    ":class" => "psswd_class"
   );
   $element['pass2']['#attributes'] += array(
     "v-model" => "pass2",

File diff suppressed because it is too large
+ 29 - 0
web/themes/custom/materiotheme/assets/dist/main.css


File diff suppressed because it is too large
+ 8 - 0
web/themes/custom/materiotheme/assets/dist/main.js


+ 15 - 0
web/themes/custom/materiotheme/assets/styles/base/_reset.scss

@@ -33,3 +33,18 @@ p a{
 		border-bottom: 1px dotted #000;
 	}
 }
+
+input[type="text"],
+input[type="email"],
+input[type="tel"],
+input[type="password"]{
+	border-radius: 5px;
+	border : 0.5px solid #aaa;
+	padding: 0.3em 0.4em;
+	// &:focus{
+	// 	outline: none;
+	// 	border-color: blue;
+	// }
+	// outline-style: solid;
+	// outline-width: 1px;
+}

+ 27 - 5
web/themes/custom/materiotheme/assets/styles/main.scss

@@ -874,7 +874,7 @@ article.node--type-frontpage{
             color: #fff;
             position: relative;
             height:18em;
-            >div{
+            >article{
               position: absolute;
               top:50%; left:50%;
               transform: translate(-50%, -50%);
@@ -883,11 +883,11 @@ article.node--type-frontpage{
               @extend %front-col-field__label;
               font-weight: 600;
               line-height: 0.7;
-              padding-bottom: 0.5em;
+              padding-bottom: 0.1em;
               text-align: center;
               word-spacing: 30000px;
             }
-            .field--name-field-description{
+            .field--name-body{
               @extend %front-col-description;
               padding:0.5em;
               p{
@@ -1525,10 +1525,32 @@ article.card{
       input[type="text"]{
         width:20em;
       }
-      .form-item-payment-information-billing-information-address-0-address-address-line2{
+      .stripe-form{
+        display: inline-block;
+        background-color: #fff;
+        color: #1A1A1A;
+        border-radius: 5px;
+        padding: 1em;
+        margin: 0 0 1em;
+        .form-item{
+          display: flex;
+          align-items: center;
+          flex-flow: row nowrap;
+          label{
+            color: #777;
+          }
+          .form-text{
+            background-color: #fff;
+            border-radius: 3px;
+          }
+        }
+      }
+      // .form-item-payment-information-billing-information-address-0-address-address-line2
+      .form-item-payment-information-add-payment-method-billing-information-address-0-address-address-line2{
         padding-left:$lw + 0.25em;
       }
-      .form-item-payment-information-billing-information-copy-to-address-book{
+      // .form-item-payment-information-billing-information-copy-to-address-book
+      .form-item-payment-information-add-payment-method-billing-information-copy-to-address-book{
         display: none;
       }
     }

+ 5 - 1
web/themes/custom/materiotheme/materiotheme.theme

@@ -178,9 +178,13 @@ function materiotheme_theme_suggestions_field_alter(&$suggestions, &$vars){
 function materiotheme_preprocess_commerce_product(array &$variables) {
   $test="test";
   // remove the variation as we already display it via views
-  if($variables['elements']['#view_mode'] === 'order_summary'){
+  if($variables['elements']['#view_mode'] === 'order_summary'
+    || $variables['elements']['#view_mode'] === 'home_summary'){
     unset($variables['product']['variation_title']);
     unset($variables['product']['variation_field_description']);
+    unset($variables['product']['variation_price']);
+    unset($variables['product']['variation_field_multiple']);
+    unset($variables['product']['variation_commerce_variation_cart_form']);
   }
 }
 

+ 27 - 0
web/themes/custom/materiotheme/templates/content/commerce-product--home-summary.html.twig

@@ -0,0 +1,27 @@
+{#
+/**
+ * @file
+ *
+ * Default product template.
+ *
+ * Available variables:
+ * - attributes: HTML attributes for the wrapper.
+ * - product: The rendered product fields.
+ *   Use 'product' to print them all, or print a subset such as
+ *   'product.title'. Use the following code to exclude the
+ *   printing of a given field:
+ *   @code
+ *   {{ product|without('title') }}
+ *   @endcode
+ * - product_entity: The product entity.
+ * - product_url: The product URL.
+ *
+ * @ingroup themeable
+ */
+#}
+<article{{ attributes }}>
+  {{- product|without('variation_attributes') -}}
+  <a href="/pricing" @click.prevent="onClickLink" class="btn">
+    {% trans %}View Option Details{% endtrans %}
+  </a>
+</article>

+ 2 - 2
web/themes/custom/materiotheme/vuejs/components/Content/Product.vue

@@ -31,7 +31,7 @@
       :styles="{width:'500px', height:'300px'}"
     >
       <section id="pricing-modal-login-register">
-        <h2>{{ $t("materio.Please login or create a new account before ordering") }}</h2>
+        <h2>{{ $t("materio.Please login or create a new account to order your access") }}</h2>
         <LoginRegister
           :callbackargs="showLoginModal"
           @onLogedIn="onLogedIn"
@@ -150,7 +150,7 @@ export default {
                   // redirect to /cart
                   // window.location.href = "/cart"
                   // TODO: redirect to checkout instead of cart
-                  window.location.href = `/checkout/${data[0].order_id.target_id}/order_information`
+                  window.location.href = `/checkout/${data[0].order_id}/order_information`
                 })
                 .catch(( error ) => {
                     console.warn('Issue with product add to cart', error)

+ 58 - 1
web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue

@@ -4,14 +4,28 @@ import Vue from 'vue'
 import { mapState, mapActions } from 'vuex'
 import { MA } from 'vuejs/api/ma-axios'
 
+import passwordStrength from 'check-password-strength'
+
 export default {
   name: "RegisterForm",
   data: () => ({
     form: null,
     mail: null,
     pass1: null,
-    pass2: null
+    pass2: null,
+    ps: ""
   }),
+  computed: {
+    psswd_class: function(){
+      return this.ps.toLowerCase()
+    },
+    can_register: function() {
+      if (this.ps === "Strong") {
+        return 'can-register'
+      }
+      return ''
+    }
+  },
   methods: {
     ...mapActions({
       userRegister: 'User/userRegister'
@@ -31,6 +45,13 @@ export default {
           console.warn('Issue with getRegisterForm', error)
         })
     },
+    checkSubmitEnabled () {
+      if(this.ps === 'Strong'){
+        this.$refs.register.disabled = false
+      }else{
+        this.$refs.register.disabled = true
+      }
+    },
     register () {
       console.log('register', this.mail, this.pass1, this.pass2);
       // TODO: check for identical password
@@ -61,6 +82,7 @@ export default {
   mounted(){
     // console.log('LoginBlock mounted');
     Drupal.attachBehaviors(this.$el);
+    this.checkSubmitEnabled()
   },
   render(h) {
     // console.log('LoginBlock render');
@@ -71,6 +93,15 @@ export default {
       // console.log('LoginBlock render template');
       return this.form.render.call(this)
     }
+  },
+  watch: {
+    pass1: function(n, o){
+      if(n){
+        this.ps = passwordStrength(n).value
+        console.log('watch pass1 n', n, 'ps :', this.ps)
+        this.checkSubmitEnabled()
+      }
+    }
   }
 }
 </script>
@@ -82,10 +113,36 @@ export default {
     max-width:30%;
     margin:0;
   }
+  .form-type-password input{
+    &.weak {
+      border-width: 2px;
+      border-color: red!important;
+      &:focus{
+        outline:none;
+      }
+    }
+    &.medium {
+      border-width: 2px;
+      border-color: orange!important;
+      &:focus{
+        outline:none;
+      }
+    }
+    &.strong {
+      border-width: 2px;
+      border-color: green!important;
+      &:focus{
+        outline:none;
+      }
+    }
+  }
   input{
     box-sizing:content-box;
     max-width:100%;
   }
+  // input#edit-submit{
+  //
+  // }
   label,
   div.description{
     display:none;

+ 5 - 1
web/themes/custom/materiotheme/vuejs/components/User/UserTools.vue

@@ -2,7 +2,11 @@
   <div id="user-tools">
     <h4
       class="mdi mdi-account"
-    >{{ mail }}</h4>
+    >
+    <a href="/user">
+      {{ mail }}
+    </a>
+    </h4>
     <a href="/admin/content/materials"
       v-if="isAdmin"
       class="mdi mdi-settings"

Some files were not shown because too many files changed in this diff