magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Loading abandoned quote problem when product is deleted. #197

Open adarshkhatri opened 5 years ago

adarshkhatri commented 5 years ago

I don't think this is a bug. But something that is troubling me.

Summary (*)

I am developing an extension to load and do some business logic with an old abandoned quote. When loading some of the quotes it gives me an exception, The product that was requested doesn't exist. Verify the product and try again. I know this is due to product in that cart is deleted already.

I see that calling this method Magento\Quote\Model\Quote::loadByIdWithoutStore($quote_id), it then tries to collect totals, then it looks for all the products, then it fails and throws an exception from CatalogRepository class.

Examples (*)

Load any old abandoned quote. At least one product of that quote must be deleted before loading.

Proposed solution

Allow loading the quote.

m2-assistant[bot] commented 5 years ago

Hi @adarshkhatri. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

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

@adarshkhatri do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?


m2-assistant[bot] commented 5 years ago

Hi @engcom-Charlie. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

m2-assistant[bot] commented 5 years ago

Hi @sdzhepa. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Charlie commented 5 years ago

Hi @sdzhepa This issue looks like a feature request. Can you transfer this issue to the feature request repository?

sdzhepa commented 5 years ago

Hello @adarshkhatri

Thank you for feedback and your proposal!

Based on the description and label feature request the issue has been transferred to Magento Feature Request public repo.