16 Commits

Author SHA1 Message Date
67019e3933 Add indexes to the database. 2026-02-05 08:40:34 +01:00
a545bfe2ab feature/handle-promotions (#59)
Reviewed-on: #59
Co-authored-by: Krzysiej <krzysiej@gmail.com>
Co-committed-by: Krzysiej <krzysiej@gmail.com>
2026-02-04 08:35:16 +01:00
6556ba0f88 Fix links to products. 2026-01-28 08:33:22 +01:00
6da4f4257e Fix links to products. 2026-01-28 08:31:41 +01:00
5696f23f3d Display big category tree on route /category/ without parameter 2026-01-27 08:58:25 +01:00
9f368a266a Display big category tree on route /category/ without parameter 2026-01-27 08:56:54 +01:00
62c6538b89 Render category tree on category pages 2026-01-26 12:56:54 +01:00
2d1861caba feature/category-tree
Co-authored-by: Krzysiej <krzysiej@gmail.com>
Co-committed-by: Krzysiej <krzysiej@gmail.com>
2026-01-26 08:59:58 +01:00
5b424a2345 Update packages and add composer install to update script 2026-01-22 08:43:19 +01:00
710c31551e Upgrade php to 8.4 2026-01-22 08:28:30 +01:00
0042fda5cc Fix product page not loading 2026-01-21 08:32:24 +01:00
646383fb6a Improved countries migration 2026-01-20 11:00:39 +01:00
f9c58edccd Improvements to handling countries. 2026-01-20 10:44:33 +01:00
9ec3291a6a Add stock to product. 2026-01-20 10:09:35 +01:00
373fd1641b Start working on handling multiple countries at once 2026-01-20 08:40:34 +01:00
46065dae1a Add stock to product. 2026-01-19 15:08:53 +01:00
14 changed files with 474 additions and 408 deletions

View File

@@ -1,4 +1,4 @@
FROM php:8.3-cli FROM php:8.4-cli
WORKDIR /usr/src/app WORKDIR /usr/src/app
ENV PHP_MEMORY_LIMIT=1500M ENV PHP_MEMORY_LIMIT=1500M

View File

@@ -2,4 +2,5 @@
echo "Updating project" echo "Updating project"
git pull origin master git pull origin master
bin/cacheclean bin/cacheclean
bin/composer install --no-dev
echo "Project updated" echo "Project updated"

467
composer.lock generated
View File

@@ -1796,22 +1796,21 @@
}, },
{ {
"name": "symfony/clock", "name": "symfony/clock",
"version": "v7.4.0", "version": "v8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/clock.git", "url": "https://github.com/symfony/clock.git",
"reference": "9169f24776edde469914c1e7a1442a50f7a4e110" "reference": "832119f9b8dbc6c8e6f65f30c5969eca1e88764f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/clock/zipball/9169f24776edde469914c1e7a1442a50f7a4e110", "url": "https://api.github.com/repos/symfony/clock/zipball/832119f9b8dbc6c8e6f65f30c5969eca1e88764f",
"reference": "9169f24776edde469914c1e7a1442a50f7a4e110", "reference": "832119f9b8dbc6c8e6f65f30c5969eca1e88764f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"psr/clock": "^1.0", "psr/clock": "^1.0"
"symfony/polyfill-php83": "^1.28"
}, },
"provide": { "provide": {
"psr/clock-implementation": "1.0" "psr/clock-implementation": "1.0"
@@ -1850,7 +1849,7 @@
"time" "time"
], ],
"support": { "support": {
"source": "https://github.com/symfony/clock/tree/v7.4.0" "source": "https://github.com/symfony/clock/tree/v8.0.0"
}, },
"funding": [ "funding": [
{ {
@@ -1870,38 +1869,37 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-12T15:39:26+00:00" "time": "2025-11-12T15:46:48+00:00"
}, },
{ {
"name": "symfony/config", "name": "symfony/config",
"version": "v7.4.3", "version": "v8.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/config.git", "url": "https://github.com/symfony/config.git",
"reference": "800ce889e358a53a9678b3212b0c8cecd8c6aace" "reference": "58063686fd7b8e676f14b5a4808cb85265c5216e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/800ce889e358a53a9678b3212b0c8cecd8c6aace", "url": "https://api.github.com/repos/symfony/config/zipball/58063686fd7b8e676f14b5a4808cb85265c5216e",
"reference": "800ce889e358a53a9678b3212b0c8cecd8c6aace", "reference": "58063686fd7b8e676f14b5a4808cb85265c5216e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/deprecation-contracts": "^2.5|^3", "symfony/deprecation-contracts": "^2.5|^3",
"symfony/filesystem": "^7.1|^8.0", "symfony/filesystem": "^7.4|^8.0",
"symfony/polyfill-ctype": "~1.8" "symfony/polyfill-ctype": "^1.8"
}, },
"conflict": { "conflict": {
"symfony/finder": "<6.4",
"symfony/service-contracts": "<2.5" "symfony/service-contracts": "<2.5"
}, },
"require-dev": { "require-dev": {
"symfony/event-dispatcher": "^6.4|^7.0|^8.0", "symfony/event-dispatcher": "^7.4|^8.0",
"symfony/finder": "^6.4|^7.0|^8.0", "symfony/finder": "^7.4|^8.0",
"symfony/messenger": "^6.4|^7.0|^8.0", "symfony/messenger": "^7.4|^8.0",
"symfony/service-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3",
"symfony/yaml": "^6.4|^7.0|^8.0" "symfony/yaml": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -1929,7 +1927,7 @@
"description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/config/tree/v7.4.3" "source": "https://github.com/symfony/config/tree/v8.0.3"
}, },
"funding": [ "funding": [
{ {
@@ -1949,7 +1947,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-12-23T14:24:27+00:00" "time": "2025-12-23T14:52:06+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
@@ -2051,39 +2049,36 @@
}, },
{ {
"name": "symfony/dependency-injection", "name": "symfony/dependency-injection",
"version": "v7.4.3", "version": "v8.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/dependency-injection.git", "url": "https://github.com/symfony/dependency-injection.git",
"reference": "54122901b6d772e94f1e71a75e0533bc16563499" "reference": "8db0d4c1dd4c533a29210c68074999ba45ad6d3e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/54122901b6d772e94f1e71a75e0533bc16563499", "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/8db0d4c1dd4c533a29210c68074999ba45ad6d3e",
"reference": "54122901b6d772e94f1e71a75e0533bc16563499", "reference": "8db0d4c1dd4c533a29210c68074999ba45ad6d3e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"psr/container": "^1.1|^2.0", "psr/container": "^1.1|^2.0",
"symfony/deprecation-contracts": "^2.5|^3", "symfony/deprecation-contracts": "^2.5|^3",
"symfony/service-contracts": "^3.6", "symfony/service-contracts": "^3.6",
"symfony/var-exporter": "^6.4.20|^7.2.5|^8.0" "symfony/var-exporter": "^7.4|^8.0"
}, },
"conflict": { "conflict": {
"ext-psr": "<1.1|>=2", "ext-psr": "<1.1|>=2"
"symfony/config": "<6.4",
"symfony/finder": "<6.4",
"symfony/yaml": "<6.4"
}, },
"provide": { "provide": {
"psr/container-implementation": "1.1|2.0", "psr/container-implementation": "1.1|2.0",
"symfony/service-implementation": "1.1|2.0|3.0" "symfony/service-implementation": "1.1|2.0|3.0"
}, },
"require-dev": { "require-dev": {
"symfony/config": "^6.4|^7.0|^8.0", "symfony/config": "^7.4|^8.0",
"symfony/expression-language": "^6.4|^7.0|^8.0", "symfony/expression-language": "^7.4|^8.0",
"symfony/yaml": "^6.4|^7.0|^8.0" "symfony/yaml": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -2111,7 +2106,7 @@
"description": "Allows you to standardize and centralize the way objects are constructed in your application", "description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/dependency-injection/tree/v7.4.3" "source": "https://github.com/symfony/dependency-injection/tree/v8.0.3"
}, },
"funding": [ "funding": [
{ {
@@ -2131,7 +2126,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-12-28T10:55:46+00:00" "time": "2025-12-23T14:52:06+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@@ -2280,33 +2275,32 @@
}, },
{ {
"name": "symfony/error-handler", "name": "symfony/error-handler",
"version": "v7.4.0", "version": "v8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/error-handler.git", "url": "https://github.com/symfony/error-handler.git",
"reference": "48be2b0653594eea32dcef130cca1c811dcf25c2" "reference": "d77ec7dda0c274178745d152e82baf7ea827fd73"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/48be2b0653594eea32dcef130cca1c811dcf25c2", "url": "https://api.github.com/repos/symfony/error-handler/zipball/d77ec7dda0c274178745d152e82baf7ea827fd73",
"reference": "48be2b0653594eea32dcef130cca1c811dcf25c2", "reference": "d77ec7dda0c274178745d152e82baf7ea827fd73",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/polyfill-php85": "^1.32", "symfony/polyfill-php85": "^1.32",
"symfony/var-dumper": "^6.4|^7.0|^8.0" "symfony/var-dumper": "^7.4|^8.0"
}, },
"conflict": { "conflict": {
"symfony/deprecation-contracts": "<2.5", "symfony/deprecation-contracts": "<2.5"
"symfony/http-kernel": "<6.4"
}, },
"require-dev": { "require-dev": {
"symfony/console": "^6.4|^7.0|^8.0", "symfony/console": "^7.4|^8.0",
"symfony/deprecation-contracts": "^2.5|^3", "symfony/deprecation-contracts": "^2.5|^3",
"symfony/http-kernel": "^6.4|^7.0|^8.0", "symfony/http-kernel": "^7.4|^8.0",
"symfony/serializer": "^6.4|^7.0|^8.0", "symfony/serializer": "^7.4|^8.0",
"symfony/webpack-encore-bundle": "^1.0|^2.0" "symfony/webpack-encore-bundle": "^1.0|^2.0"
}, },
"bin": [ "bin": [
@@ -2338,7 +2332,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code", "description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/error-handler/tree/v7.4.0" "source": "https://github.com/symfony/error-handler/tree/v8.0.0"
}, },
"funding": [ "funding": [
{ {
@@ -2358,28 +2352,28 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-05T14:29:59+00:00" "time": "2025-11-05T14:36:47+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v7.4.0", "version": "v8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "9dddcddff1ef974ad87b3708e4b442dc38b2261d" "reference": "573f95783a2ec6e38752979db139f09fec033f03"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9dddcddff1ef974ad87b3708e4b442dc38b2261d", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/573f95783a2ec6e38752979db139f09fec033f03",
"reference": "9dddcddff1ef974ad87b3708e4b442dc38b2261d", "reference": "573f95783a2ec6e38752979db139f09fec033f03",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/event-dispatcher-contracts": "^2.5|^3" "symfony/event-dispatcher-contracts": "^2.5|^3"
}, },
"conflict": { "conflict": {
"symfony/dependency-injection": "<6.4", "symfony/security-http": "<7.4",
"symfony/service-contracts": "<2.5" "symfony/service-contracts": "<2.5"
}, },
"provide": { "provide": {
@@ -2388,14 +2382,14 @@
}, },
"require-dev": { "require-dev": {
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/config": "^6.4|^7.0|^8.0", "symfony/config": "^7.4|^8.0",
"symfony/dependency-injection": "^6.4|^7.0|^8.0", "symfony/dependency-injection": "^7.4|^8.0",
"symfony/error-handler": "^6.4|^7.0|^8.0", "symfony/error-handler": "^7.4|^8.0",
"symfony/expression-language": "^6.4|^7.0|^8.0", "symfony/expression-language": "^7.4|^8.0",
"symfony/framework-bundle": "^6.4|^7.0|^8.0", "symfony/framework-bundle": "^7.4|^8.0",
"symfony/http-foundation": "^6.4|^7.0|^8.0", "symfony/http-foundation": "^7.4|^8.0",
"symfony/service-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3",
"symfony/stopwatch": "^6.4|^7.0|^8.0" "symfony/stopwatch": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -2423,7 +2417,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v7.4.0" "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.0"
}, },
"funding": [ "funding": [
{ {
@@ -2443,7 +2437,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-10-28T09:38:46+00:00" "time": "2025-10-30T14:17:19+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
@@ -2523,25 +2517,25 @@
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v7.4.0", "version": "v8.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/filesystem.git", "url": "https://github.com/symfony/filesystem.git",
"reference": "d551b38811096d0be9c4691d406991b47c0c630a" "reference": "d937d400b980523dc9ee946bb69972b5e619058d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/d551b38811096d0be9c4691d406991b47c0c630a", "url": "https://api.github.com/repos/symfony/filesystem/zipball/d937d400b980523dc9ee946bb69972b5e619058d",
"reference": "d551b38811096d0be9c4691d406991b47c0c630a", "reference": "d937d400b980523dc9ee946bb69972b5e619058d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/polyfill-ctype": "~1.8", "symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.8" "symfony/polyfill-mbstring": "~1.8"
}, },
"require-dev": { "require-dev": {
"symfony/process": "^6.4|^7.0|^8.0" "symfony/process": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -2569,7 +2563,7 @@
"description": "Provides basic utilities for the filesystem", "description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/filesystem/tree/v7.4.0" "source": "https://github.com/symfony/filesystem/tree/v8.0.1"
}, },
"funding": [ "funding": [
{ {
@@ -2589,27 +2583,27 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-27T13:27:24+00:00" "time": "2025-12-01T09:13:36+00:00"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v7.4.3", "version": "v8.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "fffe05569336549b20a1be64250b40516d6e8d06" "reference": "dd3a2953570a283a2ba4e17063bb98c734cf5b12"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/fffe05569336549b20a1be64250b40516d6e8d06", "url": "https://api.github.com/repos/symfony/finder/zipball/dd3a2953570a283a2ba4e17063bb98c734cf5b12",
"reference": "fffe05569336549b20a1be64250b40516d6e8d06", "reference": "dd3a2953570a283a2ba4e17063bb98c734cf5b12",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2" "php": ">=8.4"
}, },
"require-dev": { "require-dev": {
"symfony/filesystem": "^6.4|^7.0|^8.0" "symfony/filesystem": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -2637,7 +2631,7 @@
"description": "Finds files and directories via an intuitive fluent interface", "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/finder/tree/v7.4.3" "source": "https://github.com/symfony/finder/tree/v8.0.3"
}, },
"funding": [ "funding": [
{ {
@@ -2657,7 +2651,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-12-23T14:50:43+00:00" "time": "2025-12-23T14:52:06+00:00"
}, },
{ {
"name": "symfony/framework-bundle", "name": "symfony/framework-bundle",
@@ -2819,37 +2813,35 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v7.4.3", "version": "v8.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "a70c745d4cea48dbd609f4075e5f5cbce453bd52" "reference": "514ec3aa7982f296b0ad0825f75b6be5779ae9e7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/a70c745d4cea48dbd609f4075e5f5cbce453bd52", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/514ec3aa7982f296b0ad0825f75b6be5779ae9e7",
"reference": "a70c745d4cea48dbd609f4075e5f5cbce453bd52", "reference": "514ec3aa7982f296b0ad0825f75b6be5779ae9e7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-mbstring": "^1.1" "symfony/polyfill-mbstring": "^1.1"
}, },
"conflict": { "conflict": {
"doctrine/dbal": "<3.6", "doctrine/dbal": "<4.3"
"symfony/cache": "<6.4.12|>=7.0,<7.1.5"
}, },
"require-dev": { "require-dev": {
"doctrine/dbal": "^3.6|^4", "doctrine/dbal": "^4.3",
"predis/predis": "^1.1|^2.0", "predis/predis": "^1.1|^2.0",
"symfony/cache": "^6.4.12|^7.1.5|^8.0", "symfony/cache": "^7.4|^8.0",
"symfony/clock": "^6.4|^7.0|^8.0", "symfony/clock": "^7.4|^8.0",
"symfony/dependency-injection": "^6.4|^7.0|^8.0", "symfony/dependency-injection": "^7.4|^8.0",
"symfony/expression-language": "^6.4|^7.0|^8.0", "symfony/expression-language": "^7.4|^8.0",
"symfony/http-kernel": "^6.4|^7.0|^8.0", "symfony/http-kernel": "^7.4|^8.0",
"symfony/mime": "^6.4|^7.0|^8.0", "symfony/mime": "^7.4|^8.0",
"symfony/rate-limiter": "^6.4|^7.0|^8.0" "symfony/rate-limiter": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -2877,7 +2869,7 @@
"description": "Defines an object-oriented layer for the HTTP specification", "description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-foundation/tree/v7.4.3" "source": "https://github.com/symfony/http-foundation/tree/v8.0.3"
}, },
"funding": [ "funding": [
{ {
@@ -2897,7 +2889,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-12-23T14:23:49+00:00" "time": "2025-12-23T14:52:06+00:00"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
@@ -3020,28 +3012,27 @@
}, },
{ {
"name": "symfony/intl", "name": "symfony/intl",
"version": "v7.4.0", "version": "v8.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/intl.git", "url": "https://github.com/symfony/intl.git",
"reference": "2fa074de6c7faa6b54f2891fc22708f42245ed5c" "reference": "f9eca217ae8f2be0b3ad80723d6a3b518b90cd66"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/intl/zipball/2fa074de6c7faa6b54f2891fc22708f42245ed5c", "url": "https://api.github.com/repos/symfony/intl/zipball/f9eca217ae8f2be0b3ad80723d6a3b518b90cd66",
"reference": "2fa074de6c7faa6b54f2891fc22708f42245ed5c", "reference": "f9eca217ae8f2be0b3ad80723d6a3b518b90cd66",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4"
"symfony/deprecation-contracts": "^2.5|^3"
}, },
"conflict": { "conflict": {
"symfony/string": "<7.1" "symfony/string": "<7.4"
}, },
"require-dev": { "require-dev": {
"symfony/filesystem": "^6.4|^7.0|^8.0", "symfony/filesystem": "^7.4|^8.0",
"symfony/var-exporter": "^6.4|^7.0|^8.0" "symfony/var-exporter": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -3086,7 +3077,7 @@
"localization" "localization"
], ],
"support": { "support": {
"source": "https://github.com/symfony/intl/tree/v7.4.0" "source": "https://github.com/symfony/intl/tree/v8.0.1"
}, },
"funding": [ "funding": [
{ {
@@ -3106,7 +3097,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-27T13:27:24+00:00" "time": "2025-12-01T09:13:36+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@@ -3443,86 +3434,6 @@
], ],
"time": "2024-12-23T08:48:59+00:00" "time": "2024-12-23T08:48:59+00:00"
}, },
{
"name": "symfony/polyfill-php83",
"version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php83.git",
"reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5",
"reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5",
"shasum": ""
},
"require": {
"php": ">=7.2"
},
"type": "library",
"extra": {
"thanks": {
"url": "https://github.com/symfony/polyfill",
"name": "symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php83\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php83/tree/v1.33.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2025-07-08T02:45:35+00:00"
},
{ {
"name": "symfony/polyfill-php85", "name": "symfony/polyfill-php85",
"version": "v1.33.0", "version": "v1.33.0",
@@ -3777,35 +3688,34 @@
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v7.4.0", "version": "v8.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "d50e862cb0a0e0886f73ca1f31b865efbb795003" "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/d50e862cb0a0e0886f73ca1f31b865efbb795003", "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc",
"reference": "d50e862cb0a0e0886f73ca1f31b865efbb795003", "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "^1.33",
"symfony/polyfill-intl-grapheme": "~1.33", "symfony/polyfill-intl-normalizer": "^1.0",
"symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "^1.0"
"symfony/polyfill-mbstring": "~1.0"
}, },
"conflict": { "conflict": {
"symfony/translation-contracts": "<2.5" "symfony/translation-contracts": "<2.5"
}, },
"require-dev": { "require-dev": {
"symfony/emoji": "^7.1|^8.0", "symfony/emoji": "^7.4|^8.0",
"symfony/http-client": "^6.4|^7.0|^8.0", "symfony/http-client": "^7.4|^8.0",
"symfony/intl": "^6.4|^7.0|^8.0", "symfony/intl": "^7.4|^8.0",
"symfony/translation-contracts": "^2.5|^3.0", "symfony/translation-contracts": "^2.5|^3.0",
"symfony/var-exporter": "^6.4|^7.0|^8.0" "symfony/var-exporter": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -3844,7 +3754,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v7.4.0" "source": "https://github.com/symfony/string/tree/v8.0.1"
}, },
"funding": [ "funding": [
{ {
@@ -3864,38 +3774,31 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-27T13:27:24+00:00" "time": "2025-12-01T09:13:36+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v7.4.3", "version": "v8.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "7ef27c65d78886f7599fdd5c93d12c9243ecf44d" "reference": "60a8f11f0e15c48f2cc47c4da53873bb5b62135d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/7ef27c65d78886f7599fdd5c93d12c9243ecf44d", "url": "https://api.github.com/repos/symfony/translation/zipball/60a8f11f0e15c48f2cc47c4da53873bb5b62135d",
"reference": "7ef27c65d78886f7599fdd5c93d12c9243ecf44d", "reference": "60a8f11f0e15c48f2cc47c4da53873bb5b62135d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^3.6.1"
"symfony/translation-contracts": "^2.5.3|^3.3"
}, },
"conflict": { "conflict": {
"nikic/php-parser": "<5.0", "nikic/php-parser": "<5.0",
"symfony/config": "<6.4",
"symfony/console": "<6.4",
"symfony/dependency-injection": "<6.4",
"symfony/http-client-contracts": "<2.5", "symfony/http-client-contracts": "<2.5",
"symfony/http-kernel": "<6.4", "symfony/service-contracts": "<2.5"
"symfony/service-contracts": "<2.5",
"symfony/twig-bundle": "<6.4",
"symfony/yaml": "<6.4"
}, },
"provide": { "provide": {
"symfony/translation-implementation": "2.3|3.0" "symfony/translation-implementation": "2.3|3.0"
@@ -3903,17 +3806,17 @@
"require-dev": { "require-dev": {
"nikic/php-parser": "^5.0", "nikic/php-parser": "^5.0",
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/config": "^6.4|^7.0|^8.0", "symfony/config": "^7.4|^8.0",
"symfony/console": "^6.4|^7.0|^8.0", "symfony/console": "^7.4|^8.0",
"symfony/dependency-injection": "^6.4|^7.0|^8.0", "symfony/dependency-injection": "^7.4|^8.0",
"symfony/finder": "^6.4|^7.0|^8.0", "symfony/finder": "^7.4|^8.0",
"symfony/http-client-contracts": "^2.5|^3.0", "symfony/http-client-contracts": "^2.5|^3.0",
"symfony/http-kernel": "^6.4|^7.0|^8.0", "symfony/http-kernel": "^7.4|^8.0",
"symfony/intl": "^6.4|^7.0|^8.0", "symfony/intl": "^7.4|^8.0",
"symfony/polyfill-intl-icu": "^1.21", "symfony/polyfill-intl-icu": "^1.21",
"symfony/routing": "^6.4|^7.0|^8.0", "symfony/routing": "^7.4|^8.0",
"symfony/service-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3",
"symfony/yaml": "^6.4|^7.0|^8.0" "symfony/yaml": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -3944,7 +3847,7 @@
"description": "Provides tools to internationalize your application", "description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/translation/tree/v7.4.3" "source": "https://github.com/symfony/translation/tree/v8.0.3"
}, },
"funding": [ "funding": [
{ {
@@ -3964,7 +3867,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-12-29T09:31:36+00:00" "time": "2025-12-21T10:59:45+00:00"
}, },
{ {
"name": "symfony/translation-contracts", "name": "symfony/translation-contracts",
@@ -4050,67 +3953,58 @@
}, },
{ {
"name": "symfony/twig-bridge", "name": "symfony/twig-bridge",
"version": "v7.4.3", "version": "v8.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/twig-bridge.git", "url": "https://github.com/symfony/twig-bridge.git",
"reference": "43c922fce020060c65b0fd54bfd8def3b38949b6" "reference": "2a2978a44127bae9aaee0ed5319954eb492d81c3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/twig-bridge/zipball/43c922fce020060c65b0fd54bfd8def3b38949b6", "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/2a2978a44127bae9aaee0ed5319954eb492d81c3",
"reference": "43c922fce020060c65b0fd54bfd8def3b38949b6", "reference": "2a2978a44127bae9aaee0ed5319954eb492d81c3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/translation-contracts": "^2.5|^3", "symfony/translation-contracts": "^2.5|^3",
"twig/twig": "^3.21" "twig/twig": "^3.21"
}, },
"conflict": { "conflict": {
"phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/reflection-docblock": "<3.2.2",
"phpdocumentor/type-resolver": "<1.4.0", "phpdocumentor/type-resolver": "<1.4.0"
"symfony/console": "<6.4",
"symfony/form": "<6.4",
"symfony/http-foundation": "<6.4",
"symfony/http-kernel": "<6.4",
"symfony/mime": "<6.4",
"symfony/serializer": "<6.4",
"symfony/translation": "<6.4",
"symfony/workflow": "<6.4"
}, },
"require-dev": { "require-dev": {
"egulias/email-validator": "^2.1.10|^3|^4", "egulias/email-validator": "^2.1.10|^3|^4",
"league/html-to-markdown": "^5.0", "league/html-to-markdown": "^5.0",
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
"symfony/asset": "^6.4|^7.0|^8.0", "symfony/asset": "^7.4|^8.0",
"symfony/asset-mapper": "^6.4|^7.0|^8.0", "symfony/asset-mapper": "^7.4|^8.0",
"symfony/console": "^6.4|^7.0|^8.0", "symfony/console": "^7.4|^8.0",
"symfony/dependency-injection": "^6.4|^7.0|^8.0", "symfony/dependency-injection": "^7.4|^8.0",
"symfony/emoji": "^7.1|^8.0", "symfony/emoji": "^7.4|^8.0",
"symfony/expression-language": "^6.4|^7.0|^8.0", "symfony/expression-language": "^7.4|^8.0",
"symfony/finder": "^6.4|^7.0|^8.0", "symfony/finder": "^7.4|^8.0",
"symfony/form": "^6.4.30|~7.3.8|^7.4.1|^8.0.1", "symfony/form": "^7.4.1|^8.0.1",
"symfony/html-sanitizer": "^6.4|^7.0|^8.0", "symfony/html-sanitizer": "^7.4|^8.0",
"symfony/http-foundation": "^7.3|^8.0", "symfony/http-foundation": "^7.4|^8.0",
"symfony/http-kernel": "^6.4|^7.0|^8.0", "symfony/http-kernel": "^7.4|^8.0",
"symfony/intl": "^6.4|^7.0|^8.0", "symfony/intl": "^7.4|^8.0",
"symfony/mime": "^6.4|^7.0|^8.0", "symfony/mime": "^7.4|^8.0",
"symfony/polyfill-intl-icu": "~1.0", "symfony/polyfill-intl-icu": "^1.0",
"symfony/property-info": "^6.4|^7.0|^8.0", "symfony/property-info": "^7.4|^8.0",
"symfony/routing": "^6.4|^7.0|^8.0", "symfony/routing": "^7.4|^8.0",
"symfony/security-acl": "^2.8|^3.0", "symfony/security-acl": "^2.8|^3.0",
"symfony/security-core": "^6.4|^7.0|^8.0", "symfony/security-core": "^7.4|^8.0",
"symfony/security-csrf": "^6.4|^7.0|^8.0", "symfony/security-csrf": "^7.4|^8.0",
"symfony/security-http": "^6.4|^7.0|^8.0", "symfony/security-http": "^7.4|^8.0",
"symfony/serializer": "^6.4.3|^7.0.3|^8.0", "symfony/serializer": "^7.4|^8.0",
"symfony/stopwatch": "^6.4|^7.0|^8.0", "symfony/stopwatch": "^7.4|^8.0",
"symfony/translation": "^6.4|^7.0|^8.0", "symfony/translation": "^7.4|^8.0",
"symfony/validator": "^6.4|^7.0|^8.0", "symfony/validator": "^7.4|^8.0",
"symfony/web-link": "^6.4|^7.0|^8.0", "symfony/web-link": "^7.4|^8.0",
"symfony/workflow": "^6.4|^7.0|^8.0", "symfony/workflow": "^7.4|^8.0",
"symfony/yaml": "^6.4|^7.0|^8.0", "symfony/yaml": "^7.4|^8.0",
"twig/cssinliner-extra": "^3", "twig/cssinliner-extra": "^3",
"twig/inky-extra": "^3", "twig/inky-extra": "^3",
"twig/markdown-extra": "^3" "twig/markdown-extra": "^3"
@@ -4141,7 +4035,7 @@
"description": "Provides integration for Twig with various Symfony components", "description": "Provides integration for Twig with various Symfony components",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/twig-bridge/tree/v7.4.3" "source": "https://github.com/symfony/twig-bridge/tree/v8.0.3"
}, },
"funding": [ "funding": [
{ {
@@ -4161,7 +4055,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-12-16T08:02:06+00:00" "time": "2025-12-16T08:10:18+00:00"
}, },
{ {
"name": "symfony/twig-bundle", "name": "symfony/twig-bundle",
@@ -4342,26 +4236,25 @@
}, },
{ {
"name": "symfony/var-exporter", "name": "symfony/var-exporter",
"version": "v7.4.0", "version": "v8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-exporter.git", "url": "https://github.com/symfony/var-exporter.git",
"reference": "03a60f169c79a28513a78c967316fbc8bf17816f" "reference": "7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/03a60f169c79a28513a78c967316fbc8bf17816f", "url": "https://api.github.com/repos/symfony/var-exporter/zipball/7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04",
"reference": "03a60f169c79a28513a78c967316fbc8bf17816f", "reference": "7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4"
"symfony/deprecation-contracts": "^2.5|^3"
}, },
"require-dev": { "require-dev": {
"symfony/property-access": "^6.4|^7.0|^8.0", "symfony/property-access": "^7.4|^8.0",
"symfony/serializer": "^6.4|^7.0|^8.0", "symfony/serializer": "^7.4|^8.0",
"symfony/var-dumper": "^6.4|^7.0|^8.0" "symfony/var-dumper": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -4399,7 +4292,7 @@
"serialize" "serialize"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-exporter/tree/v7.4.0" "source": "https://github.com/symfony/var-exporter/tree/v8.0.0"
}, },
"funding": [ "funding": [
{ {
@@ -4419,7 +4312,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-09-11T10:15:23+00:00" "time": "2025-11-05T18:53:00+00:00"
}, },
{ {
"name": "twig/cache-extra", "name": "twig/cache-extra",
@@ -4788,5 +4681,5 @@
"ext-json": "*" "ext-json": "*"
}, },
"platform-dev": {}, "platform-dev": {},
"plugin-api-version": "2.6.0" "plugin-api-version": "2.9.0"
} }

View File

@@ -6,6 +6,7 @@ namespace Krzysiej\RyobiCrawler\Command;
use Illuminate\Database\Capsule\Manager as Capsule; use Illuminate\Database\Capsule\Manager as Capsule;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Krzysiej\RyobiCrawler\Models\Country;
use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
@@ -93,6 +94,7 @@ class Migrate extends Command
$table->timestamps(); $table->timestamps();
}); });
} }
if (Capsule::schema()->hasTable('countries') && !Country::where('countryName', 'Poland')->exists()) {
$id = Capsule::table('countries')->insertGetId( $id = Capsule::table('countries')->insertGetId(
[ [
'countryName' => 'Poland', 'countryName' => 'Poland',
@@ -103,16 +105,19 @@ class Migrate extends Command
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
]); ]);
}
if (Capsule::schema()->hasTable('countries') && !Country::where('countryName', 'UK')->exists()) {
Capsule::table('countries')->insert([ Capsule::table('countries')->insert([
'countryName' => 'UK', 'countryName' => 'UK',
'productsUrl' => 'https://uk.ryobitools.eu/api/product-listing/get-products', 'productsUrl' => 'https://uk.ryobitools.eu/api/product-listing/get-products',
'cultureCode' => 'en-GB', 'cultureCode' => 'en-GB',
'currency' => 'GBP', 'currency' => 'GBP',
'locale' => 'en', 'locale' => 'uk',
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
] ]
); );
}
if (!Capsule::schema()->hasColumn('products', 'country_id')) { if (!Capsule::schema()->hasColumn('products', 'country_id')) {
Capsule::schema()->table('products', function (Blueprint $table) use ($id) { Capsule::schema()->table('products', function (Blueprint $table) use ($id) {
@@ -170,13 +175,78 @@ class Migrate extends Command
$table->date('lastSeen')->nullable(); $table->date('lastSeen')->nullable();
}); });
} }
if (!Capsule::schema()->hasColumn('products', 'stock')) {
Capsule::schema()->table('products', function (Blueprint $table) {
$table->integer('stock')->nullable();
});
}
if (!Capsule::schema()->hasColumn('products', 'promotions')) {
Capsule::schema()->table('products', function (Blueprint $table) {
$table->json('promotions')->nullable();
});
}
} }
public function index(): void public function index(): void
{ {
if (!$this->hasIndex('products_skuid_country_id_unique')) {
Capsule::schema()->table('products', function (Blueprint $table) { Capsule::schema()->table('products', function (Blueprint $table) {
if ($this->hasIndex('products_skuid_unique')) {
$table->integer('skuID')->unique(false)->change(); $table->integer('skuID')->unique(false)->change();
}
$table->unique(['skuID', 'country_id']); $table->unique(['skuID', 'country_id']);
}); });
} }
if (!$this->hasIndex('prices_product_id_index')) {
Capsule::schema()->table('prices', function (Blueprint $table) {
$table->index('product_id');
});
}
if (!$this->hasIndex('products_id_index')) {
Capsule::schema()->table('products', function (Blueprint $table) {
$table->index('id');
});
}
if (!$this->hasIndex('stocks_product_id_stock_index')) {
Capsule::schema()->table('stocks', function (Blueprint $table) {
$table->index(['product_id', 'stock']);
});
}
if (!$this->isFK('products', 'id', 'stocks', 'product_id')) {
Capsule::schema()->table('products', function (Blueprint $table) {
$table->foreign('id')->references('product_id')->on('stocks');
});
}
if (!$this->isFK('products', 'id', 'prices', 'product_id')) {
Capsule::schema()->table('products', function (Blueprint $table) {
$table->foreign('id')->references('product_id')->on('prices');
});
}
if (!$this->isFK('products', 'country_id', 'countries', 'id')) {
Capsule::schema()->table('products', function (Blueprint $table) {
$table->foreign('country_id')->references('id')->on('countries');
});
}
}
private function isFK(string $table, string $column, string $fTable, string $fColumn): bool
{
$fkColumns = Capsule::schema()->getForeignKeys($table);
return !empty(array_filter($fkColumns, fn($fkColumn) => ($fkColumn['foreign_table'] == $fTable &&
in_array($fColumn, $fkColumn['foreign_columns']) &&
in_array($column, $fkColumn['columns']))
));
}
private function hasIndex(string $indexName): bool
{
return !!count(Capsule::select('SELECT name FROM sqlite_master WHERE type = "index" and name = ?', [$indexName]));
}
} }

View File

@@ -38,7 +38,7 @@ class ScrapeWebsite extends Command
$progress = new ProgressBar($output); $progress = new ProgressBar($output);
$countries = Country::all(); $countries = Country::all();
foreach($countries as $country) { foreach($countries as $country) {
$output->writeln('Country name: ' . $country->countryName."\n"); $output->writeln('Country name: ' . $country->countryName);
$progress->start(); $progress->start();
$products = $this->getProducts($country); $products = $this->getProducts($country);
$progress->setMaxSteps(count($products)); $progress->setMaxSteps(count($products));
@@ -58,11 +58,13 @@ class ScrapeWebsite extends Command
$progress->start(); $progress->start();
foreach($products as $product) { foreach($products as $product) {
$newestPrice = $product->newestPrice; $newestPrice = $product->newestPrice;
$currentStock = $product->currentStock;
$product->priceCurrent = $newestPrice->price; $product->priceCurrent = $newestPrice->price;
$product->productStandardPrice = $newestPrice->productStandardPrice; $product->productStandardPrice = $newestPrice->productStandardPrice;
$product->lowestProductPrice30Days = $newestPrice->lowestProductPrice30Days; $product->lowestProductPrice30Days = $newestPrice->lowestProductPrice30Days;
$product->priceLowest = $product->lowestPrice->price; $product->priceLowest = $product->lowestPrice->price;
$product->lastSeen = $newestPrice->created_at->format('Y-m-d'); $product->lastSeen = $newestPrice->created_at->format('Y-m-d');
$product->stock = $currentStock->stock;
$product->save(['timestamps' => false]); $product->save(['timestamps' => false]);
$progress->advance(); $progress->advance();
} }
@@ -103,17 +105,13 @@ class ScrapeWebsite extends Command
private function saveProduct(\stdClass $product, Country $country): void private function saveProduct(\stdClass $product, Country $country): void
{ {
// if ($product->skuID == 0) {
// dump([$product->skuID, $product->name]);
// }
// return;
/** @var Product $productModel */ /** @var Product $productModel */
$productModel = Product::firstOrNew(['skuID' => $product->skuID, 'country_id' => $country->id]); $productModel = Product::firstOrNew(['skuID' => $product->skuID, 'country_id' => $country->id]);
$productModel->skuID = $product->skuID; $productModel->skuID = $product->skuID;
$productModel->name = $product->name; $productModel->name = $product->name;
$productModel->availableQuantity = $product->availableQuantity; $productModel->availableQuantity = $product->availableQuantity;
$productModel->categories = $product->categories; $productModel->categories = str_replace(['/', ' '], '', $product->categories);
$productModel->image = $product->image; $productModel->image = $product->image;
$productModel->subTitle = $product->subTitle; $productModel->subTitle = $product->subTitle;
$productModel->variantCode = $product->variantCode; $productModel->variantCode = $product->variantCode;
@@ -122,6 +120,7 @@ class ScrapeWebsite extends Command
$productModel->lastSeen = date("Y-m-d"); $productModel->lastSeen = date("Y-m-d");
$productModel->touch('updated_at'); $productModel->touch('updated_at');
$productModel->country()->associate($country); $productModel->country()->associate($country);
$productModel->promotions = $product->promotions;
$productModel->save(); $productModel->save();
$priceExists = $productModel->price()->whereRaw("strftime('%Y-%m-%d', created_at) = ?", [date('Y-m-d')])->exists(); $priceExists = $productModel->price()->whereRaw("strftime('%Y-%m-%d', created_at) = ?", [date('Y-m-d')])->exists();

View File

@@ -8,22 +8,43 @@ use Symfony\Component\Routing\Attribute\Route;
final class CategoryController extends BaseController final class CategoryController extends BaseController
{ {
#[Route('/category/{category}', name: 'app_category')] #[Route('/category/{category?}', name: 'app_category')]
public function __invoke(string $category): Response public function __invoke(?string $category): Response
{ {
if($this->cache->getItem('list_category_'.$category)->isHit()) { if($this->cache->getItem('list_category_'.$category)->isHit()) {
return $this->render('productList.html.twig', ['listType' => 'category_'.$category]); return $this->render('productList.html.twig', ['listType' => 'category_'.$category]);
} }
/** @var Product[] $products */
$products = Product::with(['price', 'lowestPrice']) $products = Product::with(['price', 'lowestPrice'])
->selectRaw('products.*') ->selectRaw('products.*')
->distinct('products.id') ->distinct('products.id')
->when(!is_null($category) , fn ($q) => $q->whereRaw('json_each.value = ?', [$category]))
->fromRaw('products, json_each(products.categories)') ->fromRaw('products, json_each(products.categories)')
->whereRaw('json_each.value = ?', [$category])
->orderByDesc('starred') ->orderByDesc('starred')
->orderByDesc('created_by') ->orderByDesc('created_by')
->get(); ->get();
return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'category_'.$category]); $categoriesTree = [];
foreach ($products as $product) {
$categoriesTree = $this->addToTree($product->categories, $categoriesTree);
}
return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'category_' . $category, 'category' => $category, 'categoryTree' => $categoriesTree]);
}
private function addToTree(array $categories, mixed $categoriesTree)
{
$tmp = &$categoriesTree;
foreach ($categories as $category) {
if (empty($tmp[$category])) {
$tmp[$category] = ['count' => 0];
}
$tmp = &$tmp[$category];
$tmp['count']++;
}
return $categoriesTree;
} }
} }

View File

@@ -14,11 +14,11 @@ final class IndexController extends BaseController
if ($this->cache->getItem('list_all')->isHit()) { if ($this->cache->getItem('list_all')->isHit()) {
return $this->render('productList.html.twig', ['listType' => 'all']); return $this->render('productList.html.twig', ['listType' => 'all']);
} }
$products = Product::with(['currentStock']) $products = Product::orderByDesc('starred')
->orderByDesc('starred')
->orderByDesc('created_by') ->orderByDesc('created_by')
->get(); ->get();
return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'all']); return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'all']);
} }
} }

View File

@@ -16,11 +16,11 @@ final class NewController extends BaseController
if($this->cache->getItem('list_new')->isHit()) { if($this->cache->getItem('list_new')->isHit()) {
return $this->render('productList.html.twig', ['listType' => 'new']); return $this->render('productList.html.twig', ['listType' => 'new']);
} }
$date = now()->modify('-30 days')->format('Y-m-d');
$products = Product::where('created_at', '>', now()->modify('-30 days')->format('Y-m-d')) $products = Product::where('created_at', '>', $date)
->with(['country', 'stock'])
->orderByDesc('starred') ->orderByDesc('starred')
->orderByDesc('created_by') ->orderByDesc('created_by')
->with(['currentPrice', 'lowestPrice'])
->get(); ->get();
return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'new']); return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'new']);
} }

View File

@@ -8,18 +8,25 @@ use Symfony\Component\Routing\Attribute\Route;
final class PromosController extends BaseController final class PromosController extends BaseController
{ {
#[Route('/promos', name: 'app_promos')] #[Route('/promos/{promo?}', name: 'app_promos')]
public function __invoke(): Response public function __invoke(?string $promo): Response
{ {
if($this->cache->getItem('list_promos')->isHit()) { if ($this->cache->getItem('list_promos')->isHit()) {
return $this->render('productList.html.twig', ['listType' => 'promos']); return $this->render('productList.html.twig', ['listType' => 'promos' . $promo]);
} }
$products = Product::whereRaw('priceCurrent < productStandardPrice') $products = Product::when(is_null($promo), fn($q) => $q->whereRaw('priceCurrent < productStandardPrice'))
->orderByDesc('starred') ->orderByDesc('starred')
->orderByDesc('created_by') ->orderByDesc('created_by')
->with(['currentPrice', 'lowestPrice']) ->with(['currentPrice', 'lowestPrice'])
->when(!is_null($promo), fn($q) => $q->whereRaw("json_extract(promotions, '$.slug') LIKE ?", $promo))
->get(); ->get();
return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'promos']);
$promos = Product::select($this->database->getConnection()->raw("distinct json_extract(promotions, '$.slug') as slug, json_extract(promotions, '$.tag') as tag"))
->whereRaw("json_extract(promotions, '$.tag') is not null")
->get();
return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'promos' . $promo, 'promos' => $promos->toArray()]);
} }
} }

View File

@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Support\Str;
use function Symfony\Component\Clock\now; use function Symfony\Component\Clock\now;
/** /**
@@ -27,11 +28,13 @@ use function Symfony\Component\Clock\now;
* @property float $productStandardPrice * @property float $productStandardPrice
* @property float $lowestProductPrice30Days * @property float $lowestProductPrice30Days
* @property Date $lastSeen * @property Date $lastSeen
* @property integer $stock
* @property Object $promotions
*/ */
class Product extends Model class Product extends Model
{ {
public $timestamps = true; public $timestamps = true;
public $fillable = ['skuID']; public $fillable = ['skuID', 'country_id'];
public function country(): BelongsTo public function country(): BelongsTo
{ {
@@ -57,9 +60,10 @@ class Product extends Model
{ {
return $this->hasOne(Price::class)->ofMany('price', 'MIN'); return $this->hasOne(Price::class)->ofMany('price', 'MIN');
} }
public function newestPrice(): HasOne public function newestPrice(): HasOne
{ {
return $this->hasOne(Price::class)->latest(); return $this->hasOne(Price::class)->latest()->take(1);
} }
public function stock(): HasMany public function stock(): HasMany
@@ -69,7 +73,7 @@ class Product extends Model
public function currentStock(): HasOne public function currentStock(): HasOne
{ {
return $this->stock()->one()->ofMany()->withDefault(fn (Stock $stock) => $stock->stock = 0); return $this->stock()->one()->ofMany()->withDefault(fn(Stock $stock) => $stock->stock = 0)->take(1);
} }
public function toggleStarred(): self public function toggleStarred(): self
@@ -87,10 +91,23 @@ class Product extends Model
); );
} }
public function promotions(): Attribute
{
return Attribute::make(
get: fn(?string $value) => json_decode($value ?? '{"hasPromotion": false}', 1),
set: function (\stdClass $value) {
$value->slug = Str::slug($value->tag);
return json_encode($value);
}
);
}
public function isDiscontinued(): bool public function isDiscontinued(): bool
{ {
return $this->lastSeen < now()->format('Y-m-d'); return $this->lastSeen < now()->format('Y-m-d');
} }
public function isNew(): bool public function isNew(): bool
{ {
return $this->created_at->format('Y-m-d') > now()->modify('-30 days')->format('Y-m-d'); return $this->created_at->format('Y-m-d') > now()->modify('-30 days')->format('Y-m-d');

View File

@@ -2,11 +2,11 @@
namespace Krzysiej\RyobiCrawler\Twig; namespace Krzysiej\RyobiCrawler\Twig;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Collection;
use Krzysiej\RyobiCrawler\Models\Price; use Krzysiej\RyobiCrawler\Models\Price;
use Krzysiej\RyobiCrawler\Models\Product; use Krzysiej\RyobiCrawler\Models\Product;
use Krzysiej\RyobiCrawler\Models\Stock; use Krzysiej\RyobiCrawler\Models\Stock;
use Symfony\Component\Routing\RouterInterface;
use Twig\Extension\AbstractExtension; use Twig\Extension\AbstractExtension;
use Twig\TwigFilter; use Twig\TwigFilter;
use Twig\TwigFunction; use Twig\TwigFunction;
@@ -15,6 +15,10 @@ use function Symfony\Component\Clock\now;
class AppExtension extends AbstractExtension class AppExtension extends AbstractExtension
{ {
public function __construct(public RouterInterface $route)
{
}
public function getFunctions(): array public function getFunctions(): array
{ {
return [ return [
@@ -23,6 +27,7 @@ class AppExtension extends AbstractExtension
new TwigFunction('newCount', [$this, 'newCount']), new TwigFunction('newCount', [$this, 'newCount']),
new TwigFunction('discontinuedCount', [$this, 'discontinuedCount']), new TwigFunction('discontinuedCount', [$this, 'discontinuedCount']),
new TwigFunction('lowestPriceCount', [$this, 'lowestPriceCount']), new TwigFunction('lowestPriceCount', [$this, 'lowestPriceCount']),
new TwigFunction('renderCategoryTree', [$this, 'renderCategoryTree']),
]; ];
} }
@@ -56,7 +61,7 @@ class AppExtension extends AbstractExtension
public function lowestPriceCount(): int public function lowestPriceCount(): int
{ {
return Product::whereRaw('priceCurrent = priceLowest') return Product::whereRaw('priceCurrent = priceLowest')
->whereRaw('lastSeen = "'.now()->format('Y-m-d').'"') ->whereRaw('lastSeen = "' . now()->format('Y-m-d') . '"')
->whereRaw('priceCurrent < productStandardPrice') ->whereRaw('priceCurrent < productStandardPrice')
->count(); ->count();
} }
@@ -65,4 +70,28 @@ class AppExtension extends AbstractExtension
{ {
return $items->first(fn($item) => str_starts_with($item->created_at, $date)); return $items->first(fn($item) => str_starts_with($item->created_at, $date));
} }
public function renderCategoryTree($categories, $current, $level = 0): string
{
$tree = '';
if ($level == 0) {
$tree .= '<ul class="list-group list-group-flush">';
}
foreach ($categories as $categoryName => $category) {
$currentClass = $categoryName == $current ? 'list-group-item-primary' : '';
$tree .= '<a class="list-group-item list-group-item-action '.$currentClass.' text-decoration-none ms-' . ($level * 2) . '" href="' . $this->route->generate('app_category', ['category' => $categoryName]) . '">' . $categoryName . ' <span class="badge bg-primary rounded-pill">' . $category['count'] . '</span></a>';
unset($category['count']);
if (is_array($category) && count($category) >= 1) {
foreach ($category as $subcategoryName => $subCategory) {
$tree .= $this->renderCategoryTree([$subcategoryName => $subCategory], $current, $level + 1);
}
}
}
if ($level == 0) {
$tree .= '</ul>';
}
return $tree;
}
} }

View File

@@ -10,7 +10,8 @@
<td><img src='{{ product.image }}&width=150' class='border rounded p-1' alt='{{ product.name }}'/></td> <td><img src='{{ product.image }}&width=150' class='border rounded p-1' alt='{{ product.name }}'/></td>
<td> <td>
<a href='{{ path('app_product', {'productId': product.id}) }}' class="text-decoration-none">{{ product.name }}</a> <a href='{{ path('app_product', {'productId': product.id}) }}' class="text-decoration-none">{{ product.name }}</a>
<span class="badge text-bg-light">{{ product.subTitle }}</span> <span class="badge text-bg-light"><a href="{{ path('app_search', {'search': product.subTitle}) }}" class="link-underline link-underline-opacity-0 link-dark">{{ product.subTitle }}</a></span>
{% if product.promotions is not null and product.promotions.hasPromotion %}<a href="{{ path('app_promos', {'promo': product.promotions.slug}) }}"><span class="badge bg-info">PROMO: {{ product.promotions.tag }}</span></a>{% endif %}
</td> </td>
<td> <td>
<nav aria-label="breadcrumb" style="--bs-breadcrumb-divider: '>';"> <nav aria-label="breadcrumb" style="--bs-breadcrumb-divider: '>';">
@@ -22,7 +23,7 @@
</ol> </ol>
</nav> </nav>
</td> </td>
<td><a href='https://pl.ryobitools.eu/{{ product.url }}'>link</a></td> <td><a href='https://{{ product.country.locale }}.ryobitools.eu{{ product.url }}'>link</a></td>
</tr> </tr>
<tr> <tr>
<td colspan="5"> <td colspan="5">
@@ -42,13 +43,14 @@
<th>Stock</th> <th>Stock</th>
</tr> </tr>
</thead> </thead>
{% set stock = product.stock().get() %}
{% for price in product.price %} {% for price in product.price %}
<tr> <tr>
<td>{{ price.price | format_currency(product.country.currency, {}, product.country.locale) }}</td> <td>{{ price.price | format_currency(product.country.currency, {}, product.country.locale) }}</td>
<td>{{ price.lowestProductPrice30Days | format_currency(product.country.currency, {}, product.country.locale) }}</td> <td>{{ price.lowestProductPrice30Days | format_currency(product.country.currency, {}, product.country.locale) }}</td>
<td>{{ price.productStandardPrice | format_currency(product.country.currency, {}, product.country.locale) }}</td> <td>{{ price.productStandardPrice | format_currency(product.country.currency, {}, product.country.locale) }}</td>
<td>{{ price.created_at }}</td> <td>{{ price.created_at }}</td>
<td>{{ (product.stock | findByCreatedAtDate(price.created_at | slice(0,10))).stock ?? '' }}</td> <td>{{ (stock | findByCreatedAtDate(price.created_at | slice(0,10))).stock ?? '' }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>

View File

@@ -1,8 +1,21 @@
{% extends "template.html.twig" %} {% extends "template.html.twig" %}
{% block content %} {% block content %}
{% cache 'list_' ~ listType %} {% cache 'list_' ~ listType %}
<div class="table-responsive">
{% if listType starts with 'category_' %}
{{ renderCategoryTree(categoryTree, category) | raw }}
{% endif %}
{% if listType starts with 'promos' %}
{% for promo in promos %}
<a href="{{ path('app_promos', {'promo': promo.slug}) }}"><span class="badge bg-info">PROMO: {{ promo.tag }}</span></a>
{% endfor %}
{% endif %}
{% if (listType starts with 'category_' and category == null) or not (listType starts with 'category_') or (listType starts with 'category_' and category is not null) %}
<div class="table-responsive">
<table class='table table-hover'> <table class='table table-hover'>
<thead> <thead>
<tr> <tr>
@@ -19,45 +32,58 @@
{% for product in products %} {% for product in products %}
<tr> <tr>
<td class="align-middle font-weight-bold h3"><a class="text-warning text-decoration-none" <td class="align-middle font-weight-bold h3"><a class="text-warning text-decoration-none"
href="{{ path('app_star', {'productId': product.id}) }}">{% if product.starred == true %}{% else %}{% endif %}</a></td> href="{{ path('app_star', {'productId': product.id}) }}">{% if product.starred == true %}{% else %}{% endif %}</a>
<td class="align-middle" style="width: 120px;"><img src='{{ product.image }}&width=70' class='img-thumbnail' alt='{{ product.name }}'/></td> </td>
<td class="align-middle" style="width: 120px;"><img src='{{ product.image }}&width=70'
class='img-thumbnail'
alt='{{ product.name }}'/></td>
<td class="align-middle"> <td class="align-middle">
<a href='{{ path('app_product', {'productId': product.id}) }}' class="text-decoration-none">{{ product.name }}</a> <a href='{{ path('app_product', {'productId': product.id}) }}'
{% if product.currentStock.stock > 0 %} class="text-decoration-none">{{ product.name }}</a>
<span class="badge text-bg-light">stock: {{ product.currentStock.stock }}</span> {% if product.stock > 0 %}
<span class="badge text-bg-light">stock: {{ product.stock }}</span>
{% else %} {% else %}
<span class="badge text-bg-warning">out of stock</span> <span class="badge text-bg-warning">out of stock</span>
{% endif %} {% endif %}
{% if product.isDiscontinued() %} {% if product.isDiscontinued() %}
<span class="badge text-bg-secondary" data-bs-toggle="tooltip" data-bs-title="Last update: {{ product.lastSeen }}">is discontinued</span> <span class="badge text-bg-secondary" data-bs-toggle="tooltip"
data-bs-title="Last update: {{ product.lastSeen }}">is discontinued</span>
{% endif %} {% endif %}
{% if product.isNew() %} {% if product.isNew() %}
<span class="badge text-bg-success">is new</span> <span class="badge text-bg-success">is new</span>
{% endif %} {% endif %}
<span class="badge text-bg-light">{{ product.subTitle }}</span> <span class="badge text-bg-light"><a
href="{{ path('app_search', {'search': product.subTitle}) }}"
class="link-underline link-underline-opacity-0 link-dark">{{ product.subTitle }}</a></span>
{% if product.promotions is not null and product.promotions.hasPromotion %}<a href="{{ path('app_promos', {'promo': product.promotions.slug}) }}"><span class="badge bg-info">PROMO: {{ product.promotions.tag }}</span></a>{% endif %}
</td> </td>
<td class="align-middle"> <td class="align-middle">
<nav aria-label="breadcrumb" style="--bs-breadcrumb-divider: '>';" > <nav aria-label="breadcrumb" style="--bs-breadcrumb-divider: '>';">
<ol class="breadcrumb mb-0"> <ol class="breadcrumb mb-0">
{% for category in product.categories %} {% for category in product.categories %}
<li class="breadcrumb-item" aria-current="page"><a class="breadcrumb-item text-decoration-none" href="{{ path('app_category', {'category': category}) }}">{{ category }}</a></li> <li class="breadcrumb-item" aria-current="page"><a
class="breadcrumb-item text-decoration-none"
href="{{ path('app_category', {'category': category}) }}">{{ category }}</a>
</li>
{% endfor %} {% endfor %}
</ol> </ol>
</nav> </nav>
</td> </td>
<td class="align-middle"><a href='https://pl.ryobitools.eu/{{ product.url }}'>link</a></td> <td class="align-middle"><a href='https://{{ product.country.locale }}.ryobitools.eu{{ product.url }}'>link</a></td>
<td class="align-middle text-end"> <td class="align-middle text-end">
{% if product.isDiscontinued() or product.priceCurrent == product.productStandardPrice %} {% if product.isDiscontinued() or product.priceCurrent == product.productStandardPrice %}
{{ product.priceLowest | format_currency(product.country.currency, {}, product.country.locale) }} {{ product.priceLowest | format_currency(product.country.currency, {}, product.country.locale) }}
{% else %} {% else %}
{% if product.priceLowest != product.priceCurrent %}{{ product.priceLowest | format_currency(product.country.currency, {}, product.country.locale) }}{%else%}<span class="badge text-bg-info">now lowest</span>{% endif %}</td> {% if product.priceLowest != product.priceCurrent %}{{ product.priceLowest | format_currency(product.country.currency, {}, product.country.locale) }}{% else %}
<span class="badge text-bg-info">now lowest</span>{% endif %}</td>
{% endif %} {% endif %}
<td class="align-middle text-end">{{ product.priceCurrent | format_currency(product.country.currency, {}, product.country.locale) }}</td> <td class="align-middle text-end">{{ product.priceCurrent | format_currency(product.country.currency, {}, product.country.locale) }}</td>
<td class="align-middle"> <td class="align-middle">
<div class="d-flex flex-row"> <div class="d-flex flex-row">
{% if product.priceCurrent != product.productStandardPrice %}<span {% if product.priceCurrent != product.productStandardPrice %}<span
class="badge text-bg-warning text-decoration-line-through flex-fill">{{ product.productStandardPrice | format_currency(product.country.currency, {}, product.country.locale) }}</span> <span class="badge text-bg-warning text-decoration-line-through flex-fill">{{ product.productStandardPrice | format_currency(product.country.currency, {}, product.country.locale) }}</span>
<span
class="badge text-bg-success flex-fill">{{ ((1 - product.priceCurrent / product.productStandardPrice)*100)|number_format(0) }}%</span> class="badge text-bg-success flex-fill">{{ ((1 - product.priceCurrent / product.productStandardPrice)*100)|number_format(0) }}%</span>
{% endif %} {% endif %}
</div> </div>
@@ -65,6 +91,7 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
{% endcache %} {% endif %}
{% endcache %}
{% endblock %} {% endblock %}

View File

@@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en" data-bs-theme="light">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">