<div class="front_page_section front_page_section_woocommerce<?php
$revirta_scheme = revirta_get_theme_option('front_page_woocommerce_scheme');
if (!revirta_is_inherit($revirta_scheme)) echo ' scheme_'.esc_attr($revirta_scheme);
echo ' front_page_section_paddings_'.esc_attr(revirta_get_theme_option('front_page_woocommerce_paddings'));
?>"<?php
$revirta_css = '';
$revirta_bg_image = revirta_get_theme_option('front_page_woocommerce_bg_image');
if (!empty($revirta_bg_image))
$revirta_css .= 'background-image: url('.esc_url(revirta_get_attachment_url($revirta_bg_image)).');';
if (!empty($revirta_css))
echo ' style="' . esc_attr($revirta_css) . '"';
?>><?php
// Add anchor
$revirta_anchor_icon = revirta_get_theme_option('front_page_woocommerce_anchor_icon');
$revirta_anchor_text = revirta_get_theme_option('front_page_woocommerce_anchor_text');
if ((!empty($revirta_anchor_icon) || !empty($revirta_anchor_text)) && shortcode_exists('trx_sc_anchor')) {
echo do_shortcode('[trx_sc_anchor id="front_page_section_woocommerce"'
. (!empty($revirta_anchor_icon) ? ' icon="'.esc_attr($revirta_anchor_icon).'"' : '')
. (!empty($revirta_anchor_text) ? ' title="'.esc_attr($revirta_anchor_text).'"' : '')
. ']');
}
?>
<div class="front_page_section_inner front_page_section_woocommerce_inner<?php
if (revirta_get_theme_option('front_page_woocommerce_fullheight'))
echo ' revirta-full-height sc_layouts_flex sc_layouts_columns_middle';
?>"<?php
$revirta_css = '';
$revirta_bg_mask = revirta_get_theme_option('front_page_woocommerce_bg_mask');
$revirta_bg_color = revirta_get_theme_option('front_page_woocommerce_bg_color');
if (!empty($revirta_bg_color) && $revirta_bg_mask > 0)
$revirta_css .= 'background-color: '.esc_attr($revirta_bg_mask==1
? $revirta_bg_color
: revirta_hex2rgba($revirta_bg_color, $revirta_bg_mask)
).';';
if (!empty($revirta_css))
echo ' style="' . esc_attr($revirta_css) . '"';
?>>
<div class="front_page_section_content_wrap front_page_section_woocommerce_content_wrap content_wrap woocommerce">
<?php
// Content wrap with title and description
$revirta_caption = revirta_get_theme_option('front_page_woocommerce_caption');
$revirta_description = revirta_get_theme_option('front_page_woocommerce_description');
if (!empty($revirta_caption) || !empty($revirta_description) || (current_user_can('edit_theme_options') && is_customize_preview())) {
// Caption
if (!empty($revirta_caption) || (current_user_can('edit_theme_options') && is_customize_preview())) {
?><h2 class="front_page_section_caption front_page_section_woocommerce_caption front_page_block_<?php echo !empty($revirta_caption) ? 'filled' : 'empty'; ?>"><?php
echo wp_kses_post($revirta_caption);
?></h2><?php
}
// Description (text)
if (!empty($revirta_description) || (current_user_can('edit_theme_options') && is_customize_preview())) {
?><div class="front_page_section_description front_page_section_woocommerce_description front_page_block_<?php echo !empty($revirta_description) ? 'filled' : 'empty'; ?>"><?php
echo wp_kses(wpautop($revirta_description), 'revirta_kses_content');
?></div><?php
}
}
// Content (widgets)
?><div class="front_page_section_output front_page_section_woocommerce_output list_products shop_mode_thumbs"><?php
$revirta_woocommerce_sc = revirta_get_theme_option('front_page_woocommerce_products');
if ($revirta_woocommerce_sc == 'products') {
$revirta_woocommerce_sc_ids = revirta_get_theme_option('front_page_woocommerce_products_per_page');
$revirta_woocommerce_sc_per_page = count(explode(',', $revirta_woocommerce_sc_ids));
} else {
$revirta_woocommerce_sc_per_page = max(1, (int) revirta_get_theme_option('front_page_woocommerce_products_per_page'));
}
$revirta_woocommerce_sc_columns = max(1, min($revirta_woocommerce_sc_per_page, (int) revirta_get_theme_option('front_page_woocommerce_products_columns')));
echo do_shortcode("[{$revirta_woocommerce_sc}"
. ($revirta_woocommerce_sc == 'products'
? ' ids="'.esc_attr($revirta_woocommerce_sc_ids).'"'
: '')
. ($revirta_woocommerce_sc == 'product_category'
? ' category="'.esc_attr(revirta_get_theme_option('front_page_woocommerce_products_categories')).'"'
: '')
. ($revirta_woocommerce_sc != 'best_selling_products'
? ' orderby="'.esc_attr(revirta_get_theme_option('front_page_woocommerce_products_orderby')).'"'
. ' order="'.esc_attr(revirta_get_theme_option('front_page_woocommerce_products_order')).'"'
: '')
. ' per_page="'.esc_attr($revirta_woocommerce_sc_per_page).'"'
. ' columns="'.esc_attr($revirta_woocommerce_sc_columns).'"'
. ']');
?></div>
</div>
</div>
</div>