Commit a174e96c authored by Nahla Shiri's avatar Nahla Shiri

correction bugs Redmine

parent d5d33962
...@@ -1149,6 +1149,8 @@ aside.news-wrapper { ...@@ -1149,6 +1149,8 @@ aside.news-wrapper {
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
cursor:pointer;
} }
#slides .element-slider:last-child .image{ #slides .element-slider:last-child .image{
margin-bottom: 0px; margin-bottom: 0px;
...@@ -1487,14 +1489,14 @@ label.chevron.bottom::first-letter { ...@@ -1487,14 +1489,14 @@ label.chevron.bottom::first-letter {
padding-top: 156px; padding-top: 156px;
padding-bottom: 30px; padding-bottom: 30px;
} }
.product-info .info-content h3, .product-info .info-content h1,
.product-info .info-content h2{ .product-info .info-content h2{
font-size: 20px; font-size: 20px;
line-height: 24px; line-height: 24px;
letter-spacing: 1px; letter-spacing: 1px;
text-transform: uppercase; text-transform: uppercase;
} }
.product-info .info-content h3{ .product-info .info-content h1{
padding-bottom: 5px; padding-bottom: 5px;
} }
.product-info .btn-list{ .product-info .btn-list{
...@@ -1628,9 +1630,9 @@ label.chevron.bottom::first-letter { ...@@ -1628,9 +1630,9 @@ label.chevron.bottom::first-letter {
.easyzoom.is-error img { .easyzoom.is-error img {
cursor: not-allowed; cursor: not-allowed;
} }
.easyzoom-notice { /*.easyzoom-notice {
display: none; display: none;
} }*/
.easyzoom-flyout { .easyzoom-flyout {
position:absolute; position:absolute;
......
...@@ -603,7 +603,13 @@ function onScroll(event){ ...@@ -603,7 +603,13 @@ function onScroll(event){
var currLink = $(this); var currLink = $(this);
var refElement = $(currLink.attr("href")); var refElement = $(currLink.attr("href"));
//console.log(currLink); //console.log(currLink);
if (refElement.length && refElement.position().top - ( $(".main").outerHeight() / 2 - titleHeight - $(".footer").outerHeight() ) <= scrollPos && refElement.position().top + refElement.height() > scrollPos) { var windowWidth = $(window).width();
var margin_top = 0;
if(windowWidth > 1920)
margin_top = 150;
else
margin_top = 50;
if (refElement.length && refElement.position().top - ( $(".main").outerHeight() / 2 - titleHeight - $(".footer").outerHeight()- margin_top ) <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
$('.subcat a').removeClass("active"); $('.subcat a').removeClass("active");
currLink.addClass("active"); currLink.addClass("active");
......
...@@ -12,7 +12,6 @@ jQuery(document).ready(function() { ...@@ -12,7 +12,6 @@ jQuery(document).ready(function() {
var download_link = jQuery('.download_file_link').attr('href'); var download_link = jQuery('.download_file_link').attr('href');
var current_var = jQuery('.download_file_link').attr('id'); var current_var = jQuery('.download_file_link').attr('id');
var variation_id = jQuery('input[name="variation_id"]').val(); var variation_id = jQuery('input[name="variation_id"]').val();
// alert(variation_id);
if (variation_id == 0) if (variation_id == 0)
id = current_var; id = current_var;
else else
...@@ -56,11 +55,13 @@ jQuery(document).ready(function() { ...@@ -56,11 +55,13 @@ jQuery(document).ready(function() {
tabunivers[i++] = jQuery(this).text(); tabunivers[i++] = jQuery(this).text();
}); });
var sku = jQuery("#sku-search").val();
var selected_colors = tabcolor.join(','); var selected_colors = tabcolor.join(',');
var selected_formats = tabformat.join(','); var selected_formats = tabformat.join(',');
var selected_matiere = tabmatiere.join(','); var selected_matiere = tabmatiere.join(',');
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,sku:sku};
window.location.href = "?" + jQuery.param(params); window.location.href = "?" + jQuery.param(params);
jQuery('.list-animation section').each(function() { jQuery('.list-animation section').each(function() {
...@@ -99,8 +100,11 @@ jQuery(document).ready(function() { ...@@ -99,8 +100,11 @@ jQuery(document).ready(function() {
} }
}); });
if(result_found == false) if(result_found == false)
jQuery('.search_notfound').text(' Aucun produit ne correspond à votre recherche'); {jQuery('.search_notfound').text(' Aucun produit ne correspond à votre recherche');
console.log(result_found);
}
}); });
......
...@@ -10,6 +10,9 @@ function loadProductContent() { ...@@ -10,6 +10,9 @@ function loadProductContent() {
$('.product-details .list').width('100%'); $('.product-details .list').width('100%');
$('.product-details form').width('21.7%'); $('.product-details form').width('21.7%');
} }
$('.pa_couleur li').getListColors(); $('.pa_couleur li').getListColors();
$('.pa_couleur li').selectColor(); $('.pa_couleur li').selectColor();
$('.pa_format li').selectFormat(); $('.pa_format li').selectFormat();
...@@ -18,21 +21,26 @@ function loadProductContent() { ...@@ -18,21 +21,26 @@ function loadProductContent() {
$('.pa_paquets li').selectFormat(); $('.pa_paquets li').selectFormat();
$('.pa_designation li').selectFormat(); $('.pa_designation li').selectFormat();
$('.list-wrapper .color-list').setColorToWhite('input'); $('.list-wrapper .color-list').setColorToWhite('input');
$('#zoom').zoom(); $('#zoom, .element-slider').zoom();
$('article[data-color], .pa_couleur li').click(function(e) { $('article[data-color], .pa_couleur li').click(function(e) {
$(this).selectSlide($('#slides')); $(this).selectSlide($('#slides'));
}); });
$('#mozaique').open_gallery(); $('#mozaique').open_gallery();
initFunction(); initFunction();
$.fn.responsive(); $.fn.responsive();
$('.variations_form').on('reset_data', function() $('.variations_form').on('reset_data', function()
{ {
console.log("reset data"); console.log("reset data");
$attributes = $('.variations .list'); $attributes = $('.variations .list');
var num_attr = $('.variations .list').length;
// alert(num_attr);
$attributes.each(function(i) $attributes.each(function(i)
{ {
var $attr = $(this); var $attr = $(this);
if (!$attr.hasClass('pa_couleur') && !$attr.hasClass('pa_taille')) //alert($attr.hasClass('first_attr'));
if (!$attr.hasClass("first_attr") || num_attr == 1)
{ {
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,26 +50,20 @@ function loadProductContent() { ...@@ -42,26 +50,20 @@ function loadProductContent() {
$firstInput.change(); $firstInput.change();
} }
} }
else
/*if ($attr.hasClass('pa_taille'))
{ {
console.log('--------' + i, $attr, $attr.find('input:not(:disabled):checked').length); $('.list').first().find('input:disabled').prop('disabled',false);
if (!$attr.find('input:not(:disabled):checked').length) // jQuery(jQuery('.list').first()).find('input').first().prop('checked',true);
{ console.log('heeeere'); //jQuery(jQuery('.list').first()).find('input').first().change();
$firstInput = $attr.find('input:not(:disabled)').first();
$firstInput.prop('checked',true);
$firstInput.change();
} }
}*/
}); });
}); });
function onFoundVariation() function onFoundVariation()
{ {
console.log('found variation'); console.log('found variation');
$('.list').first().find('input:disabled').prop('disabled',false);
//$('.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();
var format=''; var format='';
...@@ -75,6 +77,23 @@ function loadProductContent() { ...@@ -75,6 +77,23 @@ function loadProductContent() {
var varID = jQuery('input[name="variation_id"]').val(); var varID = jQuery('input[name="variation_id"]').val();
/**********NS***********/
var variations_has_file = $('.download_file').data('fiche');
var tab_var_file = variations_has_file.split(',').slice(0, -1);
//console.log(tab_var_file);
if ($.inArray(varID, tab_var_file) > -1)
{
$('.download_file').show();
}
else
{
$('.download_file').hide();
}
/**********************/
if (varID != 0) { if (varID != 0) {
var price = jQuery('.woocommerce-variation-price .woocommerce-Price-amount').text(); var price = jQuery('.woocommerce-variation-price .woocommerce-Price-amount').text();
...@@ -111,13 +130,14 @@ function loadProductContent() { ...@@ -111,13 +130,14 @@ function loadProductContent() {
$(function(){ $(function(){
var initFunction=function(){ var initFunction=function(){
$('a[href^="#"], .easyzoom img').click(function(e){ $('a[href^="#"], .easyzoom img').click(function(e){
e.preventDefault(); //e.preventDefault();
}); });
};//END init Function };//END init Function
$.fn.zoom = function(){ //Zoom on Image $.fn.zoom = function(){ //Zoom on Image
$(this).on('click', function() { $(this).on('click', function() {
//$('.loading-hd').show();
var zoom = $(this); var zoom = $(this);
$( ".easyzoom" ).each(function( i ) { //$( ".easyzoom" ).each(function( i ) {
var $easyzoom = $(this).easyZoom(); var $easyzoom = $(this).easyZoom();
var api = $easyzoom.filter('.easyzoom--with-toggle').data('easyZoom'); var api = $easyzoom.filter('.easyzoom--with-toggle').data('easyZoom');
api.teardown(); api.teardown();
...@@ -127,11 +147,17 @@ $(function(){ ...@@ -127,11 +147,17 @@ $(function(){
zoom.removeClass("active"); zoom.removeClass("active");
api.teardown(); api.teardown();
} else { } else {
$this.data("active", true); $this.data("active", true);
zoom.addClass("active"); zoom.addClass("active");
zoom.removeClass('is-loading');
zoom.addClass("is-ready");
api._init(); api._init();
$(this).trigger( "mouseenter" );
//api.teardown();
} }
}); //});
}); });
} //END Zoom On Image } //END Zoom On Image
$.fn.getListColors = function(){ $.fn.getListColors = function(){
...@@ -149,6 +175,9 @@ $(function(){ ...@@ -149,6 +175,9 @@ $(function(){
formatWrapper.css({'height' : formatH , 'width' : formatW }); formatWrapper.css({'height' : formatH , 'width' : formatW });
}) })
} }
$.fn.selectColor= function(){ $.fn.selectColor= function(){
$(this).on('click',function(){ $(this).on('click',function(){
var $input = $(this).find('input'); var $input = $(this).find('input');
...@@ -328,6 +357,9 @@ $(function(){ ...@@ -328,6 +357,9 @@ $(function(){
//localStorage['from-site'] = true; //localStorage['from-site'] = true;
$('head').append($('.header-shop')); $('head').append($('.header-shop'));
var toLink = $(this).data('link'); var toLink = $(this).data('link');
$(document).attr("title", $(this).data('title'));
// $(document).attr("description", $(this).data('description'));
// $.post(toLink, { fromSite: true}); // $.post(toLink, { fromSite: true});
//$.cookie("formSite", 1); //$.cookie("formSite", 1);
$('.load-page').parent().addClass('active'); $('.load-page').parent().addClass('active');
......
...@@ -135,14 +135,14 @@ ...@@ -135,14 +135,14 @@
* @param {Event} e * @param {Event} e
*/ */
EasyZoom.prototype._onEnter = function(e) { EasyZoom.prototype._onEnter = function(e) {
var touches = e.originalEvent.touches; // var touches = e.originalEvent.touches;
this.isMouseOver = true; this.isMouseOver = true;
if (!touches || touches.length == 1) { // if (!touches || touches.length == 1) {
e.preventDefault(); e.preventDefault();
this.show(e, true); this.show(e, true);
} // }
}; };
/** /**
......
...@@ -25,7 +25,7 @@ function nap_enqueue_scripts() { ...@@ -25,7 +25,7 @@ function nap_enqueue_scripts() {
// Enqueue jQuery UI and autocomplete // Enqueue jQuery UI and autocomplete
wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-ui-autocomplete'); wp_enqueue_script('jquery-ui-autocomplete');
wp_enqueue_script( 'wc-add-to-cart-variation' ); wp_enqueue_script('wc-add-to-cart-variation');
} }
add_action('wp_enqueue_scripts', 'nap_enqueue_scripts'); add_action('wp_enqueue_scripts', 'nap_enqueue_scripts');
...@@ -305,7 +305,11 @@ function nap_menu() { ...@@ -305,7 +305,11 @@ function nap_menu() {
if ($cat->category_parent == 0) { if ($cat->category_parent == 0) {
$category_id = $cat->term_id; $category_id = $cat->term_id;
$nappe_sets = false; $nappe_sets = false;
if($category_id == 19){ $nappe_sets = true;} else { $nappe_sets = false;} if ($category_id == 19) {
$nappe_sets = true;
} else {
$nappe_sets = false;
}
$menu.= '<li class ="parent-cat" data-page = "' . $category_id . '" data-img = "' . nap_category_image($category_id) . '"><a href="' . get_term_link($cat->slug, 'product_cat') . '">' . $cat->name . '</a>'; $menu.= '<li class ="parent-cat" data-page = "' . $category_id . '" data-img = "' . nap_category_image($category_id) . '"><a href="' . get_term_link($cat->slug, 'product_cat') . '">' . $cat->name . '</a>';
$args2 = array( $args2 = array(
...@@ -334,13 +338,11 @@ function nap_menu() { ...@@ -334,13 +338,11 @@ function nap_menu() {
else else
$calss = ''; $calss = '';
if($nappe_sets){ if ($nappe_sets) {
$sub_name = $sub_category->name; $sub_name = $sub_category->name;
} } else {
else{
$sub_name = substr(strstr($sub_category->name," "), 1); $sub_name = substr(strstr($sub_category->name, " "), 1);
} }
$menu.= '<li data-cover = "' . nap_category_image($sub_category->term_id) . '"><a class="' . $calss . '" href="#cat' . $sub_category->term_id . '">' . $sub_name . '</a></li>'; $menu.= '<li data-cover = "' . nap_category_image($sub_category->term_id) . '"><a class="' . $calss . '" href="#cat' . $sub_category->term_id . '">' . $sub_name . '</a></li>';
} }
...@@ -354,16 +356,16 @@ function nap_menu() { ...@@ -354,16 +356,16 @@ function nap_menu() {
} }
function nap_variation_url($variationID) { function nap_variation_url($variationID) {
/****** MS ******/ /* * **** MS ***** */
$product = wc_get_product( $variationID); $product = wc_get_product($variationID);
$url = '?'; $url = '?';
$product_attributes = ($product->get_attributes()); $product_attributes = ($product->get_attributes());
foreach ($product_attributes as $key => $p_attr) { foreach ($product_attributes as $key => $p_attr) {
$url .= $key . '=' .$p_attr.'&'; $url .= $key . '=' . $p_attr . '&';
} }
$url .='variation_id=' . $variationID; $url .='variation_id=' . $variationID;
return preg_replace('/\s+/', '', $url); return preg_replace('/\s+/', '', $url);
/****** END MS ******/ /* * **** END MS ***** */
/* OLD NS /* OLD NS
$variable_product = wc_get_product($variationID); $variable_product = wc_get_product($variationID);
...@@ -424,8 +426,8 @@ function nap_distinct_color_variations($variations) { ...@@ -424,8 +426,8 @@ function nap_distinct_color_variations($variations) {
} }
function nap_variation_format($variationID) { function nap_variation_format($variationID) {
/*$variable_product = wc_get_product($variationID); /* $variable_product = wc_get_product($variationID);
$name= $variable_product->get_attribute('format');*/ $name= $variable_product->get_attribute('format'); */
$meta = get_post_meta($variationID, 'attribute_pa_format', true); $meta = get_post_meta($variationID, 'attribute_pa_format', true);
$term = get_term_by('slug', $meta, 'pa_format'); $term = get_term_by('slug', $meta, 'pa_format');
...@@ -448,38 +450,73 @@ function nap_distinct_format_variations($variations) { ...@@ -448,38 +450,73 @@ 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']!=''){ $ref_product = 0; $serach_by_ref=false;
$list_format=explode(",", $search['pa_format']); if (isset($search['sku']) && $search['sku'] != '') {
$intersect_format = array_intersect($list_attr['pa_format'],$list_format); $serach_by_ref=true;
$_product = wc_get_product($id);
if( $_product->is_type( 'simple' ) ){
$product_id = get_product_by_sku( $search['sku'] );
if($id == $product_id[0]->post_id)
$ref_product = 1;
} elseif( $_product->is_type( 'variable' ) ){
$variation = get_product_by_sku($search['sku']);
$variation_id = $variation[0]->post_id;
$variable_product = wc_get_product($variation_id);
if($id == $variable_product->parent_id)
$ref_product = 1;
}
// print $ref_product;
}
if (isset($search['pa_format']) && $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'])) if (isset($list_attr['pa_couleur']) && is_array($list_attr['pa_couleur'])) {
{$intersect_couleur = array_intersect($list_attr['pa_couleur'],$list_couleur);} $intersect_couleur = array_intersect($list_attr['pa_couleur'], $list_couleur);
} }
if(isset($search['pa_matiere']) && $search['pa_matiere']!=''){
$list_matiere=explode(",", $search['pa_matiere']);
} }
if(isset($search['pa_univers']) && $search['pa_univers']!=''){ if (isset($search['pa_matiere']) && $search['pa_matiere'] != '') {
$list_univers=explode(",", $search['pa_univers']); $list_matiere = explode(",", $search['pa_matiere']);
} }
if( if (isset($search['pa_univers']) && $search['pa_univers'] != '') {
$list_univers = explode(",", $search['pa_univers']);
}
if( $serach_by_ref && $ref_product)
{ echo nap_get_item($id, $args, 'catalogue', $options);
return;
}
if ( (!$serach_by_ref)&&
( ($list_couleur && !empty($intersect_couleur)) || empty($list_couleur) ) && ( ($list_couleur && !empty($intersect_couleur)) || empty($list_couleur) ) &&
( ($list_format && !empty($intersect_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) {
$terms = get_the_terms($post_ID, 'product_cat');
$link = $image = $size = ''; $link = $image = $size = '';
if (isset($options)) { if (isset($options)) {
if ($options['dwnldLink']) { if ($options['dwnldLink']) {
...@@ -501,28 +538,26 @@ function nap_get_item($post_ID, $args = null, $current_page = '', $options = nul ...@@ -501,28 +538,26 @@ function nap_get_item($post_ID, $args = null, $current_page = '', $options = nul
} }
} }
if($current_page == 'phototheque'){ if ($current_page == 'phototheque') {
$img = ''; $img = '';
if(has_post_thumbnail($post_ID)) if (has_post_thumbnail($post_ID)) {
{ $prod_image = get_the_post_thumbnail_url($post_ID, 'thumbnail'); $prod_image = get_the_post_thumbnail_url($post_ID, 'thumbnail');
$prod_hd = get_the_post_thumbnail_url($post_ID, 'full'); $prod_hd = get_the_post_thumbnail_url($post_ID, 'full');
} } else {
else { $product = new WC_Product_Variable($post_ID);
$product = new WC_Product_Variable( $post_ID );
$variations = $product->get_available_variations(); $variations = $product->get_available_variations();
if(isset($variations[0])) if (isset($variations[0])) {
{ $prod_image = get_the_post_thumbnail_url($variations[0]['variation_id'], 'thumbnail'); $prod_image = get_the_post_thumbnail_url($variations[0]['variation_id'], 'thumbnail');
$prod_hd = get_the_post_thumbnail_url($variations[0]['variation_id'], 'full'); $prod_hd = get_the_post_thumbnail_url($variations[0]['variation_id'], 'full');
} }
} }
$nap_img = ' <a class = "circle-btn download-btn hidden-elem" download href="' . $prod_hd . '"></a>'; $nap_img = ' <a class = "circle-btn download-btn hidden-elem" download href="' . $prod_hd . '"></a>';
$nap_img.= '<img class="transition" src="' . $prod_image . '" alt="'. get_the_title($post_ID).'" title="'. get_the_title($post_ID).'">'; $nap_img.= '<img class="transition" src="' . $prod_image . '" alt="' . get_the_title($post_ID) . '" title="' . get_the_title($post_ID) . '">';
} } else {
else
{
$nap_img = $link; $nap_img = $link;
$nap_img.= '<img class="transition" src="' . $image . '" alt="" title="">'; $nap_img.= '<img class="transition" src="' . $image . '" alt="' . $terms[1]->name . ' ' . get_the_title($post_ID) . '" data-title="' . $terms[1]->name . ' ' . get_the_title($post_ID) . '" data-description="' . strip_tags($terms[1]->description) . '">';
} }
$nap_article = '<article class = " visible row "> $nap_article = '<article class = " visible row ">
<a href="#"></a> <a href="#"></a>
...@@ -534,6 +569,7 @@ function nap_get_item($post_ID, $args = null, $current_page = '', $options = nul ...@@ -534,6 +569,7 @@ function nap_get_item($post_ID, $args = null, $current_page = '', $options = nul
$variations = get_posts($args); $variations = get_posts($args);
$temp_colors = array(); $temp_colors = array();
if (!empty($variations)) { if (!empty($variations)) {
foreach ($variations as $key => $value) { foreach ($variations as $key => $value) {
$color = nap_variation_color($value->ID); $color = nap_variation_color($value->ID);
$format = nap_variation_format($value->ID); $format = nap_variation_format($value->ID);
...@@ -541,11 +577,11 @@ function nap_get_item($post_ID, $args = null, $current_page = '', $options = nul ...@@ -541,11 +577,11 @@ function nap_get_item($post_ID, $args = null, $current_page = '', $options = nul
if (!in_array($color, $temp_colors)) { if (!in_array($color, $temp_colors)) {
$temp_colors[] = $color; $temp_colors[] = $color;
$nap_article.='<li data-link = "' . get_permalink($post_ID) . nap_variation_url($value->ID) . '" data-image = "' . get_the_post_thumbnail_url($value->ID, 'thumbnail') . '" data-color = "' . $color . '" data-format = "' . $format . '"></li> '; $nap_article.='<li data-link = "' . get_permalink($post_ID) . nap_variation_url($value->ID) . '" data-image = "' . get_the_post_thumbnail_url($value->ID, 'thumbnail') . '" data-description="' . strip_tags($terms[1]->description) . '" data-title = "' . $terms[1]->name . ' ' . $title_item . '" data-color = "' . $color . '" data-format = "' . $format . '"><a href="' . get_permalink($post_ID) . nap_variation_url($value->ID) . '"></a></li> ';
} }
} }
} else { } else {
$nap_article.='<li data-link = "' . get_permalink($post_ID) . '" data-image = "' . get_the_post_thumbnail_url($value->ID, 'thumbnail') . '" data-color = "' . get_post_thumbnail_id($post_ID) . '" data-format = ""></li> '; $nap_article.='<li data-link = "' . get_permalink($post_ID) . '" data-image = "' . get_the_post_thumbnail_url($value->ID, 'thumbnail') . '" data-color = "' . get_post_thumbnail_id($post_ID) . '" data-format = ""><a href="' . get_permalink($post_ID) . '"></a></li> ';
} }
$nap_article.='</ul>'; $nap_article.='</ul>';
endif; endif;
...@@ -666,6 +702,7 @@ function nap_save_general_proddata_custom_field($post_id) { ...@@ -666,6 +702,7 @@ function nap_save_general_proddata_custom_field($post_id) {
session_start(); session_start();
$ref = false; $ref = false;
//MS 2017-08-02 : Get referrer //MS 2017-08-02 : Get referrer
function externe_referrer() { function externe_referrer() {
session_start(); session_start();
...@@ -673,18 +710,15 @@ function externe_referrer() { ...@@ -673,18 +710,15 @@ function externe_referrer() {
$postid = url_to_postid($url); $postid = url_to_postid($url);
$notRefreshed = true; $notRefreshed = true;
$uri = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $uri = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$pageWasRefreshed = isset($_SERVER['HTTP_CACHE_CONTROL']) &&($_SERVER['HTTP_CACHE_CONTROL'] === 'max-age=0' || $_SERVER['HTTP_CACHE_CONTROL'] == 'no-cache'); $pageWasRefreshed = isset($_SERVER['HTTP_CACHE_CONTROL']) && ($_SERVER['HTTP_CACHE_CONTROL'] === 'max-age=0' || $_SERVER['HTTP_CACHE_CONTROL'] == 'no-cache');
//The second parameter on print_r returns the result to a variable rather than displaying it //The second parameter on print_r returns the result to a variable rather than displaying it
$RequestSignature = md5($_SERVER['REQUEST_URI'].$_SERVER['QUERY_STRING'].print_r($_POST, true)); $RequestSignature = md5($_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING'] . print_r($_POST, true));
if (($pageWasRefreshed || empty($url) )) // && (from-site) //$_SESSION['LastRequest'] == $RequestSignature if (($pageWasRefreshed || empty($url))) { // && (from-site) //$_SESSION['LastRequest'] == $RequestSignature
{
$ref = true; $ref = true;
} } else {
else
{
$ref = false; $ref = false;
$_SESSION['LastRequest'] = $RequestSignature; $_SESSION['LastRequest'] = $RequestSignature;
} }
return $ref; return $ref;
} }
...@@ -692,12 +726,12 @@ function get_logged_user() { ...@@ -692,12 +726,12 @@ function get_logged_user() {
if (is_user_logged_in()) { if (is_user_logged_in()) {
global $current_user; global $current_user;
get_currentuserinfo(); get_currentuserinfo();
if($current_user->user_lastname || $current_user->user_firstname){ if ($current_user->user_lastname || $current_user->user_firstname) {
echo $current_user->user_lastname . ' ' . $current_user->user_firstname; echo $current_user->user_lastname . ' ' . $current_user->user_firstname;
}else{ } else {
echo $current_user->user_login; echo $current_user->user_login;
} }
echo '<span class = "logout"><a href="' . wp_logout_url( home_url() ) . '">déconnexion</a></span>'; echo '<span class = "logout"><a href="' . wp_logout_url(home_url()) . '">déconnexion</a></span>';
} else { } else {
echo '<a class="login" href="#">accès pro</a>'; echo '<a class="login" href="#">accès pro</a>';
} }
...@@ -705,8 +739,9 @@ function get_logged_user() { ...@@ -705,8 +739,9 @@ function get_logged_user() {
//remove margin top margin header Wordpress //remove margin top margin header Wordpress
add_action('get_header', 'my_filter_head'); add_action('get_header', 'my_filter_head');
function my_filter_head() { function my_filter_head() {
remove_action('wp_head', '_admin_bar_bump_cb'); remove_action('wp_head', '_admin_bar_bump_cb');
} }
function nap_attribute_by_category($categorie, $attr) { function nap_attribute_by_category($categorie, $attr) {
...@@ -726,13 +761,11 @@ function nap_attribute_by_category($categorie, $attr) { ...@@ -726,13 +761,11 @@ 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) {
if($attr == 'pa_couleur') if ($attr == 'pa_couleur') {
{ $list_attr = wc_get_product_terms($value->ID, $attr, array('fields' => 'ids'));
$list_attr = wc_get_product_terms($value->ID, $attr,array( 'fields' => 'ids' )); } else {
$list_attr = woocommerce_get_product_terms($value->ID, $attr, 'names');
} }
else
{ $list_attr = woocommerce_get_product_terms($value->ID, $attr, 'names');}
// print_r($list_attr); // print_r($list_attr);
foreach ($list_attr as $key => $value) { foreach ($list_attr as $key => $value) {
$attribute[] = $value; $attribute[] = $value;
...@@ -767,18 +800,17 @@ function nap_trash_fiche_technique($post_id) { ...@@ -767,18 +800,17 @@ function nap_trash_fiche_technique($post_id) {
$wpdb->delete($table, array('meta_key' => 'fiche_var_auto', 'meta_value' => $post->post_title)); $wpdb->delete($table, array('meta_key' => 'fiche_var_auto', 'meta_value' => $post->post_title));
} }
add_action('pre_get_posts', 'nap_change_filter_post');
add_action( 'pre_get_posts', 'nap_change_filter_post' );
function nap_change_filter_post() { function nap_change_filter_post() {
global $wp_query; global $wp_query;
if(is_admin()) { if (is_admin()) {
if(!empty($wp_query->query_vars['product_cat'])) { if (!empty($wp_query->query_vars['product_cat'])) {
setcookie("product_cat", $wp_query->query_vars['product_cat']); setcookie("product_cat", $wp_query->query_vars['product_cat']);
} }
if(!isset($_GET['product_cat']) && ($_GET['post_type'] == 'product')) { if (!isset($_GET['product_cat']) && ($_GET['post_type'] == 'product')) {
$wp_query->query_vars['product_cat'] = $_COOKIE['product_cat']; $wp_query->query_vars['product_cat'] = $_COOKIE['product_cat'];
} } elseif (isset($_GET['product_cat']) && empty($_GET['product_cat'])) {
elseif(isset($_GET['product_cat']) && empty($_GET['product_cat'])) {
setcookie("product_cat", $wp_query->query_vars['product_cat']); setcookie("product_cat", $wp_query->query_vars['product_cat']);
} }
} }
...@@ -789,7 +821,7 @@ function nap_show_associated_products() { ...@@ -789,7 +821,7 @@ function nap_show_associated_products() {
global $product; global $product;
$upsells = wc_products_array_orderby( array_filter( array_map( 'wc_get_product', $product->get_upsell_ids() ), 'wc_products_array_filter_visible' ), 'rand', 'desc' ); $upsells = wc_products_array_orderby(array_filter(array_map('wc_get_product', $product->get_upsell_ids()), 'wc_products_array_filter_visible'), 'rand', 'desc');
$associated_products .= '<div class="suggest-header"> $associated_products .= '<div class="suggest-header">
<h2>Produits associés</h2> <h2>Produits associés</h2>
...@@ -797,22 +829,22 @@ function nap_show_associated_products() { ...@@ -797,22 +829,22 @@ function nap_show_associated_products() {
</div> </div>
<div class="product-list-content">'; <div class="product-list-content">';
foreach ( $upsells as $upsell ) : foreach ($upsells as $upsell) :
$img = ''; $img = '';
if(has_post_thumbnail($upsell->get_id())) if (has_post_thumbnail($upsell->get_id()))
$img = get_the_post_thumbnail($upsell->get_id(), 'medium'); $img = get_the_post_thumbnail($upsell->get_id(), 'medium');
else { else {
$product = new WC_Product_Variable( $upsell->get_id() ); $product = new WC_Product_Variable($upsell->get_id());
$variations = $product->get_available_variations(); $variations = $product->get_available_variations();
if(isset($variations[0])) if (isset($variations[0]))
$img = get_the_post_thumbnail($variations[0]['variation_id'], 'medium'); $img = get_the_post_thumbnail($variations[0]['variation_id'], 'medium');
} }
$associated_products .= '<article class = "row full-width"> $associated_products .= '<article class = "row full-width">
<a href="#"></a> <a href="#"></a>
<figure> <figure>
'.$img.' ' . $img . '
</figure> </figure>
<h3 class = "font-small" >'. $upsell->name .'</h3> <h3 class = "font-small" >' . $upsell->name . '</h3>
</article>'; </article>';
endforeach; endforeach;
...@@ -821,8 +853,51 @@ function nap_show_associated_products() { ...@@ -821,8 +853,51 @@ function nap_show_associated_products() {
return $associated_products; return $associated_products;
} }
function custom_wc_ajax_variation_threshold( $qty, $product ) { function custom_wc_ajax_variation_threshold($qty, $product) {
return 100; return 100;
} }
add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 ); add_filter('woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2);
function nap_var_fiche($available_variations) {
$variation_hasFiche = '';
foreach ($available_variations as $key => $value) {
// print $key.'-'.get_post_meta($value['variation_id'], '_var_fiche', true)."<br />";
$fiche = get_post_meta($value['variation_id'], '_var_fiche', true);
if ($fiche) {
$variation_hasFiche .= $value['variation_id'] . ',';
}
}
echo $variation_hasFiche;
}
add_filter( 'wpseo_metadesc', function( $description )
{ global $product;
global $post;
$terms = get_the_terms( $post->ID, 'product_cat' );
return
( is_product() || (isset($product) && $product->is_type( 'variable' )) )
? $terms[1]->description
: $description;
}, PHP_INT_MAX );
function get_product_by_sku( $sku ) {
global $wpdb;
$post_item = $wpdb->get_results("SELECT post_id FROM np_postmeta WHERE meta_key='_sku' AND meta_value=".$sku." LIMIT 1");
return $post_item;
return null;
}
...@@ -53,7 +53,7 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of' ...@@ -53,7 +53,7 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
<span>Filtres</span> <span>Filtres</span>
<span class="close-btn"></span> <span class="close-btn"></span>
</div> </div>
<input type="text" name ="sku-search" placeholder="Référence" id="sku-search"/>
<?php <?php
$attributes = array('Univers' => 'pa_univers', 'Matiére' => 'pa_matiere', 'Format' => 'pa_format', 'Couleurs' => 'pa_couleur'); $attributes = array('Univers' => 'pa_univers', 'Matiére' => 'pa_matiere', 'Format' => 'pa_format', 'Couleurs' => 'pa_couleur');
foreach ($attributes as $key => $value) : foreach ($attributes as $key => $value) :
...@@ -148,7 +148,7 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of' ...@@ -148,7 +148,7 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
</div> </div>
<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'] != '' || $_GET['pa_univers'] != '' || $_GET['sku'] != ''): ?>
<span class="search_result">Résultat de votre recherche :<span class="search_notfound" style="color:#ff6a5f"></span></span> <span class="search_result">Résultat de votre recherche :<span class="search_notfound" style="color:#ff6a5f"></span></span>
<?php endif; ?> <?php endif; ?>
......
...@@ -85,14 +85,13 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -85,14 +85,13 @@ do_action('woocommerce_before_add_to_cart_form');
<div class="gallery clearfix"> <div class="gallery clearfix">
<div class="gallery-content clearfix"> <div class="gallery-content clearfix">
<span class="close-btn"></span> <span class="close-btn"></span>
<article class = "row" data-color = "<?php echo get_post_thumbnail_id($ID) ?>"> <article class = "row" data-color = "<?php echo get_post_thumbnail_id($ID) ?>">
<?php if ( is_user_logged_in() ) { ?> <?php if ( is_user_logged_in() ) { ?>
<a class = "download-btn" href="<?php echo get_the_post_thumbnail_url($ID, 'full') ?>" download></a> <a class = "download-btn" href="<?php echo get_the_post_thumbnail_url($ID, 'full') ?>" download></a>
<?php } ?> <?php } ?>
<figure> <figure>
<img src="<?php echo get_the_post_thumbnail_url($ID, 'medium') ?>" alt="" title="">
<img src="<?php echo get_the_post_thumbnail_url($ID, 'medium') ?>" alt="<?php echo get_the_title($ID)?>" title="">
</figure> </figure>
</article> </article>
<?php <?php
...@@ -107,7 +106,7 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -107,7 +106,7 @@ do_action('woocommerce_before_add_to_cart_form');
<a class = "download-btn" href="<?php echo $hd[0]; ?>" download></a> <a class = "download-btn" href="<?php echo $hd[0]; ?>" download></a>
<?php } ?> <?php } ?>
<figure> <figure>
<img src="<?php echo $attachment[0]; ?>" alt="" title=""> <img src="<?php echo $attachment[0]; ?>" alt="<?php echo get_the_title($ID)?>" title="">
</figure> </figure>
</article> </article>
<?php <?php
...@@ -130,7 +129,7 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -130,7 +129,7 @@ do_action('woocommerce_before_add_to_cart_form');
<?php <?php
$format = $product->get_attribute( 'pa_format' );?> $format = $product->get_attribute( 'pa_format' );?>
<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> <h1 class = "crete font-small info-attr" ><span class="info-format"><?php echo $format; ?></span> <span class="info-color"><?php echo$_GET['pa_couleur'] ?></span></h1>
<div class="details font-small"> <div class="details font-small">
<p class="info-format-txt"> <p class="info-format-txt">
<?php echo $format; ?> <?php echo $format; ?>
......
...@@ -37,12 +37,19 @@ if (!function_exists('print_attribute_radio')) { ...@@ -37,12 +37,19 @@ if (!function_exists('print_attribute_radio')) {
function print_attribute_radio($checked_value, $value, $label, $name, $index=0) { function print_attribute_radio($checked_value, $value, $label, $name, $index=0) {
$current_color = $_GET['pa_couleur']; $current_color = $_GET['pa_couleur'];
$current_taille = $_GET['pa_taille'];
$selected = $default_checked = ""; $selected = $default_checked = "";
if ($value == strtolower($current_color)){ if ($value == strtolower($current_color)){
$default_checked = "checked"; $default_checked = "checked";
$selected = "selected"; $selected = "selected";
} }
if ($value == strtolower($current_taille)){
$default_checked = "checked";
$selected = "selected";
}
$checked = sanitize_title($checked_value) === $checked_value ? checked($checked_value, sanitize_title($value), false) : checked($checked_value, $value, false); $checked = sanitize_title($checked_value) === $checked_value ? checked($checked_value, sanitize_title($value), false) : checked($checked_value, $value, false);
$input_name = 'attribute_' . esc_attr($name); $input_name = 'attribute_' . esc_attr($name);
...@@ -78,7 +85,7 @@ if (!function_exists('print_attribute_radio')) { ...@@ -78,7 +85,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_name.'"><input type="radio" name="%1$s" value="%2$s" id="%3$s" %4$s> printf('<li class="format-list '.$input_name.' '.$selected.'"><input type="radio" name="%1$s" value="%2$s" id="%3$s" %4$s '. $default_checked .'>
<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>
...@@ -124,9 +131,10 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -124,9 +131,10 @@ do_action('woocommerce_before_add_to_cart_form');
foreach ($var_colors as $key => $value) : foreach ($var_colors as $key => $value) :
?> ?>
<div style="background-image:url('<?php echo get_the_post_thumbnail_url($key, 'medium') ?>')" class="image element-slider easyzoom easyzoom--overlay easyzoom--with-toggle" data-color = "<?php echo $value ?>" data-slick-index = "1"> <div style="background-image:url('<?php echo get_the_post_thumbnail_url($key, 'medium') ?>')" class="image element-slider easyzoom easyzoom--overlay easyzoom--with-toggle" data-color = "<?php echo $value ?>" data-slick-index = "1">
<a href="<?php echo get_the_post_thumbnail_url($key, 'full') ?>"> <a href="<?php echo get_the_post_thumbnail_url($key, 'large') ?>" data-standard="<?php echo get_the_post_thumbnail_url($key, 'medium') ?>">
<!--<img src="<?php echo get_the_post_thumbnail_url($key, 'medium') ?>" alt="" />--> <!--<img src="<?php echo get_the_post_thumbnail_url($key, 'medium') ?>" alt="" />-->
</a> </a>
<div class="loading-hd"></div>
</div> </div>
<?php <?php
...@@ -166,7 +174,7 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -166,7 +174,7 @@ do_action('woocommerce_before_add_to_cart_form');
<a class = "download-btn" href="<?php echo get_the_post_thumbnail_url($key, 'full') ?>" download></a> <a class = "download-btn" href="<?php echo get_the_post_thumbnail_url($key, 'full') ?>" download></a>
<?php } ?> <?php } ?>
<figure> <figure>
<img src="<?php echo get_the_post_thumbnail_url($key, 'medium') ?>" alt="" title=""> <img src="<?php echo get_the_post_thumbnail_url($key, 'medium') ?>" alt="<?php echo get_the_title($ID)?>" title="">
</figure> </figure>
</article> </article>
<?php <?php
...@@ -182,7 +190,7 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -182,7 +190,7 @@ do_action('woocommerce_before_add_to_cart_form');
<a class = "download-btn" href="<?php echo $hd[0]; ?>" download></a> <a class = "download-btn" href="<?php echo $hd[0]; ?>" download></a>
<?php } ?> <?php } ?>
<figure> <figure>
<img src="<?php echo $attachment[0]; ?>" alt="" title=""> <img src="<?php echo $attachment[0]; ?>" alt="<?php echo get_the_title($ID)?>" title="">
</figure> </figure>
</article> </article>
<?php <?php
...@@ -209,9 +217,11 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -209,9 +217,11 @@ do_action('woocommerce_before_add_to_cart_form');
<div class="variations" cellspacing="0"> <div class="variations" cellspacing="0">
<?php <?php
$i=0; $i=0;
foreach ($attributes as $name => $options) : ?> foreach ($attributes as $name => $options) : ?>
<div class="list row <?php echo $name;?> left border-l center">
<div class="list row <?php echo $name;?> left border-l center <?php if($i==0) echo "first_attr" ;?>">
<div class="product-header center font-small label"> <div class="product-header center font-small 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> <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>
...@@ -225,6 +235,8 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -225,6 +235,8 @@ do_action('woocommerce_before_add_to_cart_form');
} else { } else {
$checked_value = ''; $checked_value = '';
} }
?> ?>
<div class="list-wrapper"> <div class="list-wrapper">
<ul class="value"> <ul class="value">
...@@ -285,7 +297,7 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -285,7 +297,7 @@ do_action('woocommerce_before_add_to_cart_form');
$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> <h1 class = "crete font-small info-attr" ><span class="info-format"><?php echo $format ; ?></span> <span class="info-color"><?php echo$_GET['pa_couleur'] ?></span></h1>
<div class="details font-small"> <div class="details font-small">
<p class="info-format-txt"><?php echo $format; ?></p> <p class="info-format-txt"><?php echo $format; ?></p>
<p class="pq"><?php echo nap_variable_meta($current_variationID, 'variation_description'); ?></p> <p class="pq"><?php echo nap_variable_meta($current_variationID, 'variation_description'); ?></p>
...@@ -314,7 +326,7 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -314,7 +326,7 @@ do_action('woocommerce_before_add_to_cart_form');
</div> </div>
<div class = "btn-list"> <div class = "btn-list">
<a href="<?php echo get_permalink(157); ?>" class="btn pink-btn rounded">Nous contacter</a> <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 class="btn pink-btn rounded download-btn download_file" data-fiche="<?php nap_var_fiche($available_variations);?>">Télécharger la fiche technique </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> <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>
<?php if(count($product->get_upsell_ids())): <?php if(count($product->get_upsell_ids())):
......
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