Skip to content

Commit

Permalink
Minor bugfixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
arunas-stonis committed May 13, 2022
1 parent 503d04e commit 4af52e0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Block/Success.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(
Data $helper,
OrderData $orderData,
TrustpilotLog $trustpilotLog,
array $data = [],
array $data,
TrustpilotPluginStatus $pluginStatus)
{
$this->_salesFactory = $salesOrderFactory;
Expand Down
2 changes: 1 addition & 1 deletion Block/Trustbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function loadCategoryProductInfo($scope, $storeId, $category = null) {
$block = $this->getLayout()->getBlock('category.products.list');
$products = $block->getLoadedProductCollection();
} else {
$products = $cat->getProductCollection();
$products = $category->getProductCollection();
}
return $this->_helper->loadCategoryProductInfo($products, $scope, $storeId);
} catch(\Throwable $e) {
Expand Down
8 changes: 4 additions & 4 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ private function getDefaultConfigValues($key)

public function getWebsiteOrStoreId()
{
if (strlen($this->_request->getParam('store'))) {
if ($this->_request->getParam('store') !== null && strlen($this->_request->getParam('store'))) {
return (int) $this->_request->getParam('store', 0);
}
if (strlen($this->_request->getParam('website'))) {
if ($this->_request->getParam('website') !== null && strlen($this->_request->getParam('website'))) {
return (int) $this->_request->getParam('website', 0);
}
if ($this->isAdminPage() && $this->_storeManager->getStore()->getWebsiteId()) {
Expand All @@ -148,11 +148,11 @@ public function getWebsiteOrStoreId()
public function getScope()
{
// user is on the admin store level
if (strlen($this->_request->getParam('store'))) {
if ($this->_request->getParam('store') !== null && strlen($this->_request->getParam('store'))) {
return StoreScopeInterface::SCOPE_STORES;
}
// user is on the admin website level
if (strlen($this->_request->getParam('website'))) {
if ($this->_request->getParam('website') !== null && strlen($this->_request->getParam('website'))) {
return StoreScopeInterface::SCOPE_WEBSITES;
}
// is user is on admin page, try to automatically detect his website scope
Expand Down
2 changes: 1 addition & 1 deletion Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Config
const TRUSTPILOT_GENERAL_CONFIGURATION = 'general';
const TRUSTPILOT_TRUSTBOX_CONFIGURATION = 'trustbox';
const TRUSTPILOT_INTEGRATION_KEY = 'key';
const TRUSTPILOT_PLUGIN_VERSION = '2.6.566';
const TRUSTPILOT_PLUGIN_VERSION = '2.6.572';
const TRUSTPILOT_SCRIPT = 'TrustpilotScriptUrl';
const TRUSTPILOT_INTEGRATION_APP = 'IntegrationAppUrl';
const TRUSTPILOT_WIDGET_SCRIPT = 'WidgetScriptUrl';
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "trustpilot/module-reviews",
"description": "The Trustpilot Review extension makes it simple and easy for merchants to collect reviews from their customers to power their marketing efforts, increase sales conversion, build their online reputation and draw business insights.",
"type": "magento2-module",
"version": "2.6.566",
"version": "2.6.572",
"license": [
"OSL-3.0"
],
Expand Down

0 comments on commit 4af52e0

Please sign in to comment.