Skip to main content
added 6 characters in body
Source Link
Aasim Goriya
  • 5.5k
  • 2
  • 29
  • 53

I have a custom eav structure and there is store_id save in array format in the database field.

I need to filer collection with addFieldToFilter with store_id.

$collection = $this->xyzCollectionFactory->create();
$collection->addFieldToFilter('store_id', ['in' => $this->storeManager->getStore()->getId()]);

Data storeDatastore in the database below format

["1","2","8","3","4","5"]

this filter is not working, any one haveanyone has an idea how can iI do that?

I have custom eav structure and there is store_id save in array format in database field.

I need to filer collection with addFieldToFilter with store_id.

$collection = $this->xyzCollectionFactory->create();
$collection->addFieldToFilter('store_id', ['in' => $this->storeManager->getStore()->getId()]);

Data store in the database below format

["1","2","8","3","4","5"]

this filter is not working, any one have idea how can i do that?

I have a custom eav structure and there is store_id save in array format in the database field.

I need to filer collection with addFieldToFilter with store_id.

$collection = $this->xyzCollectionFactory->create();
$collection->addFieldToFilter('store_id', ['in' => $this->storeManager->getStore()->getId()]);

Datastore in the database below format

["1","2","8","3","4","5"]

this filter is not working, anyone has an idea how can I do that?

added 76 characters in body
Source Link
Mage2 Developer
  • 1.5k
  • 1
  • 18
  • 37

I have custom eav structure and there is store_id save in array format in database field.

I need to filer collection with addFieldToFilter with store_id.

$collection = $this->xyzCollectionFactory->create();
$collection->addFieldToFilter('store_id', ['in' => $this->storeManager->getStore()->getId()]);

Data store in the database below format

["1","2","8","3","4","5"]

this filter is not working, any one have idea how can i do that?

I have custom eav structure and there is store_id save in array format in database field.

I need to filer collection with addFieldToFilter with store_id.

$collection = $this->xyzCollectionFactory->create();
$collection->addFieldToFilter('store_id', ['in' => $this->storeManager->getStore()->getId()]);

this filter is not working, any one have idea how can i do that?

I have custom eav structure and there is store_id save in array format in database field.

I need to filer collection with addFieldToFilter with store_id.

$collection = $this->xyzCollectionFactory->create();
$collection->addFieldToFilter('store_id', ['in' => $this->storeManager->getStore()->getId()]);

Data store in the database below format

["1","2","8","3","4","5"]

this filter is not working, any one have idea how can i do that?

Source Link
Mage2 Developer
  • 1.5k
  • 1
  • 18
  • 37

Magento 2 + custom eav field value store in array

I have custom eav structure and there is store_id save in array format in database field.

I need to filer collection with addFieldToFilter with store_id.

$collection = $this->xyzCollectionFactory->create();
$collection->addFieldToFilter('store_id', ['in' => $this->storeManager->getStore()->getId()]);

this filter is not working, any one have idea how can i do that?