2024-11-15

This commit is contained in:
gcch 2024-11-15 14:04:11 +01:00
commit bfcf485ce0
44 changed files with 38904 additions and 188 deletions

View file

@ -0,0 +1,10 @@
name: phpmyadmin
repository: ddev/ddev-phpmyadmin
version: v0.3.9
install_date: "2024-11-15T17:27:23+01:00"
project_files:
- docker-compose.phpmyadmin.yaml
- docker-compose.phpmyadmin_norouter.yaml
- commands/host/phpmyadmin
global_files: []
removal_actions: []

19
.ddev/commands/host/phpmyadmin Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
## #ddev-generated: If you want to edit and own this file, remove this line.
## Description: Launch a browser with PhpMyAdmin
## Usage: phpmyadmin
## Example: "ddev phpmyadmin"
DDEV_PHPMYADMIN_PORT=8036
DDEV_PHPMYADMIN_HTTPS_PORT=8037
if [ ${DDEV_PRIMARY_URL%://*} = "http" ] || [ -n "${GITPOD_WORKSPACE_ID:-}" ] || [ "${CODESPACES:-}" = "true" ]; then
# Gitpod: "gp preview" opens a blank page for PhpMyAdmin, use "xdg-open" instead
if [ "${OSTYPE:-}" = "linux-gnu" ] && [ -n "${GITPOD_WORKSPACE_ID:-}" ] && [ -z "${DDEV_DEBUG:-}" ]; then
xdg-open "$(DDEV_DEBUG=true ddev launch :$DDEV_PHPMYADMIN_PORT | grep "FULLURL" | awk '{print $2}')"
else
ddev launch :$DDEV_PHPMYADMIN_PORT
fi
else
ddev launch :$DDEV_PHPMYADMIN_HTTPS_PORT
fi

View file

@ -7,8 +7,8 @@ xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
database:
type: mariadb
version: "10.11"
type: mariadb
version: "10.11"
use_dns_when_possible: true
composer_version: "2"
web_environment: []
@ -225,12 +225,12 @@ corepack_enable: true
# The default time that DDEV waits for all containers to become ready can be increased from
# the default 120. This helps in importing huge databases, for example.
#web_extra_exposed_ports:
#- name: nodejs
# web_extra_exposed_ports:
# - name: nodejs
# container_port: 3000
# http_port: 2999
# https_port: 3000
#- name: something
# - name: something
# container_port: 4000
# https_port: 4000
# http_port: 3999
@ -248,11 +248,11 @@ corepack_enable: true
# http_port: 9998
# https_port: 9999
#web_extra_daemons:
#- name: "http-1"
# web_extra_daemons:
# - name: "http-1"
# command: "/var/www/html/node_modules/.bin/http-server -p 3000"
# directory: /var/www/html
#- name: "http-2"
# - name: "http-2"
# command: "/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000"
# directory: /var/www/html
@ -278,7 +278,7 @@ corepack_enable: true
# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
# information on the commands that can be extended and the tasks you can define
# for them. Example:
#hooks:
# hooks:
# Un-comment to emit the WP CLI version after ddev start.
# post-start:
# - exec: wp cli version

View file

@ -0,0 +1,30 @@
# ddev-generated
services:
phpmyadmin:
container_name: ddev-${DDEV_SITENAME}-phpmyadmin
image: phpmyadmin:5.2.0
working_dir: "/root"
restart: "no"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
volumes:
- ".:/mnt/ddev_config"
- "ddev-global-cache:/mnt/ddev-global-cache"
expose:
- "80"
environment:
- PMA_USER=root
- PMA_PASSWORD=root
- PMA_HOST=db
- PMA_PORT=3306
- VIRTUAL_HOST=$DDEV_HOSTNAME
- UPLOAD_LIMIT=4000M
- HTTP_EXPOSE=8036:80
- HTTPS_EXPOSE=8037:80
healthcheck:
interval: 120s
timeout: 2s
retries: 1
depends_on:
- db

View file

@ -0,0 +1,4 @@
# ddev-generated
# If omit_containers[ddev-router] then this file will be replaced
# with another with a `ports` statement to directly expose port 80 to 8036
services: {}

View file

@ -18,39 +18,41 @@
],
"require": {
"php": ">=8.2",
"composer/installers": "^2.2",
"composer/installers": "^2.3",
"crell/fp": "^1.0",
"htmlburger/carbon-fields": "^3.6",
"illuminate/support": "^11.31",
"htmlburger/carbon-fields": "^3.6.5",
"illuminate/support": "^11.32",
"laravel/helpers": "^1.7",
"lstrojny/functional-php": "^1.17",
"mnsami/composer-custom-directory-installer": "^2.0",
"oscarotero/env": "^2.1",
"ramsey/uuid": "^4.7",
"roots/bedrock-autoloader": "^1.0",
"ramsey/uuid": "^4.7.6",
"roots/bedrock-autoloader": "^1.0.4",
"roots/bedrock-disallow-indexing": "^2.0",
"roots/wordpress": "^6.6.1",
"roots/wp-config": "^1.0.0",
"roots/wp-password-bcrypt": "^1.1.0",
"roots/wordpress": "^6.7",
"roots/wp-config": "^1.0",
"roots/wp-password-bcrypt": "^1.2",
"stripe/stripe-php": "^16.2",
"symfony/uid": "^7.1",
"timber/timber": "^2.2",
"vlucas/phpdotenv": "^5.5",
"wpackagist-plugin/falcon": "^2.8",
"wpackagist-plugin/force-regenerate-thumbnails": "^2.2",
"wpackagist-plugin/query-monitor": "^3.16",
"wpackagist-plugin/redis-cache": "^2.5",
"wpackagist-plugin/wc-multishipping": "^2.5",
"wpackagist-plugin/woocommerce": "^9.1",
"wpackagist-plugin/wp-openapi": "^1.0",
"symfony/uid": "^7.1.6",
"timber/timber": "^2.3",
"vlucas/phpdotenv": "^5.6.1",
"wpackagist-plugin/falcon": "^2.8.3",
"wpackagist-plugin/force-regenerate-thumbnails": "^2.2.1",
"wpackagist-plugin/media-cleaner": "^6.8.2",
"wpackagist-plugin/query-monitor": "^3.16.4",
"wpackagist-plugin/redis-cache": "^2.5.4",
"wpackagist-plugin/wc-multishipping": "^2.5.3",
"wpackagist-plugin/woocommerce": "^9.4.1",
"wpackagist-plugin/wp-openapi": "^1.0.16",
"wpackagist-theme/twentytwentyfour": "^1.3"
},
"require-dev": {
"phpstan/phpstan": "^1.12",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan": "^2.0.1",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.7.1",
"szepeviktor/phpstan-wordpress": "^1.3",
"vimeo/psalm": "^5.25"
"squizlabs/php_codesniffer": "^3.11",
"szepeviktor/phpstan-wordpress": "2.x-dev",
"vimeo/psalm": "^5.26.1"
},
"config": {
"optimize-autoloader": true,
@ -58,7 +60,8 @@
"allow-plugins": {
"composer/installers": true,
"mnsami/composer-custom-directory-installer": true,
"roots/wordpress-core-installer": true
"roots/wordpress-core-installer": true,
"phpstan/extension-installer": true
},
"sort-packages": true
},

216
composer.lock generated
View file

@ -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": "84307ecd31836b2fb3dc265e87ea5712",
"content-hash": "a8f1ac1472d932700ac1c8736a7b1cdb",
"packages": [
{
"name": "brick/math",
@ -646,16 +646,16 @@
},
{
"name": "illuminate/collections",
"version": "v11.31.0",
"version": "v11.32.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/collections.git",
"reference": "4fdef06e35aac0239d76033a2bad0ddb921226e8"
"reference": "a01a9d0799700bf34ab3797988fdd5f420d42bfe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/collections/zipball/4fdef06e35aac0239d76033a2bad0ddb921226e8",
"reference": "4fdef06e35aac0239d76033a2bad0ddb921226e8",
"url": "https://api.github.com/repos/illuminate/collections/zipball/a01a9d0799700bf34ab3797988fdd5f420d42bfe",
"reference": "a01a9d0799700bf34ab3797988fdd5f420d42bfe",
"shasum": ""
},
"require": {
@ -697,11 +697,11 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2024-11-08T03:05:25+00:00"
"time": "2024-11-15T15:43:48+00:00"
},
{
"name": "illuminate/conditionable",
"version": "v11.31.0",
"version": "v11.32.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/conditionable.git",
@ -747,16 +747,16 @@
},
{
"name": "illuminate/contracts",
"version": "v11.31.0",
"version": "v11.32.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/contracts.git",
"reference": "56312862af937bd6da8e6dc8bbd88188dfb478f8"
"reference": "44c15aec6ea0d997e0885aa5b04876fe8a141433"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/56312862af937bd6da8e6dc8bbd88188dfb478f8",
"reference": "56312862af937bd6da8e6dc8bbd88188dfb478f8",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/44c15aec6ea0d997e0885aa5b04876fe8a141433",
"reference": "44c15aec6ea0d997e0885aa5b04876fe8a141433",
"shasum": ""
},
"require": {
@ -791,11 +791,11 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2024-09-22T15:08:08+00:00"
"time": "2024-11-15T15:40:33+00:00"
},
{
"name": "illuminate/macroable",
"version": "v11.31.0",
"version": "v11.32.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/macroable.git",
@ -841,16 +841,16 @@
},
{
"name": "illuminate/support",
"version": "v11.31.0",
"version": "v11.32.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/support.git",
"reference": "866b8240387ecdcbbf4a7e5713c0f93b321544d5"
"reference": "213bc04ed2a75dac441e602df4568154c36a3670"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/support/zipball/866b8240387ecdcbbf4a7e5713c0f93b321544d5",
"reference": "866b8240387ecdcbbf4a7e5713c0f93b321544d5",
"url": "https://api.github.com/repos/illuminate/support/zipball/213bc04ed2a75dac441e602df4568154c36a3670",
"reference": "213bc04ed2a75dac441e602df4568154c36a3670",
"shasum": ""
},
"require": {
@ -913,7 +913,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2024-11-11T20:45:02+00:00"
"time": "2024-11-14T16:30:16+00:00"
},
{
"name": "laravel/helpers",
@ -3481,6 +3481,24 @@
"type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/force-regenerate-thumbnails/"
},
{
"name": "wpackagist-plugin/media-cleaner",
"version": "6.8.2",
"source": {
"type": "svn",
"url": "https://plugins.svn.wordpress.org/media-cleaner/",
"reference": "tags/6.8.2"
},
"dist": {
"type": "zip",
"url": "https://downloads.wordpress.org/plugin/media-cleaner.6.8.2.zip"
},
"require": {
"composer/installers": "^1.0 || ^2.0"
},
"type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/media-cleaner/"
},
{
"name": "wpackagist-plugin/query-monitor",
"version": "3.16.4",
@ -4553,6 +4571,54 @@
},
"time": "2024-11-09T15:12:26+00:00"
},
{
"name": "phpstan/extension-installer",
"version": "1.4.3",
"source": {
"type": "git",
"url": "https://github.com/phpstan/extension-installer.git",
"reference": "85e90b3942d06b2326fba0403ec24fe912372936"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936",
"reference": "85e90b3942d06b2326fba0403ec24fe912372936",
"shasum": ""
},
"require": {
"composer-plugin-api": "^2.0",
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.9.0 || ^2.0"
},
"require-dev": {
"composer/composer": "^2.0",
"php-parallel-lint/php-parallel-lint": "^1.2.0",
"phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0"
},
"type": "composer-plugin",
"extra": {
"class": "PHPStan\\ExtensionInstaller\\Plugin"
},
"autoload": {
"psr-4": {
"PHPStan\\ExtensionInstaller\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Composer plugin for automatic installation of PHPStan extensions",
"keywords": [
"dev",
"static analysis"
],
"support": {
"issues": "https://github.com/phpstan/extension-installer/issues",
"source": "https://github.com/phpstan/extension-installer/tree/1.4.3"
},
"time": "2024-09-04T20:21:43+00:00"
},
{
"name": "phpstan/phpdoc-parser",
"version": "2.0.0",
@ -4602,20 +4668,20 @@
},
{
"name": "phpstan/phpstan",
"version": "1.12.10",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "fc463b5d0fe906dcf19689be692c65c50406a071"
"reference": "ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/fc463b5d0fe906dcf19689be692c65c50406a071",
"reference": "fc463b5d0fe906dcf19689be692c65c50406a071",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d",
"reference": "ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0"
"php": "^7.4|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@ -4656,7 +4722,7 @@
"type": "github"
}
],
"time": "2024-11-11T15:37:09+00:00"
"time": "2024-11-11T15:43:04+00:00"
},
{
"name": "psr/log",
@ -6083,82 +6149,6 @@
],
"time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
"reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
"shasum": ""
},
"require": {
"php": ">=7.2"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php73\\": ""
},
"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 7.3+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v3.5.0",
@ -6331,30 +6321,29 @@
},
{
"name": "szepeviktor/phpstan-wordpress",
"version": "v1.3.5",
"version": "2.x-dev",
"source": {
"type": "git",
"url": "https://github.com/szepeviktor/phpstan-wordpress.git",
"reference": "7f8cfe992faa96b6a33bbd75c7bace98864161e7"
"reference": "9d5869b3d395156bf55d4ab90a0287606f9689c9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/7f8cfe992faa96b6a33bbd75c7bace98864161e7",
"reference": "7f8cfe992faa96b6a33bbd75c7bace98864161e7",
"url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/9d5869b3d395156bf55d4ab90a0287606f9689c9",
"reference": "9d5869b3d395156bf55d4ab90a0287606f9689c9",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0",
"php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0",
"phpstan/phpstan": "^1.10.31",
"symfony/polyfill-php73": "^1.12.0"
"php": "^7.4 || ^8.0",
"php-stubs/wordpress-stubs": "^6.6.2",
"phpstan/phpstan": "^2.0"
},
"require-dev": {
"composer/composer": "^2.1.14",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"php-parallel-lint/php-parallel-lint": "^1.1",
"phpstan/phpstan-strict-rules": "^1.2",
"phpunit/phpunit": "^8.0 || ^9.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^9.0",
"szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0",
"wp-coding-standards/wpcs": "3.1.0 as 2.3.0"
},
@ -6388,9 +6377,9 @@
],
"support": {
"issues": "https://github.com/szepeviktor/phpstan-wordpress/issues",
"source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.5"
"source": "https://github.com/szepeviktor/phpstan-wordpress/tree/2.x"
},
"time": "2024-06-28T22:27:19+00:00"
"time": "2024-11-15T02:01:36+00:00"
},
{
"name": "vimeo/psalm",
@ -6564,7 +6553,8 @@
"aliases": [],
"minimum-stability": "dev",
"stability-flags": {
"roave/security-advisories": 20
"roave/security-advisories": 20,
"szepeviktor/phpstan-wordpress": 20
},
"prefer-stable": true,
"prefer-lowest": false,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -9,3 +9,4 @@ parameters:
- web/wp
typeAliases:
InformationsProduitShop: 'array{id: int, nom: string, prix: string, photo_repos: string, photo_survol: string, url: string}'
InformationsVariation: 'array{id: int, titre: string, prix: string}'

View file

@ -24,10 +24,6 @@ $informations_produits = wc_get_products([
$produits = array_map(callback: "recupere_informations_produit_shop", array: $informations_produits);
$contexte["produits"] = $produits;
// echo "<pre>";
// print_r($informations_produits);
// echo "</pre>";
/**
* Charge les Scripts nécessaires pour la page Boutique.
*/

View file

@ -203,12 +203,12 @@ button.bouton-case-pleine {
width: 100%;
height: 100%;
}
button.bouton-case-pleine--blanc-sur-noir {
button.bouton-case-pleine.bouton-blanc-sur-noir {
font-style: italic;
text-transform: uppercase;
letter-spacing: var(--espacement-inter-lettres-etendu-m);
}
button.bouton-case-pleine--blanc-sur-noir:focus-visible {
button.bouton-case-pleine.bouton-blanc-sur-noir:focus-visible {
color: var(--couleur-noir);
background: var(--couleur-jaune);
}
@ -812,6 +812,7 @@ body:has(#menu-mobile:not([aria-hidden=true])) {
height: 100%;
}
.photos-produit .colonne.colonne-droite img {
width: 100%;
max-height: var(--colonne-droite-photo-hauteur-minimale);
}
.photos-produit .colonne.colonne-droite figure picture img:only-child {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -476,7 +476,7 @@
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/products.ts",
"_belt_Option-91f3b350.BKMoZFhU.js"
],
"integrity": "sha512-auB29T3SZpasyR61fK363JAMfgU0xakNPRG/UyMGT9HLNADOBcQLVZrhvj7BJrs6T3pE5Qeq0C5vVecIhB7xtQ=="
"integrity": "sha512-J4XtTd9tWX0+Dl6sIWBRvaIZ24RWU8wtAQQ/S/gPPACz3XO3i8EroaoQIluKX9nnPYEqK8LcTE0mASPzah1vcw=="
},
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts": {
"file": "scripts-page-panier.js",

View file

@ -62,16 +62,16 @@ const initialisePageBoutique = () => {
html`
<article class="produit">
<figure>
<a href="https://haikuatelier.fr.ddev.site/product/${produit.slug}">
<a href="/product/${produit.slug}">
<picture class="produit__illustration produit__illustration__principale">
${produit.image_repos ?? ""}
</picture>
<picture class="produit__illustration produit__illustration__survol">
${produit.image_survol ?? ""}
</picture>
</a>
<figcaption class="produit__textuel">
<h3 class="produit__textuel__titre">
<a href="${produit.permalink}">${produit.name}</a>

File diff suppressed because one or more lines are too long

View file

@ -17,26 +17,37 @@ $modeles = ["produit.twig"];
/** @var WC_Product $produit */
$produit = wc_get_product();
/** @var mixed $donnes_produit */
$donnees_produit = recupere_informations_produit_page_produit(wc_get_product());
$est_variation = $produit->get_type() == "variable";
$attributs = pipe(
match ($est_variation) {
$produit->get_attribute("pa_side") !== "" => $produit->get_attribute("pa_side"),
$produit->get_attribute("pa_stone") !== "" => $produit->get_attribute("pa_stone"),
$produit->get_attribute("pa_size") !== "" => $produit->get_attribute("pa_size"),
default => "",
},
fn($chaine) => explode(", ", $chaine),
);
$prix_variations = pipe(
// Récupère les Variations
/** @var bool $est_variation Le Produit est-il Variable (possède-t-il des variations ?) */
$est_produit_variable = $produit->get_type() == "variable";
/** @var InformationsVariation[] $variations_produit Un tableau des informations d'affichage de chaque Variation du Produit */
$variations_produit = pipe(
// Récupère les IDs des Enfants (Variations)
wc_get_product()->get_children(),
// Récupère les informations de chaque Variation
// Récupère les Variations
fn($enfants) => array_map(callback: fn($id) => wc_get_product($id), array: $enfants),
// Récupère les Prix
fn($variations) => array_map(callback: fn($variation) => $variation->get_price(), array: $variations),
// Ne conserve que les Informations souhaitées
fn($variations) => array_map(
callback: function ($variation) {
return [
"id" => $variation->get_variation_id(),
// Ne récupère que le titre de l'Attribut unique de la Variation
"titre" => match (true) {
$variation->get_attribute("pa_side") !== "" => $variation->get_attribute("pa_side"),
$variation->get_attribute("pa_stone") !== "" => $variation->get_attribute("pa_stone"),
$variation->get_attribute("pa_size") !== "" => $variation->get_attribute("pa_size"),
default => "",
},
"prix" => $variation->get_price(),
];
},
array: $variations,
),
);
/** @var int $prix_maximal Le prix de la Variation la plus chère */
$prix_maximal = collect($variations_produit)->max("prix");
$produits_meme_collection = array_map(
callback: "recupere_informations_produit_page_produit",
@ -44,10 +55,9 @@ $produits_meme_collection = array_map(
);
$contexte["produit"] = $donnees_produit;
$contexte["prix_maximal"] = $prix_maximal;
$contexte["variations_produit"] = $variations_produit;
$contexte["produits_meme_collection"] = $produits_meme_collection;
$contexte["est_variation"] = $est_variation;
$contexte["attributs"] = $attributs;
$contexte["prix_variations"] = $prix_variations;
/**
* Charge les Scripts nécessaires pour la page Produit.

View file

@ -43,7 +43,7 @@ button {
width: 100%;
height: 100%;
&--blanc-sur-noir {
&.bouton-blanc-sur-noir {
font-style: italic;
text-transform: uppercase;
letter-spacing: var(--espacement-inter-lettres-etendu-m);

View file

@ -102,6 +102,7 @@
&.colonne-droite {
img {
width: 100%;
max-height: var(--colonne-droite-photo-hauteur-minimale);
}

View file

@ -109,16 +109,16 @@ const initialisePageBoutique = (): void => {
html`
<article class="produit">
<figure>
<a href="https://haikuatelier.fr.ddev.site/product/${produit.slug}">
<a href="/product/${produit.slug}">
<picture class="produit__illustration produit__illustration__principale">
${produit.image_repos ?? ""}
</picture>
<picture class="produit__illustration produit__illustration__survol">
${produit.image_survol ?? ""}
</picture>
</a>
<figcaption class="produit__textuel">
<h3 class="produit__textuel__titre">
<a href="${produit.permalink}">${produit.name}</a>

View file

@ -80,7 +80,10 @@
</nav>
{# Bouton « Panier » avec l'indicateur de quantité de Produits #}
<section class="compte-panier">
<section
class="compte-panier"
hidden
>
<a
class="lien-bouton"
data-contient-articles="{{ articles_presents }}"

View file

@ -76,7 +76,7 @@
<section class="selecteur-produit">
<h3 class="selecteur-produit__nom">{{ produit.nom }}</h3>
{% if attributs|length > 1 %}
{% if variations_produit|length > 1 %}
<div class="selecteur-produit__selection-variation">
<label
for="selecteur-variation"
@ -99,12 +99,12 @@
>
--
</option>
{% for attribut in attributs %}
{% for variation in variations_produit %}
<option
data-prix="{{ prix_variations[loop.index0] }}"
value="{{ produit.variations_ids[loop.index0] }}"
data-prix="{{ variation.prix }}"
value="{{ variation.valeur }}"
>
{{ attribut }}
{{ variation.titre }}
</option>
{% endfor %}
</select>
@ -112,15 +112,16 @@
</div>
{% endif %}
<p class="selecteur-produit__prix">{{ produit.prix }}€</p>
<p class="selecteur-produit__prix">{{ prix_maximal ?? produit.prix }}€</p>
</section>
<section class="actions-produit">
<button
class="bouton-case-pleine"
{{ attributs|length > 1 ? "disabled" : "" }}
{{ variations_produit|length > 1 ? "disabled" : "" }}
id="bouton-ajout-panier"
type="button"
hidden
>
Add to cart
</button>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 KiB

After

Width:  |  Height:  |  Size: 1 MiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 KiB

After

Width:  |  Height:  |  Size: 1,006 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 830 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 714 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 853 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 936 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 856 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 880 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB