<script>
jQuery(document).ready(function ($) {
// razmer
$('#pa_razmer').change(function () {
var th = $(this).find(':selected').val();
if (th == 'svoj-razmer') {
$('#pa_razmer')
.parents('.value')
.append('' +
'<div class="rz_block">' +
'<div class="inprz">' +
'<label for="rz1">' +
'<span><?php echo carbon_get_theme_option("crb_breast_level" . get_lang()); ?></span> <a data-fancybox="gallery" data-caption="<?php echo carbon_get_theme_option("crb_breast_level" . get_lang()); ?>" href="/wp-content/themes/benefis/img/rz/1.jpg"><i class="fa fa-question-circle" aria-hidden="true"></i></a>' +
'</label> <input name="rz1" type="text" class="custom_rz" value="" >' +
'</div>' +
'<div class="inprz"><label for="rz28"><span><?php echo carbon_get_theme_option("crb_tutu_length" . get_lang()); ?></span> <a data-fancybox="gallery" data-caption="<?php echo carbon_get_theme_option("crb_tutu_length" . get_lang()); ?>" href="/wp-content/themes/benefis/img/rz/28.jpg"><i class="fa fa-question-circle" aria-hidden="true"></i></a></label> <input name="rz28" type="text" class="custom_rz" value="" >' +
'</div>' +
'<input name="_custom_option" type="hidden" class="custom_rz" id="allval" value="">' +
'</div>' +
'');
//.append
} else {
$('.rz_block').remove();
}
});
$('.variations_form.cart').on('submit', function () {
var name,
value,
allrz = '';
$('.inprz').each(function () {
name = $(this).find('label > span').html();
value = $(this).find('input').val();
allrz += name + ": " + value + "; ";
});
$('#allval').val(allrz);
});
});
</script>
<div class="woocommerce">
<div class="bs-content">
<h2 class="products-section__title"><?php echo get_the_category_by_ID(376); ?></h2>
<div class="bs-products-loops">
<?php
$products = new WP_Query([
'post_type' => 'product',
'posts_per_page' => 10,
'product_cat' => 'ready-made-products'
]);
?>
<?php if ($products->have_posts()): ?>
<?php while ($products->have_posts()): ?><?php $products->the_post(); ?>
<?php do_action('woocommerce_product_loop_start'); ?>
<?php wc_get_template_part('content', 'product'); ?>
<?php do_action('woocommerce_product_loop_end'); ?>
<?php endwhile; ?><?php wp_reset_postdata(); ?>
<?php else: ?><?php endif; ?>
</div>
<h2 class="products-section__title"><?php echo get_the_category_by_ID(380); ?></h2>
<div class="bs-products-loops">
<?php
$products_proposal = new WP_Query([
'post_type' => 'product',
'posts_per_page' => 10,
'product_cat' => 'new-proposals'
]);
?>
<?php if ($products_proposal->have_posts()): ?>
<?php while ($products_proposal->have_posts()): ?><?php $products_proposal->the_post(); ?>
<?php do_action('woocommerce_product_loop_start'); ?>
<?php wc_get_template_part('content', 'product'); ?>
<?php do_action('woocommerce_product_loop_end'); ?>
<?php endwhile; ?><?php wp_reset_postdata(); ?>
<?php else: ?><?php endif; ?>
</div>
</div>
</div>