diff --git a/web/app/themes/haiku-atelier-2024/single-product.php b/web/app/themes/haiku-atelier-2024/single-product.php index 64d23c0f..a2689346 100755 --- a/web/app/themes/haiku-atelier-2024/single-product.php +++ b/web/app/themes/haiku-atelier-2024/single-product.php @@ -41,12 +41,11 @@ $variations_produit = pipe( 'id' => $variation->get_id(), // Ne récupère que le titre de l'Attribut unique de la Variation. 'titre' => match (true) { + '' !== $variation->get_attribute('pa_giftcard-amount') => $variation->get_attribute( 'pa_giftcard-amount', ), '' !== $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'), - '' !== $variation->get_attribute('pa_giftcard-amount') => $variation->get_attribute( - 'pa_giftcard-amount', - ), + '' !== $variation->get_attribute('pa_stone') => $variation->get_attribute('pa_stone'), + '' !== $variation->get_attribute('pa_material-workshop') => $variation->get_attribute('pa_material-workshop'), default => '', }, 'prix' => $variation->get_price(), diff --git a/web/app/themes/haiku-atelier-2024/src/inc/TraitementInformations.php b/web/app/themes/haiku-atelier-2024/src/inc/TraitementInformations.php index bbe3eb8d..5cb3cd10 100755 --- a/web/app/themes/haiku-atelier-2024/src/inc/TraitementInformations.php +++ b/web/app/themes/haiku-atelier-2024/src/inc/TraitementInformations.php @@ -222,8 +222,9 @@ function recupere_produits_meme_collection(string $slug_collection): mixed { function recupere_et_formate_attributs_produit(mixed $attributs_produit): mixed { return [ - 'taille' => ['nom' => 'Size', 'valeur' => $attributs_produit['pa_size'] ?? false], - 'pierre' => ['nom' => 'Stone', 'valeur' => $attributs_produit['pa_stone'] ?? false], 'cote' => ['nom' => 'Side', 'valeur' => $attributs_produit['pa_side'] ?? false], + 'materiel' => ['nom' => 'Material', 'valeur' => $attributs_produit['pa_material-workshop'] ?? false], + 'pierre' => ['nom' => 'Stone', 'valeur' => $attributs_produit['pa_stone'] ?? false], + 'taille' => ['nom' => 'Size', 'valeur' => $attributs_produit['pa_size'] ?? false], ]; }