Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $bestsalecollection = $this->_collectionFactory->create()->setModel(
- MagentoCatalogModelProduct::class
- )->addStoreFilter(
- $storeId
- );
- $productCollection = $this->productcollectionFactory->create();
- $sellercollection=$productCollection->addFieldToFilter('current_user_id',array('eq'=>1));
- $filter_product=[];
- foreach ($sellercollection as $allProduct){
- foreach ($bestsalecollection as $bestSale){
- if($allProduct->getEntityId()==$bestSale->getProductId()){
- $filter_product[]=$bestSale;
- }
- }
- }
- $this->_logger->info(print_r($bestSale->getData(),true)); $this->setCollection($filter_product);
- return parent::_prepareCollection();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement