Questions tagged [getresource]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5 votes
2 answers
3k views

getResource is deprecated, what is the alternative?

getResource() is deprecated so my question is what do I need to use instead to be future proof for next updates. I use this function like below in the catalog list.phtml $seedBank = $_product->...
  • 381
1 vote
0 answers
306 views

Magento 2.2.2 Uncaught Error: Call to undefined method Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend\Interceptor::getResource(

Magento 2.2.2 I created a Magento 2 shop and I keep getting the mentioned error (full error https://pastebin.com/rfH2R1Aa). I also cleared the cache, recompiled, redeployed, deleted generated folder....
  • 912
2 votes
1 answer
43 views

Difference between $this->getData() or $this->getResource()

In my Collection.php when i get the collection by $this->getData() is give me collection. But it create some other problem for me . Now i use $this->getResource() then problem solved But it ...
  • 1,525