Commit 1bbdde10 authored by Nahla Shiri's avatar Nahla Shiri

correction js + css + fiche technique

parent 43366f80
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -63,6 +63,14 @@
padding: 0px;
color: #182566;
}
::-webkit-scrollbar {
width: 0px; /* remove scrollbar space */
background: transparent; /* optional: just make scrollbar invisible */
}
.product-details .list {overflow: -moz-scrollbars-none;}
@keyframes fadein {
from {
opacity:0;
......@@ -700,10 +708,10 @@ nav ul ul{
display: none;
width: 190px;
}
nav ul ul li:before{
/*nav ul ul li:before{
content: "•";
padding-right: 5px;
}
}*/
nav ul ul li {
font-size: 14px;
font-weight: 300;
......@@ -791,6 +799,10 @@ VII/ Pages...............ALL pages
========================================================================== */
/* --------------*/ /* ---------->>> HOME <<<-----------*/ /* --------------*/
#home {
background: rgba(7,17,48,0.5);
}
.img-wrapper{
height: 100vh;
background-size: cover;
......@@ -865,20 +877,36 @@ aside.news-wrapper {
height: 100%;
}
.product-images{
width: 59%;
width: 59% !important;
padding: 39px;
opacity: 0;
text-align: center;
position: relative;
}
.product-slides{
width: 80%;
.product-images .close-panel{
position: absolute;
left: 5%;
}
.woocommerce-product-details__short-description {
display: none;
}
.product-slides .product-header {
text-align: left;
margin-left: 35px;
}
.product-slides {
width: 580px;
margin: 0 auto;
position: relative;
padding-left: 60px;
padding-left: 25px;
}
.product-header{
color: #182566;
padding-bottom: 33px;
padding-top: 22px;
padding: 22px 30px 33px;
}
.product-header h3{
font-size: 25px;
......@@ -889,8 +917,8 @@ aside.news-wrapper {
position: relative;
}
#slides{
/* width: 80%;*/
width: 500px;
width: 415px;
/*width: 500px;*/
height: 100%;
margin: 0 auto;
}
......@@ -900,7 +928,7 @@ aside.news-wrapper {
margin: 0 auto;
}
.element-slider{
height: 500px;
height: 415px;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
......@@ -970,7 +998,7 @@ aside.news-wrapper {
margin-bottom: 12px;
border-radius: 20px;
position: relative;
padding: 3px 0px;
//padding: 3px 0px;
/*padding: 3px 10px 4px 3px; */
cursor: pointer;
text-align: center;
......@@ -979,6 +1007,7 @@ aside.news-wrapper {
width: 25px;
display: block;
height: 25px;
line-height: 25px;
}
.nav-slider ul li.active{
background: #FF6A5F;
......@@ -989,8 +1018,8 @@ aside.news-wrapper {
}
.nav-slider ul li:hover{
background: #FF6A5F;
width: 100%;
padding-right: 13px;
width: 150%;
padding-right: 10px;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
......@@ -1059,14 +1088,21 @@ aside.news-wrapper {
}
.product-details .list{
width: 50%;
padding: 40px 30px;
padding: 40px 0px;
position: relative;
height: 100%;
background: #fff;
overflow-y: auto;
overflow-y: hidden;
opacity: 0;
border-left: 1px solid rgba(26,26,26,0.1);
}
.product-details .list ul {
overflow-y: scroll;
max-height: 560px;
margin-right: -17px;
}
.border-l:before{
content: '';
display: block;
......@@ -1101,10 +1137,31 @@ aside.news-wrapper {
margin: 0 auto;
position: relative;
}
.pa_format ul li{
.pa_format ul li {
text-align: center;
margin-bottom: 25px;
color: #313D7A;
max-width: 85%;
}
.pa_format ul li label {
overflow: hidden;
display: block;
vertical-align: text-top;
}
label.chevron.bottom {
display: block;
width: 120%;
}
.pa_format ul li img {
vertical-align: top;
margin-top: -50px;
}
.pa_format ul li:last-of-type{
margin-bottom: 20px;
}
.pa_format li.disabled{
color: rgba(26,26,26,0.2);
......@@ -1165,7 +1222,7 @@ aside.news-wrapper {
.product-info .info-content h2{
font-size: 20px;
line-height: 24px;
letter-spacing: 2px;
letter-spacing: 1px;
text-transform: uppercase;
}
.product-info .info-content h3{
......@@ -1184,6 +1241,11 @@ aside.news-wrapper {
.product-info .details p{
padding-bottom: 6px;
}
.entry-summary .price {
font-size: 0;
}
.product-info .price{
font-size: 20px;
line-height: 24px;
......@@ -1340,6 +1402,7 @@ aside.news-wrapper {
-moz-appearance:none;
appearance:none;
position: relative;
margin-left: -15px;
}
.reset_variations, .quantity{
display: none !important;
......@@ -1592,6 +1655,44 @@ aside.news-wrapper {
display: none;
}
.filter-bloc .bloc-content ul {
overflow-y: auto;
max-height: 300px;
overflow-x: hidden;
}
.filter-bloc .list-color-filter li {
display: inline-block;
height: 15px;
width: 15px;
border-radius: 50%;
cursor: pointer;
text-align: center;
margin-bottom: 4px;
margin-right: 3px;
}
.filter-bloc .list-color-filter li.selected:before {
content: '\2713';
color: #fff;
margin: 0 auto;
font-size: 9px;
margin-bottom: 0px;
}
.filter-bloc .list-color-filter li:before {
content: '';
}
.filter-bloc .list-color-filter li:last-child {
width: 100%;
margin-top: 8px;
text-align: center;
font-size: 9px;
letter-spacing: 0.2px;
}
.filter-bloc ul li {
display: block;
padding-bottom: 2px;
......@@ -1629,6 +1730,10 @@ aside.news-wrapper {
cursor: pointer;
letter-spacing: 0.2px;
}
/******NS***********/
/*******************/
.cover-wrapper{
position: absolute;
left: 0;
......@@ -1689,7 +1794,7 @@ aside.news-wrapper {
.right-container .right-panel{
position: absolute;
right: 0;
padding: 0px 17px;
padding: 0px 15px;
padding-bottom: 100px;
}
.panel section > h2{
......
......@@ -157,9 +157,11 @@ $(function(){
$this.addClass('active');
$('.filter-bloc .bloc-content').slideUp('slow');
$this.find('.bloc-content').slideDown('slow');
$('.commercial').slideUp('slow');
}else{
$this.removeClass('active');
$this.find('.bloc-content').slideUp('slow');
//$('.commercial').slideDown('slow');
}
}).on('click','.filter-bloc li:not(.disabled,.reinit)',function(e){
......
jQuery( document ).ready( function() {
jQuery( document ).on('click',".download_file", function() {
var id ;
var download_link = jQuery( '.download_file_link' ).attr('href');
var current_var = jQuery( '.download_file_link' ).attr('id');
var variation_id = jQuery( 'input[name="variation_id"]' ).val();
if(variation_id == 0)
jQuery(document).ready(function() {
jQuery(document).on('click', ".download_file", function() {
var id;
var download_link = jQuery('.download_file_link').attr('href');
var current_var = jQuery('.download_file_link').attr('id');
var variation_id = jQuery('input[name="variation_id"]').val();
if (variation_id == 0)
id = current_var;
else
id = variation_id;
var link = download_link+'?variation_id='+id;
var link = download_link + 'variation_id=' + id;
window.open(link, '_blank');
return false;
......@@ -19,26 +19,66 @@ jQuery( document ).ready( function() {
jQuery(document ).on('change','.color-list input,.format-list input ', function() {
jQuery(document).on('change', '.color-list input,.format-list input ', function() {
var varID = jQuery( 'input[name="variation_id"]' ).val();
if(varID != 0 ){
var varID = jQuery('input[name="variation_id"]').val();
if (varID != 0) {
var price = jQuery('.woocommerce-variation-price .woocommerce-Price-amount').text();
var pq = jQuery('.woocommerce-variation-description').text();
jQuery('.price .crete').text(price);
jQuery('.pq').text(pq);
}
var name= jQuery(this).attr('name');
if (jQuery(this).is(':checked') && name =='attribute_pa_couleur'){
var name = jQuery(this).attr('name');
if (jQuery(this).is(':checked') && name == 'attribute_pa_couleur') {
jQuery('.info-color').text(jQuery(this).attr('value'));
}
if (jQuery(this).is(':checked') && name =='attribute_pa_format'){
if (jQuery(this).is(':checked') && name == 'attribute_pa_format') {
jQuery('.info-format').text(jQuery(this).attr('value'));
jQuery('.info-format-txt').text(jQuery(this).attr('value'));
}
});
jQuery("#search-btn").on('click', function() {
jQuery('article').show();
jQuery('.list-animation section').show();
jQuery('article').removeClass('in_search');
//filtre couleur
var tabcolor = [];
i = 0;
jQuery(".list-color-filter .selected").each(function() {
tabcolor[i++] = jQuery(this).attr('data-color');
});
//console.log(tabcolor);
jQuery(".product-list article li").each(function() {
var product_color = jQuery(this).attr('data-color');
if (jQuery.inArray(product_color, tabcolor) >= 0) {
jQuery(this).closest('article').addClass('in_search');
}
});
if (tabcolor.length > 0)
{
jQuery('article:not(.in_search)').hide();
jQuery('.list-animation section').each(function() {
if (jQuery(this).find('article.in_search').length == 0) {
jQuery(this).hide();
}
});
}
});
});
\ No newline at end of file
......@@ -47,12 +47,16 @@ $(function(){
}
})
}
$.fn.selectFormat = function(){
$(this).on('click',function(){
var actifImage = $(this).find('img').data('img-active'),
initialImage = $(this).find('img').data('img');
$(this).parent().parent().find('li').each(function(){
img = $(this).find('img');
img.attr('src',img.data('img'));
})
$(this).parent().parent().find('li').removeClass('selected');
......@@ -88,11 +92,13 @@ $(function(){
tl = new TimelineMax()
tl.staggerFromTo('.slides-wrapper .gallery article',0.3,{opacity:0,y:100},{opacity:1,y:0},0.1,0);
tl.fromTo('.gallery',0.5,{opacity:0,visibility:"hidden"},{opacity:1,visibility:"visible"},0);
tl.fromTo('.nav-slider',0.1,{opacity:1},{opacity:0},0);
tl.fromTo('#slides',0.5,{opacity:1},{opacity:0},0);
tl.fromTo('.nav-slider',0.5,{opacity:1},{opacity:0},0);
});
$('.gallery').on('click','.close-btn,article',function(){
tl.reverse();
$('.gallery').fadeTo( "slow", 0).css('visibility','hidden');
$('#slides,.nav-slider').fadeTo( "slow", 1);
})
}
$.fn.showRightPanelAnimation = function(removeClass,addClass){
......@@ -119,16 +125,23 @@ $(function(){
})
}
$.fn.productAnimation = function(){
//first format Actif
var activeImg = $('.format-label #format_0').data('img-active');
$('.format-label #format_0').attr('src',activeImg);
tlProduct = new TimelineMax();
tlProduct.fromTo('.product-images',1,{autoAlpha:0, marginLeft:"-10%"},{autoAlpha:1, marginLeft:"0"},0);
tlProduct.staggerFromTo('.product-details .list',0.7,{opacity:0, marginLeft:"-10%"},{opacity:1, marginLeft:"0"},0.4,0.5);
tlProduct.fromTo('.product-info',1,{autoAlpha:0, marginLeft:"-10%"},{autoAlpha:1, marginLeft:"0"},1.2);
tlProduct.fromTo('.product-images',0.2,{autoAlpha:0, marginLeft:"-10%"},{autoAlpha:1, marginLeft:"0"},0);
tlProduct.staggerFromTo('.product-details .list',0.2,{opacity:0, marginLeft:"-10%"},{opacity:1, marginLeft:"0"},0.4,0.5);
tlProduct.fromTo('.product-info',0.2,{autoAlpha:0, marginLeft:"-10%"},{autoAlpha:1, marginLeft:"0"},1.2);
}
$('.product-list article img, .product-list article ul li').on('click', function() {
$('head').append($('.header-shop'));
var toLink = $(this).data('link');
$('.load-page').parent().addClass('active');
$('.load-page').load(toLink,function(){
//alert('here');
sizeProductDetails = $('.product-details .list').length;
if (sizeProductDetails < 2) {
$('.product-info').outerWidth('78.3%');
......@@ -151,7 +164,7 @@ $(function(){
$('.pa_couleur li').selectColor();
$('.pa_format li').selectFormat();
$('.color-list.selected').selectSlide($('#slides'));
},500)
},100)
$('.download-btn:not(.download_file)').click(function(e){
e.stopPropagation();
});
......
......@@ -4,7 +4,7 @@
* Template Name: Fiche technique
*
*/
$nfiles = glob("devis/[!\\.]*");
$nfiles = glob("fiches-techniques/[!\\.]*");
if ($nfiles !== FALSE) {
......@@ -15,26 +15,41 @@ if ($nfiles !== FALSE) {
}
$fiche_num = str_pad($nb_fiche, 6, "0", STR_PAD_LEFT);
$product_id = $_GET['product_id'];
$variation_id = $_GET['variation_id'];
$code_variation = nap_load_variation_settings_fields($variation_id);
$fiche_id = $code_variation['var_fiche'];
$file_title = "";
$product_cats = wp_get_post_terms($product_id, 'product_cat');
$file_title.=$product_cats[1]->name;
//fiche variable
if($variation_id !='undefined'){
$code_variation = nap_load_variation_settings_fields($variation_id);
$fiche_id = $code_variation['var_fiche'];
$sku = nap_variable_meta($variation_id, 'sku');
$gencod = $code_variation['var_gencod'];
$itf14 = $code_variation['var_itf14'] ;
$variable_product = wc_get_product($variation_id);
$thumb_image = get_the_post_thumbnail($variation_id, 'medium');
$file_title.="<br/>" . $variable_product->get_attribute('format') . " " . get_the_title($product_id);
$color="<span class='variation_color'><strong><em>Couleur </em>: " . $variable_product->get_attribute('couleur') . "</strong></span>";
}
$variable_product = wc_get_product($variation_id);
$product_title = $variable_product->get_title();
$product_infos = get_page_by_title($product_title, OBJECT, 'product');
//fiche simple
else {
// titre = Catégorie + sous catégorie + format + tag
$file_title = "";
$product_cats = array_reverse(wp_get_post_terms($product_infos->ID, 'product_cat'));
$fiche_id = get_post_meta($product_id, '_fiche_simple', true);
$sku = get_post_meta($product_id, '_sku',true);
$gencod = get_post_meta($product_id, '_gencod_simple', true);
$itf14 = get_post_meta($product_id,'_itf14_simple', true);
$thumb_image = get_the_post_thumbnail($product_id, 'medium');
$file_title.=$product_cats[1]->name;
$file_title.="<br/>" . get_the_title($product_id);
}
$product = wc_get_product($product_infos->ID);
$tags = $product->get_tag_ids();
$file_title.="<br/>" . $variable_product->get_attribute('format') . " " . get_tag($tags[0])->name;
$icones = "";
if (get_field('fiche_icones', $fiche_id)):
......@@ -45,7 +60,7 @@ if (get_field('fiche_icones', $fiche_id)):
endwhile;
endif;
echo $file_content = "<html>
$file_content = "<html>
<head><title>" . $file_title . "</title>
<style>
.html,body {
......@@ -106,10 +121,9 @@ echo $file_content = "<html>
.thumb_var img {
max-width: 400px !important;
max-height: 400px !important;
padding-right: 100px;
float: right;
}
.gallery-item {
......@@ -157,21 +171,21 @@ echo $file_content = "<html>
</head>
<body><div class='file_content'>
<div class='file_header'>
<div class='half_width thumb_var'>
" . $thumb_image = get_the_post_thumbnail($variation_id, 'shop_catalog') . "
<div class='half_width thumb_var' style='text-align:center'>
" . $thumb_image. "
</div>
<div class='half_width'>
<div class='half_width' style='margin-left:20px;'>
<h1>" . $file_title . "</h1>
<span class='variation_color'><strong><em>Couleur </em>: " . $variable_product->get_attribute('couleur') . "</strong></span>
".$color."
" . nap_get_content($fiche_id) . "
<div>" . $icones . "</div>
</div>
</div>
<div class='bleu_zone'>
<div class='half_width' style='position:relative; padding-left:30px'>
<p>Code article : " . $code_variation['var_code'] . "</p>
<p>Gencod : " . $code_variation['var_gencod'] . "</p>
<p>ITF 14 : " . $code_variation['var_itf14'] . "</p>
<p>Code article : " . $sku . "</p>
<p>Gencod : " . $gencod. "</p>
<p>ITF 14 : " . $itf14 . "</p>
</div>
......@@ -193,8 +207,10 @@ echo $file_content = "<html>
<th>L (cm)</th>
<th>l (cm)</th>
<th>H (cm)</th>
<th>Ø (cm)</th>
<th>Épaisseur (cm)</th>
<th>Capacité (cm)</th>
<th>Taille</th>
<th>Poids (g)</th>
</tr>
</thead>
......@@ -203,8 +219,10 @@ echo $file_content = "<html>
<td>" . get_field('ft_unite_L1', $fiche_id) . "</td>
<td>" . get_field('ft_unite_l2', $fiche_id) . "</td>
<td>" . get_field('ft_unite_H', $fiche_id) . "</td>
<td>" . get_field('ft_unite_diametre', $fiche_id) . "</td>
<td>" . get_field('ft_unite_epaisseur', $fiche_id) . "</td>
<td>" . get_field('ft_unite_capacite', $fiche_id) . "</td>
<td>" . get_field('ft_unite_taille', $fiche_id) . "</td>
<td>" . get_field('ft_unite_poids', $fiche_id) . "</td>
</tr>
</tbody>
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
<nav class="row">
<div class="main-nav nav-wrapper animated slideInLeft">
<div class="nav-header">
<a href="<?php echo get_home_url(); ?>" title="nap by CGMP"><h1 class="logo" style="background: url('<?php echo home_url('wp-content/themes/nap/assets/css/img/naplogo.svg')?>')">nap by CGMP</h1></a>
<a href="<?php echo get_home_url(); ?>" title="nap by CGMP"><h1 class="logo" >nap by CGMP</h1></a>
</div>
<?php get_template_part( 'nav-list' );?>
</div>
......
......@@ -20,11 +20,12 @@ if (!defined('ABSPATH')) {
}
$current_page = 'catalogue';
get_header();
$product;
$cate = get_queried_object();
$cateID = $cate->term_id;
//SubCats
$child_category = get_terms('product_cat', array('parent'=>$cateID, 'child_of' => the_category_ID(), 'exclude' => $cateID, 'orderby' => 'id', 'order' => 'ASC'));
$child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of' => the_category_ID(), 'exclude' => $cateID, 'orderby' => 'id', 'order' => 'ASC'));
?>
<div class="container clearfix" id="catalogue" data-page = "<?php echo $cateID; ?>">
......@@ -42,71 +43,55 @@ $child_category = get_terms('product_cat', array('parent'=>$cateID, 'child_of' =
<span>Filtres</span>
<span class="close-btn"></span>
</div>
<?php
$attributes = array('Univers' => 'pa_univers', 'Matiére' => 'pa_matiere', 'Format' => 'pa_format', 'Couleurs' => 'pa_couleur');
foreach ($attributes as $key => $value) :
?>
<div class="filter-bloc">
<div class="header">
<p><span>Univers</span></p>
<p><span><?php echo $key ?></span></p>
</div>
<div class="bloc-content">
<ul>
<li>Nouveautés</li>
<li>Noël</li>
<li class = "disabled">Printemps</li>
</ul>
</div>
<?php
$terms = get_terms($value);
</div>
<div class="filter-bloc">
<div class="header">
<p><span>Matiére</span></p>
</div>
<div class="bloc-content">
<ul>
<li>Nouveautés</li>
<li>Noël</li>
<li class = "disabled">Printemps</li>
</ul>
</div>
</div>
<div class="filter-bloc">
<div class="header">
<p><span>Format</span></p>
</div>
<div class="bloc-content">
<ul>
<li>Nouveautés</li>
<li>Noël</li>
<li class = "disabled">Printemps</li>
</ul>
</div>
</div>
<div class="filter-bloc">
<div class="header">
<p><span>Couleurs</span></p>
</div>
if (!empty($terms) && !is_wp_error($terms)):
?>
<div class="bloc-content">
<ul class = "list-color-filter clearfix">
<li data-color = "#7A3853"></li>
<li data-color = "#fff"></li>
<li data-color = "#7A3853"></li>
<li data-color = "#E8A380"></li>
<li data-color = "#fff"></li>
<li data-color = "#7A3853"></li>
<li data-color = "#E8A380"></li>
<li data-color = "#fff"></li>
<li data-color = "#7A3853"></li>
<li data-color = "#7A3853"></li>
<li data-color = "#fff"></li>
<li data-color = "#7A3853"></li>
<li data-color = "#E8A380"></li>
<li data-color = "#fff"></li>
<li data-color = "#7A3853"></li>
<ul <?php if ($value == 'pa_couleur') echo 'class = "list-color-filter clearfix"'; ?>>
<?php
foreach ($terms as $term) :
if ($value == 'pa_couleur'):
$color = get_field('couleurs', 'pa_couleur_' . $term->term_id);
if (isset($color) && strlen($color) > 0):
?>
<li data-color = "<?php echo $color; ?>" class="<?php echo $term->name; ?>"></li>
<?php
endif;
else :
?>
<li><?php echo $term->name; ?></li>
<?php
endif;
endforeach;
if ($value == 'pa_couleur'):
?>
<li class="reinit">Tout déselectionner</li>
<?php endif; ?>
</ul>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
<div class="center filter-btn-list">
<div class="btn pink-btn rounded">Rechercher</div>
<div class="btn pink-btn rounded" id="search-btn">Rechercher</div>
<span class = "reinit-all">Effacer les filtres</span>
</div>
</div>
......@@ -136,9 +121,9 @@ $child_category = get_terms('product_cat', array('parent'=>$cateID, 'child_of' =
while ($naps_posts->have_posts()) : $naps_posts->the_post();
$id = get_the_ID();
$options['size'] = (get_field('produit_affichage',$id ))? get_field('produit_affichage',$id ):'small';
$options['size'] = (get_field('produit_affichage', $id)) ? get_field('produit_affichage', $id) : 'small';
$args = array(
'post_type' => 'product_variation',
'post_type' => array('product', 'product_variation'),
'post_status' => array('private', 'publish'),
'numberposts' => -1,
'orderby' => 'menu_order',
......
......@@ -24,13 +24,15 @@ global $product;
$attribute_keys = array_keys($attributes);
$product_cats = array_reverse(wp_get_post_terms($product->get_id(), 'product_cat'));
$product_cats = wp_get_post_terms($product->get_id(), 'product_cat');
$subcat_iD = $product_cats[1]->term_id;
$current_variationID = $_GET['variation_id'];
if (!function_exists('print_attribute_radio')) {
function print_attribute_radio($checked_value, $value, $label, $name) {
function print_attribute_radio($checked_value, $value, $label, $name, $index=0) {
$current_color = $_GET['attribute_couleur'];
$selected = $default_checked = "";
if ($value == strtolower($current_color)){
......@@ -53,10 +55,14 @@ if (!function_exists('print_attribute_radio')) {
<input data-color="' . $hexa . '" type="radio" name="%1$s" value="%2$s" id="%3$s" %4$s ' . $default_checked . '></li>', $input_name, $esc_value, $id, $checked, $filtered_label);
} else {
$icons = nap_icon_format($value);
$format_img='<img src="'.$icons['inactive'].'" data-img = "'.$icons['inactive'].'" data-img-active = "'.$icons['active'].'" id="format_'.$index.'">';
$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 selected"><input type="radio" name="%1$s" value="%2$s" id="%3$s" %4$s>
<label class="format-label" for="%3$s"><img src="'.$icons['inactive'].'" data-img = "'.$icons['inactive'].'" data-img-active = "'.$icons['active'].'"></label>
<label class="format-label" for="%3$s">'.$format_img.'</label>
<div class="format-desc">'.$value.'</span>
</li>', $input_name, $esc_value, $id, $checked, $filtered_label); //<label class="format-label" style="background:url(' . $icons['inactive'] . ')" for="%3$s"></label>
}
......@@ -75,7 +81,7 @@ do_action('woocommerce_before_add_to_cart_form');
<div class="product-slides row">
<div class="product-header">
<h2 class="crete -italic font-small"><?php echo $product_cats[1]->name ?></h2>
<h3 class="crete"><?php the_title(); ?></h3>
<h3 class="crete"><?php the_title();?></h3>
</div>
<div class="slides-wrapper center">
<div class="row">
......@@ -137,7 +143,7 @@ do_action('woocommerce_before_add_to_cart_form');
</article>
<?php
endforeach;
if(!empty($ambiance)):
foreach ($ambiance as $key => $value) :
$attachment = wp_get_attachment_image_src($value, 'medium');
$hd = wp_get_attachment_image_src($value, 'full');
......@@ -149,7 +155,10 @@ do_action('woocommerce_before_add_to_cart_form');
<img src="<?php echo $attachment[0]; ?>" alt="" title="">
</figure>
</article>
<?php endforeach; ?>
<?php
endforeach;
endif;
?>
</div>
......@@ -175,7 +184,7 @@ do_action('woocommerce_before_add_to_cart_form');
<div class="list row <?php echo $name;?> left border-l center">
<div class="product-header center font-small label">
<label for="<?php echo sanitize_title($name); ?>" class = "chevron bottom">Choix <?php if($i==0) echo 'de la '; else echo 'du '; ?><?php echo wc_attribute_label($name); ?></label>
<label for="<?php echo sanitize_title($name); ?>" class = "chevron bottom"> <?php if($i==0) echo 'choix de la '; else echo 'choix du '; ?><?php echo strtolower(wc_attribute_label($name)); ?></label>
</div>
<?php
$sanitized_name = sanitize_title($name);
......@@ -194,15 +203,17 @@ do_action('woocommerce_before_add_to_cart_form');
// Get terms if this is a taxonomy - ordered. We need the names too.
$terms = wc_get_product_terms($product->get_id(), $name, array('fields' => 'all'));
foreach ($terms as $term) {
foreach ($terms as $key=>$term) {
if (!in_array($term->slug, $options)) {
continue;
}
print_attribute_radio($checked_value, $term->slug, $term->name, $sanitized_name);
print_attribute_radio($checked_value, $term->slug, $term->name, $sanitized_name,$key);
}
} else {
foreach ($options as $option) {
print_attribute_radio($checked_value, $option, $option, $sanitized_name);
}
}
}
......@@ -230,49 +241,12 @@ do_action('woocommerce_before_add_to_cart_form');
<?php do_action('woocommerce_after_variations_form'); ?>
<!--<div class="list row list-color left border-l">
<div class="product-header center font-small">
<span class = "chevron bottom">Choix de la couleur</span>
</div>
<ul>
<?php
foreach ($var_colors as $key => $value) :
$variable_product = wc_get_product($key);
?>
<li class = "" data-name='<?php echo $variable_product->get_attribute('couleur'); ?>'><span data-color="<?php echo $value; ?>"></span></li>
<?php endforeach; ?>
</ul>
</div>
<div class="list row pa_format left border-l">
<div class="product-header center font-small">
<span class = "chevron bottom">Choix du format</span>
</div>
<ul>
<?php
$formats_tab = nap_distinct_format_variations($variations);
foreach ($formats_tab as $key => $value) :
$icons = nap_icon_format($key);
$term = get_term_by('name', $value, 'pa_format');
// print_r($term);
?>
<li class ="" data-format='<?php echo $term->slug; ?>'>
<img src="<?php echo $icons['inactive'] ?>" data-img = "<?php echo $icons['inactive'] ?>" data-img-active = '<?php echo $icons['active'] ?>'>
<div class="format-desc"><?php echo $value ?></div>
</li>
<?php endforeach; ?>
</ul>
</div>-->
</form>
<div class="product-info row center left border-l">
<div class="info-content">
<h2 class = "crete -italic font-small" ><?php echo $product_cats[1]->name ?></h2>
<h3 class = "crete -italic font-small info-attr" ><span class="info-format"><?php echo $_GET['attribute_format']?></span> <span class="info-color"><?php echo$_GET['attribute_couleur'] ?></span></h3>
<h2 class = "crete font-small" ><?php echo $product_cats[1]->name ?></h2>
<h3 class = "crete font-small info-attr" ><span class="info-format"><?php echo $_GET['attribute_format']?></span> <span class="info-color"><?php echo$_GET['attribute_couleur'] ?></span></h3>
<div class="details font-small">
<p class="info-format-txt"><?php echo $_GET['attribute_format']?></p>
<p class="pq"><?php echo nap_variable_meta($current_variationID, 'variation_description'); ?></p>
......@@ -302,7 +276,7 @@ do_action('woocommerce_before_add_to_cart_form');
<div class = "btn-list">
<a href="<?php echo get_permalink(157); ?>" class="btn pink-btn rounded">Nous contacter</a>
<a class="btn pink-btn rounded download-btn download_file">Télécharger la fiche technique </a>
<a href="<?php echo get_permalink(43); ?>" class="hidden download_file_link" id="<?php echo $current_variationID ?>"></a>
<a href="<?php echo get_permalink(43); ?>?product_id=<?php echo $product->get_id()?>&" class="hidden download_file_link" id="<?php echo $current_variationID ?>"></a>
</div>
<div class="font-small circle-btn add-icon show-product"><span class= "abs-center">Produits associées</span></div>
</div>
......
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