Skip to content

Commit

Permalink
Merge pull request opencart#179 from ocshop/master
Browse files Browse the repository at this point in the history
догоняем оригинал
  • Loading branch information
ocshop committed Nov 27, 2015
2 parents 10d800b + e4c72fa commit bf0b0ec
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 24 deletions.
2 changes: 2 additions & 0 deletions upload/catalog/controller/account/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public function index() {
$this->response->redirect($this->url->link('account/success'));
}

$this->load->language('account/register');

$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = array(
Expand Down
2 changes: 2 additions & 0 deletions upload/catalog/controller/account/return.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ public function add() {
$this->response->redirect($this->url->link('account/return/success', '', true));
}

$this->load->language('account/return');

$this->document->setTitle($this->language->get('heading_title'));
$this->document->setRobots('noindex,follow');
$this->document->addScript('catalog/view/javascript/jquery/datetimepicker/moment.js');
Expand Down
2 changes: 2 additions & 0 deletions upload/catalog/controller/affiliate/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public function index() {
$this->response->redirect($this->url->link('affiliate/success'));
}

$this->load->language('affiliate/register');

$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = array(
Expand Down
2 changes: 2 additions & 0 deletions upload/catalog/controller/information/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public function index() {
$this->response->redirect($this->url->link('information/contact/success'));
}

$this->load->language('information/contact');

$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = array(
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/model/total/voucher.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public function getVoucher($code) {
$implode[] = "'" . (int)$order_status_id . "'";
}

$order_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order` WHERE order_id = '" . (int)$voucher_query->row['order_id'] . "' AND order_status_id IN(" . implode(",", $implode) . ")");
$order_query = $this->db->query("SELECT order_id FROM `" . DB_PREFIX . "order` WHERE order_id = '" . (int)$voucher_query->row['order_id'] . "' AND order_status_id IN(" . implode(",", $implode) . ")");

if (!$order_query->num_rows) {
$status = false;
}

$order_voucher_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_voucher` WHERE order_id = '" . (int)$voucher_query->row['order_id'] . "' AND voucher_id = '" . (int)$voucher_query->row['voucher_id'] . "'");
$order_voucher_query = $this->db->query("SELECT order_voucher_id FROM `" . DB_PREFIX . "order_voucher` WHERE order_id = '" . (int)$voucher_query->row['order_id'] . "' AND voucher_id = '" . (int)$voucher_query->row['voucher_id'] . "'");

if (!$order_voucher_query->num_rows) {
$status = false;
Expand Down
32 changes: 10 additions & 22 deletions upload/system/library/cart/currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,39 +65,27 @@ public function format($number, $currency = '', $value = '', $format = true) {
$currency = $this->code;
}

if ($value) {
$value = $value;
} else {
if (!$value) {
$value = $this->currencies[$currency]['value'];
}

if ($value) {
$value = (float)$number * $value;
} else {
$value = $number;
$amount = $value ? (float)$number * $value : (float)$number;

$amount = round($amount, (int)$decimal_place);

if (!$format) {
return $amount;
}

$string = '';

if (($symbol_left) && ($format)) {
if ($symbol_left) {
$string .= $symbol_left;
}

if ($format) {
$decimal_point = $this->language->get('decimal_point');
} else {
$decimal_point = '.';
}

if ($format) {
$thousand_point = $this->language->get('thousand_point');
} else {
$thousand_point = '';
}

$string .= number_format(round($value, (int)$decimal_place), (int)$decimal_place, $decimal_point, $thousand_point);
$string .= number_format($amount, (int)$decimal_place, $this->language->get('decimal_point'), $this->language->get('thousand_point'));

if (($symbol_right) && ($format)) {
if ($symbol_right) {
$string .= $symbol_right;
}

Expand Down

0 comments on commit bf0b0ec

Please sign in to comment.