add customer cart
This commit is contained in:
@@ -33,4 +33,4 @@ use yii\bootstrap\Html;
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo Html::a(Yii::t('frontend/product', "Fizetve"),null,[ 'id' => 'btn_paid', 'class' => 'btn btn-primary' ]) ?>
|
||||
<?php echo Html::a(Yii::t('frontend/product', "Fizetve"),null,[ 'id' => 'btn_pay_customer_cart', 'class' => 'btn btn-primary' ]) ?>
|
||||
@@ -69,7 +69,8 @@ $discountOptions = mkOptions( ArrayHelper::map($discounts, 'id_discount', 'name'
|
||||
]
|
||||
); ?>
|
||||
<?php echo Html::activeHiddenInput($model, 'id_product') ?>
|
||||
<?php echo Html::activeHiddenInput($model, 'append_to_sold_list') ?>
|
||||
<?php echo Html::activeHiddenInput($model, 'cart') ?>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class='col-md-12'>
|
||||
@@ -104,7 +105,11 @@ $discountOptions = mkOptions( ArrayHelper::map($discounts, 'id_discount', 'name'
|
||||
<?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'] );?>
|
||||
<?php
|
||||
if ( isset($model->card) ){
|
||||
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(); ?>
|
||||
@@ -3,10 +3,10 @@ use yii\bootstrap\Html;
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<h1><?php echo Yii::t('frontend/product','User Cart')?></h1>
|
||||
<div class="row">
|
||||
<div class='col-md-12 '>
|
||||
<div class="sold-items-container">
|
||||
<div class="user-cart">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -33,3 +33,4 @@ use yii\bootstrap\Html;
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo Html::a(Yii::t('frontend/product', "Paid"),null,[ 'id' => 'btn_pay_user_cart', 'class' => 'btn btn-primary' ]) ?>
|
||||
@@ -19,8 +19,12 @@ ProductSellAsset::register($this);
|
||||
$options = [];
|
||||
|
||||
$options['lookup_product_url'] = Url::toRoute(['product/lookup']);
|
||||
$options['clear_list_url'] = Url::toRoute(['product/clear-list']);
|
||||
$options['sold_items'] = $userTransfers;
|
||||
$options['url_pay_user_cart'] = Url::toRoute(['product/payout-user-cart']);
|
||||
$options['user_cart'] = $userTransfers;
|
||||
if ( isset($model->card) ){
|
||||
$options['url_pay_customer_card'] = Url::toRoute(['product/payout-customer-cart','number' => $model->card->number]);
|
||||
$options['customer_cart'] = $model->customerCart;
|
||||
}
|
||||
$options['discounts'] = Discount::modelsToArray($discounts);
|
||||
|
||||
|
||||
@@ -77,14 +81,10 @@ $this->registerJs ( 'new ProductSell( '. json_encode($options).');' );
|
||||
<?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' ]) ?>
|
||||
|
||||
|
||||
|
||||
<?php if ( isset($card) ){ ?>
|
||||
<?php echo $this->render('_customer_cart' ) ?>
|
||||
<?php }?>
|
||||
<?php echo $this->render('_user_cart' ) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user