Timeline for How to get Custom Model in a block that extends Block \Magento\Catalog\Block\Product\View?
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 23, 2015 at 10:56 | comment | added | Reena Parekh | ok pls use updated construct function.. most probably that should work but if that doesnt work either then sorry i cant figure out what is causing the problem. | |
Nov 23, 2015 at 10:55 | history | edited | Reena Parekh | CC BY-SA 3.0 |
added 1007 characters in body
|
Nov 23, 2015 at 10:44 | comment | added | xanka |
This error [2015-11-23 17:39:17] main.CRITICAL: Recoverable Error: Argument 2 passed to Myaddon\CustomProduct\Block\Product\Custom::__construct() must be an instance of Myaddon\CustomProduct\Model\CustomProductFactory, instance of Magento\Framework\Url\Encoder given, called in C:\localhost\magento2-2.0.0-rc\var\generation\Myaddon\CustomProduct\Block\Product\Custom\Interceptor.php on line 14 and defined in C:\localhost\magento2-2.0.0-rc\app\code\Myaddon\CustomProduct\Block\Product\Custom.php on line 24 [] []
|
|
Nov 23, 2015 at 10:41 | comment | added | xanka | i try this. but get error same with __construct() CustomProductFactory $_customProduct. | |
Nov 23, 2015 at 10:41 | history | edited | Reena Parekh | CC BY-SA 3.0 |
added 712 characters in body
|
Nov 23, 2015 at 10:35 | history | edited | Reena Parekh | CC BY-SA 3.0 |
added 712 characters in body
|
Nov 23, 2015 at 10:29 | history | edited | Reena Parekh | CC BY-SA 3.0 |
added 97 characters in body
|
Nov 23, 2015 at 10:23 | comment | added | xanka | tks you. $this->customProduct must be an instance of Myaddon\CustomProduct\Model\CustomProduct. if not declare $this->customProduct->getCollection() return? | |
Nov 23, 2015 at 10:11 | history | answered | Reena Parekh | CC BY-SA 3.0 |