fix(produit) rétablis le sélecteur de variation
- passe temporairement du sélecteur d'attribut au sélecteur de variation, car il n'est pas possible de mettre à jour le prix affiché au changement de variation...
This commit is contained in:
parent
a5b240cd3f
commit
a39682d363
3 changed files with 48 additions and 48 deletions
|
|
@ -169,8 +169,8 @@ function charge_scripts_styles_page_panier(): void {
|
||||||
|
|
||||||
add_action('wp_enqueue_scripts', 'charge_scripts_styles_page_panier');
|
add_action('wp_enqueue_scripts', 'charge_scripts_styles_page_panier');
|
||||||
|
|
||||||
$lal = wp_json_encode($contexte);
|
// $lal = wp_json_encode($contexte);
|
||||||
echo "<script>console.debug({$lal});</script>";
|
// echo "<script>console.debug({$lal});</script>";
|
||||||
|
|
||||||
// Rendu
|
// Rendu
|
||||||
Timber::render(
|
Timber::render(
|
||||||
|
|
|
||||||
|
|
@ -86,12 +86,12 @@ 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($context);
|
// $lal = wp_json_encode($context);
|
||||||
echo "<script>console.debug({$lal});</script>";
|
// echo "<script>console.debug({$lal});</script>";
|
||||||
|
|
||||||
$lol = wc_get_product()->get_children();
|
// $lol = wc_get_product()->get_children();
|
||||||
$lol = wp_json_encode($lol);
|
// $lol = wp_json_encode($lol);
|
||||||
echo "<script>console.debug({$lol});</script>";
|
// echo "<script>console.debug({$lol});</script>";
|
||||||
|
|
||||||
// Rendu
|
// Rendu
|
||||||
Timber::render(
|
Timber::render(
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
<h3 class="selecteur-produit__nom">{{ produit.name }}</h3>
|
<h3 class="selecteur-produit__nom">{{ produit.name }}</h3>
|
||||||
|
|
||||||
<div class="selecteur-produit__attribut-variation">
|
<div class="selecteur-produit__attribut-variation">
|
||||||
|
{#
|
||||||
{% if produit.attributes %}
|
{% if produit.attributes %}
|
||||||
{% for attribut in produit.attributes %}
|
{% for attribut in produit.attributes %}
|
||||||
<div class="test">
|
<div class="test">
|
||||||
|
|
@ -19,8 +20,8 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
#}
|
||||||
|
|
||||||
<!--
|
|
||||||
{% if variations_produit|length > 1 %}
|
{% if variations_produit|length > 1 %}
|
||||||
<label
|
<label
|
||||||
for="selecteur-variation"
|
for="selecteur-variation"
|
||||||
|
|
@ -53,7 +54,6 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="selecteur-produit__prix">{{ prix_maximal ?? produit.price }}€</p>
|
<p class="selecteur-produit__prix">{{ prix_maximal ?? produit.price }}€</p>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue