add customer cart

This commit is contained in:
2015-10-21 17:57:16 +02:00
parent baf7c79d04
commit 23a0390a27
14 changed files with 467 additions and 16 deletions

View File

@@ -0,0 +1,36 @@
<?php
use yii\bootstrap\Html;
?>
<h1><?php echo Yii::t('frontend/product','Customer cart')?></h1>
<div class="row">
<div class='col-md-12 '>
<div class="customer-cart">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
<?php echo Yii::t('frontend/product', 'Product name')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Count')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Currency')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Item Price')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Total Price')?>
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<?php echo Html::a(Yii::t('frontend/product', "Fizetve"),null,[ 'id' => 'btn_paid', 'class' => 'btn btn-primary' ]) ?>

View File

@@ -97,11 +97,14 @@ $discountOptions = mkOptions( ArrayHelper::map($discounts, 'id_discount', 'name'
</div>
</div>
<div class="row">
<div class='col-md-5'>
<div class='col-md-4'>
<?php echo Html::a(Yii::t("frontend/product","Sell product"),null,['class' => 'btn btn-success', 'id' => 'btn_sell'] );?>
</div>
<div class='col-md-7'>
<?php echo Html::a(Yii::t("frontend/product","Sell product and add to total"),null,['class' => 'btn btn-success', 'id' => 'btn_sell_append'] );?>
<div class='col-md-4'>
<?php echo Html::a(Yii::t("frontend/product","To cart"),null,['class' => 'btn btn-success', 'id' => 'btn_sell_append'] );?>
</div>
<div class='col-md-4'>
<?php echo Html::a(Yii::t("frontend/product","Write up"),null,['class' => 'btn btn-success', 'id' => 'btn_add_to_customer_cart'] );?>
</div>
</div>
<?php ActiveForm::end(); ?>

View File

@@ -74,11 +74,17 @@ $this->registerJs ( 'new ProductSell( '. json_encode($options).');' );
<div class='row '>
<div class='col-md-6 product-form'>
<h1><?php echo Yii::t('frontend/product','Sell product')?></h1>
<?php echo $this->render('_sale_form' ,['model' =>$model , 'lookupModel' =>$lookupModel, 'currencies' => $currencies, 'accounts' => $accounts,'discounts' => $discounts,]) ?>
<?php echo $this->render('_sale_form' ,['model' =>$model , 'lookupModel' =>$lookupModel, 'currencies' => $currencies, 'accounts' => $accounts,'discounts' => $discounts ]) ?>
</div>
<div class='col-md-6'>
<?php echo $this->render('_customer_cart' ) ?>
<h1><?php echo Yii::t('frontend/product','Cart')?></h1>
<?php echo $this->render('_sold_items' ) ?>
<?php echo Html::a(Yii::t('frontend/product', "Paid"),null,[ 'id' => 'btn_paid', 'class' => 'btn btn-primary' ]) ?>
</div>
</div>