Commit f0bd5a5b authored by Nahla Shiri's avatar Nahla Shiri

merge variable et simple

parent 9c0b580b
...@@ -55,12 +55,12 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -55,12 +55,12 @@ do_action('woocommerce_before_add_to_cart_form');
<?php <?php
if (get_field('images_ambiance', 'product_cat_' . $sub_cat[0]->term_id)):
if (!empty($ambiance_product)) { if (!empty($ambiance_product)) {
$ambiance = $ambiance_product; $ambiance = $ambiance_product;
} else { } else {
$ambiance = array(); $ambiance = array();
} }
if (get_field('images_ambiance', 'product_cat_' . $sub_cat[0]->term_id)):
while (has_sub_field('images_ambiance', 'product_cat_' . $sub_cat[0]->term_id)) : while (has_sub_field('images_ambiance', 'product_cat_' . $sub_cat[0]->term_id)) :
$image_amb = get_sub_field('img_ab'); $image_amb = get_sub_field('img_ab');
$ambiance [] = $image_amb; $ambiance [] = $image_amb;
......
...@@ -64,7 +64,7 @@ if (!function_exists('print_attribute_radio')) { ...@@ -64,7 +64,7 @@ if (!function_exists('print_attribute_radio')) {
$filtered_label = apply_filters('woocommerce_variation_option_name', $label); $filtered_label = apply_filters('woocommerce_variation_option_name', $label);
printf('<li class="format-list selected"><input type="radio" name="%1$s" value="%2$s" id="%3$s" %4$s> printf('<li class="format-list selected"><input type="radio" name="%1$s" value="%2$s" id="%3$s" %4$s checked>
<label class="format-label" for="%3$s">'.$format_img.'</label> <label class="format-label" for="%3$s">'.$format_img.'</label>
<div class="format-desc">'.$label.'</span> <div class="format-desc">'.$label.'</span>
...@@ -111,15 +111,14 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -111,15 +111,14 @@ do_action('woocommerce_before_add_to_cart_form');
<?php <?php
endforeach; endforeach;
?>
<?php
if (get_field('images_ambiance', 'product_cat_' . $sub_cat[0]->term_id)):
if (!empty($ambiance_product)) { if (!empty($ambiance_product)) {
$ambiance = $ambiance_product; $ambiance = $ambiance_product;
} else { } else {
$ambiance = array(); $ambiance = array();
} }
if (get_field('images_ambiance', 'product_cat_' . $sub_cat[0]->term_id)):
while (has_sub_field('images_ambiance', 'product_cat_' . $sub_cat[0]->term_id)) : while (has_sub_field('images_ambiance', 'product_cat_' . $sub_cat[0]->term_id)) :
$image_amb = get_sub_field('img_ab'); $image_amb = get_sub_field('img_ab');
$ambiance [] = $image_amb; $ambiance [] = $image_amb;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment