Exemplo n.º 1
0
 /**
  * Sum orders total price
  *
  * @return string
  */
 public function getOrdersTotalPrice()
 {
     $total = 0;
     foreach ($this->getTodayOrders()->getData() as $order) {
         $total += $order->full_price;
     }
     return StoreProduct::formatPrice($total);
 }
Exemplo n.º 2
0
	 </a>
  </p>

  <p>
    <ul>
    <?php 
foreach ($order->products as $product) {
    echo '<li>' . $product->getRenderFullName() . "</li>";
}
?>
    </ul>
    
    <p>
      <b>Всего к оплате:</b>
      <?php 
echo StoreProduct::formatPrice($order->total_price + $order->delivery_price);
?>
 <?php 
echo Yii::app()->currency->main->symbol;
?>
    </p>

    <p>
      <b>Контактные данные:</b><br/>
      <?php 
echo implode('<br/>', array($order->user_name, $order->user_phone));
?>
 
    </p>

  </p>
Exemplo n.º 3
0
<?php

/**
 * Small cart.
 * This template is loaded thru ajax request after new product added to cart.
 */
?>
<div class="cart_left"></div>
<div class="cart_right">
	<a href="<?php 
echo Yii::app()->createUrl('/orders/cart/index');
?>
" class="light">
		<?php 
echo Yii::app()->cart->countItems();
?>
 товаров
		- <?php 
echo StoreProduct::formatPrice(Yii::app()->currency->convert(Yii::app()->cart->getTotalPrice()));
?>
		<?php 
echo Yii::app()->currency->active->symbol;
?>
	</a>
</div>
Exemplo n.º 4
0
$this->renderPartial('_configurations', array('model' => $model));
?>

		<div class="errors" id="productErrors"></div>
		
		<div style="clear: both;font-size: 16px">
			<?php 
if ($model->appliedDiscount) {
    echo '<span style="color:red; "><s>' . $model->toCurrentCurrency('originalPrice') . ' ' . Yii::app()->currency->active->symbol . '</s></span>';
}
?>
		</div>

		<div class="price">
			<span id="productPrice"><?php 
echo StoreProduct::formatPrice($model->toCurrentCurrency());
?>
</span>
			<?php 
echo Yii::app()->currency->active->symbol;
?>
		</div>
		<div style="clear:both;"></div>
				<div class="quantity">
            <?php 
echo CHtml::numberField("quantities[{$index}]", $product['quantity'], array('class' => 'count', 'placeholder' => '1'));
?>
        </div>
		<div class="actions">
			<?php 
echo CHtml::hiddenField('product_id', $model->id);
Exemplo n.º 5
0
</td>
			</tr>
			<tr align="right">
				<td><b><?php 
echo Yii::t('OrdersModule.admin', 'Сумма товаров');
?>
:</b></td>
				<td><span id="orderTotalPrice"><?php 
echo StoreProduct::formatPrice($model->total_price);
?>
</span><?php 
echo Yii::app()->currency->main->symbol;
?>
</td>
			</tr>
			<tr align="right" style="font-size: 14px;">
				<td><b><?php 
echo Yii::t('OrdersModule.admin', 'К оплате');
?>
:</b></td>
				<td><span id="orderSummary"><?php 
echo StoreProduct::formatPrice($model->full_price);
?>
</span><?php 
echo Yii::app()->currency->main->symbol;
?>
</td>
			</tr>
		</tbody>
	</table>
</div>
Exemplo n.º 6
0
        </tbody>
    </table>


    <div class="cart-collaterals">

    <div class="cart_totals ">
        <h2>К оплате</h2>

        <table cellspacing="0">
            <tbody>
            <tr class="order-total">
                <th>Всего</th>
                <td><strong><span class="amount">
                            <?php 
echo StoreProduct::formatPrice($totalPrice);
?>
                            <?php 
echo Yii::app()->currency->active->symbol;
?>
                        </span></strong> </td>
            </tr>
            </tbody>
        </table>



    </div>

    </div>
    <div class="order_data">
Exemplo n.º 7
0

	<?php 
/*foreach($model->deliveryMethod->paymentMethods as $payment): ?>
	<div class="order_data mt10 ">
		<div class="user_data rc5 activeHover">
			<h3><?php echo $payment->name ?></h3>
			<p><?php echo $payment->description ?></p>
			<p><?php echo $payment->renderPaymentForm($model) ?></p>
		</div>
	</div>
	<?php endforeach */
?>


	<div class="recount cart_totals ">
		<span class="total">Всего к оплате:</span>
		<span id="total">
			<?php 
echo StoreProduct::formatPrice(Yii::app()->currency->convert($model->full_price));
?>
			<?php 
echo Yii::app()->currency->active->symbol;
?>
		</span>
	</div>

	<div style="clear: both;"></div>
</div>
</div>
Exemplo n.º 8
0
<?php

$orders_msg = Yii::t('UsersModule.admin', 'Заказов: {count} на сумму {sum} {sym}', array('{count}' => sizeof($model->orders), '{sum}' => StoreProduct::formatPrice($model->ordersTotalPrice), '{sym}' => Yii::app()->currency->main->symbol));
$comments_msg = Yii::t('UsersModule.admin', 'Комментариев: {count}', array('{count}' => $model->commentsCount));
?>


<h3><?php 
echo Yii::t('UsersModule.admin', 'Дополнительно');
?>
</h3>

<a href="/admin/orders/orders/?Order[user_id]=<?php 
echo $model->id;
?>
"><?php 
echo $orders_msg;
?>
</a><br>
<a href="/admin/comments/index/?Comment[user_id]=<?php 
echo $model->id;
?>
"><?php 
echo $comments_msg;
?>
</a>
Exemplo n.º 9
0
                        </div>
                        <h2>
                            <?php 
echo CHtml::link(CHtml::encode($data->name), array('frontProduct/view', 'url' => $data->url), array('title' => $title));
?>
                        </h2>
                        <div class="product-carousel-price">
                            <?php 
/*
	if($data->appliedDiscount)
	echo '<span style=""><s>'.$data->toCurrentCurrency('originalPrice').'</s></span>';
*/
?>
							<div class="price">
								<?php 
echo (int) StoreProduct::formatPrice($data->toCurrentCurrency());
?>
                                                                <?php 
echo Yii::app()->currency->active->symbol;
?>
							</div>
                        </div>  

                        <div class="product-option-shop">
                            
                                    <?php 
///форма для отправки данных о добавлении товара в карзину
echo CHtml::form(array('/cart/add'), 'post', array('id' => 'prod' . $data->id));
echo CHtml::hiddenField('product_id', $data->id);
echo CHtml::hiddenField('product_price', (int) $data->price);
echo CHtml::hiddenField('use_configurations', $data->use_configurations);
Exemplo n.º 10
0
	 </a>
  </p>

  <p>
    <ul>
    <?php 
foreach ($order->products as $product) {
    echo '<li>' . $product->getRenderFullName() . "</li>";
}
?>
    </ul>
    
    <p>
      <b>Всего к оплате:</b>
      <?php 
echo (int) Yii::app()->currency->convert(StoreProduct::formatPrice($order->total_price + $order->delivery_price));
?>
 
      <?php 
echo Yii::app()->currency->active->symbol;
?>
    </p>

    <p>
      <b>Контактные данные:</b><br/>
      <?php 
echo implode('<br/>', array($order->user_name, $order->user_phone));
?>
 
    </p>
Exemplo n.º 11
0
 /**
  * Get ordered products in json format.
  * Result is displayed in the orders list.
  */
 public function actionJsonOrderedProducts()
 {
     $model = $this->_loadModel(Yii::app()->request->getQuery('id'));
     $data = array();
     foreach ($model->getOrderedProducts()->getData() as $product) {
         $data[] = array('name' => $product->renderFullName, 'quantity' => $product->quantity, 'price' => StoreProduct::formatPrice($product->price));
     }
     echo CJSON::encode($data);
 }