change cart to plain post from ajax
This commit is contained in:
@@ -7,6 +7,13 @@ use yii\base\Widget;
|
||||
use frontend\components\ReceptionTicketWidget;
|
||||
use frontend\components\ReceptionCustomerWidget;
|
||||
?>
|
||||
<div class='row'>
|
||||
<div class='col-md-4'>
|
||||
<div class="alert alert-info">
|
||||
Aktuális kassza: <?php echo $model->getDefaultAccountName();?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-3'>
|
||||
<?php echo ReceptionMenuWidget::widget( [ 'model' => $model ] ) ?>
|
||||
@@ -20,4 +27,4 @@ use frontend\components\ReceptionCustomerWidget;
|
||||
<div class='col-md-3'>
|
||||
<?php echo ReceptionTicketWidget::widget([ 'model' => $model ] ) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
use yii\bootstrap\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
?>
|
||||
|
||||
|
||||
@@ -35,9 +36,9 @@ use yii\bootstrap\Html;
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class='col-md-3 '>
|
||||
<?php echo Html::a(Yii::t('frontend/product', "Paid"),null,[ 'id' => 'btn_pay_customer_cart', 'class' => 'btn btn-primary btn-block' , 'name' => 'payout_customer_cart']) ?>
|
||||
<?php echo Html::a(Yii::t('frontend/product', "Paid"),"javascript: $('#frm_customer_cart').submit()",[ 'id' => 'btn_pay_customer_cart', 'class' => 'btn btn-primary btn-block' , 'name' => 'payout_customer_cart']) ?>
|
||||
</div>
|
||||
<div class='col-md-3 '>
|
||||
<?php echo Html::a(Yii::t('frontend/product', "Frissít"),null,[ 'class' => 'btn btn-primary btn-block' , 'onclick' => 'location.reload();']) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,9 +39,7 @@ use kartik\widgets\ActiveForm;
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class='col-md-3 '>
|
||||
<?php $form = ActiveForm::begin([]); ?>
|
||||
<?php echo Html::submitButton( Yii::t('frontend/product', "Paid"), [ 'id' => 'btn_pay_user_cart', 'class' => 'btn btn-primary btn-block' , 'name' => 'payout_user_cart']) ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
<?php echo Html::a( Yii::t('frontend/product', "Paid"), "javascript: $('#frm_user_cart').submit()",[ 'id' => 'btn_pay_user_cart', 'class' => 'btn btn-primary btn-block' , 'name' => 'payout_user_cart']) ?>
|
||||
</div>
|
||||
<div class='col-md-3 '>
|
||||
<?php echo Html::a(Yii::t('frontend/product', "Frissít"),null,[ 'class' => 'btn btn-primary btn-block' , 'onclick' => 'location.reload();']) ?>
|
||||
|
||||
@@ -18,7 +18,7 @@ $options = [];
|
||||
|
||||
$options['lookup_product_url'] = Url::toRoute(['product/lookup']);
|
||||
$options['find_product_url'] = Url::toRoute(['product/find']);
|
||||
$options['url_pay_user_cart'] = Url::toRoute(['product/payout-user-cart']);
|
||||
$options['url_pay_user_cart'] = Url::toRoute(['product/payout-user-cart' , 'number' =>isset($model->card) ? $model->card->number : '']);
|
||||
$options['url_delete_transaction'] = Url::toRoute(['transfer/delete']);
|
||||
$options['url_pay_transaction'] = Url::toRoute(['transfer/payout']);
|
||||
$options['user_cart'] = $userTransfers;
|
||||
@@ -95,7 +95,7 @@ $this->params['breadcrumbs'][] = Yii::t('frontend/product', 'Sale');
|
||||
</div>
|
||||
<div class='col-md-6'>
|
||||
<?php if ( $receptionForm->isCardWithCustomer() ){ ?>
|
||||
<?php echo $this->render('_customer_cart' ) ?>
|
||||
<?php echo $this->render('_customer_cart' , ['model' => $model]) ?>
|
||||
<?php }?>
|
||||
<?php echo $this->render('_user_cart' ) ?>
|
||||
|
||||
|
||||
@@ -33,9 +33,10 @@ use kartik\widgets\ActiveForm;
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class='col-md-3 '>
|
||||
<?php echo Html::a(Yii::t('frontend/product', "Paid"),"javascript: $('#frm_customer_cart').submit()",[ 'id' => 'btn_pay_customer_cart', 'class' => 'btn btn-primary btn-block' , 'name' => 'payout_customer_cart']) ?>
|
||||
</div>
|
||||
<div class='col-md-3 '>
|
||||
<?php $form = ActiveForm::begin([]); ?>
|
||||
<?php echo Html::submitButton( Yii::t('frontend/product', "Paid") , [ 'id' => 'btn_pay_user_cart', 'class' => 'btn btn-primary btn-block', 'name' => 'payout_customer_cart' ] ) ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
<?php echo Html::a(Yii::t('frontend/product', "Frissít"),null,[ 'class' => 'btn btn-primary btn-block' , 'onclick' => 'location.reload();']) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,8 +36,9 @@ use kartik\widgets\ActiveForm;
|
||||
</div>
|
||||
<div class='row' >
|
||||
<div class='col-md-3'>
|
||||
<?php $form = ActiveForm::begin([]); ?>
|
||||
<?php echo Html::submitButton(Yii::t('frontend/product', "Paid"),[ 'id' => 'btn_pay_user_cart', 'class' => 'btn btn-primary btn-block' , 'name' => 'payout_user_cart']) ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
<?php echo Html::a( Yii::t('frontend/product', "Paid"), "javascript: $('#frm_user_cart').submit()",[ 'id' => 'btn_pay_user_cart', 'class' => 'btn btn-primary btn-block' , 'name' => 'payout_user_cart']) ?>
|
||||
</div>
|
||||
<div class='col-md-3 '>
|
||||
<?php echo Html::a(Yii::t('frontend/product', "Frissít"),null,[ 'class' => 'btn btn-primary btn-block' , 'onclick' => 'location.reload();']) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -29,10 +29,16 @@ $options = [];
|
||||
$options['clear_cart_url'] = Url::toRoute(['product/clear-list']);
|
||||
$options['types'] = TicketType::modelsToArray($ticketTypes);
|
||||
$options['user_cart'] = $model->userCart;
|
||||
$options['customer_cart'] = $model->customerCart;
|
||||
// $options['customer_cart'] = $model->customerCart;
|
||||
$options['selected_type'] = count($ticketTypes) > 0 ? $ticketTypes[0]->id_ticket_type : 0;
|
||||
$options['url_delete_transaction'] = Url::toRoute(['transfer/delete']);
|
||||
$options['url_pay_transaction'] = Url::toRoute(['transfer/payout']);
|
||||
$options['url_pay_user_cart'] = Url::toRoute(['product/payout-user-cart' , 'number' =>isset($receptionForm->card) ? $receptionForm->card->number : '']);
|
||||
|
||||
if ( isset($receptionForm->card) ){
|
||||
$options['url_pay_customer_card'] = Url::toRoute(['product/payout-customer-cart','number' => $receptionForm->card->number]);
|
||||
$options['customer_cart'] = $model->customerCart;
|
||||
}
|
||||
|
||||
$this->registerJs ( 'new TicketSell( '. json_encode($options).');' );
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user