Lorem ipsum

META get value množstevní sleva discount

<script>
$(document).ready(function(){
$('<span class="add6">Koupit celý karton (6 lahví).</span><span>Získáte slevu <strong style=" color: #009901">10%</strong> a lahev vás vyjde jen na <strong><span>sleva</span> Kč.</span></strong>').appendTo('.type-product .p-to-cart-block');
$('.add6').click(function() {
$(".type-product.quantity input").val("6");
$('.p-to-cart-block .add-to-cart-button').trigger('click');
});
var attr = document.querySelector('meta[itemprop="price"]').getAttribute('content');
var mult = attr * 0.1; // gives the value for subtract from main value
var discont = attr - mult;
$('.type-product .add6 + span strong > span').text(discont);
});
</script>