This question is marked as duplicate. But after see the answer it is also duplicate

Get product collection by category id on phtml file magento2

Original answer

Create product collection in PHTML with filter based on Category ID

what should do regarding this kind of behavior from user?

In my opinion you must mention the Original author..

2 Answers 2


Flag for moderators attention, they will decide if it's plagiarism and can delete the answer. As the original question already has the same answer this answer does not add any value anyways, even if it's the same by accident.


I think you must gives credits to the original author as well as you must give link to the original answer, so original user get credits.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .