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

correction prix

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