Skip to content

Conversation

@neeta-wagento
Copy link
Contributor

@neeta-wagento neeta-wagento commented Jun 5, 2018

Original Pull Request

#11869

While Getting Collection of Quote Item using Magento\Quote\Model\ResourceModel\QuoteItem\Collection::getItems() was throwing Fatal error: Uncaught Error: Call to a member function getStoreId() on null in C:\www\magento2\vendor\magento\module-quote\Model\ResourceModel\Quote\Item\Collection.php:98
because of used of injected class.

Description

I have used injected class \Magento\Quote\Model\ResourceModel\Quote\Item\Option\CollectionFactory's getStoreId() method.

It seems working fine with Load Quote Item Collection using Magento\Quote\Model\ResourceModel\QuoteItem\Collection::getItems()
$quoteItemCollection = $this->quoteItemCollectionFactory->create()->getItems();

Fixed Issues (if relevant)

  1. magento/magento2#<8954>: Error While Trying To Load Quote Item Collection Using Magento\Quote\Model\ResourceModel\QuoteItem\Collection::getItems() Error While Trying To Load Quote Item Collection Using Magento\Quote\Model\ResourceModel\QuoteItem\Collection::getItems() #8954

  2. . https://github.com/magento/magento2/issues/8954

Manual testing scenarios

  1. ... Inject class Magento\Quote\Model\ResourceModel\QuoteItem\Collection $quoteItemCollectionFactory
  2. ... $quoteItemCollection = $this->quoteItemCollectionFactory->create()->getItems();
    It will return array as expected result.

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)

…o\Quote\Model\ResourceModel\QuoteItem\Collection::getItems()
Resolve Space Issue
@magento-engcom-team
Copy link
Contributor

Hi @neeta-wagento. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.1.15 release.

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

Labels

Component: Quote Partner: Wagento Pull Request is created by partner Wagento partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants