示例#1
0
<?php

/**
 * Template part used for tour price presentation.
 *
 * @author    Themedelight
 * @package   Themedelight/AdventureTours
 * @version   1.0.0
 */
global $product;
$price_html = $product->get_price_html();
$class_without_price = $price_html ? '' : ' price-decoration--without-price';
$label_text = apply_filters('adventure_tours_price_decoration_label', esc_html__('One tour per person', 'adventure-tours'), $product);
$class_without_label = $label_text ? '' : ' price-decoration--without-label';
printf('<div class="price-decoration block-after-indent%s">', esc_attr($class_without_price . $class_without_label));
if ($price_html) {
    printf('<div class="price-decoration__value"><i class="td-price-tag"></i>%s</div>', $price_html);
}
if ($label_text) {
    printf('<div class="price-decoration__label">%s</div>', esc_html($label_text));
}
if ($product->is_type('tour')) {
    adventure_tours_renders_tour_badge(array('tour_id' => $product->id, 'css_class' => 'price-decoration__label-round', 'text_before' => '<span>', 'text_after' => '</span>'));
}
print '</div>';
示例#2
0
				<div class="atgrid__item__top">
					<?php 
    printf('<a href="%s" class="atgrid__item__top__image">%s</a>', esc_url($item_url), $image_html ? $image_html : $placeholder_image);
    ?>
					<?php 
    if ('highlighted' == $view_settings['price_style']) {
        ?>
						<?php 
        $badge = adventure_tours_di('tour_badge_service')->get_tour_badge($item_id);
        printf('<a href="%s" class="price-round"%s><span class="price-round__content">%s</span></a>', esc_url($item_url), isset($badge['color']) ? ' style="background-color:' . esc_attr($badge['color']) . '"' : '', $price_html);
        ?>
					<?php 
    } else {
        ?>
						<?php 
        adventure_tours_renders_tour_badge(array('tour_id' => $item_id, 'wrap_css_class' => 'atgrid__item__angle-wrap', 'css_class' => 'atgrid__item__angle'));
        ?>
						<?php 
        if ($price_html) {
            printf('<div class="atgrid__item__price"><a href="%s" class="atgrid__item__price__button">%s</a></div>', esc_url($item_url), $price_html);
        }
        ?>
					<?php 
    }
    ?>
					<?php 
    adventure_tours_renders_stars_rating($item->get_average_rating(), array('before' => '<div class="atgrid__item__rating">', 'after' => '</div>'));
    ?>
					<?php 
    if ($view_settings['show_categories']) {
        adventure_tours_render_tour_icons(array('before' => '<div class="atgrid__item__icons">', 'after' => '</div>'), $item_id);
示例#3
0
    adventure_tours_render_product_attributes(array('before' => '<div class="item-attributes item-attributes--style2">', 'after' => '</div>', 'before_each' => '<div class="item-attributes__item">', 'after_each' => '</div>', 'limit' => 3), $item_id);
    $attributes = ob_get_clean();
    ?>
		<div class="atlist__item margin-bottom">
			<div class="atlist__item__image">
			<?php 
    printf('<a class="atlist__item__image-wrap" href="%s">%s</a>', esc_url($permalink), $thumb_html ? $thumb_html : adventure_tours_placeholder_img($view_settings['image_size']));
    ?>
			<?php 
    if ($view_settings['show_categories']) {
        adventure_tours_render_tour_icons(array('before' => '<div class="atlist__item__icons">', 'after' => '</div>'));
    }
    ?>
			<?php 
    if ($item->is_type('tour')) {
        adventure_tours_renders_tour_badge(array('tour_id' => get_the_ID(), 'wrap_css_class' => 'atlist__item__angle-wrap', 'css_class' => 'atlist__item__angle'));
    }
    ?>
			</div>
			<div class="atlist__item__content<?php 
    if (!$attributes) {
        echo ' atlist__item__content--full-height';
    }
    ?>
">
				<div class="atlist__item__content__items">
					<div class="atlist__item__content__item">
						<h2 class="atlist__item__title"><a href="<?php 
    echo esc_url($permalink);
    ?>
"><?php