change cart to plain post from ajax
This commit is contained in:
@@ -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