Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-wm committed Apr 3, 2015
2 parents 0f7dc4c + 8559919 commit c827434
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 24 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Expand Up @@ -5,9 +5,14 @@
* Mail config hostname variable (https://github.com/opencart/opencart/issues/2840)
* Order status id INT size in install.sql (https://github.com/opencart/opencart/issues/2820)
* Fix admin alert email for new customer.
* Product review fixed when error message is returned.
* Pagination fix in sale/recurring (https://github.com/opencart/opencart/pull/2853)

#### Changes
* Added pre & post triggers for customer log in
* Order modified success string changed (https://github.com/opencart/opencart/pull/2817)
* Changed the PayPal Express max amount calculation to be currency specific (https://github.com/opencart/opencart/issues/2836)
* Worldpay signup icon link changed to new URL.

#### Added

Expand Down
6 changes: 3 additions & 3 deletions upload/admin/controller/sale/recurring.php
Expand Up @@ -126,8 +126,8 @@ protected function getList() {
'filter_date_added' => $filter_date_added,
'order' => $order,
'sort' => $sort,
'start' => ($page - 1) * $this->config->get('config_admin_limit'),
'limit' => $this->config->get('config_admin_limit'),
'start' => ($page - 1) * $this->config->get('config_limit_admin'),
'limit' => $this->config->get('config_limit_admin'),
);

$recurrings_total = $this->model_sale_recurring->getTotalRecurrings($filter_data);
Expand Down Expand Up @@ -263,7 +263,7 @@ protected function getList() {
$pagination = new Pagination();
$pagination->total = $recurrings_total;
$pagination->page = $page;
$pagination->limit = $this->config->get('config_admin_limit');
$pagination->limit = $this->config->get('config_limit_admin');
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url->link('sale/recurring', 'token=' . $this->session->data['token'] . '&page={page}' . $url, 'SSL');

Expand Down
6 changes: 1 addition & 5 deletions upload/catalog/controller/account/wishlist.php
Expand Up @@ -173,8 +173,4 @@ public function add() {
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}

public function remove() {

}
}
}
6 changes: 2 additions & 4 deletions upload/catalog/controller/payment/pp_express.php
Expand Up @@ -64,8 +64,7 @@ public function express() {
$shipping = 1;
}

$max_amount = $this->currency->convert($this->cart->getTotal(), $this->config->get('config_currency'), 'USD');
$max_amount = min($max_amount * 1.5, 10000);
$max_amount = $this->cart->getTotal() * 1.5;
$max_amount = $this->currency->format($max_amount, $this->currency->getCode(), '', false);

$data = array(
Expand Down Expand Up @@ -1274,8 +1273,7 @@ public function checkout() {

$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);

$max_amount = $this->currency->convert($order_info['total'], $this->config->get('config_currency'), 'USD');
$max_amount = min($max_amount * 1.25, 10000);
$max_amount = $this->cart->getTotal() * 1.5;
$max_amount = $this->currency->format($max_amount, $this->currency->getCode(), '', false);

if ($this->cart->hasShipping()) {
Expand Down
6 changes: 1 addition & 5 deletions upload/catalog/controller/product/compare.php
Expand Up @@ -196,8 +196,4 @@ public function add() {
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}

public function remove() {

}
}
}
12 changes: 8 additions & 4 deletions upload/catalog/controller/product/product.php
Expand Up @@ -624,12 +624,16 @@ public function write() {
$json['error'] = $this->language->get('error_rating');
}

if ($this->config->get('config_google_captcha_status')) {
$recaptcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode($this->config->get('config_google_captcha_secret')) . '&response=' . $this->request->post['g-recaptcha-response'] . '&remoteip=' . $this->request->server['REMOTE_ADDR']);
if ($this->config->get('config_google_captcha_status') && empty($json['error'])) {
if (isset($this->request->post['g-recaptcha-response'])) {
$recaptcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode($this->config->get('config_google_captcha_secret')) . '&response=' . $this->request->post['g-recaptcha-response'] . '&remoteip=' . $this->request->server['REMOTE_ADDR']);

$recaptcha = json_decode($recaptcha, true);
$recaptcha = json_decode($recaptcha, true);

if (!$recaptcha['success']) {
if (!$recaptcha['success']) {
$json['error'] = $this->language->get('error_captcha');
}
} else {
$json['error'] = $this->language->get('error_captcha');
}
}
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/language/english/api/order.php
@@ -1,6 +1,6 @@
<?php
// Text
$_['text_success'] = 'You order has been successfully modified orders';
$_['text_success'] = 'Success: You have modified orders!';

// Error
$_['error_permission'] = 'Warning: You do not have permission to access the API!';
Expand Down
Expand Up @@ -69,7 +69,7 @@
<?php } ?>
<?php if ($review_status) { ?>
<div class="tab-pane" id="tab-review">
<form class="form-horizontal">
<form class="form-horizontal" id="form-review">
<div id="review"></div>
<h2><?php echo $text_write; ?></h2>
<?php if ($review_guest) { ?>
Expand Down Expand Up @@ -570,7 +570,7 @@ $('#button-review').on('click', function() {
url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
type: 'post',
dataType: 'json',
data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : ''),
data: $("#form-review").serialize(),
beforeSend: function() {
$('#button-review').button('loading');
},
Expand Down

0 comments on commit c827434

Please sign in to comment.