diff --git a/.env b/.env index cfcea58..60ad310 100644 --- a/.env +++ b/.env @@ -27,7 +27,7 @@ APP_SECRET=86f8e46e16865da05c3cbe1137e8aa22 # IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml # # DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" - DATABASE_URL="mysql://root:@127.0.0.1:3306/symfony" + DATABASE_URL="mysql://root:root@127.0.0.1:3306/symfony" #DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=13&charset=utf8" ###< doctrine/doctrine-bundle ### diff --git a/README.md b/README.md new file mode 100644 index 0000000..3e8f7ef --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +1. composer install +2. bin/console doctrine:migrations:migrate +3. php -d memory_limit=-1 bin/console app:fill:products diff --git a/composer.json b/composer.json index 23a8f46..4e8c700 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ "doctrine/doctrine-migrations-bundle": "^3.1", "doctrine/orm": "^2.10", "doctrine/sql-formatter": "^1.1", - "guzzlehttp/guzzle": "^6.5", "grandcruwijnen/sdk": "^0.1.26", + "guzzlehttp/guzzle": "^6.5", "nelmio/cors-bundle": "^2.1", "phpdocumentor/reflection-docblock": "^5.2", "sensio/framework-extra-bundle": "^6.1", diff --git a/composer.lock b/composer.lock index 3405319..c14d711 100644 --- a/composer.lock +++ b/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": "d3508be1f7135909222903d386818055", + "content-hash": "537336eeb8478c40d7cc2815a8618776", "packages": [ { "name": "api-platform/core", @@ -3021,16 +3021,16 @@ }, { "name": "symfony/cache", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "945bcebfef0aeef105de61843dd14105633ae38f" + "reference": "2056f2123f47c9f63102a8b92974c362f4fba568" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/945bcebfef0aeef105de61843dd14105633ae38f", - "reference": "945bcebfef0aeef105de61843dd14105633ae38f", + "url": "https://api.github.com/repos/symfony/cache/zipball/2056f2123f47c9f63102a8b92974c362f4fba568", + "reference": "2056f2123f47c9f63102a8b92974c362f4fba568", "shasum": "" }, "require": { @@ -3098,7 +3098,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v5.3.8" + "source": "https://github.com/symfony/cache/tree/v5.3.10" }, "funding": [ { @@ -3114,7 +3114,7 @@ "type": "tidelift" } ], - "time": "2021-09-26T18:29:18+00:00" + "time": "2021-10-11T15:41:55+00:00" }, { "name": "symfony/cache-contracts", @@ -3197,16 +3197,16 @@ }, { "name": "symfony/config", - "version": "v5.3.4", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "4268f3059c904c61636275182707f81645517a37" + "reference": "ac23c2f24d5634966d665d836c3933d54347e5d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/4268f3059c904c61636275182707f81645517a37", - "reference": "4268f3059c904c61636275182707f81645517a37", + "url": "https://api.github.com/repos/symfony/config/zipball/ac23c2f24d5634966d665d836c3933d54347e5d4", + "reference": "ac23c2f24d5634966d665d836c3933d54347e5d4", "shasum": "" }, "require": { @@ -3256,7 +3256,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v5.3.4" + "source": "https://github.com/symfony/config/tree/v5.3.10" }, "funding": [ { @@ -3272,20 +3272,20 @@ "type": "tidelift" } ], - "time": "2021-07-21T12:40:44+00:00" + "time": "2021-10-22T09:06:52+00:00" }, { "name": "symfony/console", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a" + "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a", + "url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3", + "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3", "shasum": "" }, "require": { @@ -3355,7 +3355,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.7" + "source": "https://github.com/symfony/console/tree/v5.3.10" }, "funding": [ { @@ -3371,20 +3371,20 @@ "type": "tidelift" } ], - "time": "2021-08-25T20:02:16+00:00" + "time": "2021-10-26T09:30:15+00:00" }, { "name": "symfony/dependency-injection", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "e39c344e06a3ceab531ebeb6c077e6652c4a0829" + "reference": "be833dd336c248ef2bdabf24665351455f52afdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/e39c344e06a3ceab531ebeb6c077e6652c4a0829", - "reference": "e39c344e06a3ceab531ebeb6c077e6652c4a0829", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/be833dd336c248ef2bdabf24665351455f52afdb", + "reference": "be833dd336c248ef2bdabf24665351455f52afdb", "shasum": "" }, "require": { @@ -3443,7 +3443,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.3.8" + "source": "https://github.com/symfony/dependency-injection/tree/v5.3.10" }, "funding": [ { @@ -3459,7 +3459,7 @@ "type": "tidelift" } ], - "time": "2021-09-21T20:52:44+00:00" + "time": "2021-10-22T18:11:05+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3644,16 +3644,16 @@ }, { "name": "symfony/dotenv", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/dotenv.git", - "reference": "12888c9c46ac750ec5c1381db5bf3d534e7d70cb" + "reference": "97ffd3846f8a782086e82c1b5fdefb3f3ad078db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/12888c9c46ac750ec5c1381db5bf3d534e7d70cb", - "reference": "12888c9c46ac750ec5c1381db5bf3d534e7d70cb", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/97ffd3846f8a782086e82c1b5fdefb3f3ad078db", + "reference": "97ffd3846f8a782086e82c1b5fdefb3f3ad078db", "shasum": "" }, "require": { @@ -3694,7 +3694,7 @@ "environment" ], "support": { - "source": "https://github.com/symfony/dotenv/tree/v5.3.8" + "source": "https://github.com/symfony/dotenv/tree/v5.3.10" }, "funding": [ { @@ -3710,7 +3710,7 @@ "type": "tidelift" } ], - "time": "2021-07-29T06:18:06+00:00" + "time": "2021-10-28T21:34:29+00:00" }, { "name": "symfony/error-handler", @@ -4202,16 +4202,16 @@ }, { "name": "symfony/form", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/form.git", - "reference": "417bb0355ed1027817c14f39aff353e9fb4bd9a8" + "reference": "656a1e370b1a617ba2fd42700b5e73dc24e8b60c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/form/zipball/417bb0355ed1027817c14f39aff353e9fb4bd9a8", - "reference": "417bb0355ed1027817c14f39aff353e9fb4bd9a8", + "url": "https://api.github.com/repos/symfony/form/zipball/656a1e370b1a617ba2fd42700b5e73dc24e8b60c", + "reference": "656a1e370b1a617ba2fd42700b5e73dc24e8b60c", "shasum": "" }, "require": { @@ -4284,7 +4284,7 @@ "description": "Allows to easily create, process and reuse HTML forms", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/form/tree/v5.3.8" + "source": "https://github.com/symfony/form/tree/v5.3.10" }, "funding": [ { @@ -4300,20 +4300,20 @@ "type": "tidelift" } ], - "time": "2021-09-21T20:52:44+00:00" + "time": "2021-10-28T19:22:18+00:00" }, { "name": "symfony/framework-bundle", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "ea6e30a8c9534d87187375ef4ee39d48ee40dd2d" + "reference": "2ff74f86abf2f67f2d0b53e23ab7a268b105dcfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/ea6e30a8c9534d87187375ef4ee39d48ee40dd2d", - "reference": "ea6e30a8c9534d87187375ef4ee39d48ee40dd2d", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/2ff74f86abf2f67f2d0b53e23ab7a268b105dcfe", + "reference": "2ff74f86abf2f67f2d0b53e23ab7a268b105dcfe", "shasum": "" }, "require": { @@ -4435,7 +4435,7 @@ "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/framework-bundle/tree/v5.3.8" + "source": "https://github.com/symfony/framework-bundle/tree/v5.3.10" }, "funding": [ { @@ -4451,20 +4451,20 @@ "type": "tidelift" } ], - "time": "2021-09-28T07:17:01+00:00" + "time": "2021-10-26T11:54:54+00:00" }, { "name": "symfony/http-client", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "c6370fe2c0a445aedc08f592a6a3149da1fea4c7" + "reference": "710b69ed4bc9469900ec5ae5c3807b0509bee0dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/c6370fe2c0a445aedc08f592a6a3149da1fea4c7", - "reference": "c6370fe2c0a445aedc08f592a6a3149da1fea4c7", + "url": "https://api.github.com/repos/symfony/http-client/zipball/710b69ed4bc9469900ec5ae5c3807b0509bee0dc", + "reference": "710b69ed4bc9469900ec5ae5c3807b0509bee0dc", "shasum": "" }, "require": { @@ -4522,7 +4522,7 @@ "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-client/tree/v5.3.8" + "source": "https://github.com/symfony/http-client/tree/v5.3.10" }, "funding": [ { @@ -4538,7 +4538,7 @@ "type": "tidelift" } ], - "time": "2021-09-07T10:45:28+00:00" + "time": "2021-10-19T08:32:53+00:00" }, { "name": "symfony/http-client-contracts", @@ -4620,16 +4620,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e36c8e5502b4f3f0190c675f1c1f1248a64f04e5" + "reference": "9f34f02e8a5fdc7a56bafe011cea1ce97300e54c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e36c8e5502b4f3f0190c675f1c1f1248a64f04e5", - "reference": "e36c8e5502b4f3f0190c675f1c1f1248a64f04e5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9f34f02e8a5fdc7a56bafe011cea1ce97300e54c", + "reference": "9f34f02e8a5fdc7a56bafe011cea1ce97300e54c", "shasum": "" }, "require": { @@ -4673,7 +4673,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.3.7" + "source": "https://github.com/symfony/http-foundation/tree/v5.3.10" }, "funding": [ { @@ -4689,20 +4689,20 @@ "type": "tidelift" } ], - "time": "2021-08-27T11:20:35+00:00" + "time": "2021-10-11T15:41:55+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.3.9", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "ceaf46a992f60e90645e7279825a830f733a17c5" + "reference": "703e4079920468e9522b72cf47fd76ce8d795e86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ceaf46a992f60e90645e7279825a830f733a17c5", - "reference": "ceaf46a992f60e90645e7279825a830f733a17c5", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/703e4079920468e9522b72cf47fd76ce8d795e86", + "reference": "703e4079920468e9522b72cf47fd76ce8d795e86", "shasum": "" }, "require": { @@ -4785,7 +4785,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.3.9" + "source": "https://github.com/symfony/http-kernel/tree/v5.3.10" }, "funding": [ { @@ -4801,7 +4801,7 @@ "type": "tidelift" } ], - "time": "2021-09-28T10:25:11+00:00" + "time": "2021-10-29T08:36:48+00:00" }, { "name": "symfony/intl", @@ -6503,16 +6503,16 @@ }, { "name": "symfony/runtime", - "version": "v5.3.4", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/runtime.git", - "reference": "685a4a5491e25c7f2dd251d8fcca583b427ff290" + "reference": "115eebbe287b35d65bd7b062bf3362e135941a59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/runtime/zipball/685a4a5491e25c7f2dd251d8fcca583b427ff290", - "reference": "685a4a5491e25c7f2dd251d8fcca583b427ff290", + "url": "https://api.github.com/repos/symfony/runtime/zipball/115eebbe287b35d65bd7b062bf3362e135941a59", + "reference": "115eebbe287b35d65bd7b062bf3362e135941a59", "shasum": "" }, "require": { @@ -6560,7 +6560,7 @@ "description": "Enables decoupling PHP applications from global state", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/runtime/tree/v5.3.4" + "source": "https://github.com/symfony/runtime/tree/v5.3.10" }, "funding": [ { @@ -6576,7 +6576,7 @@ "type": "tidelift" } ], - "time": "2021-06-30T13:49:12+00:00" + "time": "2021-10-22T08:45:15+00:00" }, { "name": "symfony/security-bundle", @@ -6682,16 +6682,16 @@ }, { "name": "symfony/security-core", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/security-core.git", - "reference": "62e5943d042aa5fc43d44b40209aa7304f68c56e" + "reference": "eb0421ce78603ba72e1de6eeeb8dd33e832ea605" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/62e5943d042aa5fc43d44b40209aa7304f68c56e", - "reference": "62e5943d042aa5fc43d44b40209aa7304f68c56e", + "url": "https://api.github.com/repos/symfony/security-core/zipball/eb0421ce78603ba72e1de6eeeb8dd33e832ea605", + "reference": "eb0421ce78603ba72e1de6eeeb8dd33e832ea605", "shasum": "" }, "require": { @@ -6755,7 +6755,7 @@ "description": "Symfony Security Component - Core Library", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-core/tree/v5.3.8" + "source": "https://github.com/symfony/security-core/tree/v5.3.10" }, "funding": [ { @@ -6771,7 +6771,7 @@ "type": "tidelift" } ], - "time": "2021-09-21T20:52:44+00:00" + "time": "2021-10-25T13:34:14+00:00" }, { "name": "symfony/security-csrf", @@ -6914,16 +6914,16 @@ }, { "name": "symfony/security-http", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/security-http.git", - "reference": "d499ecde6f81de42e557514626d6d5c14c0bdb78" + "reference": "613ca73c22d8228986ff95f7769182db4f4bb7dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-http/zipball/d499ecde6f81de42e557514626d6d5c14c0bdb78", - "reference": "d499ecde6f81de42e557514626d6d5c14c0bdb78", + "url": "https://api.github.com/repos/symfony/security-http/zipball/613ca73c22d8228986ff95f7769182db4f4bb7dc", + "reference": "613ca73c22d8228986ff95f7769182db4f4bb7dc", "shasum": "" }, "require": { @@ -6979,7 +6979,7 @@ "description": "Symfony Security Component - HTTP Integration", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-http/tree/v5.3.8" + "source": "https://github.com/symfony/security-http/tree/v5.3.10" }, "funding": [ { @@ -6995,20 +6995,20 @@ "type": "tidelift" } ], - "time": "2021-09-26T16:35:00+00:00" + "time": "2021-10-26T07:06:56+00:00" }, { "name": "symfony/serializer", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "a877799b1e94f792208bea68295f6675027c92be" + "reference": "5d7f068253ac3e7c62964ebdda491b06d401059a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/a877799b1e94f792208bea68295f6675027c92be", - "reference": "a877799b1e94f792208bea68295f6675027c92be", + "url": "https://api.github.com/repos/symfony/serializer/zipball/5d7f068253ac3e7c62964ebdda491b06d401059a", + "reference": "5d7f068253ac3e7c62964ebdda491b06d401059a", "shasum": "" }, "require": { @@ -7081,7 +7081,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v5.3.8" + "source": "https://github.com/symfony/serializer/tree/v5.3.10" }, "funding": [ { @@ -7097,7 +7097,7 @@ "type": "tidelift" } ], - "time": "2021-09-17T08:55:39+00:00" + "time": "2021-09-29T17:19:25+00:00" }, { "name": "symfony/service-contracts", @@ -7242,16 +7242,16 @@ }, { "name": "symfony/string", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5" + "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5", + "url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", + "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", "shasum": "" }, "require": { @@ -7305,7 +7305,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.7" + "source": "https://github.com/symfony/string/tree/v5.3.10" }, "funding": [ { @@ -7321,20 +7321,20 @@ "type": "tidelift" } ], - "time": "2021-08-26T08:00:08+00:00" + "time": "2021-10-27T18:21:46+00:00" }, { "name": "symfony/translation", - "version": "v5.3.9", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "6e69f3551c1a3356cf6ea8d019bf039a0f8b6886" + "reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/6e69f3551c1a3356cf6ea8d019bf039a0f8b6886", - "reference": "6e69f3551c1a3356cf6ea8d019bf039a0f8b6886", + "url": "https://api.github.com/repos/symfony/translation/zipball/6ef197aea2ac8b9cd63e0da7522b3771714035aa", + "reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa", "shasum": "" }, "require": { @@ -7400,7 +7400,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.3.9" + "source": "https://github.com/symfony/translation/tree/v5.3.10" }, "funding": [ { @@ -7416,7 +7416,7 @@ "type": "tidelift" } ], - "time": "2021-08-26T08:22:53+00:00" + "time": "2021-10-10T06:43:24+00:00" }, { "name": "symfony/translation-contracts", @@ -7619,16 +7619,16 @@ }, { "name": "symfony/twig-bundle", - "version": "v5.3.4", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/twig-bundle.git", - "reference": "345965b40c1847ebdbb2ab0eb98c71a98a5e167b" + "reference": "70157db4357eadf33f38e4e7efa5da4b294e17de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/345965b40c1847ebdbb2ab0eb98c71a98a5e167b", - "reference": "345965b40c1847ebdbb2ab0eb98c71a98a5e167b", + "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/70157db4357eadf33f38e4e7efa5da4b294e17de", + "reference": "70157db4357eadf33f38e4e7efa5da4b294e17de", "shasum": "" }, "require": { @@ -7687,7 +7687,7 @@ "description": "Provides a tight integration of Twig into the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/twig-bundle/tree/v5.3.4" + "source": "https://github.com/symfony/twig-bundle/tree/v5.3.10" }, "funding": [ { @@ -7703,20 +7703,20 @@ "type": "tidelift" } ], - "time": "2021-07-21T12:40:44+00:00" + "time": "2021-10-28T13:28:41+00:00" }, { "name": "symfony/validator", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "3a773f6f03ef2846c280e4f5b5f34cf950ead127" + "reference": "a85f3ba9e1c883253fc00a2e3d111e6e82a0baf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/3a773f6f03ef2846c280e4f5b5f34cf950ead127", - "reference": "3a773f6f03ef2846c280e4f5b5f34cf950ead127", + "url": "https://api.github.com/repos/symfony/validator/zipball/a85f3ba9e1c883253fc00a2e3d111e6e82a0baf5", + "reference": "a85f3ba9e1c883253fc00a2e3d111e6e82a0baf5", "shasum": "" }, "require": { @@ -7797,7 +7797,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v5.3.8" + "source": "https://github.com/symfony/validator/tree/v5.3.10" }, "funding": [ { @@ -7813,20 +7813,20 @@ "type": "tidelift" } ], - "time": "2021-09-21T20:52:44+00:00" + "time": "2021-10-28T19:22:18+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "eaaea4098be1c90c8285543e1356a09c8aa5c8da" + "reference": "875432adb5f5570fff21036fd22aee244636b7d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/eaaea4098be1c90c8285543e1356a09c8aa5c8da", - "reference": "eaaea4098be1c90c8285543e1356a09c8aa5c8da", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/875432adb5f5570fff21036fd22aee244636b7d1", + "reference": "875432adb5f5570fff21036fd22aee244636b7d1", "shasum": "" }, "require": { @@ -7885,7 +7885,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.3.8" + "source": "https://github.com/symfony/var-dumper/tree/v5.3.10" }, "funding": [ { @@ -7901,7 +7901,7 @@ "type": "tidelift" } ], - "time": "2021-09-24T15:59:58+00:00" + "time": "2021-10-26T09:30:15+00:00" }, { "name": "symfony/var-exporter", @@ -8702,23 +8702,23 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.7", + "version": "9.2.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" + "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", + "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.12.0", + "nikic/php-parser": "^4.13.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -8767,7 +8767,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8" }, "funding": [ { @@ -8775,7 +8775,7 @@ "type": "github" } ], - "time": "2021-09-17T05:39:03+00:00" + "time": "2021-10-30T08:01:38+00:00" }, { "name": "phpunit/php-file-iterator", @@ -10873,16 +10873,16 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "e9c0548d8d7abcd257f18f0adc0517895996a9c1" + "reference": "325aaf6302501ed3673cffbd3ba88db5949de8ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/e9c0548d8d7abcd257f18f0adc0517895996a9c1", - "reference": "e9c0548d8d7abcd257f18f0adc0517895996a9c1", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/325aaf6302501ed3673cffbd3ba88db5949de8ae", + "reference": "325aaf6302501ed3673cffbd3ba88db5949de8ae", "shasum": "" }, "require": { @@ -10936,7 +10936,7 @@ "description": "Provides utilities for PHPUnit, especially user deprecation notices management", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v5.3.8" + "source": "https://github.com/symfony/phpunit-bridge/tree/v5.3.10" }, "funding": [ { @@ -10952,7 +10952,7 @@ "type": "tidelift" } ], - "time": "2021-09-14T13:57:08+00:00" + "time": "2021-10-28T19:22:18+00:00" }, { "name": "symfony/web-profiler-bundle", diff --git a/config/services.yaml b/config/services.yaml index ef07b76..bd911d1 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -2,7 +2,7 @@ # Files in the packages/ subdirectory configure your dependencies. # Put parameters here that don't need to change on each machine where the app is deployed -# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration +# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration parameters: services: @@ -20,6 +20,23 @@ services: - '../src/Entity/' - '../src/Kernel.php' - '../src/Tests/' + - '../src/Migrations/' + + # controllers are imported separately to make sure services can be injected + # as action arguments even if you don't extend any base controller class + App\Controller\: + resource: '../src/Controller/' + tags: ['controller.service_arguments'] # add more service definitions when explicit configuration is needed # please note that last definitions always *replace* previous ones + Grandcruwijnen\: + autowire: true + resource: '../vendor/grandcruwijnen/sdk/src/Grandcruwijnen/*' + + Grandcruwijnen\SDK\API: + arguments: + $username: '%env(MAGENTO2_USERNAME)%' + $password: '%env(MAGENTO2_PASSWORD)%' + $baseUri: 'https://beta.grandcruwijnen.dev/' + $userAgent: 'Grandcruwijnen.nl Funnel' \ No newline at end of file diff --git a/public/image/sommelierIcon.png b/public/image/sommelierIcon.png new file mode 100644 index 0000000..8c223cd Binary files /dev/null and b/public/image/sommelierIcon.png differ diff --git a/public/image/wijnoverzicht.png b/public/image/wijnoverzicht.png new file mode 100644 index 0000000..1b614f1 Binary files /dev/null and b/public/image/wijnoverzicht.png differ diff --git a/public/javascript/script.js b/public/javascript/script.js new file mode 100644 index 0000000..f30653d --- /dev/null +++ b/public/javascript/script.js @@ -0,0 +1,3 @@ +function goBack() { + window.history.back(); +} \ No newline at end of file diff --git a/public/style/style.css b/public/style/style.css index 229eb4a..7949d1a 100644 --- a/public/style/style.css +++ b/public/style/style.css @@ -1,10 +1,21 @@ body { font-family: 'Montserrat', sans-serif; - height: 100%; width: 100%; background-color: #e9dcd1; } +.example-wrapper { + margin: 1em auto; + max-width: 800px; + width: 95%; + font: 18px/1.5 sans-serif; +} + +.example-wrapper code { + background: #F5F5F5; + padding: 2px 6px; +} + .p { line-height: 1.5; } @@ -13,13 +24,25 @@ body { display: inline-grid; border: #1111 1px solid; box-shadow: 0 0 5px -1px rgb(0 0 0 / 30%), 0 0 15px -1px rgb(0 0 0 / 25%), 0 0 20px -1px rgb(0 0 0 / 15%); - margin: 4vw 0 0 4vw; + margin: 4vw 0 0 4.5vw; height: 25vh; width: 20vh; border-radius: 10%; background-color: #e9dcd1; } +.grid-sub { + display: inline-grid; + text-align: center; + border: #1111 1px solid; + box-shadow: 0 0 5px -1px rgb(0 0 0 / 30%), 0 0 15px -1px rgb(0 0 0 / 25%), 0 0 20px -1px rgb(0 0 0 / 15%); + margin: 4vw 0 0 4.5vw; + height: 60px; + width: 20vh; + border-radius: 10px; + background-color: #e9dcd1; +} + .grid:active { box-shadow: 0 0 5px -1px rgb(0 0 0 / 30%), 0 0 15px -1px rgb(0 0 0 / 25%), 0 0 20px -1px rgb(0 0 0 / 15%); transform: translateY(10px) translateX(10px); @@ -40,10 +63,60 @@ body { .text { margin-left: 2vw; } + h1 { font-size: 4rem; } -.container { - margin-top: 5000000vh !important; +.logo_landing_page { + margin: 30px 30px 30px 5vw; +} + +.logo { + margin: 30px 30px 30px -10vw; + +} + +.content { + height: 100vh !important; +} + +.mealImage { + /*margin: -10px;*/ + width: 19.6vw; + margin-left: -15px; + border-radius: 20px 20px 0 0; + min-height: 20vw +} + +#row { + display: flex; + width: 100%; + flex-wrap: wrap; + justify-content: center; +} + +button { + outline: none !important; +} + +#column { + text-align: center; + border-radius: 20px; + margin: 10px; + width: 20%; + height: 54vh; + box-shadow: rgba(0, 0, 0, 0.24) 0 3px 8px; +} + +.wineImage { + max-width: 40vw; + max-height: 60vh; + position: relative; + padding-top: 5vh +} + +.imageWine { + max-width: 200px; + max-height: 200px; } \ No newline at end of file diff --git a/src/Command/ProductsCommand.php b/src/Command/ProductsCommand.php new file mode 100644 index 0000000..b284adc --- /dev/null +++ b/src/Command/ProductsCommand.php @@ -0,0 +1,95 @@ +products = $products; + $this->manager = $manager; + $this->productRepository = $productRepository; + } + + protected function configure(): void + { + $this->setDescription(self::$defaultDescription); + } + + /** + * @throws Exception + * @throws GuzzleException + */ + protected function execute(InputInterface $input, OutputInterface $output): int + { + $io = new SymfonyStyle($input, $output); + $items = $this->products->getProducts()['items']; + foreach ($items as $magentoProduct) + { + //var_dump($magentoProduct['custom_attributes']); die(); + if ($magentoProduct['status'] !== 1) + { + continue; + } + if ( ! isset($magentoProduct['media_gallery_entries'][0])) + { + continue; + } + $product = $this->productRepository->findOneBy(['sku' => $magentoProduct['sku']]); + $updatedAt = new DateTime($magentoProduct['updated_at']); +// $io->comment($magentoProduct['sku']); + if ($product === null) + { + $product = new Product(); + $product + ->setSku($magentoProduct['sku']) + ->setUpdatedAt($updatedAt) + ->setName($magentoProduct['name']) + ->setDescription($magentoProduct['custom_attributes'][1]['value']) + ->setPrice($magentoProduct["price"]) + ->setStock($magentoProduct['extension_attributes']['stock_item']['qty']) + ->setImage($magentoProduct['media_gallery_entries'][0]['file']); + } else if ($updatedAt > $product->getUpdatedAt()) + { + $product + ->setValid(false) + ->setCheckedSinceUpdate(false); + } + + $this->manager->persist($product); + } + + $this->manager->flush(); + + $io->success('Product database updated'); + + return Command::SUCCESS; + } +} \ No newline at end of file diff --git a/src/Controller/MealController.php b/src/Controller/MealController.php index c98400c..ed4d254 100644 --- a/src/Controller/MealController.php +++ b/src/Controller/MealController.php @@ -2,10 +2,9 @@ namespace App\Controller; - +use App\Dto\ProductMatch; +use App\Repository\ProductRepository; use App\Service\MealMatcherService; -use Grandcruwijnen\SDK\API; -use Grandcruwijnen\SDK\Products; use GuzzleHttp\Exception\GuzzleException; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; @@ -15,10 +14,13 @@ class MealController extends AbstractController { + /** + * @throws GuzzleException + */ #[Route('/', name: 'landing_page')] public function getIndex(MealMatcherService $mealMatcherService): Response { - return $this->render('landing page/index.html.twig', ['choices' => $mealMatcherService->getIndexPage()]); + return $this->render('landing/index.html.twig', ['choices' => $mealMatcherService->getIndexPage()]); } /** @@ -33,7 +35,7 @@ public function getMealCategories(MealMatcherService $mealMatcherService): Respo /** * @throws GuzzleException */ - #[Route('/{parentId}', name: 'meal_categories_for_parent')] + #[Route('/category/{parentId}', name: 'meal_categories_for_parent')] public function getCategoriesForParent(int $parentId, MealMatcherService $mealMatcherService): Response { return $this->render('categories/index.html.twig', ['meals' => $mealMatcherService->getCategoriesForParent($parentId)]); @@ -51,17 +53,26 @@ public function getMealsForCategory(int $categoryId, MealMatcherService $mealMat /** * @throws GuzzleException */ - #[Route('/matches/{mealId}', name: 'wines_for_meals')] - public function getWinesForMeals($mealId, MealMatcherService $mealMatcherService) + #[Route('matches/{mealId}', name: 'wines_for_meals')] + public function getWinesForMeals(ProductRepository $products, $mealId, MealMatcherService $mealMatcherService): Response { + $matches = []; +// dd($mealMatcherService->getWinesForMeal($mealId)); + foreach ($mealMatcherService->getWinesForMeal($mealId) as $wine) { + $product = $products->findOneBy(['sku' => $wine->wine->sku]); + // $product = $products->findOneBy(['sku' => $wine->wine->sku]); + if ($product !== null) { + $score = $wine->score; + $productMatch = new ProductMatch($product, $score); + $matches[] = $productMatch; +// $score'' = $product; - $api = new API("jelmer@grandcruwijnen.nl", "7Wn2okY7!A@mX-DZMmw7tanFaQ*sTGef87o!Gn4_mE6ctiqmLk2hH6LX_deN_K8P7U6LRs7H2BT.cGWvh", "https://beta.grandcruwijnen.dev"); - $products = new Products($api); - $sku = '01001'; - $products = $products->getProduct($sku); + //TODO: Scores toevoegen aan de wijn + } + } return $this->render('wines/index.html.twig', [ - 'products' => $products, 'matches' => $mealMatcherService->getWinesForMeal($mealId) + 'matches' => $matches ]); } } diff --git a/src/Dto/ProductMatch.php b/src/Dto/ProductMatch.php new file mode 100644 index 0000000..06ebd8d --- /dev/null +++ b/src/Dto/ProductMatch.php @@ -0,0 +1,14 @@ +product = $product; + $this->score = $score; + } +} + +?> \ No newline at end of file diff --git a/src/Entity/MealMatcher.php b/src/Entity/MealMatcher.php deleted file mode 100644 index 6dd8bd8..0000000 --- a/src/Entity/MealMatcher.php +++ /dev/null @@ -1,61 +0,0 @@ -id; - } - - public function getName(): ?string - { - return $this->name; - } - - public function setName(string $name): self - { - $this->name = $name; - - return $this; - } - - public function getImage(): ?string - { - return $this->image; - } - - public function setImage(string $image): self - { - $this->image = $image; - - return $this; - } -} diff --git a/src/Entity/Product.php b/src/Entity/Product.php new file mode 100644 index 0000000..e6748a2 --- /dev/null +++ b/src/Entity/Product.php @@ -0,0 +1,186 @@ +valid = false; + $this->checkedSinceUpdate = false; + } + + public function getId(): ?int + { + return $this->id; + } + + public function getSku(): ?string + { + return $this->sku; + } + + public function setSku(string $sku): self + { + $this->sku = $sku; + + return $this; + } + + public function getUpdatedAt(): ?\DateTimeInterface + { + return $this->updatedAt; + } + + public function setUpdatedAt(\DateTimeInterface $updatedAt): self + { + $this->updatedAt = $updatedAt; + + return $this; + } + + public function getValid(): ?bool + { + return $this->valid; + } + + public function setValid(bool $valid): self + { + $this->valid = $valid; + + return $this; + } + + public function getCheckedSinceUpdate(): ?bool + { + return $this->checkedSinceUpdate; + } + + public function setCheckedSinceUpdate(bool $checkedSinceUpdate): self + { + $this->checkedSinceUpdate = $checkedSinceUpdate; + + return $this; + } + + public function getName(): ?string + { + return $this->name; + } + + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + public function getDescription(): ?string + { + return $this->description; + } + + public function setDescription(string $description): self + { + $this->description = $description; + + return $this; + } + + public function getPrice(): ?float + { + return $this->price; + } + + public function setPrice(float $price): self + { + $this->price = $price; + + return $this; + } + + public function getStock(): ?int + { + return $this->stock; + } + + public function setStock(int $stock): self + { + $this->stock = $stock; + + return $this; + } + + public function getImage(): ?string + { + return $this->image; + } + + public function setImage(string $image): self + { + $this->image = $image; + + return $this; + } +} diff --git a/src/Migrations/Version20211018145712.php b/src/Migrations/Version20211018145712.php deleted file mode 100644 index 5883abf..0000000 --- a/src/Migrations/Version20211018145712.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('CREATE TABLE meal_matcher (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, image VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('DROP TABLE meal_matcher'); - } -} diff --git a/src/Migrations/Version20211102200438.php b/src/Migrations/Version20211102200438.php new file mode 100644 index 0000000..3a466d1 --- /dev/null +++ b/src/Migrations/Version20211102200438.php @@ -0,0 +1,31 @@ +addSql('CREATE TABLE product (id INT AUTO_INCREMENT NOT NULL, sku VARCHAR(255) NOT NULL, updated_at DATETIME NOT NULL, valid TINYINT(1) NOT NULL, checked_since_update TINYINT(1) NOT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT NOT NULL, price DOUBLE PRECISION NOT NULL, stock INT NOT NULL, image VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('DROP TABLE product'); + } +} diff --git a/src/Migrations/Version20211103080939.php b/src/Migrations/Version20211103080939.php new file mode 100644 index 0000000..9fc9604 --- /dev/null +++ b/src/Migrations/Version20211103080939.php @@ -0,0 +1,31 @@ +addSql('CREATE TABLE product (id INT AUTO_INCREMENT NOT NULL, sku VARCHAR(255) NOT NULL, updated_at DATETIME NOT NULL, valid TINYINT(1) NOT NULL, checked_since_update TINYINT(1) NOT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT NOT NULL, price DOUBLE PRECISION NOT NULL, stock INT NOT NULL, image VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('DROP TABLE product'); + } +} diff --git a/src/Migrations/Version20211103083317.php b/src/Migrations/Version20211103083317.php new file mode 100644 index 0000000..260eac8 --- /dev/null +++ b/src/Migrations/Version20211103083317.php @@ -0,0 +1,31 @@ +addSql('CREATE TABLE product (id INT AUTO_INCREMENT NOT NULL, sku VARCHAR(255) NOT NULL, updated_at DATETIME NOT NULL, valid TINYINT(1) NOT NULL, checked_since_update TINYINT(1) NOT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT NOT NULL, price DOUBLE PRECISION NOT NULL, stock INT NOT NULL, image VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('DROP TABLE product'); + } +} diff --git a/src/Repository/ProductRepository.php b/src/Repository/ProductRepository.php new file mode 100644 index 0000000..c34bb70 --- /dev/null +++ b/src/Repository/ProductRepository.php @@ -0,0 +1,50 @@ +createQueryBuilder('p') + ->andWhere('p.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('p.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Product + { + return $this->createQueryBuilder('p') + ->andWhere('p.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Service/MealMatcherService.php b/src/Service/MealMatcherService.php index 255ab83..e5e095a 100644 --- a/src/Service/MealMatcherService.php +++ b/src/Service/MealMatcherService.php @@ -3,10 +3,8 @@ namespace App\Service; -use Grandcruwijnen\SDK\Products; use GuzzleHttp\Client; use GuzzleHttp\Exception\GuzzleException; -use App\Controller\MealController; class MealMatcherService { private Client $client; @@ -16,27 +14,9 @@ public function __construct() $this->client = new Client(['base_uri' => 'https://mealmatcher.grandcruwijnen.nl']); } - /** - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getIndexPage() + public function getIndexPage(): string { - return 'landing page/index.html.twig'; - } - - /** - * @throws GuzzleException - */ - public function getMealsCategories() - { - $response = $this->client->request('GET', '/api/meal_categories'); - - $categories = json_decode($response->getBody()->getContents()); - usort($categories, function ($categoryA, $categoryB) { - return strcmp($categoryA->name, $categoryB->name); - }); - - return $categories; + return 'landing/index.html.twig'; } /** @@ -58,6 +38,21 @@ public function getParentMealCategories(): array return $parentCategories; } + /** + * @throws GuzzleException + */ + public function getMealsCategories() + { + $response = $this->client->request('GET', '/api/meal_categories'); + + $categories = json_decode($response->getBody()->getContents()); + usort($categories, function ($categoryA, $categoryB) { + return strcmp($categoryA->name, $categoryB->name); + }); + + return $categories; + } + /** * @throws GuzzleException */ @@ -86,12 +81,14 @@ public function getMealsForCategory(int $categoryId) return json_decode($response->getBody()->getContents()); } + /** * @throws GuzzleException */ public function getWinesForMeal($mealId) { - $response = $this->client->request('GET', '/api/meal_matches?mealId=' . $mealId . '&limit=30', ); + $response = $this->client->request('GET', '/api/meal_matches?meal=' . $mealId . '&limit=60'); + return json_decode($response->getBody()->getContents()); } } \ No newline at end of file diff --git a/templates/base.html.twig b/templates/base.html.twig index 5f11ae7..a55fcf1 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -17,7 +17,7 @@ {% endblock %} - - {% block body %}{% endblock %} - + {% block body %} + + {% endblock %} \ No newline at end of file diff --git a/templates/categories/index.html.twig b/templates/categories/index.html.twig index f4200ee..fc7c363 100644 --- a/templates/categories/index.html.twig +++ b/templates/categories/index.html.twig @@ -6,51 +6,54 @@ {% endblock %} -{% block title %}Hello MealController!{% endblock %} +{% block title %}Online sommelier | Categories!{% endblock %} {% block body %} -
-
- - logo - -
-

U het gerecht en wij adviseren de wijn!

-

-
+
+
+ + + +
+

U het gerecht en wij adviseren de wijn!

+

+

{% set imageCategory = ['https://www.grandcruwijnen.nl/static/version1634749600/frontend/Grandcruwijnen/default/nl_NL/Grandcruwijnen_SmartSommelier/images/93.svg','https://www.grandcruwijnen.nl/static/version1634749600/frontend/Grandcruwijnen/default/nl_NL/Grandcruwijnen_SmartSommelier/images/52.svg','https://www.grandcruwijnen.nl/static/version1634749600/frontend/Grandcruwijnen/default/nl_NL/Grandcruwijnen_SmartSommelier/images/78.svg','https://www.grandcruwijnen.nl/static/version1634749600/frontend/Grandcruwijnen/default/nl_NL/Grandcruwijnen_SmartSommelier/images/2.svg','https://www.grandcruwijnen.nl/static/version1634749600/frontend/Grandcruwijnen/default/nl_NL/Grandcruwijnen_SmartSommelier/images/139.svg','https://www.grandcruwijnen.nl/static/version1634749600/frontend/Grandcruwijnen/default/nl_NL/Grandcruwijnen_SmartSommelier/images/24.svg','https://www.grandcruwijnen.nl/static/version1634749600/frontend/Grandcruwijnen/default/nl_NL/Grandcruwijnen_SmartSommelier/images/109.svg','https://www.grandcruwijnen.nl/static/version1634749600/frontend/Grandcruwijnen/default/nl_NL/Grandcruwijnen_SmartSommelier/images/102.svg'] %} {% set imageCounterArr = -1 %} -
+ {% for meal in meals %} - {% set imageCounterArr = imageCounterArr + 1 %} -
+ {% set imageCounterArr = imageCounterArr + 1 %} + {% if meal.parent is null %} - +
+
{{ meal.name }}
+
{% else %} - -
{{ meal.name }}
-
+
+ + {{ meal.name }} + +
{% endif %} -
+ {% endfor %} -
+
{% endblock %} -{% block javascripts%} - - +{% block javascripts %} + {% endblock %} \ No newline at end of file diff --git a/templates/landing page/index.html.twig b/templates/landing page/index.html.twig deleted file mode 100644 index 127fe1c..0000000 --- a/templates/landing page/index.html.twig +++ /dev/null @@ -1,46 +0,0 @@ -{% extends 'base.html.twig' %} -{% block stylesheets %} - -{% endblock %} - -{% block title %}Hello MealController!{% endblock %} - -{% block body %} - -
- logo -
-
-

Grandcruwijnen biedt u de volgende opties:

-
-
- - - -
- - -{% endblock %} \ No newline at end of file diff --git a/templates/landing/index.html.twig b/templates/landing/index.html.twig new file mode 100644 index 0000000..4490b9f --- /dev/null +++ b/templates/landing/index.html.twig @@ -0,0 +1,41 @@ +{% extends 'base.html.twig' %} +{% block stylesheets %} + +{% endblock %} + +{% block title %}Landing Page!{% endblock %} + +{% block body %} +
+ logo +
+
+

Grandcruwijnen biedt u de volgende opties:

+
+
+
+ +
+ Wijn + overzicht +
+
+ +
+ Online Sommelier +
+
+ +
+ Uw eigen gerecht +
+
+ + +{% endblock %} \ No newline at end of file diff --git a/templates/meals/index.html.twig b/templates/meals/index.html.twig index 5c22ece..8b695f9 100644 --- a/templates/meals/index.html.twig +++ b/templates/meals/index.html.twig @@ -6,32 +6,36 @@ {% endblock %} - -{% block title %}Hello MealController!{% endblock %} +{% block title %}Online sommelier | Meals!{% endblock %} {% block body %} {# https://mealmatcher.grandcruwijnen.nl/meals/%7B12de8bb3-8ce2-43a9-8b09-d56161365ebc%7D #} - logo - -
+ logo + +

Welkom bij de online sommelier

Hier kunt u uw gerecht kiezen en dan worden er bijpassende wijnen gezocht.

-
+
{% for meal in meals %} -
- {{ meal.name }} +
+ {{ meal.name }}

{{ meal.name }}

- +
{% endfor %} @@ -42,11 +46,6 @@ {% endblock %} -{% block javascripts%} - - +{% block javascripts %} + {% endblock %} \ No newline at end of file diff --git a/templates/wines/index.html.twig b/templates/wines/index.html.twig index 1588236..9c834bd 100644 --- a/templates/wines/index.html.twig +++ b/templates/wines/index.html.twig @@ -1,95 +1,150 @@ {% extends 'base.html.twig' %} {% block stylesheets %} - - + + + {% endblock %} {% block title %} -Hello MealController! + Online sommelier | Wines {% endblock %} {% block body %} - - -
- logo - -
+
+

Welkom bij de online sommelier

+

Hier kunt u kiezen uit de best bijpassende wijnen gezocht bij het geselecteerde gerecht.

+
-
-

Welkom bij de online sommelier

-

Hier kunt u kiezen uit de best bijpassende wijnen gezocht bij het geselecteerde gerecht.

-
+
+
+ {% for match in matches %} +
+ {{ match.product.sku }} +

{{ match.product.name }}

+

Prijs: €{{ match.product.price }},-

+ + + + -
-
- {% for product in products %} -
- -

{{products.name}}

- - - + +