Skip to content

Commit

Permalink
Sort order added. Closes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimehgb committed Mar 13, 2017
1 parent b09762c commit ed7c305
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions upload/admin/controller/payment/mycelium.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function index() {
*/

$this->setting('expiration_period', $this->request->post['mycelium_expiration_period']);
$this->setting('sort_order', $this->request->post['mycelium_sort_order']);
$this->setting('geo_zone_id', $this->request->post['mycelium_geo_zone_id']);
$this->setting('status', $this->request->post['mycelium_status']);
$this->setting('paid_status', $this->request->post['mycelium_paid_status']);
Expand Down Expand Up @@ -87,6 +88,7 @@ public function index() {
$data['entry_shifty'] = $this->language->get('entry_shifty');
$data['entry_reuse_time'] = $this->language->get('entry_reuse_time');

$data['entry_sort_order'] = $this->language->get('entry_sort_order');
$data['entry_geo_zone'] = $this->language->get('entry_geo_zone');
$data['entry_status'] = $this->language->get('entry_status');
$data['entry_paid_status'] = $this->language->get('entry_paid_status');
Expand Down Expand Up @@ -169,6 +171,7 @@ public function index() {
$data['mycelium_gateway_xpub'] = (isset($this->request->post['mycelium_gateway_xpub'])) ? $this->request->post['mycelium_gateway_xpub'] : $this->setting('gateway_xpub');
$data['mycelium_expiration_period'] = (isset($this->request->post['mycelium_expiration_period'])) ? $this->request->post['mycelium_expiration_period'] : $this->setting('expiration_period');
$data['mycelium_shifty_enabled'] = (isset($this->request->post['mycelium_shifty_enabled'])) ? $this->request->post['mycelium_shifty_enabled'] :$this->setting('shifty_enabled');
$data['mycelium_sort_order'] = (isset($this->request->post['mycelium_sort_order'])) ? $this->request->post['mycelium_sort_order'] : $this->setting('sort_order');
$data['mycelium_geo_zone_id'] = (isset($this->request->post['mycelium_geo_zone_id'])) ? $this->request->post['mycelium_geo_zone_id'] : $this->setting('geo_zone_id');
$data['mycelium_status'] = (isset($this->request->post['mycelium_status'])) ? $this->request->post['mycelium_status'] : $this->setting('status');
$data['mycelium_reuse_time'] = (isset($this->request->post['mycelium_reuse_time'])) ? $this->request->post['mycelium_reuse_time'] : $this->setting('address_reuse_time');
Expand Down Expand Up @@ -417,6 +420,7 @@ public function install() {
'mycelium_test_mode' => 'false',
'mycelium_convert_to' => 'BTC',
'mycelium_email_notifications' => 'false',*/
'mycelium_sort_order' => null,
'mycelium_geo_zone_id' => '0',
'mycelium_status' => '0',
'mycelium_paid_status' => $default_paid,
Expand Down
1 change: 1 addition & 0 deletions upload/admin/language/english/payment/mycelium.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
$_['entry_return_url'] = 'Return URL';
$_['entry_back_url'] = 'Back/Cancel URL';
$_['entry_expiration_period']= 'Order expiration period';
$_['entry_sort_order'] = 'Sort Order';
$_['entry_geo_zone'] = 'Geo Zone';
$_['entry_status'] = 'Status';
$_['entry_paid_status'] = 'Paid Status';
Expand Down
10 changes: 9 additions & 1 deletion upload/admin/view/template/payment/mycelium.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
</div>
</div>
-->
<div class="form-group">
<div class="form-group">
<label class="col-sm-2 control-label" for="input-shifty"><span data-toggle="tooltip" title="<?php echo $help_shifty; ?>"><?php echo $entry_shifty; ?></span></label>
<div class="col-sm-10">
<select name="mycelium_shifty_enabled" id="input-shifty" class="form-control">
Expand All @@ -138,6 +138,13 @@
</select>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label" for="input-sort-order"><?php echo $entry_sort_order; ?></label>
<div class="col-sm-10">
<input type="text" name="mycelium_sort_order" class="form-control" value="<?php echo $mycelium_sort_order; ?>" />
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label" for="input-geo-zone"><?php echo $entry_geo_zone; ?></label>
Expand All @@ -156,6 +163,7 @@
</div>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label" for="input-status"><?php echo $entry_status; ?></label>
<div class="col-sm-10">
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/model/payment/mycelium.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function getMethod($address) {
'code' => 'mycelium',
'title' => $title,
'terms' => '',
'sort_order' => $this->config->get('cod_sort_order')
'sort_order' => $this->mycelium->setting('sort_order')
);
}
}
Expand Down

1 comment on commit ed7c305

@jaimehgb
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be reinstalled to work fine.

Please sign in to comment.