There is a snippet for wp woocommerce:
<script> jQuery(document).ready(function($) { $('select').blur( function(){ if( '' != $('input.variation_id').val() ){ $('p.price').html($('div.woocommerce-variation-price > span.price').html()).append('<p class="availability">'+$('div.woocommerce-variation-availability').html()+'</p>'); console.log($('input.variation_id').val()); } else { $('p.price').html($('div.hidden-variable-price').html()); if($('p.availability')) $('p.availability').remove(); console.log('NULL'); } }); }); </script>
It is necessary that the result was console.log - 10%
How to do this? You can tell, otherwise I don’t understand anything in jQuery.
* 0.9
I ask how to write the code correctly in jQuery. How to this$('p.price').html($('div.woocommerce-variation-price > span.price').html()).append('<p class="availability">'+$('div.woocommerce-variation-availability').html()+'</p>');
add this* 0.9
???? - Svetlana Zaitseva$price = 100; $price_got = $price * 0.9; echo $price_got; Ответ: 90;
$price = 100; $price_got = $price * 0.9; echo $price_got; Ответ: 90;
How to do it on jQuery in the above code? - Svetlana Zaitseva