Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed rating issue website wise #18888

Merged

Conversation

saphaljha
Copy link
Contributor

Description (*)

Fixed rating issue website wise.

Fixed Issues (if relevant)

  1. Backend issue : "ratings isn't available" website wise #18192: Backend issue : "ratings isn't available" website wise

Manual testing scenarios (*)

N/A

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @saphaljha. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me $VERSION instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@orlangur
Copy link
Contributor

@saphaljha get rid of useless merge commits, please.

@VladimirZaets VladimirZaets self-assigned this Oct 28, 2018
/**
* @var \Magento\Framework\App\State
*/
protected $_state;
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, @saphaljha, due to Magento Technical guidelines we can't introduce protected properties. All new properties should be private.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @VladimirZaets , Thank you for your guidance, I'll check and update it asap.

@@ -48,12 +54,14 @@ public function __construct(
\Magento\Framework\Module\Manager $moduleManager,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Review\Model\ResourceModel\Review\Summary $reviewSummary,
\Magento\Framework\App\State $state,
Copy link
Contributor

Choose a reason for hiding this comment

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

Due to Magento backward-compatible guide we can't add new required parameters to constructor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @VladimirZaets , I'll check and update it asap.

@@ -425,9 +433,11 @@ public function getReviewSummary($object, $onlyForCurrentStore = true)

$data = $connection->fetchAll($select, [':review_id' => $object->getReviewId()]);

$currentStore = ($this->_state->getAreaCode() == "adminhtml") ? false : $this->_storeManager->getStore()->getId();
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should use an existing constant for providing area name.
Also, please use NULL instead of false, we shouldn't mix types of variable. Store id is number or null type, but not false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @VladimirZaets , I'll check and update it asap.

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-3486 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

@saphaljha thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@magento-engcom-team
Copy link
Contributor

Hi @saphaljha. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants