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

correction prix

parent 3fce8b5c
...@@ -13,6 +13,7 @@ jQuery(document).ready(function() { ...@@ -13,6 +13,7 @@ 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
...@@ -24,20 +25,24 @@ jQuery(document).ready(function() { ...@@ -24,20 +25,24 @@ jQuery(document).ready(function() {
}); });
jQuery(document).bind('change', 'input[name="variation_id"]', function() {
jQuery('li.format-list:first-child input').attr('checked', true);
jQuery(document).on('change', '.color-list input,.format-list input ', function() {
var varID = jQuery('input[name="variation_id"]').val(); var varID = jQuery('input[name="variation_id"]').val();
// alert(varID);
if (varID != 0) { if (varID != 0) {
var price = jQuery('.woocommerce-Price-amount').text(); var price = jQuery('.woocommerce-variation-price .woocommerce-Price-amount').text();
// alert(price); if(price == "")
{
price = jQuery('.summary .woocommerce-Price-amount').text();
}
var pq = jQuery('.woocommerce-variation-description').text(); var pq = jQuery('.woocommerce-variation-description').text();
jQuery('.price .crete').text(price +" ht"); jQuery('.price .crete').text(price + " ht");
jQuery('.pq').text(pq); jQuery('.pq').text(pq);
} }
});
jQuery('li.format-list:first-child input').attr('checked', true);
jQuery(document).on('change', '.color-list input,.format-list input ', function() {
var name = jQuery(this).attr('name'); var name = jQuery(this).attr('name');
if (jQuery(this).is(':checked') && name == 'attribute_pa_couleur') { if (jQuery(this).is(':checked') && name == 'attribute_pa_couleur') {
......
...@@ -273,6 +273,8 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -273,6 +273,8 @@ 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;?>
...@@ -283,7 +285,7 @@ do_action('woocommerce_before_add_to_cart_form'); ...@@ -283,7 +285,7 @@ do_action('woocommerce_before_add_to_cart_form');
<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>
</div> </div>
<div class="price"> <div class="price">
<span class="crete"><?php echo nap_variable_meta($current_variationID, 'price'); ?>€ ht</span> <span class="crete"><?php echo nap_variable_meta($current_variationID, 'price'); ?>€ ht</span>
<div class="notice">( prix public conseillé )</div> <div class="notice">( prix public conseillé )</div>
<div class="font-small"> <div class="font-small">
......
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