if ($images !== null && count($images) > 0) { $img = CHtml::image('/images/goods/xs_' . $images[0]->image); } else { $img = CHtml::image('/images/xs_empty.jpg'); } echo CHtml::link($img, $this->createUrl('good/view', array('id' => $good->id))); ?> </div> <div class="good_desc"> <?php echo CHtml::link($good->name, $this->createUrl('good/view', array('id' => $good->id))); $good->ShowRating(); echo '<div class="fix">'; $main_features = $good->GetMainAttributes(); foreach ($main_features as $main_feature) { echo $main_feature->attr->GetValue($main_feature->value); if (end($main_features) != $main_feature) { echo ', '; } } if ($good->price !== null && $good->price != 0) { echo '</div><div class="sm-price">Цена: ' . CAlexHelper::GetMoneyFormat($good->price) . ' руб.</div>'; } else { echo '</div><div><b>Нет в продаже</b></div>'; } ?> </div> </div> <?php $this->endCache(); }
jqPrettyPhoto::addPretty('.photo a', jqPrettyPhoto::PRETTY_GALLERY, jqPrettyPhoto::THEME_FACEBOOK, $options); ?> <br clear="both"/></div> <div class="defText clearfix"> <div class="prices price-inf"> <div>Цена: </div> <div class="price"> <?php if ($good->price == 0) { ?> <span class="b-prices__num">Нет в продаже</span> <?php } else { ?> <span class="b-prices__num"><?php echo CAlexHelper::GetMoneyFormat($good->price); ?> </span> <span class="b-prices__currency">руб.</span> <?php } ?> </div> </div> <div class="b-rating__with_text"> <?php $this->endCache(); } ?> <?php $good->ShowRating();
/** * get items count in shopping card */ public function actionGetCartQuantity() { $count = Yii::app()->shoppingCart->getItemsCount(); $cost = CAlexHelper::GetMoneyFormat(Yii::app()->shoppingCart->getCost()); echo $count . ',' . $cost; }
<td width="60%">Наименование товара</td> <td>Цена</td> <td>Кол-во</td> <td>Сумма</td> <td>Удалить</td> </tr> </thead> <tbody> <?php $positions = Yii::app()->shoppingCart->getPositions(); foreach ($positions as $position) { echo '<tr>'; echo '<td class="good-name">' . $position->GetGoodImage('xs') . CHtml::link($position->name, $this->createUrl('good/view', array('id' => $position->id))) . '</td>'; echo '<td><span id="one-price-' . $position->id . '">' . CAlexHelper::GetMoneyFormat($position->getPrice()) . '</span> руб.</td>'; echo '<td>' . CHtml::textField('good-quantity-' . $position->id, $position->getQuantity(), array('onkeyup' => 'SetNewQuantity(' . $position->id . ')', 'maxlength' => '10', 'size' => '3')) . '</td>'; echo '<td><span id="sum-price-' . $position->id . '">' . CAlexHelper::GetMoneyFormat($position->getSumPrice()) . '</span> руб.</td>'; echo '<td class="remove-good">' . CHtml::link('<img src="/images/delete.png" alt="" />', '', array('onclick' => 'DeleteItem(' . $position->id . ')')) . '</td>'; echo '</tr>'; } ?> </tbody> <tfoot> <td colspan=5> <div class="cart-sum">Итого: <span><?php $cost = (string) Yii::app()->shoppingCart->getCost(); echo CAlexHelper::GetMoneyFormat($cost); ?> руб.</span></div> </td> </tfoot>