fonc: ajoute la prise en charge des attributs de la Carte Cadeau
This commit is contained in:
parent
b4ee1b8002
commit
22a143da2a
3 changed files with 4 additions and 6 deletions
|
|
@ -45,6 +45,7 @@ $variations_produit = pipe(
|
||||||
'' !== $variation->get_attribute('pa_side') => $variation->get_attribute('pa_side'),
|
'' !== $variation->get_attribute('pa_side') => $variation->get_attribute('pa_side'),
|
||||||
'' !== $variation->get_attribute('pa_stone') => $variation->get_attribute('pa_stone'),
|
'' !== $variation->get_attribute('pa_stone') => $variation->get_attribute('pa_stone'),
|
||||||
'' !== $variation->get_attribute('pa_size') => $variation->get_attribute('pa_size'),
|
'' !== $variation->get_attribute('pa_size') => $variation->get_attribute('pa_size'),
|
||||||
|
'' !== $variation->get_attribute('pa_giftcard-amount') => $variation->get_attribute('pa_giftcard-amount'),
|
||||||
default => '',
|
default => '',
|
||||||
},
|
},
|
||||||
'prix' => $variation->get_price(),
|
'prix' => $variation->get_price(),
|
||||||
|
|
@ -61,12 +62,6 @@ $produits_meme_collection = array_map(
|
||||||
array: recupere_produits_meme_collection($donnees_produit['collection'])($donnees_produit['id']),
|
array: recupere_produits_meme_collection($donnees_produit['collection'])($donnees_produit['id']),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Déboguage en cas d'images fantômes
|
|
||||||
// echo "<br><br><br><br><pre>";
|
|
||||||
// print_r($produit->get_meta_data());
|
|
||||||
// print_r($variations_produit);
|
|
||||||
// echo "</pre>";
|
|
||||||
|
|
||||||
$contexte['produit'] = $donnees_produit;
|
$contexte['produit'] = $donnees_produit;
|
||||||
$contexte['prix_maximal'] = $prix_maximal;
|
$contexte['prix_maximal'] = $prix_maximal;
|
||||||
$contexte['variations_produit'] = $variations_produit;
|
$contexte['variations_produit'] = $variations_produit;
|
||||||
|
|
@ -92,6 +87,9 @@ function charge_scripts_page_produit(): void {
|
||||||
|
|
||||||
add_action('wp_enqueue_scripts', 'charge_scripts_page_produit');
|
add_action('wp_enqueue_scripts', 'charge_scripts_page_produit');
|
||||||
|
|
||||||
|
// $lal = wp_json_encode($contexte);
|
||||||
|
// echo "<script>console.debug({$lal});</script>";
|
||||||
|
|
||||||
// Rendu
|
// Rendu
|
||||||
Timber::render(
|
Timber::render(
|
||||||
filenames: $modeles,
|
filenames: $modeles,
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue