Skip to content

Commit

Permalink
Fix payment
Browse files Browse the repository at this point in the history
  • Loading branch information
voltan committed Dec 12, 2015
1 parent ccc23d3 commit 502332a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Front/PaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function indexAction()
$this->jump(array('', 'controller' => 'payment', 'action' => 'result'), __('Error to get information.'));
}
// Set view
$this->view()->setLayout('layout-content');
$this->view()->setLayout('layout-style');
$this->view()->setTemplate('pay');
$this->view()->assign('invoice', $invoice);
$this->view()->assign('form', $form);
Expand Down
2 changes: 1 addition & 1 deletion src/Form/PayForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ public function init()
)
)); */
}
}
}
17 changes: 10 additions & 7 deletions template/front/pay.phtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?php $this->css($this->assetModule('css/front.css')); ?>
<div class="clearfix">
<?php if (!empty($form)) { ?>
<?php echo $this->form($form); ?>
<script>document.pay.submit();</script>
<?php } ?>
</div>
<?php if (!empty($form)) { ?>
<?php echo $this->form($form); ?>
<script type="text/javascript">
function formAutoSubmit () {
var frm = document.getElementById("pay");
frm.submit();
}
window.onload = formAutoSubmit;
</script>
<?php } ?>

0 comments on commit 502332a

Please sign in to comment.