<h3 class="side-heading">Спецпредложение</h3> <?php foreach ($specialProduct as $topprod) { $price = ORM::factory('Product')->getPriceValue($topprod->id); ?> <div class="product-col"> <div class="image"> <a href="<?php echo $category->url; ?> /<?php echo $topprod->url; ?> "> <img src="<?php echo Lib_Image::resize_width($topprod->main_image, 'product', $topprod->id, 250, 250); ?> " alt="product" class="img-responsive" /> </a> </div> <div class="caption"> <div class="price"> <span class="price-new"><?php echo number_format($price, 0, ' ', ' '); ?> руб.</span> </div> <?php if ($topprod->new_price) { ?> <div class="price">
private function replace_images() { $model_name = get_class($this->_model); $content = preg_replace_callback('%(\\[.*\\])%isU', function ($match) { $more_images = json_decode($this->_model->more_images); if (!strstr($match[1], '|')) { $match[1] = str_replace(']', '|]', $match[1]); } $parts = explode('|', $match[1]); $image_num = str_replace('[image_', '', $parts[0]) - 1; $image_alt = str_replace(']', '', $parts[1]); if (isset($more_images[$image_num]) && ($image = $more_images[$image_num])) { return '<img src="' . Lib_Image::resize_width($image, mb_strtolower($this->_object_name), $this->_model->id, $model_name::BIG_WIDTH) . '" class="img-rounded" alt="' . $image_alt . '" />'; } }, $this->_model->content); return $content; }
$crt = ORM::factory('Certificate')->fetchCertificateById($certificate->id); $price = $crt->price; $resprice = $price * $certificate->quantity; $lastprice += $price * $certificate->quantity; ?> <tr data-cert-id="<?php echo $key; ?> "> <td class="text-center"> <a href="/sertificate/<?php echo $crt->url; ?> "> <img src="<?php echo Lib_Image::resize_width($crt->image, 'certificate', $crt->id, 128, null); ?> " alt="<?php echo $crt->name; ?> " title="image" class="img-thumbnail img-responsive" /> </a> </td> <td class="text-left"> <a data-name="prod_name" href="/sertificate/<?php echo $crt->url; ?> "> <?php echo $crt->name; ?>
<div class="container"> <div class="row"> <div class="breadcrumbs col-xs-12" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <strong>Вы здесь:</strong> <div><a href="/" itemprop="url"><span itemprop="title">Главная</span></a></div><div><span>Акции</span></div> </div> </div></div> <div class="clear"></div><div class="container"> <div class="row"> <div class="col-xs-12"> <h1>Акции</h1> </div> </div></div><div class="col-xs-12"> <?php echo $pagination; ?> </div><div class="container contant"> <div class="row"> <div class="polka"> <?php $discount = ORM::factory('Discount')->fetchActive(); foreach ($discount as $item) { ?> <div class="discount col-xs-4"> <div class="col-xs-12 image"><a href="/discount/<?php echo $item->url; ?> "><img src="<?php echo Lib_Image::resize_width($item->image, 'discount', $item->id, 290, null); ?> " alt="Акция - <?php echo $item->name; ?> " /></a></div> <div class="col-xs-12"><span class="from_to"><?php echo $item->from_to; ?> </span></div> <div class="col-xs-12 h1"><a href="/discount/<?php echo $item->url; ?> "><?php echo $item->name; ?> </a></div> <div class="col-xs-12"><?php