Commit d929b995 authored by Nahla Shiri's avatar Nahla Shiri

correction variation + filter

parent adc6a1ce
...@@ -230,6 +230,7 @@ select,option{ ...@@ -230,6 +230,7 @@ select,option{
display: block; display: block;
top: 80px; top: 80px;
font-size: 11px; font-size: 11px;
} }
/*========================================================================== /*==========================================================================
II/ Helper..............Helper classes II/ Helper..............Helper classes
...@@ -1504,10 +1505,10 @@ label.chevron.bottom::first-letter { ...@@ -1504,10 +1505,10 @@ label.chevron.bottom::first-letter {
top: 45%; top: 45%;
} }
.product-info .details{ .product-info .details{
padding: 12px 0px 18px; padding: 12px 0px 0px;
} }
.product-info .details p{ .product-info .details p{
padding-bottom: 6px; padding-bottom: 2px;
} }
.entry-summary .price { .entry-summary .price {
...@@ -1519,6 +1520,7 @@ label.chevron.bottom::first-letter { ...@@ -1519,6 +1520,7 @@ label.chevron.bottom::first-letter {
line-height: 24px; line-height: 24px;
letter-spacing: 2px; letter-spacing: 2px;
display: block; display: block;
margin-top:-5px;
} }
.product-info .notice{ .product-info .notice{
font-size: 9px; font-size: 9px;
...@@ -1703,9 +1705,9 @@ label.chevron.bottom::first-letter { ...@@ -1703,9 +1705,9 @@ label.chevron.bottom::first-letter {
position: relative; position: relative;
} }
.phototheque-content .nav-phototeque{ .phototheque-content .nav-phototeque{
padding: 40px 10px 40px 40px; padding: 40px 20px 40px 40px;
max-width: 465px; max-width: 465px;
width: 34%; /*width: 34%;*/
border-right: 1px solid rgba(26,26,26,0.2); border-right: 1px solid rgba(26,26,26,0.2);
overflow: hidden; overflow: hidden;
height: 100%; height: 100%;
...@@ -1750,7 +1752,7 @@ label.chevron.bottom::first-letter { ...@@ -1750,7 +1752,7 @@ label.chevron.bottom::first-letter {
} }
.gallery-wrapper { .gallery-wrapper {
padding: 0px 30px 80px; padding: 0px 30px 80px;
width: 65%; width: 62%;
} }
.gallery-wrapper h2{ .gallery-wrapper h2{
/*padding-bottom: 41px;*/ /*padding-bottom: 41px;*/
......
...@@ -943,6 +943,14 @@ ...@@ -943,6 +943,14 @@
display: none; display: none;
height: 0; height: 0;
} }
.search_result {
position: relative;
display: block;
top: 30px;
font-size: 11px;
padding: 0 40px;
}
} }
/*END (max-width: 860px) */ /*END (max-width: 860px) */
/* ------------------------*/ /* ---------->>> 620 <<<-----------*/ /* ------------------------*/ /* ------------------------*/ /* ---------->>> 620 <<<-----------*/ /* ------------------------*/
......
jQuery(document).ready(function() { jQuery(document).ready(function() {
/* jQuery('p').each(function() {
jQuery(document).on('click', ".format-list", function() { var $this = jQuery(this);
if($this.html().replace(/\s|&nbsp;/g, '').length == 0) {
var format = jQuery(this).find('.format-desc').text(); $this.remove();
jQuery('.info-format').text(format); }
jQuery('.info-format-txt').text(format);
}); });
*/
jQuery(document).on('click', ".download_file", function() { jQuery(document).on('click', ".download_file", function() {
var id; var id;
var download_link = jQuery('.download_file_link').attr('href'); var download_link = jQuery('.download_file_link').attr('href');
...@@ -21,61 +18,19 @@ jQuery(document).ready(function() { ...@@ -21,61 +18,19 @@ jQuery(document).ready(function() {
else else
id = variation_id; id = variation_id;
var link = download_link + 'variation_id=' + id; var link = download_link + 'variation_id=' + id;
window.open(link, '_blank');
return false;
});
/*
jQuery(document).bind('change', 'input[name="variation_id"]', function() {
setTimeout(function(){
var varID = jQuery('input[name="variation_id"]').val();
if (varID != 0) {
var price = jQuery('.woocommerce-variation-price .woocommerce-Price-amount').text();
if(price == "")
{
price = jQuery('.summary .woocommerce-Price-amount').text();
}
var pq = jQuery('.woocommerce-variation-description').text();
jQuery('.price .crete').text(price + " ht");
jQuery('.pq').text(pq);
}
}, 800);
});
jQuery('li.format-list:first-child input').attr('checked', true);
jQuery(document).on('change', '.color-list input,.format-list input ', function() {
window.open(link, '_blank');
return false;
var name = jQuery(this).attr('name');
if (jQuery(this).is(':checked') && name == 'attribute_pa_couleur') {
jQuery('li.format-list:first-child input').attr('checked', true);
jQuery('.info-color').text(jQuery(this).attr('value'));
}
if (jQuery(this).is(':checked') && name == 'attribute_pa_format') {
var format = jQuery('.format-list.selected .format-desc').text();
jQuery('.info-format').text(format);
jQuery('.info-format-txt').text(format);
}
}); });
*/
jQuery("#search-btn").on('click', function() { jQuery("#search-btn").on('click', function() {
jQuery('article').show(); jQuery('article').show();
jQuery('.list-animation section').show(); jQuery('.list-animation section').show();
jQuery('article').removeClass('selected'); jQuery('article').removeClass('selected');
jQuery('article').removeClass('hidden'); jQuery('article').removeClass('hidden');
var tabcolor = []; var tabcolor = [];
i = 0; i = 0;
...@@ -107,36 +62,22 @@ jQuery(document).ready(function() { ...@@ -107,36 +62,22 @@ jQuery(document).ready(function() {
var selected_univers = tabunivers.join(','); var selected_univers = tabunivers.join(',');
var params = {pa_couleur: selected_colors, pa_format: selected_formats, pa_matiere: selected_matiere, pa_univers: selected_univers}; var params = {pa_couleur: selected_colors, pa_format: selected_formats, pa_matiere: selected_matiere, pa_univers: selected_univers};
window.location.href = "?" + jQuery.param(params); window.location.href = "?" + jQuery.param(params);
jQuery('.list-animation section').each(function() {
if (jQuery(this).find("article").length) {
/*history.pushState({}, null, "?" + jQuery.param(params)); // console.log('article found');
jQuery.ajax({ }
type: 'GET',
url: '',
data: {"pa_couleur": selected_colors,"pa_format":selected_formats},
success: function(data) {
},
error: function() {
}
});
jQuery(".product-list article li").each(function() {
var product_color = jQuery(this).attr('data-color');
var product_format = jQuery(this).attr('data-format');
if (jQuery.inArray(product_color, tabcolor) >= 0 || jQuery.inArray(product_format, tabformat) >= 0) {
jQuery(this).closest('article').addClass('in_search');
}
});
*/
else {
jQuery(this).hide();
}
});
}); });
jQuery(window).on('load',function() { jQuery(window).on('load',function() {
jQuery('.filter-bloc').removeClass('active');
jQuery('.filter-bloc ').each(function() { jQuery('.filter-bloc ').each(function() {
if (jQuery(this).find('.bloc-content').length == 0) { if (jQuery(this).find('.bloc-content').length == 0) {
...@@ -145,18 +86,21 @@ jQuery(document).ready(function() { ...@@ -145,18 +86,21 @@ jQuery(document).ready(function() {
} }
}); });
var result_found = false;
jQuery('.list-animation section').each(function() { jQuery('.list-animation section').each(function() {
if (jQuery(this).find("article").length) { if (jQuery(this).find("article").length) {
// console.log('article found'); result_found = true;
} }
else { else {
jQuery(this).hide(); jQuery(this).hide();
} }
}); });
if(result_found == false)
jQuery('.search_notfound').text(' Aucun produit ne correspond à votre recherche');
}); });
......
...@@ -32,7 +32,7 @@ function loadProductContent() { ...@@ -32,7 +32,7 @@ function loadProductContent() {
$attributes.each(function(i) $attributes.each(function(i)
{ {
var $attr = $(this); var $attr = $(this);
if (!$attr.hasClass('pa_couleur')) if (!$attr.hasClass('pa_couleur') && !$attr.hasClass('pa_taille'))
{ {
console.log(i, $attr, $attr.find('input:not(:disabled):checked').length); console.log(i, $attr, $attr.find('input:not(:disabled):checked').length);
if (!$attr.find('input:not(:disabled):checked').length) if (!$attr.find('input:not(:disabled):checked').length)
...@@ -42,6 +42,18 @@ function loadProductContent() { ...@@ -42,6 +42,18 @@ function loadProductContent() {
$firstInput.change(); $firstInput.change();
} }
} }
/*if ($attr.hasClass('pa_taille'))
{
console.log('--------' + i, $attr, $attr.find('input:not(:disabled):checked').length);
if (!$attr.find('input:not(:disabled):checked').length)
{ console.log('heeeere');
$firstInput = $attr.find('input:not(:disabled)').first();
$firstInput.prop('checked',true);
$firstInput.change();
}
}*/
}); });
}); });
function onFoundVariation() function onFoundVariation()
...@@ -49,10 +61,16 @@ function loadProductContent() { ...@@ -49,10 +61,16 @@ function loadProductContent() {
console.log('found variation'); console.log('found variation');
//$('.variations_form .format_list input').prop('checked',false); //$('.variations_form .format_list input').prop('checked',false);
$('.variations_form .color-list input:disabled').prop('disabled',false); $('.variations_form .color-list input:disabled').prop('disabled',false);
$('.variations_form .attribute_pa_taille input:disabled').prop('disabled',false);
console.log('found', $('.variations_form .format-list input:checked + * + .format-desc')); console.log('found', $('.variations_form .format-list input:checked + * + .format-desc'));
var format = $('.variations_form .format-list input:checked + * + .format-desc').text(); //var format = $('.variations_form .format-list input:checked + * + .format-desc').text();
$('.info-format').text(format); var format='';
$('.info-format-txt').text(format); $('.variations_form .format-list input:checked + * + .format-desc ').each(function() {
format = format + $(this).text()+'<br />';
});
$('.info-format').html(format);
$('.info-format-txt').html(format);
$('.info-color').text($('.color-list input:checked').attr('value')); $('.info-color').text($('.color-list input:checked').attr('value'));
var varID = jQuery('input[name="variation_id"]').val(); var varID = jQuery('input[name="variation_id"]').val();
......
...@@ -42,10 +42,13 @@ if(!$ext_ref) { ...@@ -42,10 +42,13 @@ if(!$ext_ref) {
while (has_sub_field('tl_images', $post_ID)) : while (has_sub_field('tl_images', $post_ID)) :
$options = array(); $options = array();
$private = get_sub_field('prive_acces_pro');
$options['image'] = get_sub_field('tl_image'); $options['image'] = get_sub_field('tl_image');
$options['title'] = get_sub_field('tl_titre_image'); $options['title'] = get_sub_field('tl_titre_image');
$options['dwnldLink'] = get_sub_field('tl_link'); $options['dwnldLink'] = get_sub_field('tl_link');
echo nap_get_item($post_ID, null, '', $options); if(!$private || (is_user_logged_in() && $private))
{echo nap_get_item($post_ID, null, '', $options);}
?> ?>
<?php <?php
......
...@@ -365,6 +365,6 @@ $mpdf=new mPDF('utf-8', 'Letter', 0, '', 0, 0, 20, 20, 0, 0); ...@@ -365,6 +365,6 @@ $mpdf=new mPDF('utf-8', 'Letter', 0, '', 0, 0, 20, 20, 0, 0);
$mpdf->WriteHTML($file_content); $mpdf->WriteHTML($file_content);
$mpdf->Output('fiches-techniques/fiche-'.$fiche_num.'.pdf'); $mpdf->Output('fiches-techniques/fiche-'.$fiche_num.'.pdf');
$pdf ='/fiches-techniques/fiche-'.$fiche_num.'.pdf'; $pdf ='/nap/fiches-techniques/fiche-'.$fiche_num.'.pdf';
header('Location:'.$pdf ); header('Location:'.$pdf );
\ No newline at end of file
...@@ -13,10 +13,7 @@ ...@@ -13,10 +13,7 @@
<div class="row right footer-links"> <div class="row right footer-links">
<ul> <ul>
<li class='nl'><a href="#">newsletter</a></li> <li class='nl'><a href="#">newsletter</a></li>
<?php <li class="to-slide"><a href="<?php echo get_permalink(260)?>">téléchargements</a></li>
if ( is_user_logged_in() ) { ?>
<li class="to-slide"><a href="<?php echo get_permalink(260)?>">téléchargements</a></li>
<?php } ?>
<li class="<?php if( !is_user_logged_in() ) echo " login-user"; else echo " to-slide";?>"><?php if ( is_user_logged_in() ) {?><a href="<?php echo get_permalink(3364);?>">photothèque</a><?php } else echo "<a>photothèque</a>"; ?></li> <li class="<?php if( !is_user_logged_in() ) echo " login-user"; else echo " to-slide";?>"><?php if ( is_user_logged_in() ) {?><a href="<?php echo get_permalink(3364);?>">photothèque</a><?php } else echo "<a>photothèque</a>"; ?></li>
<li class="to-slide"><a href="<?php echo get_permalink(171)?>">mentions légales</a></li> <li class="to-slide"><a href="<?php echo get_permalink(171)?>">mentions légales</a></li>
</ul> </ul>
......
...@@ -289,7 +289,7 @@ function nap_menu() { ...@@ -289,7 +289,7 @@ function nap_menu() {
$pad_counts = 0; $pad_counts = 0;
$hierarchical = 1; $hierarchical = 1;
$title = ''; $title = '';
$empty = 0; $empty = 1;
$args = array( $args = array(
'taxonomy' => $taxonomy, 'taxonomy' => $taxonomy,
...@@ -450,9 +450,14 @@ function nap_distinct_format_variations($variations) { ...@@ -450,9 +450,14 @@ function nap_distinct_format_variations($variations) {
function nap_filter_attribute($id, $args, $options, $list_attr, $search) { function nap_filter_attribute($id, $args, $options, $list_attr, $search) {
if(isset($search['pa_format']) && $search['pa_format']!=''){ if(isset($search['pa_format']) && $search['pa_format']!=''){
$list_format=explode(",", $search['pa_format']); $list_format=explode(",", $search['pa_format']);
$intersect_format = array_intersect($list_attr['pa_format'],$list_format);
} }
if(isset($search['pa_couleur']) && $search['pa_couleur']!=''){ if(isset($search['pa_couleur']) && $search['pa_couleur']!=''){
$list_couleur=explode(",", $search['pa_couleur']); $list_couleur=explode(",", $search['pa_couleur']);
if(isset($list_attr['pa_couleur']) && is_array($list_attr['pa_couleur']))
{$intersect_couleur = array_intersect($list_attr['pa_couleur'],$list_couleur);}
} }
if(isset($search['pa_matiere']) && $search['pa_matiere']!=''){ if(isset($search['pa_matiere']) && $search['pa_matiere']!=''){
$list_matiere=explode(",", $search['pa_matiere']); $list_matiere=explode(",", $search['pa_matiere']);
...@@ -461,14 +466,16 @@ function nap_filter_attribute($id, $args, $options, $list_attr, $search) { ...@@ -461,14 +466,16 @@ function nap_filter_attribute($id, $args, $options, $list_attr, $search) {
$list_univers=explode(",", $search['pa_univers']); $list_univers=explode(",", $search['pa_univers']);
} }
if( if(
( ($list_couleur && in_array($list_attr['pa_couleur'],$list_couleur)) || empty($list_couleur) ) && ( ($list_couleur && !empty($intersect_couleur)) || empty($list_couleur) ) &&
( ($list_format && in_array($list_attr['pa_format'],$list_format)) || empty($list_format) ) && ( ($list_format && !empty($intersect_format)) || empty($list_format) ) &&
( ($list_univers && in_array($list_attr['pa_univers'],$list_univers)) || empty($list_univers) ) && ( ($list_univers && in_array($list_attr['pa_univers'],$list_univers)) || empty($list_univers) ) &&
( ($list_matiere && in_array($list_attr['pa_matiere'],$list_matiere)) || empty($list_matiere) ) ( ($list_matiere && in_array($list_attr['pa_matiere'],$list_matiere)) || empty($list_matiere) )
) )
{ {
echo nap_get_item($id, $args, 'catalogue', $options); echo nap_get_item($id, $args, 'catalogue', $options);
} }
} }
function nap_get_item($post_ID, $args = null, $current_page = '', $options = null, $search = null) { function nap_get_item($post_ID, $args = null, $current_page = '', $options = null, $search = null) {
...@@ -719,7 +726,14 @@ function nap_attribute_by_category($categorie, $attr) { ...@@ -719,7 +726,14 @@ function nap_attribute_by_category($categorie, $attr) {
$products = get_posts($args); $products = get_posts($args);
$attribute = array(); $attribute = array();
foreach ($products as $key => $value) { foreach ($products as $key => $value) {
$list_attr = woocommerce_get_product_terms($value->ID, $attr, 'names'); if($attr == 'pa_couleur')
{
$list_attr = wc_get_product_terms($value->ID, $attr,array( 'fields' => 'ids' ));
}
else
{ $list_attr = woocommerce_get_product_terms($value->ID, $attr, 'names');}
// print_r($list_attr);
foreach ($list_attr as $key => $value) { foreach ($list_attr as $key => $value) {
$attribute[] = $value; $attribute[] = $value;
} }
......
...@@ -64,11 +64,18 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of' ...@@ -64,11 +64,18 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
</div> </div>
<?php <?php
$terms = nap_attribute_by_category($cateID, $value);
if ($value == 'pa_couleur') { if ($value == 'pa_couleur') {
$terms = get_terms($value); $all_terms = get_terms($value);
} else
$terms = nap_attribute_by_category($cateID, $value); $colors_ids = array();
foreach($all_terms as $k => $v) {
$colors_ids[$v->name] = $v->term_id;
}
$color_by_category = array_intersect($colors_ids, $terms);
}
if (!empty($terms) && !is_wp_error($terms)): if (!empty($terms) && !is_wp_error($terms)):
?> ?>
<div class="bloc-content"> <div class="bloc-content">
...@@ -79,8 +86,10 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of' ...@@ -79,8 +86,10 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
foreach ( $terms as $term) : foreach ( $terms as $term) :
if ($value == 'pa_couleur'): if ($value == 'pa_couleur'):
$colors[$term->name] = get_field('couleurs', 'pa_couleur_' . $term->term_id); // var_dump($color_by_category);
$name_color = array_search($term,$color_by_category);
$colors[$name_color] = get_field('couleurs', 'pa_couleur_' . $term);
//print_r($colors);
else : else :
$filter_format = nap_selected_filter($_GET['pa_format'], $term); $filter_format = nap_selected_filter($_GET['pa_format'], $term);
$filter_matiere = nap_selected_filter($_GET['pa_matiere'], $term); $filter_matiere = nap_selected_filter($_GET['pa_matiere'], $term);
...@@ -140,7 +149,8 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of' ...@@ -140,7 +149,8 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
<div class="right-panel right"> <div class="right-panel right">
<div class="panel panel-content list-animation"> <div class="panel panel-content list-animation">
<?php if ($_GET['pa_couleur'] != '' || $_GET['pa_format'] != '' || $_GET['pa_matiere'] != ''): ?> <?php if ($_GET['pa_couleur'] != '' || $_GET['pa_format'] != '' || $_GET['pa_matiere'] != ''): ?>
<span class="search_result">Résultat de votre recherche :</span> <span class="search_result">Résultat de votre recherche :<span class="search_notfound" style="color:#ff6a5f"></span></span>
<?php endif; ?> <?php endif; ?>
<?php foreach ($child_category as $key => $value) : ?> <?php foreach ($child_category as $key => $value) : ?>
...@@ -190,15 +200,15 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of' ...@@ -190,15 +200,15 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
$list_att['pa_format'] = explode(',',$list_formats); $list_att['pa_format'] = explode(',',$list_formats);
} }
/* print '*********************';
var_dump($list_att['pa_format']);*/
if ($_GET) { if ($_GET) {
if (is_array($attribute_value['pa_couleur'])) { if (is_array($attribute_value['pa_couleur'])) {
$list_couleurs ='';
foreach ($attribute_value['pa_couleur'] as $key => $value) { foreach ($attribute_value['pa_couleur'] as $key => $value) {
$list_att['pa_couleur'] = nap_color_attribute($value->slug); // $list_att['pa_couleur'] = nap_color_attribute($value->slug);
$list_couleurs .= nap_color_attribute($value->slug).',';
} }
$list_att['pa_couleur'] = explode(',',$list_couleurs);
} }
if (is_array($attribute_value['pa_format'])) { if (is_array($attribute_value['pa_format'])) {
......
...@@ -147,7 +147,7 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -147,7 +147,7 @@ do_action('woocommerce_before_add_to_cart_form');
<?php if (wc_product_sku_enabled() && ( $product->get_sku() || $product->is_type('variable') )) : ?> <?php if (wc_product_sku_enabled() && ( $product->get_sku() || $product->is_type('variable') )) : ?>
<span class="sku_wrapper"><span class="sku"><?php echo ( $sku = $product->get_sku() ) ? $sku : nap_variable_meta($current_variationID, 'sku'); ?></span></span> <span class="sku_wrapper"><span class="sku">Réf. <?php echo ( $sku = $product->get_sku() ) ? $sku : nap_variable_meta($current_variationID, 'sku'); ?></span></span>
<?php endif; ?> <?php endif; ?>
......
...@@ -78,7 +78,7 @@ if (!function_exists('print_attribute_radio')) { ...@@ -78,7 +78,7 @@ if (!function_exists('print_attribute_radio')) {
'<img src="'.$default_active.'" class="active" id="'.$value.'-active" style ="height:35px;width:35px" alt="">'; '<img src="'.$default_active.'" class="active" id="'.$value.'-active" style ="height:35px;width:35px" alt="">';
} }
$filtered_label = apply_filters('woocommerce_variation_option_name', $label); $filtered_label = apply_filters('woocommerce_variation_option_name', $label);
printf('<li class="format-list "><input type="radio" name="%1$s" value="%2$s" id="%3$s" %4$s> printf('<li class="format-list '.$input_name.'"><input type="radio" name="%1$s" value="%2$s" id="%3$s" %4$s>
<label class="format-label" for="xx%3$s">'.$format_img.'</label> <label class="format-label" for="xx%3$s">'.$format_img.'</label>
<div class="format-desc">'.$label.'</div> <div class="format-desc">'.$label.'</div>
...@@ -279,11 +279,11 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -279,11 +279,11 @@ do_action('woocommerce_before_add_to_cart_form');
<div class="inner-product-info"> <div class="inner-product-info">
<div class="info-content"> <div class="info-content">
<?php <?php
$format = get_post_meta($current_variationID, 'attribute_pa_format', true); $format = get_post_meta($current_variationID, 'attribute_pa_format', true);
$format_info = get_term_by('slug', $format, 'pa_format'); $format_info = get_term_by('slug', $format, 'pa_format');
$format = $format_info->name;?>
$format = $format_info->name;?>
<h2 class = "crete font-small" ><?php echo $sub_cat[0]->name; ?></h2> <h2 class = "crete font-small" ><?php echo $sub_cat[0]->name; ?></h2>
<h3 class = "crete font-small info-attr" ><span class="info-format"><?php echo $format ; ?></span> <span class="info-color"><?php echo$_GET['pa_couleur'] ?></span></h3> <h3 class = "crete font-small info-attr" ><span class="info-format"><?php echo $format ; ?></span> <span class="info-color"><?php echo$_GET['pa_couleur'] ?></span></h3>
<div class="details font-small"> <div class="details font-small">
...@@ -301,8 +301,7 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -301,8 +301,7 @@ do_action('woocommerce_before_add_to_cart_form');
<?php if (wc_product_sku_enabled() && ( $product->get_sku() || $product->is_type('variable') )) : ?> <?php if (wc_product_sku_enabled() && ( $product->get_sku() || $product->is_type('variable') )) : ?>
<span class="sku_wrapper"><span class="sku"><?php echo ( $sku = $product->get_sku() ) ? $sku : nap_variable_meta($current_variationID, 'sku'); ?></span></span> <span class="sku_wrapper">Réf. <span class="sku"><?php echo ( $sku = $product->get_sku() ) ? $sku : nap_variable_meta($current_variationID, 'sku'); ?></span></span>
<?php endif; ?> <?php endif; ?>
......
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