Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/opencart/opencart
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkerr committed May 13, 2024
2 parents f58aa27 + 2ca60a4 commit 1cd3c2f
Show file tree
Hide file tree
Showing 396 changed files with 4,891 additions and 2,448 deletions.
77 changes: 42 additions & 35 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions upload/admin/controller/catalog/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ public function form(): void {
if ($category_info) {
$data['product_categories'][] = [
'category_id' => $category_info['category_id'],
'name' => ($category_info['path']) ? $category_info['path'] . ' > ' . $category_info['name'] : $category_info['name']
'name' => ($category_info['path'] ? $category_info['path'] . ' > ' . $category_info['name'] : $category_info['name'])
];
}
}
Expand Down Expand Up @@ -944,8 +944,8 @@ public function form(): void {
'quantity' => $product_discount['quantity'],
'priority' => $product_discount['priority'],
'price' => $product_discount['price'],
'date_start' => ($product_discount['date_start'] != '0000-00-00') ? $product_discount['date_start'] : '',
'date_end' => ($product_discount['date_end'] != '0000-00-00') ? $product_discount['date_end'] : ''
'date_start' => ($product_discount['date_start'] != '0000-00-00' ? $product_discount['date_start'] : ''),
'date_end' => ($product_discount['date_end'] != '0000-00-00' ? $product_discount['date_end'] : '')
];
}

Expand All @@ -963,8 +963,8 @@ public function form(): void {
'customer_group_id' => $product_special['customer_group_id'],
'priority' => $product_special['priority'],
'price' => $product_special['price'],
'date_start' => ($product_special['date_start'] != '0000-00-00') ? $product_special['date_start'] : '',
'date_end' => ($product_special['date_end'] != '0000-00-00') ? $product_special['date_end'] : ''
'date_start' => ($product_special['date_start'] != '0000-00-00' ? $product_special['date_start'] : ''),
'date_end' => ($product_special['date_end'] != '0000-00-00' ? $product_special['date_end'] : '')
];
}

Expand Down
8 changes: 4 additions & 4 deletions upload/admin/controller/event/statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
class Statistics extends \Opencart\System\Engine\Controller {
/**
* addReview
* Add Review
*
* @param string $route
* @param array<int, mixed> $args
Expand All @@ -24,7 +24,7 @@ public function addReview(string &$route, array &$args, &$output): void {
}

/**
* deleteReview
* Delete Review
*
* @param string $route
* @param array<int, mixed> $args
Expand All @@ -41,7 +41,7 @@ public function deleteReview(string &$route, array &$args, &$output): void {
}

/**
* addReturn
* Add Return
*
* @param string $route
* @param array<int, mixed> $args
Expand All @@ -58,7 +58,7 @@ public function addReturn(string &$route, array &$args, &$output): void {
}

/**
* deleteReturn
* Delete Return
*
* @param string $route
* @param array<int, mixed> $args
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{% endfor %}
</div>
<ul class="nav nav-tabs">
<li class="nav-item"><a href="#tab-description" class="nav-link active" data-bs-toggle="tab">{{ tab_general }}</a></li>
<li class="nav-item"><a href="#tab-description" class="nav-link active" data-bs-toggle="tab">{{ tab_description }}</a></li>
<li class="nav-item"><a href="#tab-documentation" class="nav-link" data-bs-toggle="tab">{{ tab_documentation }}</a></li>
<li class="nav-item"><a href="#tab-download" class="nav-link" data-bs-toggle="tab">{{ tab_download }}</a></li>
<li class="nav-item"><a href="#tab-comment" class="nav-link" data-bs-toggle="tab">{{ tab_comment }} ({{ comment_total }})</a></li>
Expand Down
2 changes: 1 addition & 1 deletion upload/admin/view/template/user/api_form.twig
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ $('#session button').on('click', function(e) {
var element = this;
$.ajax({
url: 'index.php?route=user/api.deletesession&user_token={{ user_token }}&api_session_id=' + $(element).val(),
url: 'index.php?route=user/api.deleteSession&user_token={{ user_token }}&api_session_id=' + $(element).val(),
type: 'post',
dataType: 'json',
beforeSend: function() {
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/controller/api/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ public function save(): void {
if (isset($this->request->post['order_status_id'])) {
$order_status_id = (int)$this->request->post['order_status_id'];
} else {
$order_status_id = $this->config->get('config_order_status_id');
$order_status_id = (int)$this->config->get('config_order_status_id');
}

$this->model_checkout_order->addHistory($json['order_id'], $order_status_id);
Expand Down Expand Up @@ -1205,7 +1205,7 @@ public function confirm(): void {
if (isset($this->request->post['order_status_id'])) {
$order_status_id = (int)$this->request->post['order_status_id'];
} else {
$order_status_id = $this->config->get('config_order_status_id');
$order_status_id = (int)$this->config->get('config_order_status_id');
}

$this->model_checkout_order->addHistory($json['order_id'], $order_status_id);
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/model/setting/store.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function getStores(): array {
*
* @return \Opencart\System\Engine\Registry
*/
public function createStoreInstance(string $session_id = ''): \Opencart\System\Engine\Registry {
public function createStoreInstance(int $store_id = 0, string $language = '', string $session_id = ''): \Opencart\System\Engine\Registry {
// Autoloader
$this->autoloader->register('Opencart\Catalog', DIR_CATALOG);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class FreeCheckout extends \Opencart\System\Engine\Model {
/**
* Get Methods
*
* @param array<mixed> $address
* @param array<string, mixed> $address
*
* @return array<string, mixed>
*/
Expand Down
2 changes: 1 addition & 1 deletion upload/system/engine/action.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(string $route) {
}

/**
* getId
* Get Id
*
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion upload/system/engine/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Config {
private array $data = [];

/**
* addPath
* Add Path
*
* @param string $namespace
* @param string $directory
Expand Down
4 changes: 2 additions & 2 deletions upload/system/library/cart/cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ public function __construct(\Opencart\System\Engine\Registry $registry) {

if ($this->customer->isLogged()) {
// We want to change the session ID on all the old items in the customers cart
$this->db->query("UPDATE `" . DB_PREFIX . "cart` SET `session_id` = '" . $this->db->escape($this->session->getId()) . "' AND `date_added` = NOW() WHERE `store_id` = '" . (int)$this->config->get('config_store_id') . "' AND `customer_id` = '" . (int)$this->customer->getId() . "'");
$this->db->query("UPDATE `" . DB_PREFIX . "cart` SET `session_id` = '" . $this->db->escape($this->session->getId()) . "', `date_added` = NOW() WHERE `store_id` = '" . (int)$this->config->get('config_store_id') . "' AND `customer_id` = '" . (int)$this->customer->getId() . "'");

// Once the customer is logged in we want to update the customers cart
$this->db->query("UPDATE `" . DB_PREFIX . "cart` SET `customer_id` = '" . (int)$this->customer->getId() . "' AND `date_added` = NOW() WHERE `store_id` = '" . (int)$this->config->get('config_store_id') . "' AND `customer_id` = '0' AND `session_id` = '" . $this->db->escape($this->session->getId()) . "'");
$this->db->query("UPDATE `" . DB_PREFIX . "cart` SET `customer_id` = '" . (int)$this->customer->getId() . "', `date_added` = NOW() WHERE `store_id` = '" . (int)$this->config->get('config_store_id') . "' AND `customer_id` = '0' AND `session_id` = '" . $this->db->escape($this->session->getId()) . "'");
}

// Populate the cart data
Expand Down
2 changes: 1 addition & 1 deletion upload/system/library/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(string $code) {
}

/**
* addPath
* Add Path
*
* @param string $namespace
* @param string $directory
Expand Down

0 comments on commit 1cd3c2f

Please sign in to comment.