Skip to content

Instantly share code, notes, and snippets.

@mrtuvn
Last active June 18, 2019 15:17
Show Gist options
  • Save mrtuvn/be95de91798f0cfde55318cd9be8e6c8 to your computer and use it in GitHub Desktop.
Save mrtuvn/be95de91798f0cfde55318cd9be8e6c8 to your computer and use it in GitHub Desktop.
PdfPro Fix storeview
<?php
namespace Vnecoms\PdfPro\Model\ResourceModel\Key;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
class Collection extends AbstractCollection
{
protected function _construct()
{
$this->_init('Vnecoms\PdfPro\Model\Key', 'Vnecoms\PdfPro\Model\ResourceModel\Key');
}
protected function _afterLoad()
{
parent::_afterLoad();
foreach ($this->_items as $item) {
$item->setData('store_ids', explode(',', $item->getData('store_ids')));
}
return $this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment