예제 #1
0
        <?php 
echo $product['description'];
?>
        <br><br>
        <?php 
if ($product['available']) {
    echo '<h5><span class="glyphicon glyphicon-ok text-success"></span> &nbsp;Есть в наличии</h5>';
} else {
    echo '<h5><span class="glyphicon glyphicon-remove text-danger"></span> Нет в наличии</h5>';
}
?>
        <br>
        <?php 
if (!empty($product['priceByr'])) {
    $pricePerMeasure = trim($product['measure'], '.') != 'шт' ? " р. / {$product['measure']}" : ' р.';
    $ph->tag_open('h4')->text('Цена : ')->tag('span', CurrencyHelper::price_byr($product['priceByr']), ['class' => 'text-info', 'style' => 'font-weight: bold; font-size:20px', 'data-toggle' => 'tooltip', 'title' => 'цена после деноминации'])->text($pricePerMeasure)->tag('span', '&nbsp;&nbsp; (' . CurrencyHelper::price_byr_before_denomination($product['priceByr']) . $pricePerMeasure . ')', ['style' => 'font-size:13px; color: #747474;', 'data-toggle' => 'tooltip', 'title' => 'цена до деноминации']);
    $ph->tag_close('h4');
} else {
    $ph->tag_open('h4')->link('Цену уточняйте', '/contacts')->tag_close('h4');
}
?>
        <br>
        <h4>Приобрести данный товар можно по телефонам:</h4>
        МТС : <?php 
$ph->link('8 029 850 40 85', '/contacts');
?>
        <br>
        Velcom : <?php 
$ph->link('8 044 461 09 06', '/contacts');
?>
예제 #2
0
<?php

use application\helpers\CurrencyHelper;
?>

<div class="col-sm-3">
    <div class="product-container text-center">
        <?php 
$ph->tag_open('a', ['href' => $ph->url($_product['fullUrl']), 'class' => 'image-container'])->tag('img', null, ['src' => !empty($_product['imagePath']) ? $ph->path($_product['imagePath']) : $ph->image_path('no-photo.jpg'), 'class' => 'image'])->tag_close('a')->link($_product['name'], $_product['fullUrl'], ['class' => 'name']);
?>
        <div class="price-container">
            <?php 
if ($_product['available']) {
    if (!empty($_product['priceByr'])) {
        $ph->tag('span', CurrencyHelper::price_byr($_product['priceByr']), ['class' => 'price', 'data-toggle' => 'tooltip', 'title' => 'цена после деноминации'])->tag('span', ' р. ', ['class' => 'price-currency'])->tag('span', '&nbsp; / &nbsp; <span>' . CurrencyHelper::price_byr_before_denomination($_product['priceByr']) . '</span> р.', ['class' => 'price-before-denomination', 'data-toggle' => 'tooltip', 'title' => 'цена до деноминации']);
    } else {
        $ph->tag('span', 'Цену уточняйте', ['class' => 'price-currency']);
    }
} else {
    $ph->tag('span', 'Нет в наличии', ['class' => 'not-available']);
}
?>
        </div>
        <?php 
$ph->link('<i class="glyphicon glyphicon-plus"></i>Подробнее', $_product['fullUrl'], ['class' => 'btn btn-default read-more']);
?>
    </div>
</div>

<script>
    $(function () {     // activate bootstrap tooltips